Reruning the model in one simulation

Asked by Najm on 2020-11-01

Hi,

I have a model simple model (comprising of spheres connected with springs). I want to run this model several times in the following manner:
1). Apply a force to certain nodes and get the reaction forces and new displacement
2). Have all the nodes return to the original position
3). Apply a force to certain nodes (different from 1) and get the reaction forces and new displacement
4) have all the nodes return to the original position
5) ....
and so on.
Ideally I want this to be as one script and not create multiple scripts and then combining the result. Is there a way of doing this? If I can know how to reset the model (bring all the nodes in the initial position and have no residual forces), I can create functions based on iteration numbers and script it.

Thank you so much for your help.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Najm
Solved:
2020-11-03
Last query:
2020-11-03
Last reply:
2020-11-01

This question was reopened

Jan Stránský (honzik) said : #1

Hello,

you have several options. You can use:
- batch execution [1]
- O.saveTmp / O.loadTmp [2,3]
- simple for loop with O.reset [4] at the beginning
- create external script controlling the running, resetting, ... "one script"
- ... ?

cheers
Jan

[1] https://yade-dem.org/doc/user.html#batch-queuing-and-execution-yade-batch
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.saveTmp
[3] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.loadTmp
[4] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.reset

Jan Stránský (honzik) said : #2

Btw, please read [5], from comment #10 below
cheers
Jan

[5] https://answers.launchpad.net/yade/+question/693640

Najm (mrhappy) said : #3

Thank you so much for your help. Let me explore these options.
With regards to my user name: Mr.Happy, I totally understand. I will create a new account with a more serious name. Thanks for pointing that out.

Best!

Jan Stránský (honzik) said : #4

> I will create a new account

try first renaming the existing account