question about setParticleNonDynamic
Dear All,
In the following code, there are two particles which have a overlap of 10% relative to the radius.
PROBLEM is: If one particle is moved, and the other one is fixed by the command setParticleNonD
So, I guess that the setParticleNonD
However, I checked the thread https:/
To make this question more clear, the code was attached.
#import the appropriate ESyS-Particle module
from esys.lsm import *
from esys.lsm.util import Vec3, BoundingBox
from POVsnaps import POVsnaps
from esys.escript import *
from math import *
from numpy import *
#instantiate a simulation object
#and initialise the neighbour search algorithm:
sim = LsmMpi(
sim.initNeighbo
particleType=
gridSpacing=5.0,
verletDist=0.2
)
TotalTimeSteps = 10
SaveTimeIncr = 1
#specify the number of timesteps and timestep increment:
sim.setNumTimeS
sim.setTimeStep
#specify the spatial domain for the simulation:
domain = BoundingBox(
sim.setSpatialD
#add the first particle to the domain:
particle=
particle.setTag(1)
#particle.
sim.createParti
#add the second particle to the domain:
particle=
particle.setTag(2)
sim.createParti
sim.createInter
RotFrictionPrms(
name = "friction",
normalK = 1.0, #if set youngsModulus a large value such as 100000.0, the repel is more obvious
dynamicMu = 0.4,
staticMu = 0.6,
shearK = 0.2,
scaling = False,
rigid=True
)
)
#create a FieldSaver to contact force and particle positions
friction_
interactionName = "friction",
fieldName = "force",
fileName = "friction_
fileFormat = "RAW_WITH_POS_ID",
beginTimeStep = 0,
endTimeStep = TotalTimeSteps,
timeStepIncr = SaveTimeIncr
)
sim.createField
#create a FieldSaver to store the total kinetic energy of the particles:
sim.createField
ParticleScalar
fieldName=
fileName=
fileFormat="SUM",
beginTimeStep=0,
endTimeStep=
timeStepIncr=
)
)
#create a FieldSaver to store potential energy stored in bonds:
sim.createField
InteractionSca
interactionNa
fieldName=
fileName=
fileFormat="SUM",
beginTimeStep=1,
endTimeStep=
timeStepIncr=
)
)
#create CheckPointer
sim.createCheck
CheckPointPrms (
fileNamePrefix = "snapshot",
beginTimeStep = 1,
endTimeStep = TotalTimeSteps,
timeStepIncr = SaveTimeIncr
)
)
povcam = POVsnaps(sim=sim, interval=
povcam.
sim.addPostTime
#execute the simulation:
N_max = sim.getNumTimeS
n = 1
particleNum = 2
delt_u = Vec3(0.055,0.0,0.0)
while (n < N_max):
ParticleList = sim.getParticle
for pp in ParticleList:
if pp.getTag() == 1:
Posnparticle = pp.getInitialPo
#print "positon After deformation: ",Posnparticle[
sim.
# Choose one of the following restrictions, otherwise, the particles will be repelled away from each other
## Restrict the Translational degree of freedom
#sim.
sim.setParticl
sim.runTimeStep()
n += 1
#exit simulation
sim.exit()
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Jiadun Liu
- Solved:
- Last query:
- Last reply: