Undrained triaxial test servo control

Asked by Yuxuan Wen

Hello,

I want to run the undrained triaxial test and I have tried two servo control mechanism. One control mechanism works but the other doesn't. So I want to ask why one works but the other doesn't while they seemed same to me.

1. run "servo()" that I defined every step in the O.engine, this method doesn't work

t0=O.time
O.cell.trsf=Matrix3.Identity

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom()],
     [Ip2_FrictMat_FrictMat_FrictPhys()],
     [Law2_ScGeom_FrictPhys_CundallStrack()]),
 NewtonIntegrator(damping=0.05),
        GlobalStiffnessTimeStepper(),
 PyRunner(command='servo', iterPeriod=1),]

def servo():
        ratex=-0.05
 ratey=0.5*sqrt(1-0.05*(O.time-t0))*0.05/(1-0.05*(O.time-t0))/(1-0.05*(O.time-t0)) # derivative to time, d(sqrt(1/1-0.05*t))/dt
 ratez=0.5*sqrt(1-0.05*(O.time-t0))*0.05/(1-0.05*(O.time-t0))/(1-0.05*(O.time-t0)) # derivative to time, d(sqrt(1/1-0.05*t))/dt
 O.cell.velGrad=Matrix3(ratex,0,0,0,ratey,0,0,0,ratez)

2. do not run "servo" that I defined, instead, just add two sentences at the end of the script, this method works
O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom()],
     [Ip2_FrictMat_FrictMat_FrictPhys()],
     [Law2_ScGeom_FrictPhys_CundallStrack()]),
 NewtonIntegrator(damping=0.05),
        GlobalStiffnessTimeStepper(),]

O.cell.trsf=Matrix3.Identity
O.cell.velGrad=Matrix3(-0.05, 0, 0, 0, 0.025, 0, 0, 0, 0.025)

In the first servo control mechanism, the volume continues to increase, which is wrong. In the second mechanism, the volume only decreases negligibly, which is right. If I put the O.cell.trsf=Matrix3.Identity in the "servo" in the first method, do you think it can work? Do you know the reason for this?

Thank you!
Regards,
Yuxuan

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Yuxuan Wen
Solved:
Last query:
Last reply:
Revision history for this message
Robert Caulk (rcaulk) said :
#1

I don't quite understand the question. But I will point out that the PyRunner is incorrectly typed. If you want to run the function "servo()", then the PyRunner argument should be command='servo()'.

Revision history for this message
Yuxuan Wen (wenyuxuan) said :
#2

Thank you Robert, the problem is solved!

Best Regards,
Yuxuan