different result after scenetostring
Hi:
I noticed that the results of my simulation is different if I use 'scenetostring' and 'stringtoscene' (I also tested save and load). I generated a periotric cell and change to strain from (0,0,0,0,0,0,0,0,0) to (0,0,0,
Here are my codes:
from libyade import yade
from yade import*
from yade import pack, Vector3, Vector3, utils
from minieigen import Vector3, Matrix3, Matrix6
def randomPeriPack(
O.switchScene(); O.resetThisScene()
sp=pack.
O.periodic=True
O.cell.
sp.makeCloud(
O.engines=
O.materials.
for s in sp: O.bodies.
O.dt=utils.
O.timingEnable
O.run(); O.wait()
for b in O.bodies: b.state.pos = O.cell.
ret=pack.
ret.fromSimula
O.switchScene()
return ret
young = 4e6
O.materials.
sp = randomPeriPack(
sp.toSimulation()
O.engines = [
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
NewtonIntegrat
]
O.dt = 0.
O.step()
O.dt = 0.0002
is2aabb.
ss2d3dg.
Strain1 = Matrix3(
Strain2 = Matrix3(
I = Matrix3.Identity
trsf1 = Strain1+I
trsf2 = Strain2+I
v1 = (trsf1-
O.cell.velGrad = v1
O.run(500,True)
print(O.cell.trsf)
scene = O.sceneToString() ####!!!!!
O.stringToScene
v2 = (trsf2-
O.cell.velGrad = v2
O.run(500,True)
print(O.cell.trsf)
print(utils.
If you run the script, I think the result of stress[8] should be -567126, and if you delete the scenetostring and stringtoscene, the result is -733878. My yade version is 2017.01a. Maybe my yade version is relatively old??
Yours,
Joe
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
This question was reopened
- by zhou qian