Dear all
I’m trying to simulate a water column which is surrounded by air in a block that have fix walls (in sph model)
But i’ve faced many problems and questions. my code has too many errors in answers. i tryed to use hybrid/tait for water and air both and exert gravity to both but the air doesn’t move at all and the water colomn just goes down directly without any moving and shaking like a rigid body and even permeates to the wall.
i don’t know how to rewrite the code to get a reliable answer.
should i use two pair style for water and gas seperatly? if yes how?
how can i make the walls inscrutable?
why my model (even just a water column) doesn’t move just like the water collapse example?
If somebody could clarify this it would be greatly appreciated.
#my code
{
echo both
processors * * 1
units lj
dimension 2
newton on
boundary f f p
atom_style meso
create simulation box
region box block -60 60 -50 50 -0.25 0.25 units box
create_box 3 box
mass 1 0.1
mass 2 0.155
mass 3 0.2
create water particles
region water block -55 -35 -45 15 inf. inf. units box
lattice sq 2
create_atoms 1 region water
create air1
region air1 block -55 -35 15 45 inf. inf. units box
lattice sq 2
create_atoms 2 region air1
create air2
region air2 block -35 55 -45 45 inf. inf. units box
lattice sq 2
create_atoms 2 region air2
create bc1
region bc1 block -60 -55 -50 50 -0.25 0.25 units box
lattice sq 20
create_atoms 3 region bc1
create bc2
region bc2 block -60 60 45 50 -0.25 0.25 units box
lattice sq 20
create_atoms 3 region bc2
create bc3
region bc3 block 55 60 -50 50 -0.25 0.25 units box
lattice sq 20
create_atoms 3 region bc3
create bc4
region bc4 block -60 60 -50 -45 -0.25 0.25 units box
lattice sq 20
create_atoms 3 region bc4
group water type 1
group air type 2
group bc type 3
variable h equal 0.03
variable k equal 0.0000000000003
variable c equal 10.0
variable dt equal 0.1*{h}/{c}
variable nrun equal 15.0/{dt}
pair_style hybrid/overlay sph/rhosum 1 sph/taitwater
pair_coeff * * sph/taitwater 1000.0 {c} 1.0 {h} # use target density of 1000, soundspeed {c} for Tait’s EOS
pair_coeff 1 1 sph/rhosum {h}
pair_coeff 1 2 sph/rhosum {h}
pair_coeff 1 3 sph/rhosum {k}
pair_coeff 1*2 3 none
#pair_coeff 1*3 3 none
#pair_coeff 3*1 3 none
pair_coeff 2 2 sph/rhosum {h}
#pair_style sph/idealgas
delete_atoms overlap .005 all all
#delete_atoms porosity air2 0.5 12345
#delete_atoms porosity air2 0.7 12345
fix gfix air gravity -9.81 vector 0 1 0
fix gfix1 water gravity -9.81 vector 0 1 0
compute rho_peratom all meso_rho/atom
compute e_peratom all meso_e/atom
compute esph all reduce sum c_e_peratom
compute ke all ke
variable etot equal c_esph+c_ke+f_gfix
fix dtfix all dt/reset 1 NULL {dt} 0.5 units box
fix integrate_water_fix water meso
fix integrate_bc_fix bc meso/stationary
fix zeroforce bc setforce 0 0 0
dump dump_id all custom 100 dump.lammpstrj id type xs ys zs c_rho_peratom c_e_peratom fx fy
dump_modify dump_id first yes
thermo 10
thermo_modify norm no
thermo_modify lost ignore
#neigh_modify every 5 delay 0 check no
variable skin equal 0.3*{h}
neighbor {skin} bin # set Verlet list skin distance
run {nrun}
}