yade-users team mailing list archive
Mailing list archive
Re: Successive slightly different simulations
> Does someone have an idea ? Could python scripts (which I don't know at
> all but it will maybe be the time) help for that ?
Hi, yes, you can use python for just this.
I will give you an example of using different loading speeds (you can
chage to suit your needs). Label the engine you of which parameters you
will modify (Engine::label) e.g. 'jeromeEngine' (not necessary, but
makes it easiest to find the engine).
# create the simulation here, save it
# or do nothing it it is already created and saved
# loop over different loading modes
for mode in ['mode1','mode2','mode3']:
# load the original state
# get the engine you want to modify
# change engine parameters depending on the loading mode
# run 1000 iterations and wait (True) until they are done
# you could use different criterion of when to stop, but this one is
the simplest since it is known beforehand
# print/save the results you need here
# for example, an internal variable of your engine
# or force actiong on body #50
Save the script as something.py and run with yade-trunk something.py.
Get back with questions, Janek already suggested creating a section of
python code snippets on the wiki, but this hasn't started yet.
Yade-users mailing list