Question #688060 on Yade changed:
https://answers.launchpad.net/yade/+question/688060
Status: Answered => Solved
ehsan benabbas confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.
--
You received this question notification because your team yade-users is
an
Question #688060 on Yade changed:
https://answers.launchpad.net/yade/+question/688060
Status: Open => Answered
Jan Stránský proposed the following answer:
something like:
###
with open(fileName,"w") as f:
f.write("# cpx cpy cpz fnx fny fnz ...\n")
for d in data: # or directly for i in
Question #688060 on Yade changed:
https://answers.launchpad.net/yade/+question/688060
Status: Answered => Open
ehsan benabbas is still having a problem:
Thank you so much Jan. Tha solved my problem. Is there any way to print
those in a txt file like in a x_y_z_r format? something like that?
Question #688060 on Yade changed:
https://answers.launchpad.net/yade/+question/688060
Status: Open => Answered
Jan Stránský proposed the following answer:
> but it's just a line
yes, it is a data saved in JSON format. Completely satisfying the
requirement "save them in a text file"
> this
Question #688060 on Yade changed:
https://answers.launchpad.net/yade/+question/688060
Status: Answered => Open
ehsan benabbas is still having a problem:
Thank you Jan
I added as a last line of the loop (right after "d =
dict(cp=cp,normal=normal,branch=branch,fn=fn,fs=fs)")
The txt file is
Question #688060 on Yade changed:
https://answers.launchpad.net/yade/+question/688060
Status: Open => Answered
Jan Stránský proposed the following answer:
sorry, since you save "data" variable, you should feed it with the data (which
I missed in the answer). Just add
data.append(d)
at the
Question #688060 on Yade changed:
https://answers.launchpad.net/yade/+question/688060
Status: Needs information => Open
ehsan benabbas gave more information on the question:
Hi Jan, Thanks for your helps
This is the code:
from yade import pack
Question #688060 on Yade changed:
https://answers.launchpad.net/yade/+question/688060
Status: Open => Needs information
Jan Stránský requested more information:
> and made no changes
> Friction: 28.5 porosity: 1.0
the printing is commented in the original script, so you must have done
some
Question #688060 on Yade changed:
https://answers.launchpad.net/yade/+question/688060
Status: Answered => Open
ehsan benabbas is still having a problem:
Jan thank you for your answer.
When I add these commands at the end of [1], the txt file is empty and
just contains "[]" .
The output is
Question #688060 on Yade changed:
https://answers.launchpad.net/yade/+question/688060
Status: Open => Answered
Jan Stránský proposed the following answer:
1) plot module is not suitable for this kind of savings (also the usage
in the script is wrong)
"for i in O.interactions" was there to
Question #688060 on Yade changed:
https://answers.launchpad.net/yade/+question/688060
Description changed to:
Hi everyone,
I am using Ubuntu 18.04, and Yade 2019-08-08.git-775ae74
I use the Triaxial code by Bruno Chareyre [1]
[1]
11 matches
Mail list logo