Static and dynamic loading and straining of a cylindrical sample

Asked by behzad

Hey guys,

Imagine we have a cylindrical sample and we want to independently do the following tests:

1- Static tress controlled uniaxial compression (or even tension)

2- Dynamic tress controlled uniaxial loading (e.g. a sinusoidal stress loading)

3-Dynamic uniaxial straining

How do we do it? Any built-in functions?

For the third case I tried

O.engines=O.engines+[UniaxialStrainer(strainRate=math.cos(O.time)*1e-2,axis=2,asymmetry=0,posIds=[1],negIds=[0],
crossSectionArea=0.0025,label='strainer')]

or

O.engines=O.engines+[UniaxialStrainer(strainRate=E_rate,axis=2,asymmetry=0,posIds=[1],negIds=[0],
crossSectionArea=0.0025,label='strainer')]
O.engines=O.engines+[PyRunner(iterPeriod=1,command='initTest()',label='strainCollector')]

def initTest():
 global mode
 E_rate=math.cos(O.time)*1e-2
 strainer.strainRate=E_rate

But it didn't work!

Any ideas and comments are appreciated!
Thanks,
Behzad

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Chareyre (bruno-chareyre-9) said :
#1

Hi Behzad,
In your script cos(O.time) is evaluated when the engine is instanciated,
then strainRate is never updated.

The simplest way:

for k in range(N):
    strainer.strainRate = f(t)
    O.run(1,1)

Another way: put this update in a pyRunner.
Regards
Bruno

On 17/12/14 18:56, behzad wrote:
> New question #259209 on Yade:
> https://answers.launchpad.net/yade/+question/259209
>
> Hey guys,
>
> Imagine we have a cylindrical sample and we want to independently do the following tests:
>
> 1- Static tress controlled uniaxial compression (or even tension)
>
> 2- Dynamic tress controlled uniaxial loading (e.g. a sinusoidal stress loading)
>
> 3-Dynamic uniaxial straining
>
> How do we do it? Any built-in functions?
>
> For the third case I tried
>
> O.engines=O.engines+[UniaxialStrainer(strainRate=math.cos(O.time)*1e-2,axis=2,asymmetry=0,posIds=[1],negIds=[0],
> crossSectionArea=0.0025,label='strainer')]
>
> or
>
> O.engines=O.engines+[UniaxialStrainer(strainRate=E_rate,axis=2,asymmetry=0,posIds=[1],negIds=[0],
> crossSectionArea=0.0025,label='strainer')]
> O.engines=O.engines+[PyRunner(iterPeriod=1,command='initTest()',label='strainCollector')]
>
> def initTest():
> global mode
> E_rate=math.cos(O.time)*1e-2
> strainer.strainRate=E_rate
>
> But it didn't work!
>
> Any ideas and comments are appreciated!
> Thanks,
> Behzad
>
>
>
>

--
_______________
Bruno Chareyre
Associate Professor
ENSE³ - Grenoble INP
Lab. 3SR
BP 53
38041 Grenoble cedex 9
Tél : +33 4 56 52 86 21
Fax : +33 4 76 82 70 43
________________

Revision history for this message
behzad (behzad-majidi) said :
#2

Good,

what about stress controlled loading?

Can we use TriaxialStressController() byt outting goal1=goal2=0, goal3=f(t)?

Or we simply assign the required load to a loading plate like;

O.forces.addF(plate,Vector3(0,0,-1e7),permanent=True)

cheers

Revision history for this message
Jérôme Duriez (jduriez) said :
#3

Bruno's remark ("In your script cos(O.time) is evaluated when the engine is instanciated, then strainRate is never updated") surely applies too to your idea "goal3=f(t)"
So it is better to forget it, I think.

Revision history for this message
behzad (behzad-majidi) said :
#4

Yes, but we can update the engine with a Pyrunner, as I did below.

My question was in a uniaxial loading, do we need to use the TriaxialStressController() by putting goal1=goal2=0, goal3=f(t)? or we simply control the stress level by applying the desired load to the loading plate?

 O.reset()
from yade import utils, plot
from yade import pack, qt

id_Mat1=O.materials.append(FrictMat(young=1e8,poisson=0.3,density=1000,frictionAngle=1))
Mat=O.materials[id_Mat1]

id_Mat2=O.materials.append(FrictMat(young=1e10,poisson=0.3,density=1000,frictionAngle=1))
Rigid=O.materials[id_Mat2]

s1=utils.sphere([0.0,0.0,1.0],1.0,fixed=False,material=Mat)
s2=utils.sphere([0.0,0.0,3.0],1.0,fixed=False,material=Mat)

O.bodies.append(s1)
O.bodies.append(s2)

box_1 = O.bodies.append(box((0,0,0),(1,1,.001),fixed=True,material=Rigid))
box_2 = O.bodies.append(box((0,0,4.),(1,1,.0001),fixed=False,material=Rigid))

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(damping=0.7,gravity=[0,0,0])
]

O.engines=O.engines+[UniaxialStrainer(strainRate=0.0,axis=2,asymmetry=1,posIds=[3],negIds=[2],
crossSectionArea=0.00196,blockDisplacements=False,blockRotations=False,setSpeeds=True,label='strainer')]

O.engines=O.engines+[PyRunner(iterPeriod=5,command='addPlotData()',label='plotDataCollector')]
O.engines=O.engines+[PyRunner(iterPeriod=1,command='calcul()',label='Rate')]

def addPlotData():
       yade.plot.addData(t=O.iter,Upper_z=O.bodies[3].state.pos[2],Lower_z=O.bodies[2].state.pos[2],F_z=O.forces.f(3)[2])

plot.plots={'t':('Upper_z',),'t ':('Lower_z'),' t':('F_z')}

plot.plot()

alpha= 0.5

O.step()

def calcul():

 kn_a= 1.98e8
 Gz= alpha/(kn_a*O.dt)
 F_z=O.forces.f(3)[2]
 goal_z=abs(math.sin(O.iter*1e-4)*1e7+1e7)
 Uz= Gz*(F_z-goal_z)
 if O.iter < 300000:
  if abs((F_z-goal_z)/goal_z)< 0.005:
   strainer.strainRate=0.0;
   O.run(3);
  else:
   strainer.strainRate=Uz/4
   O.run(3);
 else:
  print 'finished';
  exit

qt.View()

Can you help with this problem?

Provide an answer of your own, or ask behzad for more information if necessary.

To post a message you must log in.