NRotElasticPrms Basic Questions

Asked by Grady

Hello everyone,

I have some basic questions about the NRotElasticPrms interaction group. Sorry if any of these are repeated questions but, I didn't see them in other threads.

1. The parameter provided for NRotElasticPrms is a normal stiffness "Normalk". When I look at the class information for NRotElasticPrms, it says that Normalk is the spring constant used when calculating linear elastic normal force. It also says that if scaling = true (default) that the stiffness is scaled according to particle size. How exactly is the stiffness scaled? I assume that if the stiffness is scaled then "Normalk" acts as a modulus of elasticity and the scaling comes in the area and length used to calculate the stiffness. I'm just having trouble finding in the code an exact formula for this procedure.

2. If I want to look at the .cpp file for NRotElasticPrms, How do I find it? I looked through the classes at http://www.access.edu.au/esys-particle_doxygen_doc/snapshot/html/annotated.html
but, I could not find the .cpp file relating specifically to NRotElasticPrms.

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Solved by:
Grady
Solved:
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Vince Boros (v-boros) said :
#2

Hello Grady:

1. You can find code for the scaling in Model/ElasticInteraction.cpp. Look at the CElasticInteraction constructor where the "spring constant" is modified by a factor that is the average of the two particles' radiuses.

2. Taking for example the name NRotElasticPrms, which you use in a Python script to access the C++ code, look in the Doxygen documentation for NRotElasticPrmsPy, which is the equivalent C++ function: click Classes -> Class List and search the right pane, where esys::lsm::NRotElasticPrmsPy is described as a "Wrapper for CElasticIGP". Clicking on esys::lsm::NRotElasticPrmsPy takes you to a "Class Reference" page at the bottom of which is a list of files that NRotElasticPrmsPy (and by consequence NRotElasticPrms) appears in, including Python/esys/lsm/InteractionParamsPy.cpp. If you go back to the class list page and click on CElasticIGP in the description for esys::lsm::NRotElasticPrmsPy, you will find at the bottom of this page a list of files that CElasticIGP appears in, including Model/ElasticInteraction.cpp. Above this you will see that CElasticIGP::m_scaling is referenced by CElasticInteraction::CElasticInteraction().

I did not originally find the code in this fashion, instead using "grep". Once I had traced NRotElasticPrms(Py) back to CElasticIGP in Model/ElasticInteraction.cpp, it was easy enough to find the CElasticInteraction constructor and the code you are chasing. You can find all the C++ files that implement the models in Model/, and the C++ files for producing the Python API under Python/esys/lsm/.

Regards,

Vince

Revision history for this message
Grady (mathewsg) said :
#3

Thank you, that answered my question.