← Back to team overview

yade-users team mailing list archive

Re: [Question #224128]: How to learn and start a 2D simulation in YADE

 

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

    Status: Answered => Open

Fu zuoguang is still having a problem:
Dear Jan Stránsky :
     Thanks for helping me yesterday, now I can understand the suggestions you gave me, now I have other problems to seek your help, which are as follow:
(1). I can use the order "global" to finish defining the variables(such as "unb","meanS" ) in "### functions defination ###".
(2). I have borrowed "O.cell.setBox(7,7,7)" in my script before generating particles, but unfortunately it does not have some effect.
(3). After initial state determination, I need to achive the second step of my 2D simulation, but firstly I should to inherit the initial state to high-level calculation. So, I make the first attempt at Saving the result in a "Tmp" and read it before the next simulation. The script is like that:

O.dt = 2e-4
O.run()
############################################################
O.saveTmp('init') 
O.loadTmp('init')
triax01=ThreeDTriaxialEngine(
	wall_bottom_id=wallIds[2],wall_top_id=wallIds[3],
	wall_left_id=wallIds[0],wall_right_id=wallIds[1],
	wall_back_id=wallIds[4],wall_front_id=wallIds[5],
	wall_front_activated = False,wall_back_activated = False,
	internalCompaction=False, 
	stressControl_1 = True, stressControl_2 = False,stressControl_3 = True,

	computeStressStrainInterval =10,
	sigma_iso = 1.25e5,
#	sigma1 = 1.25e5,
#	sigma2 = 1.25e5,
#	sigma3 = 1.25e5,
	strainRate1 = 0.00,strainRate2 = -0.06,
)
O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb(),Bo1_Wall_Aabb()]),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
		[Ip2_ViscElMat_ViscElMat_ViscElPhys()],
		[Law2_ScGeom_ViscElPhys_Basic()]
	),
	GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
	triax01,
	NewtonIntegrator(damping=.2),
	PyRunner(command='checkUnbalanced()',iterPeriod=200)
]
# calculation steps defination
O.dt = 2e-4

But the shell says that "checkUnbalanced()" has not been defined. I make
sure that I have defined it at the beginning of this script and I do not
know why it does not work here. Please tell me what my fault is and how
to make a right inheritance.

Seeking your help!

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.