Skip to content

Commit

Permalink
Make scripts for 2D and 3D
Browse files Browse the repository at this point in the history
  • Loading branch information
slitvinov committed May 12, 2012
1 parent 92bf9cc commit a49e0b1
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 11 deletions.
3 changes: 3 additions & 0 deletions examples/USER/sph/sdpd-polymer-fedosov/3d-lattice.lmp
@@ -0,0 +1,3 @@
region box block 0.0 ${Lx} 0.0 ${Ly} 0 ${Lz} units box
create_box 1 box
lattice sc ${dx}
16 changes: 16 additions & 0 deletions examples/USER/sph/sdpd-polymer-fedosov/3d-vars.lmp
@@ -0,0 +1,16 @@
variable Ly equal 1.803e-3
variable Lx equal ${Ly}/50*20
variable Lz equal ${Ly}/50*10
variable dx equal 2.5e-5
variable sdpd_rho equal 1000
variable sdpd_rho0 equal 1000
variable sdpd_c equal 3e-2
variable sdpd_eta equal 1.5e-1
variable sdpd_background equal 0.0
variable sdpd_mu equal ${sdpd_eta}/${sdpd_rho}
variable h equal 2.7*${dx}
variable gx equal 6.12
variable Nfreq equal 1000
variable r0 equal 1.4*${dx}
variable H equal 5.3e-4
variable sdpd_mass equal ${dx}*${dx}*${dx}*${sdpd_rho}
Expand Up @@ -10,14 +10,14 @@ else
exit -1
fi

ndim=3d
rm -rf dum* im* poly* log.lammps
${lmp} -in sdpd-polymer2D-inti.lmp
${lmp} -var ndim ${ndim} -in sdpd-polymer-init.lmp
${restart2data} poly3d.restart poly3d.txt


awk -v cutoff=3.0 -v Nbeads=0 -v Nsolvent=1 -v Npoly=full \
-f addpolymer.awk poly3d.txt > poly3.txt
nbound=$(tail -n 1 poly3.txt | awk '{print $1}')
sed "s/_NUMBER_OF_BOUNDS_/$nbound/1" poly3.txt > poly3d.txt

${mpirun} -np 2 ${lmp} -in sdpd-polymer2D-run.lmp
${mpirun} -np 2 ${lmp} -var ndim ${ndim} -in sdpd-polymer-run.lmp
@@ -1,7 +1,6 @@
clear

echo both
variable ndim string 2d
dimension ${ndim}
units si
atom_style hybrid bond meso
Expand All @@ -14,13 +13,7 @@ include ${ndim}-vars.lmp
# create fluid particles
include ${ndim}-lattice.lmp
create_atoms 1 region box

mass 1 ${sdpd_mass}

#variable sdpd_temp index 1.0e-5


timestep 0.0e-5

write_restart poly3d.restart

@@ -1,5 +1,4 @@
echo both
variable ndim string 2d
dimension ${ndim}
units si
atom_style hybrid bond meso
Expand Down

0 comments on commit a49e0b1

Please sign in to comment.