squashing modelling

Hello,

I would like to model the vertical squashing (compression) of a porous material filled with a fluid. The material is inserted in an initially cubic box with six impermeable faces. During the squashing the material is supposed to expand freely along the side faces of the box.
I want to measure the force felt by top plate (face).
For this model, I was inspired by the oedemeter.py code developed in yade (examples) which uses the TriaxialStressController.

1- My first question concerns the parametrization of the flow engine (* at the end of message):
I want to model as initial conditions 6 impermeable boundaries as:

flow.bndCondIsPressure=[False,False,False,False,False,False]
#flow.bndCondValue=[0,0,0,0,0,0]

but I have immediatly some error messages concerning all the bodies of the code:

"55 : Vh==NULL!! id=55 Point=-261779 255626 -257189 rad=0.0669795
227 : Vh==NULL!! id=227 Point=281321 290581 293209 rad=0.0610796
285 : Vh==NULL!! id=285 Point=302977 -297801 305075 rad=0.0590901
304 : Vh==NULL!! id=304 Point=-457272 -456443 291186 rad=0.0584384
354 : Vh==NULL!! id=354 Point=-295804 297047 300808 rad=0.0567233
496 : Vh==NULL!! id=496 Point=303403 284717 -313298 rad=0.0518524
520 : Vh==NULL!! id=520 Point=310560 -309795 -315643 rad=0.0510292
572 : Vh==NULL!! id=572 Point=-336225 -819563 -802613 rad=0.0492455
CHOLMOD warning: matrix not positive definite
something went wrong in Cholesky factorization, use LDLt as fallback this time
6 : Vh==NULL!! id=6 Point=-2.05296e+15 -1.03117e+16 6.74598e+16 rad=0.0686603
7 : Vh==NULL!! id=7 Point=-6.70813e+13 7.31321e+16 5.4678e+16 rad=0.068626
etc..."

flow.bndCondIsPressure=[False,False,False,True,False,False]
#flow.bndCondValue=[0,0,0,0,0,0]
I have no error message apparently but this is not what I want!

2- My second question concerns the control of the dynamics of the squashing I want and the motion
for the 6 plates: a motion driven by an applied strain rate (0.1) on vertical direction and free motion with no applied
pressure for the 4 side faces:
"
triax.internalCompaction=False
triax.goal2=-0.1
triax.goal1= 0
triax.goal3= 0
triax.wall_left_activated= True
triax.wall_right_activated= True
triax.wall_front_activated= True
triax.wall_back_activated= True
triax.wall_top_activated= True
"

when I ask for printing the force and position of the top plate
"global plate:
plate = O.bodies[triax.wall_top_id]
Ftot0 = abs(O.forces.f(plate.id)[0])
Ftot1 = abs(O.forces.f(plate.id)[1])
Ftot2 = abs(O.forces.f(plate.id)[2])
xtot = plate.state.pos[0]
ytot = plate.state.pos[1]
ztot = plate.state.pos[2]"

I get a constant force Ftot1 an no motion at all of the upper plate (xtot, ytot, ztot)=Cst !!
I don't understand.

Thank you very much for your enlightments,

Fr.

(*)
#B. Activate flow engine and set boundary conditions in order to get permeability
flow.defTolerance=0.3
flow.meshUpdateInterval=200
flow.useSolver=3
flow.permeabilityFactor=1
flow.viscosity=10
flow.bndCondIsPressure=[0,0,1,1,0,0]
flow.bndCondValue=[0,0,1,0,0,0]
flow.boundaryUseMaxMin=[0,0,0,0,0,0]
O.dt=0.1e-3
O.dynDt=False

O.run(1,1)
...
#D. now the compression test, impermeable at the top, impermeable at the bottom plate and on the sides
flow.bndCondIsPressure=[False,False,False,False,False,False]
#flow.bndCondValue=[0,0,0,0,0,0]
flow.updateTriangulation=True #force remeshing to reflect new BC immediately
newton.damping=0

