Question #690741 on Yade changed:
https://answers.launchpad.net/yade/+question/690741

    Status: Open => Answered

Jan Stránský proposed the following answer:
> because the output file was empty.

the output file was empty because there was the error

> I have already used 'plot.addData' in the 'history' function of my
code (find it on my question please)

you have defined 'history' function and used 'plot.addData', but we have
no idea what you do with 'history' without a MWE (find it on [1]
please). One option is that it is never called (or even not used in the
code at all in an extreme case).

> and have never had a problem ... have never been empty at the end.
This time I just changed some properties such as the number of particles
and did not expect to face this error as I think it should have nothing
to do with those properties.

again, without MWE we can just guess..
The parameters certainly influences the simulation, maybe stop conditions, 
maybe simulation time etc. Maybe also influencing the history function calls.

> I just changed the line to the following to see if I get the error again or 
> not.
> plot.saveDataTxt('Macro_results.txt',vars=('e11','e22','e33','ev','s11','s22','s33','i','t','fab'))

plot.saveDataTxt saves all variables by default, so I doubt this change would 
make it better..
I really suggest also printing the plot.data value (to be sure if the problem 
is because of empty plot.data or other problem).


One simple solution is to save the data directly in 'history' function, then 
you do not need to save it at the end and you have at least something in case 
something went wrong during the run.
(Assuming that the frequency and amount of saved data does not take significant 
time of the simulation)

cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to