diff --git a/example/particle/3d/shear1.xml b/example/particle/3d/shear1.xml index 000e9147..1bc1e339 100644 --- a/example/particle/3d/shear1.xml +++ b/example/particle/3d/shear1.xml @@ -2,8 +2,8 @@ - - + + @@ -13,7 +13,7 @@ - + units cgs boundary p f f newton off # required off for tangential history @@ -27,14 +27,15 @@ neigh_modify delay 0 # Declare domain - region domain block -1 1 0 1 -1 1 + variable len2 equal ${length}*0.5 + region domain block -${len2} ${len2} 0 ${height} -${len2} ${len2} create_box 1 domain # Specify particle groups group particle_group type 1 # Define region for particle insertion - region pack block -1 1 0 1 -1 1 + region pack block -${len2} ${len2} 0 ${height} -${len2} ${len2} # Insert particles fix part_1 particle_group particletemplate/sphere 17891 atom_type 1 density constant 1.0 radius constant ${radius} @@ -47,13 +48,13 @@ # Define material properties (from which kn kt etc. are calculated for hertz interactions) soft_particles yes - fix m1 all property/global youngsModulus peratomtype 3000.000000 # defines kn, kt, gamma_n, gamma_t + fix m1 all property/global youngsModulus peratomtype 30000.000000 # defines kn, kt, gamma_n, gamma_t fix m2 all property/global poissonsRatio peratomtype 0.5 # defines kn, kt, gamma_n, gamma_t fix m3 all property/global coefficientRestitution peratomtypepair 1 0.8 # defines damping, must be >0.05 fix m4 all property/global coefficientFriction peratomtypepair 1 0.5 # defines friction - fix topwall all mesh/surface/stress file example/data/plane1x1.stl type 1 scale 2 rotate axis 1 0 0 angle 90 move -1 1 -1 surface_vel 1 0 0 - fix bottomwall all mesh/surface/stress file example/data/plane1x1.stl type 1 scale 2 rotate axis 1 0 0 angle 90 move -1 0 -1 + fix topwall all mesh/surface/stress file example/data/plane1x1.stl type 1 scale ${length} rotate axis 1 0 0 angle 90 move -${len2} ${height} -${len2} surface_vel 1 0 0 + fix bottomwall all mesh/surface/stress file example/data/plane1x1.stl type 1 scale ${length} rotate axis 1 0 0 angle 90 move -${len2} 0 -${len2} # Define physics for particle interactions pair_style gran model hertz tangential history # 'tangential off' sets Ft=0; 'tangential no_history' incorporates damping to Ft, sets kt=0; 'tangential history' incorporate kt and damping into Ft @@ -74,20 +75,20 @@ variable bfx equal f_bottomwall[1] variable bfy equal f_bottomwall[2] variable bfz equal f_bottomwall[3] - dump forces all mesh/vtk 1000 ${output}_wall_*.vtk output interpolate id stress stresscomponents - fix forceslog all print 100 "${time},${tfx},${tfy},${tfz},${bfx},${bfy},${bfz}" file ${output}_forces.csv title "t,tFx,tFy,tFz,bFx,bFy,bFz" screen no + dump forces all mesh/vtk ${vtk_it} ${output}_wall_*.vtk output interpolate id stress stresscomponents + fix forceslog all print ${log_it} "${time},${tfx},${tfy},${tfz},${bfx},${bfy},${bfz}" file ${output}_forces.csv title "t,tFx,tFy,tFz,bFx,bFy,bFz" screen no - dump vtk_dump all atom/vtk 1000 ${output}_part_*.vtu + dump vtk_dump all atom/vtk ${vtk_it} ${output}_part_*.vtu timestep ${timestep} - run 50000 + run ${iterations} - + - + diff --git a/src/lammps.cpp b/src/lammps.cpp index d57379ff..44d04939 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -132,12 +132,12 @@ int main(int argc, char* argv[]) { ret = sscanf(value.c_str(),"%lf%n", &val, &len); if ((ret > 0) && (len == value.size())) { is_numeric = true; - fprintf(fp, "variable %s equal %.15lg\n", v.c_str(), val); + fprintf(fp, "variable %s equal %.13lg\n", v.c_str(), val); } } if (!is_numeric) fprintf(fp, "variable %s string %s\n", v.c_str(), value.c_str()); } - fprintf(fp, "variable timestep equal %.15lg\n", RFI.auto_timestep); + fprintf(fp, "variable timestep equal %.13lg\n", RFI.auto_timestep); fprintf(fp, "\n"); fprintf(fp, "%s\n", RFI.getVar("content").c_str()); fprintf(fp, "\n");