Question information

Language:
English Edit question
Status:
Solved
For:
Assignee:
No assignee Edit question
Solved by:
Rioual
Solved:
2019-03-20
Last query:
2019-03-20
2019-03-19
 Robert Caulk (rcaulk) said on 2019-03-19: #1

Hello,

Cheers,

Robert

 Rioual (francois-rioual-v) said on 2019-03-19: #2

Hello Robert,

Thank you for your answer but it has no link with my problem because I do not deal with compressible flows !
In my situation, the vertical mechanical compression induces lateral mechanical expansion.

All the best

Fr.

 Robert Caulk (rcaulk) said on 2019-03-19: #3

The problem in the link I posted is, in fact, identical to your problem :-). You are describing undrained triaxial compression. While that thread discusses how you might go about re-posing that ill-posed flow problem in Yade.

 Rioual (francois-rioual-v) said on 2019-03-19: #4

Hello Robert,

Indeed, it is only advised by Bruno to use "custom tricks" (?) to deal with the Undrained/incompressible case.
Can you tell me more for my specific case of squashing ??

Thanks,

Fr.

 Robert Caulk (rcaulk) said on 2019-03-19: #5

I'll echo Bruno's recommendation to use the compressible scheme:

"3/ switching to compressible scheme does not imply to change other parameters, no. It is more the other way around: the stability of the incompressible scheme requires the smallest timestep, for instance. So switching to compressible should be 100% safe in general."

 Rioual (francois-rioual-v) said on 2019-03-19: #6

Hello,

-OK, Robert, I introduced a fluid bulk modulus: the error message does not appear anymore immediately but later one in the middle of the compression process. Apparently the time of apparition of the error message depends on the value given to the fluid bulk modulus....what are the units of this parameter in yade ?? typical values ??

- I have still my second question open concerning the force and position of the top plate (see question 2 above): it does not vary during the compression process !

Best,

Fr.

 Bruno Chareyre (bruno-chareyre) said on 2019-03-19: #7

