how to get some variables in a certain range

Asked by nobody on 2019-11-13

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:
2019-11-14
Last query:
2019-11-14
Last reply:
2019-11-13
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

nobody (nobody01) said : #2

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