apply buoyancy forces on particles
Hi,
I want to model increasing water level in a sandy soil. Therefore I want to include buoyancy forces, that should act on particles (not at contacts).
I tried O.forces.addF() method, but it just adds forces for one single step. So I tried ForceEngine and for one single particle, the script is working fine:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#define model properties:
shear_modulus = 3.2e10
poisson_ratio = 0.15
young_modulus = 2*shear_
friction_coeff = 10
angle = atan(friction_
rho_p = 2650 #density of particles
v_iw = 1 #velocity of increasing water-level
#material:
id_Mat=
Mat=O.materials
#create sphere and box:
O.bodies.
O.bodies.
#define engines:
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
NewtonIntegrat
]
#initiate force engines for all particles:
for b in O.bodies:
if (b.isStandalone and isinstance(
O.engines=
def apply_buo(
for b in O.bodies:
if b not in saturatedList:
if b.isStandalone and isinstance(
pos = b.state.pos
rad = b.shape.radius
Id = b.id
else:
continue
h = pos[2] - rad
if h < water_height:
dh = water_height - h
dh = min(dh,2*rad) #to get sure, that dh is not bigger than 2*radius
F_buo = Vector3(
###
#O.
fe0.force = F_buo #can not be used for many particles ... hmpf
if (h+2*rad) < water_height:
saturatedL
print 'particle is fully surrounded by water'
return saturatedList
saturatedList = []
t0 = O.time
O.dt=1e-4
O.engines=
O.engines=
O.run(25000,True)
#theoretical buoyancy force:
print 'theoretical F_buo = ',4*pi*9810/3
###endofscript
The problem occurs, when I have thousands of particles in the model. How can I find out which particle has which ForceEngine? Do you have other ideas how to solve this problem?
Regards,
Christian
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Christian Jakob
- Solved:
- Last query:
- Last reply: