export data with NaN in two data files
Hi All,
I want to use plot.saveDataTxt command to save data into different files.
the code can run and without errors, but the output data have NaN in these files
here is the code:
#################
from yade import pack, plot,export
import numpy as np
O.bodies.
sp=pack.
sp.makeCloud(
sp.toSimulation()
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
NewtonIntegrat
PyRunner(
PyRunner(
PyRunner(
]
O.dt=.5*
print(len(
def checkUnbalanced():
if unbalancedForce
O.pause()
def addPlotData():
plot.addData(
plot.saveDataT
def coon():
porosity_cal = utils.voxelPoro
CoorN=
plot.addData(
plot.saveDataT
#######
the output of these two files are shown below:
# i CN porosity
2500 nan nan
3000 1.92 0.662186625
5000 nan nan
6000 3.32 0.65279675
7500 nan nan
9000 3.52 0.652999125
####
# i unbalanced
2500 0.527135373123
3000 nan
5000 0.137454303934
6000 nan
7500 0.00701580820745
In the Pyrunner command, I set the iterPeriod to 2500 and 3000. even though I set the iterPeriod to the same, the test files still have NaN.
but I hope the result like this:
##############
# i CN porosity
3000 1.92 0.662186625
6000 3.32 0.65279675
9000 3.52 0.652999125
####
# i unbalanced
2500 0.527135373123
5000 0.137454303934
7500 0.00701580820745
#######
since there is no error, I have no idea why this happens.
best,
yong
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- Last query:
- Last reply: