use of Law2_ScGeom_CapillaryPhys_Capillarity with variable pressure does not change results
Hello,
I am trying a simple test case with rolling large spheres on top of small ones by using the two 'classical capillary exemples present in the directory :
./examples/
in both cases changing the capillaryPressure in Law2_ScGeom_
in complement in some previous answers in the Yade-help you are talking about two 'similar' laws :
Law2_ScGeom_
so what is the actual situation and which one we have to use in order to see some differences?
thanks in adance for your help
Luc
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Hi,
If I remember correctly, the biggest difference between Law2_ScGeom_
- Law2_ScGeom_
- the interpolation used to go from the discrete set of data (in the capillary file(s)) to any YADE interaction is also different. The one of Law2_ScGeom_
Anyway, I would first try much simpler configurations (a liquid bridge between 2 spheres, like [*]) : on that configuration, I'm quite sure you will get different capillary forces for different capillary pressures.
I'm actually expecting your current observations to be quite specific to your current (more complex) configuration.
[*] https:/
Revision history for this message
|
#2 |
Hi Jerôme,
my engine is exactly the same as in the reference [*]:
#for linear model only
O.engines=[
),
# call the checkUnbalanced function (defined below) every 2 seconds
]
I guess that the computeThings() is only for obtaining intermediate output? and does not play a rol ein the fcap calculation?
In my problem, my main concern is the transiont between the packing preparation where the capillary pressure is set to zero in order to have identical packing structure then set to the defined Cap_Pressure.
In my guess, this will not create new contact so no new need of fcap caluation?
maybe I am wrong somewhere?
Revision history for this message
|
#3 |
O.engines does not tell much in itself here. Particle size considerations are at least as much important: with "big" particles, the behavior is anyway insensitive to capillary forces, and I would expect the same result between (dry), (use of Law2_ScGeom_
Regarding your workflow and the sudden activation of capillary forces: usually when you introduce new forces in a discrete system, things can happen (e.g. contacts may create).
As for the "need of fcap calculation", Law2_ScGeom_
PS : Your reference [*] in #2 can not be the same as mine in #1, it does not help the discussion ;-)
Revision history for this message
|
#4 |
Hi Jérôme,
here the full code and the table for the batch test with only the capillray pressure changes : 1000 and 5000
exactly the same particle positions (611 moving) for all of them after 1913000 steps !!
if I am testing type = 3 it is alaso the same thing : no difference??
of course the results are different between the three cases (1 dry, 2 hertz,3 linear)
So I don't catch why these engine loops are not playing well?
-------
table :
model_type packing_fraction pas_box theta_max converg_min cover_pack_fraction init_seed friction ratio Cap_Pres_Imposed
2 .55 .1 80.0 .002 0.3 625 0.5 2. 1000
2 .55 .1 80.0 .002 0.3 625 0.5 2. 5000
and the code :
# avec directory : +'/'+
# The components of the batch are:
# 1. table with parameters, one set of parameters per line (ccc.table)
# 2. readParamsFromTable which reads respective line from the parameter file
# 3. the simulation muse be run using yade-batch, not yade
#
# $ yade-batch --job-threads=1 03-oedometric-
#
# load parameters from file if run in batch
# default values are used if not run from batch
# gravity deposition in box, showing how to plot and save history of data,
# and how to control the simulation while it is running by calling
# python functions from within the simulation loop
#pas_box theta_max converg_min cover_pack_fraction init_seed friction ratio
#model_type bottom_cover pas_box theta_max converg_min cover_pack_fraction init_seed friction ratio
#3 .55 .1 80.0 .002 0.3 625 0.5 2.5 5000
readParamsFromT
# make rMean, rRelFuzz, maxLoad accessible directly as variables later
from yade.params.table import *
# import yade modules that we will use below
from yade import pack, plot, export,math
global ratio,nombre,
global cover_pack_fraction ,converg_min, init_seed,
global i_pas, box_size,
global angle_actif,angle
#some parameters passed by batch_table:
####batch : friction = 0.5
####batch : theta_max = 30.0
####batch : pas_box = 0.1
####batch : ratio = 3 # size ratio between the glued spheres and the moving ones
####batch : cover_pack_fraction = 0.2 # coverage percent for moving spheres
####batch : init_seed=10
####batch : packing_fraction = 70./100.
####batch : model_type = 1
#some parameters:
shear_modulus = 1e5
poisson_ratio = 0.3
young_modulus = 2*shear_
local_damping = 0.01
viscous_normal = 0.021
viscous_shear = 0.8*viscous_normal
position_init = numpy.arange(
position_init = position_
numpy.zeros_
Cap_Pressure = 0.0 #valeur initiale
angle = math.atan(friction) # value in radians for friction Angle
angle_init = math.atan(0.10)
angle_actif = angle_init
# initialisation coordonnees initiales
#newTable(
#creating a material (FrictMat):
#frictionAngle(=.5)
# Contact friction angle (in radians). Hint : use ‘radians(
id_SphereMat=
SphereMat=
#1 = >hertz model sans capillary forces
if model_type == 1:#hertz model with capillary forces
converg_min = converg_min
elif model_type == 2: #hertz model with capillary forces
converg_min = 10.0*converg_min
else: #for linear model only
converg_min = 10*converg_min
box_size = 4.0
i_pas = 0
step0 = 0
step1 = 0
step2 = 0
step_precedent = 0
mask1=0b01
mask2=0b10
mask3=0b11
gravity_y = 9.81*sin( pas_box*
gravity_z = 9.81*cos( pas_box*
O.reset
# create rectangular box from facets
O.bodies.
# create empty sphere packing
# sphere packing is not equivalent to particles in simulation, it contains only the pure geometry
rayon = 0.025
height = 5. * rayon
nombre= int(packing_
print("nombre = ",nombre)
print("friction angle = ",angle_actif)
print("Model type (1 sec- 2 hertz, 3 lineaire) = ",model_type)
sp=pack.
# generate randomly spheres with uniform radius distribution
sp.makeCloud(
# add the sphere pack to the simulation
sp.toSimulation
# simulation loop
#define engines:
if model_type == 1:
O.engines=[
ForceResetter(),
InsertionSort
InteractionLoop(
# handle sphere+sphere and facet+sphere collisions
[Ig2_
[Ip2_
# [Law2_L3Geom_
),
NewtonIntegra
# call the checkUnbalanced function (defined below) every 2 seconds
PyRunner(
]
elif model_type == 2: #hertz model with capillary forces
O.engines=[
ForceResetter(),
InsertionSort
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
Law2_
#It is also necessary to disable interactions removal by the constitutive law (Law2).
#for hertz model only Value of the capillary pressure Uc defined as Uc=Ugas-Uliquid 10000 initial
#Capillary pressure uc, to be defined equal to Law2_ScGeom_
NewtonIntegra
# call the checkUnbalanced function (defined below) every 2 seconds
PyRunner(
]
ContactModel.
ContactModel.
ContactModel.
else: #for linear model only
O.engines=[
ForceResetter(),
InsertionSort
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
Law2_
NewtonIntegra
# call the checkUnbalanced function (defined below) every 2 seconds
PyRunner(
]
# timesteps
O.dt=.5*
# enable energy tracking; any simulation parts supporting it
# can create and update arbitrary energy types, which can be
# accessed as O.energy[
O.trackEnergy=True
nom_file=
filename_
traitement_file = nom_file+
traitement = open(traitement
traitement.close()
# if the unbalanced forces goes below .05, the packing
# is considered stabilized, therefore we stop collected
# data history and stop
def checkUnbalanced():
global converg_
# print("iteration= ",utils.
if (O.iter)<(5000): return
if (O.iter-
if (O.iter-
O.save(
O.pause()
#######
# the rest will be run only if unbalanced is < <converg_min (stabilized packing)
if utils.unbalance
# print ("bal iter steps :",utils.
#######
if step0==0:
step0 = O.iter
print ("len-O.bodies = ",len(O.bodies))
for b in O.bodies:
#b1.state.vel = Vector3(0,0,0)
b.state.vel[0] = 0 # stop
b.state.vel[1] = 0 # tous les
b.state.vel[2] = 0 # deplacements translations
b.state.angVel = Vector3(0,0,0)# stop les rotations
#b.angVel[0]=0
#b.angVel[1]=0
#b.angVel[2]=0
b.state.
b.state.
O.save(
# save file text mode; beginning of the run
# export.
# export.
print ("fin de step 1: ",step0)
#######
if step0 ==O.iter and step1==0:
step1=1
nombre_moving = int(cover_
print ("nombre_moving =", nombre_moving)
#generate particles:
sp=pack.
# generate randomly spheres with uniform radius distribution
sp.makeCloud(
# O.bodies.
# add the sphere pack to the simulation
sp.toSimulati
# export.
print ("len-O.bodies (2 packs) = ",len(O.bodies))
#######
if O.iter>step0 and step1==1:
step1=O.iter
step2=1
step_
O.save(
angle_actif = angle
O.materials[
# for existing contacts, set contact friction directly
for i in O.interactions: i.phys.
print("friction angle (step2) = ",angle_actif)
pos_init()
# save file text mode; beginning of the run
# export.
# export.
print ("fin de step2 : ", step1)
Cap_
#######
if O.iter>step1 and step2==1:
if O.iter<
step_
num_Angle=
str_Angle= f"{(num_
pos_moved()
# filename1=
filename1=
filenamevtk=
export.
# export.
# # now open paraview, click "Tools" menu -> "Python Shell", click "Run Script", choose "pv_section.py" from this directiory
# or just run python pv_section.py
# see /home/oger/
# text2vtk and text2vtkSection function can be copy-pasted from yade/py/export.py into separate py file to avoid executing yade or to use pure python
export.
i_pas = i_pas+ 1
gravity_y = 9.81*sin( pas_box*
gravity_z = 9.81*cos( pas_box*
Newton_
print ("info : ", (pas_box*i_pas), gravity_y, gravity_z, O.iter)
ForceResetter()
#print(
if (pas_box*
# save output file txt after end of second sedimentation
####batch : export.
O.save(
O.pause()
def pos_init():
global position_
nombre_mobile=0
for b in O.bodies:
if b.mask==mask3:
position_
position_
position_
position_
# print( position_
nombre_mobile = nombre_mobile+1
def pos_moved():
global position_
nombre_mobile = 0
nombre_moved = 0
for b in O.bodies:
if b.mask==mask3:
dist=
(position_
(position_
if dist>( position_
nombre_
# print("
nombre_mobile = nombre_mobile+1
traitement = open(traitement
print (i_pas,
traitement.close()
# save tmp pour rerun convergence
O.saveTmp()
O.run()
# when running with yade-batch, the script must not finish until the simulation is done fully
# this command will wait for that (has no influence in the non-batch mode)
waitIfBatch()
Revision history for this message
|
#5 |
This question was expired because it remained in the 'Open' state without activity for the last 15 days.
Revision history for this message
|
#6 |
i still need an answer so:
please help me by just checking if the series of mechanical parameters attribution are correct as they are not playing the exact rules right now!
Revision history for this message
|
#7 |
This question was expired because it remained in the 'Open' state without activity for the last 15 days.