How to make a simulation of triaxial-compress at 2 dimensions ?
Dear All !
I have already success to make a 2-dimensions box with Gen , and got a good result when I make a unaxial-compression simulation. But when I tried to make a simulation of traxial-compression , I met some problem as the stress waved obviously with the increase of strain . In the other hand , I also wondered whether the force or the displacement in Z-direction the system ingored when the fuction force2dComputat
Here is my script of triaxila-compress simulation :
-------
#rot_compress.py: A uniaxial compression simulation using ESyS-Particle
# Author: D. Weatherley
# Date: 27 December 2008
# Organisation: ESSCC, University of Queensland
# (C) All rights reserved, 2008.
#
#
#import the appropriate ESyS-Particle modules:
from esys.lsm import *
from esys.lsm.util import *
from esys.lsm.geometry import *
from WallLoader import WallLoaderRunnable
from ServoWallLoader import ServoWallLoader
from esys.lsm.util import Vec3, BoundingBox
#instantiate a simulation object:
sim = LsmMpi (numWorkerProcesses = 1, mpiDimList = [1,1,1])
modelname=
xdim=100
ydim=100
zdim=0
minR = 0.2
maxR = 1.0
timestep = 2000000
ramptime = 500
velocity = 0.0002
kn = 4.288e3
c_press = 4
area = xdim*zdim
#initialise the neighbour search algorithm:
sim.initNeighbo
particleType = "RotSphere",
gridSpacing = 2.5*maxR,
verletDist = 0.2*minR
)
#set the number of timesteps and timestep increment:
sim.setNumTimeSteps (timestep)
sim.setTimeStepSize (0.0005)
sim.force2dComp
#specify the spatial domain for the simulation
domain = BoundingBox(
sim.setSpatialD
#create a prism of spherical particles:
sim.readGeometr
#create rotational elastic-brittle bonds between clusters:
pp_bonds = sim.createInter
BrittleBeamPrms(
name="pp_bonds",
youngsModulus=kn,
poissonsRatio=0.25,
cohesion=6,
tanAngle=4.0,
tag=0
)
)
#initialise frictional interactions for unbonded particles:
sim.createInter
RotElasticPrms(
name="contaction",
normalK=kn,
scaling = True
)
)
sim.createInter
FrictionPrms(
name="friction",
youngsModulus=kn,
poissonsRatio=0.25,
dynamicMu=0.4,
staticMu=0.6
)
)
#create an exclusion between bonded and frictional interactions:
sim.createExclusion (
interactionName1 = "pp_bonds",
interactionName2 = "friction"
)
sim.createExclusion (
interactionName1 = "pp_bonds",
interactionName2 = "contact"
)
#######
#create a wall at the bottom of the model:
sim.createWall (
name = "bottom_wall",
posn = Vec3(0.0000, 0.0000, 0.0000),
normal = Vec3(0.0000, 1.0000, 0.0000)
)
#create a wall at the top of the model:
sim.createWall (
name = "top_wall",
posn = Vec3(0.0000, ydim, 0.0000),
normal = Vec3(0.0000, -1.0000, 0.0000)
)
#create 4 wall at the round of the model:
sim.createWall (
name = "round_wall1",
posn = Vec3(0.0000, 0.0000, 0.0000),
normal = Vec3(1.0000, 0.0000, 0.0000)
)
sim.createWall (
name = "round_wall3",
posn = Vec3(xdim, 0.00, zdim),
normal = Vec3(-1.0000, 0.0000, 0.0000)
)
#specify elastic repulsion from the bottom wall:
sim.createInter
NRotElasticWallPrms (
name = "bottom_
wallName = "bottom_wall",
normalK = 10*kn
)
)
#specify elastic repulsion from the top wall:
sim.createInter
NRotElasticWallPrms (
name = "top_wall_repel",
wallName = "top_wall",
normalK = 10*kn
)
)
sim.createInter
NRotElasticWallPrms (
name = "round_
wallName = "round_wall1",
normalK = 10*kn
)
)
sim.createInter
NRotElasticWallPrms (
name = "round_
wallName = "round_wall3",
normalK = 10*kn
)
)
#add translational viscous damping:
sim.createInter
LinDampingPrms(
name="damping1",
viscosity=0.02,
maxIterations=50
)
)
#add rotational viscous damping:
sim.createInter
RotDampingPrms(
name="damping2",
viscosity=0.02,
maxIterations=50
)
)
#######
##add a wall loader to move the top wall:
wall_loader1 = WallLoaderRunnable(
LsmMpi = sim,
wallName = "top_wall",
vPlate = Vec3 (0.0, -1*velocity, 0.0),
startTime = 500,
rampTime = ramptime
)
sim.addPreTimeS
#add a wall loader to move the bottom wall:
wall_loader2 = WallLoaderRunnable(
LsmMpi = sim,
wallName = "bottom_wall",
vPlate = Vec3 (0.0, velocity, 0.0),
startTime = 500,
rampTime = ramptime
)
sim.addPreTimeS
servo_loader1 = ServoWallLoader
LsmMpi = sim,
interactionName = "round_
force = Vec3 (c_press*ydim, 0.0, 0.0),# 5MPa #
startTime = 0,
rampTime = 500
)
sim.addPreTimeS
servo_loader3 = ServoWallLoader
LsmMpi = sim,
interactionName = "round_
force = Vec3 (-1*c_press*ydim, 0.0, 0.0),# 5MPa #
startTime = 0,
rampTime = 500
)
sim.addPreTimeS
#######
#create a FieldSaver to store number of bonds:
sim.createField
InteractionScal
interactionName
fieldName="count",
fileName=
fileFormat="SUM",
beginTimeStep=0,
endTimeStep=
timeStepIncr=100
)
)
#create a FieldSaver to store the total kinetic energy of the particles:
sim.createField
ParticleScalarF
fieldName="e_kin",
fileName=
fileFormat="SUM",
beginTimeStep=0,
endTimeStep=
timeStepIncr=100
)
)
#create a FieldSaver to store potential energy stored in bonds:
sim.createField
InteractionScal
interactionName
fieldName=
fileName=
fileFormat="SUM",
beginTimeStep=0,
endTimeStep=
timeStepIncr=100
)
)
#create a FieldSaver to wall positions:
posn_saver = WallVectorField
wallName=
fieldName=
fileName=
fileFormat=
beginTimeStep=0,
endTimeStep=
timeStepIncr=100
)
sim.createField
posn_saver2 = WallVectorField
wallName=
fieldName=
fileName=
fileFormat=
beginTimeStep=0,
endTimeStep=
timeStepIncr=100
)
sim.createField
#create a FieldSaver to wall forces:
force_saver = WallVectorField
wallName=
fieldName="Force",
fileName=
fileFormat=
beginTimeStep=0,
endTimeStep=
timeStepIncr=100
)
sim.createField
#create a FieldSaver to round_wall forces:
force_saver2 = WallVectorField
wallName=
# wallName=
fieldName=
fileName=
fileFormat=
beginTimeStep=0,
endTimeStep=
timeStepIncr=100
)
sim.createField
sim.createCheck
CheckPointPrms (
fileNamePrefix = "c1-snapshot",
beginTimeStep = 0,
endTimeStep = timestep,
timeStepIncr = 1000
)
)
#execute the simulation:
sim.run()
-------
With kind regards,
Zhongwen
Question information
- Language:
- English Edit question
- Status:
- Expired
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: