Dumped value of normal force not matching with calculated normal force

anandmds's picture
Submitted by anandmds on Mon, 05/09/2016 - 13:12

Hey guys,

I extracted the particle contact information in a particular time step, and I chose a pair where a pair of particles were in contact (exactly two of them).
I calculated the resultant normal force acting between the particles, and I also calculated the normal for by analytical formula given in the documentation, F_n = F_spring - F_damping (I found the relative normal velocity by finding the component of the resultant relative velocity along the line joining the two particles, and hence gamma_n*V_nij gave me damping force). But there is huge error of 46% between the cases. I also added the mass*acceleration term but it did not solve the problem. Can someone please help me solve this discrepancy, as this is very crucial for me to proceed ahead in my work.

Thanks & regards
Anand M

robin | Tue, 05/10/2016 - 09:17

Hi Anand,
Which contact law, and fix, are you using?
Could you post a test case with only two particles, displaying the behavior you describe?
If you're using fix deform remap x, it may be part of the problem.
Good luck,
Robin

anandmds's picture

anandmds | Thu, 05/12/2016 - 06:17

Thanks for responding robin, I am posting the data of a particular time step. As I mentioned before, I have analysed such a pair that are in contact only with themselves. The file "p420000" The first 2 columns are the id's of the particles in contact. The next 3 columns are the components of the normal force, followed by 3 components of tangential force, followed by "shear force components" then, the contact area and the last component is the "Normal overlap", "delta_n". The file "sml420000" is self explanatory.

I am using the " Hertz model" and "tangential History" under the pair_style "gran" and I am not using "fix deform remap x", since you asked.
The problem I am facing here is the normal force computed with the help of the components dumped in the data file, is not matching with the normal force I calculate by putting the values in the formula corresponding to my model, given in the documentation. Kindly help me.

Regards
Anand M

Anand.M
M.S. Mechanical Engineering,
I.I.T. Madras

robin | Fri, 05/13/2016 - 10:37

Hi Anand,
I'm not using any hertzian law, so I never checked.
Here's an example of a test case for the tangential damping, which seems to work fine (error=machine epsilon).
You might want to do the same for the law you need, and post it, because we cannot do mush with only the result files.
Cheers,
Robin

### Simulation parameters
variable gamt equal 1e6
variable diam equal 1.5 # particle diameter
variable timeStep equal 0.01 # time step
variable mass equal 1e14 # particles mass
variable nStep equal 20 # number of steps

### General settings
atom_style granular
atom_modify map array
boundary f f f
newton off
communicate single vel yes
units si
neighbor $(v_diam/10) bin
neigh_modify delay 0
timestep ${timeStep}

### Domain definition, particles generation, velocity
region myRegion block -2 2 -2 2 -2 2 units box
create_box 1 myRegion
create_atoms 1 single 0 0 $(0.7*0.5*v_diam)
create_atoms 1 single 0 0 $(-.7*0.5*v_diam)
group 1 id 1 # for velocity command
group 2 id 2
set region myRegion diameter ${diam}
set region myRegion mass ${mass}
velocity 1 set 0 +1e+0 0
velocity 2 set 0 -1e+0 0

### Interaction model choice
fix myFric all property/global coefficientFriction peratomtypepair 1 1e300
fix myKn all property/global kn peratomtypepair 1 0
fix myKt all property/global kt peratomtypepair 1 0
fix myCn all property/global gamman_abs peratomtypepair 1 0
fix myCt all property/global gammat_abs peratomtypepair 1 ${gamt}
pair_style gran model hooke/stiffness tangential history absolute_damping on
pair_coeff * *

### Force verification
compute i all pair/gran/local vel force_tangential # Output: vx1 vy1 vz1 vx2 vy2 vz2 fTx fTy fTz
compute j all reduce max c_i[2] c_i[3] c_i[5] c_i[6] c_i[8] c_i[9] # Local variables can't be handled by command variable. Only one pair: take the max.
# Tangential force from liggghts
variable FtLig equal (c_j[5]^2+c_j[6]^2)^0.5
# Tangential velocity from liggghts
variable distY equal y[1]-y[2]
variable distZ equal z[1]-z[2]
variable r equal (v_distY^2+v_distZ^2)^0.5
variable enY equal v_distY/v_r
variable enZ equal v_distZ/v_r
variable veloY equal c_j[1]-c_j[3]
variable veloZ equal c_j[2]-c_j[4]
variable veloN equal v_veloY*v_enY+v_veloZ*v_enZ
variable veloNY equal v_veloN*v_enY
variable veloNZ equal v_veloN*v_enZ
variable veloTY equal v_veloY-v_veloNY
variable veloTZ equal v_veloZ-v_veloNZ
variable veloT equal (v_veloTY^2+v_veloTZ^2)^0.5
# Theoretical tangential force from velocity
variable Ft equal v_gamt*v_veloT
variable error equal (v_FtLig-v_Ft)/v_Ft

### Output
thermo_style custom step v_veloT v_FtLig v_Ft v_error # choose data to output
thermo_modify format float %e # set format to scientific notation

### Run
fix myIntegration all nve
run ${nStep}

anandmds's picture

anandmds | Sat, 05/14/2016 - 07:46

Thanks Robin, I figured why my results were not matching though. The data I was getting was for a larger time step, Hence it was not matching with the exact results immediately. If I reduced the timestep and redid the calculations, the error reduces significantly.
Though it would be really great, if you could help me solve another problem, whose source I am not able to figure. The dump values of "thermal_heatflux" & "temp" are coming out to be "-nan" after some time of running the simulation. How do I get rid of this ? I have tried reducing the time step and also reduce the number of particles. when I reduce the no. of particles to a great extent, "-nan" appears at a later stage, but does not vanish. How do I get rid of this ? Please help.

Regards
Anand M

Anand.M
M.S. Mechanical Engineering,
I.I.T. Madras