how to get some variables in a certain range

Asked by ytang

Hi All,

recently, I want to get some variables in a certain range. For instance, fabric tensor, and coordination number.

I know if we want to get these variables for the whole sample we can use some commands like the following:

yade.utils. avgNumInteractions

yade._utils.fabricTensor

for these two commands, there is nothing thing related to the dimensions, which means I cannot get these variables by using these commands. I also looked at the document, it seems there are no special commands can do this.

so if I want to get these variables at some local range in my sample. Do I need to write the python code to get the fabric tensor by using its definition? or there is another way I didn't find it?

thanks in advance,
Yong

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Best Jan Stránský (honzik) said :
#1

Hello,

writing your own functions (either in python or c++) is probably the only option if there is no builtin functionality..

An ugly hack (not tested) would be to save the simulation, load separately, delete all particles outside region of interest and then call these "global" functions.
Then you can return to your original simulation.

cheers
Jan

Revision history for this message
ytang (ytang116) said :
#2

Thanks Jan Stránský, that solved my question.