ADFORCE

Submitted by Kashminder on Sat, 06/12/2021 - 00:06

I am trying to use a adforce command to apply a stoke's drag force on a single particle using the following syntax

atom_style granular
atom_modify map array
communicate single vel yes

boundary f f f
newton off
units si
#region reg sphere 0.1 0.1 0.1 0.4 side out
#region reg block -0.05 0.05 -0.05 0.05 0. 0.15 units box
#create_box 1 reg
region reg block -0.005 0.005 -0.005 0.005 0.000 0.002 units box

read_data velo

#processors 2 2 1

neighbor 0.002 bin
neigh_modify delay 0

# Material properties required for new pair styles

fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.95
fix m4 all property/global coefficientFriction peratomtypepair 1 0.05
fix m5 all property/global characteristicVelocity scalar 2
fix m6 all property/global cohesionEnergyDensity peratomtypepair 1 -3000000

# pair style

pair_style gran model hertz tangential history cohesion sjkr
pair_coeff * *

# timestep, gravity
timestep 0.0000001

#fix gravi all gravity 9.81 vector 0.0 0.0 -1.0

# CFD PART
variable tsteps equal 100000000
variable tf equal 360
variable tf1 equal 10
variable dt equal v_tf1/v_tsteps
variable t equal v_dt*step

variable tc equal (v_t)/v_tf

#defining parameters

compute kash all property/atom z
compute kashi all property/atom x
compute kish all property/atom y
variable b equal c_kash[1]
variable p equal sqrt((c_kish[1])^2+(c_kashi[1])^2)

variable uz equal 10^-7
variable uz equal 10^-7
variable uz equal 10^-7

variable fx atom (vx-v_ux)*0.0000000014
variable fy atom (vy-v_uy)*0.0000000014
variable fz atom (vz-v_uz)*0.0000000014

fix ali all addforce v_fx v_fy v_fz

here ux,uy and uz are the velocities of the fluid and vx,vy and vz are the velocities of the particles defined in the data file and 0.0000000014 is the stoke's drag coeffcient. The problem here is that after few iterations the velocity of the particle reaches to 6786m/s (for example). whereas the initial particle velocity is assigned 0 and initial fluid velocity is defined as 5*10^-7. the fluid velocity remains in ^10-7 but the particle velocity reaches so high. I am wondering how can particle move faster then fluid when I am applying stokes drag

SHUBHAM AGARWAL | Fri, 07/16/2021 - 23:50

Hello Kashminder
Hope you have solved the problem. If not, you can try the following:

The error may be due to the following reasons:
1. precision up to which data is stored in the data file
2. Steps for which the data is stored (here, you need the velocity data at every step

To circumvent the above, you may try the following:
You have the equation
force =stokes_coeff*(v_particle-v_fluid)
you can rewrite it as:
force =(stokes_coeff*v_particle)+(-stokes_coeff**v_fluid) = fluid_drag+ const_force

in your model you can apply the above using a combination of 'viscous ' and addforce commands:
fix fluid_drag viscous stokes_coeff # apply the fluid_drag pard the equation
fix ali all addforce const_force_x const_force_y const_force_z # adds const_force part, thus giving the total force

Let me know if you have issues further

Kashminder | Sat, 07/17/2021 - 21:47

I tried doing that, it still doesn't help. I have used this approach now
variable taxx atom v_ux*0.0000000014
variable vaxx atom vx*0.0000000014
variable twitterx atom (v_taxx-v_vaxx)
variable taxyy atom v_uy*0.0000000014
variable vaxyy atom vy*0.0000000014
variable twittery atom (v_taxyy-v_vaxyy)
variable taxyz atom v_uz*0.0000000014
variable vaxyz atom vz*0.0000000014
variable twitterz atom (v_taxyz-v_vaxyz)
variable fx atom v_twitterx
variable fy atom v_twittery
variable fz atom v_twitterz

fix ali all addforce v_fx v_fy v_fz
And I am printing twitter x, twittery and twitterz. Also, I am printing fx, fy and fz in the data file. TO my surprise the values of fx, fy and fz are different from twitterx,y and z. I am confused why does that happens.