applying force on facet
Hi All,
I'm trying to simulate the CPT [1] in a deep location. In order to simulate the confining pressure state, I use the method mentioned here [2].
The basic idea is as follows:
(1) import the particles;
(2) create the top, bottom, and cylindrical walls by facets with mass
(3) give the facets with some forces.
In the end, I just want to test the unbalanced force. The result shows that the unbalanced force doesn't change at all even though I set the gravity force. Besides, it seems the facets don't move to reach the target pressure. (you can see these two situations here
[3] )
#######
the following code doesn't show any errors.
My questions are:
(1) why the unbalanced force doesn't change? [3]
(2) why the facets wall doesn't move? [3]
#######
#######
from yade import ymport ,pack,export,
import itertools
from numpy import *
import numpy as np
import math
young=4e8
finalcompFricDe
stabilityThresh
#######
sphereMat=
O.bodies.
#######
#######
frictMat = O.materials.
#######
#######
width = 0.4 ; height = 0.5 ; preStress = -3e5
#######
nw = 25 ; nh = 15
#######
facets = []
rCyl2 = .5*width / cos(pi/float(nw))
for r in range(nw):
for h in range(nh):
v1 = Vector3( rCyl2*cos(
v2 = Vector3( rCyl2*cos(
v3 = Vector3( rCyl2*cos(
v4 = Vector3( rCyl2*cos(
f1 = facet((
f2 = facet((
facets.
O.bodies.
mass = O.bodies[
for f in facets:
f.state.mass = mass
f.state.
#######
def addForces():
for f in facets:
n = f.shape.normal
a = f.shape.area
O.forces.
#######
#######
widthtop = 0.5 ; heighttop = 0.45 ; preStresstop = -3e5
#######
nxtop = 25 ; nytop = 25
#######
facetstop = []
for nx in range(nxtop):
for ny in range(nytop):
v11 = Vector3( (nx+0)*
v12 = Vector3( (nx+1)*
v13 = Vector3( (nx+1)*
v14 = Vector3( (nx+0)*
f11 = facet((
f12 = facet((
facetstop.
O.bodies.
masstop = O.bodies[
for f in facetstop:
f.state.mass = masstop
f.state.
#######
def addForcestop():
for f in facetstop:
n = f.shape.normal
a = f.shape.area
O.forces.
#######
#######
widthbottom = 0.5 ; heightbottom = 0.0 ; preStressbottom = 3e5
#######
nxbottom = 25 ; nybottom = 25
facetsbottom = []
for nx in range(nxbottom):
for ny in range(nybottom):
v11 = Vector3( (nx+0)*
v12 = Vector3( (nx+1)*
v13 = Vector3( (nx+1)*
v14 = Vector3( (nx+0)*
f11 = facet((
f12 = facet((
facetsbottom.
O.bodies.
massbottom = O.bodies[
for f in facetsbottom:
f.state.mass = massbottom
f.state.
#######
def addForcesbottom():
for f in facetsbottom:
n = f.shape.normal
a = f.shape.area
O.forces.
#######
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
GlobalStiffnes
NewtonIntegrat
VTKRecorder(
######
######
PyRunner(
PyRunner(
PyRunner(
PyRunner(
]
def checkunbalanced():
unb=unbalanced
print 'unbalanced force: ',unb
if unb<stabilityTh
O.pause()
export.
O.save(
O.saveTmp()
#######
#######
references:
[1] https:/
[2] https:/
[3] https:/
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- 2021-02-19
- Last query:
- 2021-02-19
- Last reply:
- 2021-02-18
Klaus Thoeni (klaus.thoeni) said : | #1 |
Hi,
facets in Yade are massless and non-dynamic. You cannot apply forces, you can only apply velicities/
Klaus
|
#2 |
@ytang:
> the following code doesn't show any errors.
it does show this error:
IOError: [Errno 2] No such file or directory: 'cluster-adddd.txt'
> why the facets wall doesn't move?
The order of engines does matter.
In your case, the forces are reset before being applied (you set them by addForcestop, but then they are reset by ForceResetter).
Put addForcestop PyRunner **before** NewtonIntegrator (as it is in [2])
@Klaus
> facets in Yade are massless and non-dynamic. You cannot apply forces
this is the default state. By setting mass (and inertia) and unblocking desired DOFs, you can easily have dynamic "plain" facets.
But yes, pfacets may be a better choice for various reasons
cheers
Jan
ytang (ytang116) said : | #3 |
Hi Jan, Klaus,
Sorry for the late reply.
For Jan,
the file is in Dropbox.
You are right, I need to put the addForce function before the NewtonIntegrator.
Besides, I think it's very hard to control the facet, it's very to split it into pieces. So, I think I need to change to Pfacet.
best,
Yong
ytang (ytang116) said : | #4 |
Thanks Jan Stránský, that solved my question.
Jan Stránský (honzik) said : | #5 |
> the file is in Dropbox.
yes, it is clear from the link address :-) Nevertheless, it could not be publicly accessed (it is possible now), probably you will delete is some time etc. that's why there is "Please, no external links!" section in [4]
cheers
Jan