Packing using ThermalEngine

Asked by Jiannan Wang

Hello,

This is more like extended following up question of [1]. I'm trying to explore thermal expansion by modifying example [2]:

Active the ThermoMech in section [4], and heat up one of the boundaries (adding temperature to one of the thermal boundary conditions in [5]). It seems to work using the packing file in the example ([3]) at dt = 1e-12, or start with dt = 1e-12 for few iterations, i.e. 500 iterations, and then switch back to 1e-9.

But it is not working with my own generated packing. I try to keep the dimensions and the partial size as same as the one in the example ([3]). No matter how small the dt is (even 1e-20), the partials inside the cubic immediately disappear. Is there something I missed on the packing side? Or I messed up on some other fronts as while? I attach a MEW packing script:

############
from yade import export

young=1e9
tt=TriaxialTest(StabilityCriterion=.001, compactionFrictionDeg=radians(3),internalCompaction=True, radiusMean=-0.004,numberOfGrains=1000, upperCorner=(0.05,0.05,0.05),lowerCorner=(0,0,0),thickness=0.01,radiusStdDev=0.3,sigmaIsoCompaction=-10000,maxMultiplier=1.+2e4/young,finalMaxMultiplier=1.+2e3/young)

O.run(20000,1)
export.text('CubicPack.spheres')
############
Thanks in advance.

Best regards
Jiannan

[1]: https://answers.launchpad.net/yade/+question/692076
[2]: https://gitlab.com/yade-dev/trunk/-/blob/master/examples/ThermalEngine/noFlowScenario.py
[3]: https://gitlab.com/yade-dev/trunk/-/blob/master/examples/ThermalEngine/5cmEdge_1mm.spheres
[4]: https://gitlab.com/yade-dev/trunk/-/blob/master/examples/ThermalEngine/noFlowScenario.py#L125-127
[5]: https://gitlab.com/yade-dev/trunk/-/blob/master/examples/ThermalEngine/noFlowScenario.py#L129-130

Question information

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

Please provide an MWE [1]. What you have here does not generate a packing, it generates an empty file.

[1]https://www.yade-dem.org/wiki/Howtoask

Revision history for this message
Robert Caulk (rcaulk) said :
#2

It occurs to me that you may be unaware of our user manual [1][2].

[1]]https://yade-dem.org/doc/user.html#scene-construction
[2]https://yade-dem.org/doc/user.html#packing-algorithms

Revision history for this message
Jiannan Wang (jnwang) said :
#3

Hello Robert,

Sorry for the mistake. I put the scene back to the MWE, the result is still the same:

############
from yade import export

young=1e9
tt=TriaxialTest(StabilityCriterion=.001, compactionFrictionDeg=radians(3),internalCompaction=True, radiusMean=0.004,numberOfGrains=1000, upperCorner=(0.05,0.05,0.05),lowerCorner=(0,0,0),thickness=0.01,radiusStdDev=0.3,sigmaIsoCompaction=-10000,maxMultiplier=1.+2e4/young,finalMaxMultiplier=1.+2e3/young)
tt.generate("CubicPack.yade")
O.load('CubicPack.yade')

O.run(20000,1)
export.text('CubicPack.spheres')
############

Also I tried the one similar to [1], still no luck. Here is the modified MWE just in case:

#############
from yade import pack, export

stabilityThreshold=0.01
young=1e9
mn,mx=Vector3(0,0,0),Vector3(0.05,0.05,0.05)

O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=radians(3),density=2600,label='spheres'))
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,rMean=0.004,rRelFuzz=0.0,num=1000)
sp.toSimulation(material='spheres')

triax=TriaxialStressController(
 maxMultiplier=1.+2e4/young,
 finalMaxMultiplier=1.+2e3/young,
 thickness = 0,
 stressMask = 7,
 internalCompaction=True,
)

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()]
 ),
 GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
 triax,
 NewtonIntegrator(damping=0.5)
]

O.dt=0.1e-5
O.dynDt=False

tri_pressure = 10000
triax.goal1=triax.goal2=triax.goal3=-tri_pressure

while 1:
  O.run(1000, True)
  unb=unbalancedForce()
  print('unbalanced force:',unb,' mean stress: ',triax.meanStress)
  if unb<stabilityThreshold and abs(-tri_pressure-triax.meanStress)/tri_pressure<0.001:
    break
O.save('CubicPack.yade.gz')
export.textExt('CubicPack.spheres')
##################

Is it something I should be aware during the packing? Or I missed something in the THM in order to get thermal expansion?

Thanks

Best regards
Jiannan

[1]: https://gitlab.com/yade-dev/trunk/-/blob/master/examples/triax-tutorial/script-session1.py

Revision history for this message
Robert Caulk (rcaulk) said :
#4

Hello,

Still no MWE. An MWE is a self contained script that recreates your problem. It is short and contains only the necessary code that someone can copy and paste into their terminal to recreate your problem. No external files. The process of creating and widdling the script down to an MWE will help you understand how Yade packings work, since it is apparent that you do not completely understand how yade packings work (which is completely OK! Welcome to Yade :-) :-)). Let's do this the right way and not start incoherently blaming ThermalEngine for a simple packing problem. The right way is to provide an MWE that recreates your problem.

Cheers,

Robert