Hi,
1- Isn't it just scheme instability due to the timestep? Did you try a smaller one?
> units of this parameter in yade
Same unit as Young (both dimensionless in my view, but that's up to you).

2. PLease show a minimal working example.

Bruno

 Chareyre (bruno-chareyre-9) said on 2019-03-19: #9

For 2/
You write force component in some variable at some point, then you record
that variable. Of course it's constant.
Like saying that speed of wind at time t_0 is independent of time t, which
is true and expected.
Bruno

Le mar. 19 mars. 2019 17:08, Rioual <email address hidden>
a écrit :

> Question #679320 on Yade changed:
>
>
> Rioual is still having a problem:
> Hello Bruno
>
>
> 1- I tried the simulation with different smaller time scales 1e-4, 1e-5,
> 1e-6 and the error messages appear at fairly the same simulation time
> apparently:
> "
> CHOLMOD warning: matrix not positive definite
> something went wrong in Cholesky factorization, use LDLt as fallback this
> time
> 65 : Vh==NULL!! id=65 Point=-0.803797 -0.683743 1.61915 rad=0.0666365
> 147 : Vh==NULL!! id=147 Point=-0.927542 -0.647778 1.92058 rad=0.0638237
> ...etc"
>
> 2- Before the error messages, the compression is processed as can be
> observed on the graphical output (motion of the boundaries) but nothing
> changes when I print the position of the upper plate and the force on
> this plate. See a minimal working example code of the compression
> process below that shows both problems 1 and 2:
>
>
> ****************************************************************************
>
> ## ______________ First section, similar to
> triax-tutorial/script-session1.py _________________
>
> num_spheres=1000# number of spheres
> young=1e6
> C=1e6
> compFricDegree = 3 # initial contact friction during the confining phase
> finalFricDegree = 11 # contact friction during the deviatoric loading (for
> ice!!)
> mn,mx=Vector3(0,0,0),Vector3(1,1,1) # corners of the initial packing
>
>
>
> O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=0,density=0,label='walls'))
> walls=aabbWalls([mn,mx],thickness=0,material='walls')
> wallIds=O.bodies.append(walls)
>
> sp=pack.SpherePack()
> sp.makeCloud(mn,mx,-1,0.3333,num_spheres,False, 0.95,seed=1) #"seed" make
> the "random" generation always the same
> sp.toSimulation(material='spheres')
>
> triax=TriaxialStressController(
> maxMultiplier=1.+2e4/young, # spheres growing factor (fast growth)
> finalMaxMultiplier=1.+2e3/young, # spheres growing factor (slow
> growth)
> thickness = 0,
> max_vel = 0.005,
> internalCompaction=True, # If true the confining pressure is
> generated by growing particles
> )
>
> newton=NewtonIntegrator(damping=0.2)
>
> 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()],label="iloop"
> ),
> the moment, see 2nd section
>
> GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
> triax,
> newton
> ]
>
> triax.goal1=triax.goal2=triax.goal3=-10000
>
> while 1:
> print '***'
> O.run(1000, True)
> unb=unbalancedForce()
> if unb<0.001 and abs(-10000-triax.meanStress)/10000<0.001:
> break
>
>
> ##Second section: Activate flow engine and set boundary conditions for
> the compression (squashing) test, impermeable on each face:
>
> flow.defTolerance=0.3
> flow.meshUpdateInterval=200
> flow.useSolver=3
> flow.permeabilityFactor=1
> flow.viscosity=10
> flow.boundaryUseMaxMin=[0,0,0,0,0,0]
> O.dt=1e-4
> O.dynDt=False
>
> flow.bndCondIsPressure=[False,False,False,False,False,False]
> #flow.bndCondValue=[0,0,0,0,0,0]
>
> newton.damping=0
>
> #aditional compressibility of the fluid
> flow.fluidBulkModulus=1e6
>
> triax.internalCompaction=False
> triax.goal2=-0.1
> triax.goal1= 0
> triax.goal3= 0
> triax.wall_left_activated= True
> triax.wall_right_activated= True
> triax.wall_front_activated= True
> triax.wall_back_activated= True
> triax.wall_top_activated= True
>
> global plate
> plate = O.bodies[triax.wall_top_id]
>
> Ftot0 = O.forces.f(plate.id)[0]
> Ftot1 = O.forces.f(plate.id)[1]
> Ftot2 = O.forces.f(plate.id)[2]
>
> xtot = plate.state.pos[0]
> ytot = plate.state.pos[1]
> ztot = plate.state.pos[2]
>
>
> ## a function printing variables
> def history():
> print 't=', O.time, 'Force on the plate (Ftot)=', Ftot0, Ftot1,
> Ftot2
> print 't=', O.time, 'Position of the plate (xtot,ytot,ztot)=',
> xtot, ytot, ztot
>
>
> O.engines=O.engines+[PyRunner(iterPeriod=200,command='history()',label='recorder')]
>
> print "starting squashing simulation"
> O.run(200,1)
> timing.stats()
>
>
> ************************************************************************************************
>
>
> Best wishes,
>
> Fr.
>
> --
>
> _______________________________________________
> Post to : <email address hidden>
>
>
>

 Rioual (francois-rioual-v) said on 2019-03-20: #10

Hello Bruno

For 2/ mistake of a beginner indeed because of my previous bad understanding of a loop in yade with o.run, now it is clear, ok, thanks !!

For 1/ the crash still remains....

All the best
Fr.

 Rioual (francois-rioual-v) said on 2019-03-20: #11

...The force on the upper plate doesn't stop increasing during the run: the packing might be too packed to generate a lateral expansion of the material, it may bring problems (?)

Fr.

 Rioual (francois-rioual-v) said on 2019-03-20: #12

The strain rate is too high...
Thank you all, my problem is solved!