Revision history for this message
Jiannan Wang (jnwang) said :
#5

Hello Robert,

My mistake, I thought you meant just the packing MWE. Really appreciate your patience. I attached the MWE in the follow. It is modified from [1]. In order to make it not inconveniently long, I removed the saving and plotting parts. The packing file is same as #3.

##########
from yade import pack, ymport
from yade import timing

young=5.7e+10
poisson=0.235
density=2630
tensileStrength=1.2e+8
cohesion=3.5e+8
frictionAngle=radians(50)

O.materials.append(JCFpmMat(young=young,poisson=poisson,frictionAngle=frictionAngle,density=density,tensileStrength=tensileStrength,cohesion=cohesion,label='spheres'))
O.materials.append(JCFpmMat(young=young,poisson=poisson,frictionAngle=0,density=density,tensileStrength=tensileStrength,cohesion=cohesion,label='walls'))

walls=aabbWalls([(0,0,0),(0.05,0.05,0.05)],thickness=0,material='walls')
wallIds=O.bodies.append(walls)
sp = O.bodies.append(ymport.textExt('compressedPack.spheres', 'x_y_z_r',material='spheres'))

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.5,label='is2aabb'),Bo1_Box_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=1.5,label='ss2sc'),Ig2_Box_Sphere_ScGeom()],
  [Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1,label='interactionPhys')],
  [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=True,label='interactionLaw'),
  Law2_ScGeom_FrictPhys_CundallStrack()],label="iloop"
 ),
 GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.5),
 FlowEngine(dead=1,label="flow",multithread=False),
 ThermalEngine(dead=1,label='thermal'),
 NewtonIntegrator(damping=0.5)
]
O.step()
ss2sc.interactionDetectionFactor=-1
is2aabb.aabbEnlargeFactor=-1

for b in O.bodies:
 if isinstance(b.shape, Sphere):
  b.dynamic=False

flow.dead=0
flow.defTolerance=-0.003
flow.meshUpdateInterval=-100
flow.boundaryUseMaxMin=[1,1,1,1,1,1]
flow.breakControlledRemesh=True
flow.useSolver=4
flow.permeabilityFactor= 1
flow.viscosity= 0.001
flow.bndCondIsPressure=[0,0,0,0,0,0]
flow.bndCondValue=[0,0,0,0,0,0]
flow.thermalEngine=True
flow.debug=False
flow.fluidRho = 997
flow.fluidCp = 4181.7
flow.bndCondIsTemperature=[1,0,0,0,0,0]
flow.thermalEngine=True
flow.thermalBndCondValue=[343.15,0,0,0,0,0]
flow.tZero=333.15
flow.pZero=0

thermal.dead=0
thermal.debug=False
thermal.fluidConduction=True
thermal.ignoreFictiousConduction=True
thermal.conduction=True
thermal.thermoMech=True
thermal.solidThermoMech = True
thermal.fluidThermoMech = True
thermal.advection=True
thermal.bndCondIsTemperature=[1,0,0,0,0,0]
thermal.thermalBndCondValue=[343.15,0,0,0,0,0]
thermal.fluidK = 0.6069
thermal.fluidConductionAreaFactor=1.
thermal.uniformReynolds=10
thermal.particleT0 = 333.15
thermal.particleDensity=2600.
thermal.particleK = 2.
thermal.particleCp = 710.
thermal.tsSafetyFactor=0
thermal.useKernMethod=True
thermal.useHertzMethod=False

timing.reset()
O.dt=1e-12
O.dynDt=False
O.run(1,1)
#################################
Thank yo again.

Best regards
Jiannan

[1]: https://gitlab.com/yade-dev/trunk/-/blob/master/examples/ThermalEngine/noFlowScenario.py

Revision history for this message
Robert Caulk (rcaulk) said :
#6

Hello,

Still not an MWE. An MWE is a self contained script that recreates your problem. It is short and contains only the necessary code that someone can copy and paste into their terminal to recreate your problem. No external files.

Cheers,

Robert

Revision history for this message
Robert Caulk (rcaulk) said :
#7

Please ensure that your walls are containing your packing.

Revision history for this message
Jiannan Wang (jnwang) said :
#8

Hello Robert,

Thank you for pointing it out. I added density and thickness to the walls. It seems to be working. Just in case I fully understand, this is you meant by containing packing right? Really appreciate.

Best regards
Jiannan Wang

Revision history for this message
Robert Caulk (rcaulk) said :
#9

Hello,

I meant, your packing appears to be larger than the location of the walls.
In other words, the walls are slicing through your packing in the beginning
of the simulation.

Cheers,

Robert

Le sam. 1 août 2020 à 02:50, Jiannan Wang <
<email address hidden>> a écrit :

> Question #692123 on Yade changed:
> https://answers.launchpad.net/yade/+question/692123
>
> Status: Answered => Open
>
> Jiannan Wang is still having a problem:
> Hello Robert,
>
> Thank you for pointing it out. I added density and thickness to the
> walls. It seems to be working. Just in case I fully understand, this is
> you meant by containing packing right? Really appreciate.
>
> Best regards
> Jiannan Wang
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Jiannan Wang (jnwang) said :
#10

Hello Robert,

Aha, I didn't even realized that. Thank you again. That's really helpful.

Best regards
Jiannan Wang