in development : not for release

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11670 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
rjones 2014-03-24 21:00:46 +00:00
parent 4376fa63ef
commit 2fb6f59c9f
5 changed files with 0 additions and 720 deletions

View File

@ -1,107 +0,0 @@
# needs description
# E = - grad \phi
# f = q E
echo both
units metal
atom_style atomic
lattice diamond 3.6
pair_style tersoff
boundary s s f
read_data tube_8_4.init
# PARAMETERS-----------------------------
variable L equal zhi-zlo
variable R equal 12.1/2
variable xhiFE equal 5.0*$R
variable xloFE equal -${xhiFE}
variable yhiFE equal $R
variable yloFE equal -${xhiFE}
variable zhiFE equal zhi
variable zloFE equal zlo+10
print "Length $L [${zloFE}, ${zhiFE}]"
variable E equal 10.0
print "Electric field $E"
variable drhodx equal 0.0001
variable s equal 50
# END -----------------------------------
#pair_coeff * * SiC.tersoff C
pair_coeff * * ../../../../potentials/SiC.tersoff C
mass * 12.01
# all atoms simulation
region feRegion block ${xloFE} ${xhiFE} ${yloFE} ${yhiFE} ${zloFE} ${zhiFE} units box
group internal region feRegion
variable nAll equal count(all)
variable nGhost equal count(all)-count(internal)
print ">>> number of stationary ghosts: ${nGhost} of ${nAll}"
neighbor 5. bin
neigh_modify every 10 delay 0 check no
timestep 0.0005
# coupling
fix AtC internal atc electrostatic CNT_electrostatic.mat
fix_modify AtC internal_quadrature off
fix_modify AtC omit atomic_charge
fix_modify AtC mesh create 5 1 12 feRegion f p f
# initial & boundary conditions
fix_modify AtC initial displacement x all 0.0
fix_modify AtC initial displacement y all 0.0
fix_modify AtC initial displacement z all 0.0
fix_modify AtC initial velocity x all 0.0
fix_modify AtC initial velocity y all 0.0
fix_modify AtC initial velocity z all 0.0
fix_modify AtC initial electric_potential all 0.0
variable a equal -$R-0.1
variable b equal $R+0.1
fix_modify AtC mesh create_nodeset tube $a $b $a $b ${zloFE} ${zhiFE} units box
variable a equal ${zloFE}-0.1
variable b equal ${zloFE}+0.1
fix_modify AtC mesh create_nodeset lbc ${xloFE} ${xhiFE} ${xloFE} ${xhiFE} $a $b units box
variable a equal ${xhiFE}-0.1
variable b equal ${xhiFE}+0.1
fix_modify AtC mesh create_nodeset top $a $b ${yloFE} ${yhiFE} ${zloFE} ${zhiFE} units box
variable a equal ${xloFE}-0.1
variable b equal ${xloFE}+0.1
fix_modify AtC mesh create_nodeset bot $a $b ${yloFE} ${yhiFE} ${zloFE} ${zhiFE} units box
fix_modify AtC fix displacement x lbc 0.
fix_modify AtC fix displacement y lbc 0.
fix_modify AtC fix displacement z lbc 0.
fix_modify AtC fix velocity x lbc 0.
fix_modify AtC fix velocity y lbc 0.
fix_modify AtC fix velocity z lbc 0.
fix_modify AtC fix electron_density all 0.0
#fix_modify AtC fix electron_density tube 0.2
fix_modify AtC fix electron_density tube linear 0 0 0 0 0 ${drhodx} 0
fix_modify AtC fix electric_potential all linear 0 0 0 $E 0 0 0 0
fix_modify AtC control momentum flux
# run
thermo_style custom step cpu etotal ke
thermo 1#$s
fix_modify AtC output cnt_electrostaticFE $s full_text
fix_modify AtC output index step
# NOTE not recognized as vector by paraview
variable uX atom x-f_AtC[1]
variable uY atom y-f_AtC[2]
variable uZ atom z-f_AtC[3]
variable rho atom mass*f_AtC[4]
dump CONFIG all custom $s cnt_electrostatic.dmp id type x y z v_uX v_uY v_uZ v_rho
log cnt_electrostatic.log
#run 1000
# fixed charge, bc on potential
fix_modify AtC unfix electric_potential all
fix_modify AtC fix electric_potential lbc linear 0 0 0 $E 0 0 0 0
fix_modify AtC fix electric_potential top linear 0 0 0 $E 0 0 0 0
fix_modify AtC fix electric_potential bot linear 0 0 0 $E 0 0 0 0
run 1000

View File

@ -1,118 +0,0 @@
# needs description
# E = - grad \phi
# f = q E
# NOTE tangent is constant for LAGRANGIAN but not exact...
# NOTE try one atom and one free node
# issue is one of magnitude of E since
# tangent = perm BB - dn/dphi NN
# CHECK CONDITIONING?
echo both
units metal
atom_style atomic
lattice diamond 3.6
boundary f f f
#region box block -4.3458792459312239 4.3458792459312328 -4.3458792459312168 4.3458792459312203 0.0 104.29551668 units box
#region box block 0 10 0 10 0 10
#create_box 1 box
#group box region box
#atom_modify sort 0 1
pair_style tersoff
read_data tube_8_4.data
pair_coeff * * ../../../../potentials/SiC.tersoff C
mass * 12.01
# PARAMETERS-----------------------------
variable L equal zhi-zlo
variable R equal 12.1/2
variable xhiFE equal 5.0*$R
variable xloFE equal -${xhiFE}
variable yhiFE equal $R
variable yloFE equal -${xhiFE}
variable zhiFE equal zhi
variable zloFE equal zlo+10
print "Length $L [${zloFE}, ${zhiFE}]"
variable E equal 0.01 # 1.0 10.0 0.01
variable V equal $E*${zloFE}
variable V equal 2
print "Electric field $E ref.voltage $V"
variable s equal 20
# END -----------------------------------
# all atoms simulation
region feRegion block ${xloFE} ${xhiFE} ${yloFE} ${yhiFE} ${zloFE} ${zhiFE} units box
group internal region feRegion
variable nAll equal count(all)
variable nGhost equal count(all)-count(internal)
print ">>> number of stationary ghosts: ${nGhost} of ${nAll}"
#neighbor 5. bin
#neigh_modify every 10 delay 0 check no
timestep 0.0005
# coupling
fix AtC internal atc electrostatic-equilibrium CNT_electrostatic2.mat
fix_modify AtC omit atomic_charge
#fix_modify AtC internal_quadrature off <<<< ???
variable alat equal 1.42
variable w equal ${alat}*${alat}*3.*sqrt(3.)/4.0
#variable w equal 10
fix_modify AtC atom_weight constant internal $w
fix_modify AtC source_integration atom
fix_modify AtC atom_element_map eulerian 1
fix_modify AtC mesh create 5 1 12 feRegion f p f
fix_modify AtC control momentum flux
#fix_modify AtC extrinsic poisson_solver max_iterations 5
# initial conditions
fix_modify AtC initial displacement x all 0.0
fix_modify AtC initial displacement y all 0.0
fix_modify AtC initial displacement z all 0.0
fix_modify AtC initial velocity x all 0.0
fix_modify AtC initial velocity y all 0.0
fix_modify AtC initial velocity z all 0.0
#variable a equal -$R-0.1
#variable b equal $R+0.1
#fix_modify AtC mesh create_nodeset tube $a $b $a $b ${zloFE} ${zhiFE} units box
fix_modify AtC mesh create_nodeset lbc ${xloFE} ${xhiFE} ${xloFE} ${xhiFE} ${zloFE} ${zloFE} units box
fix_modify AtC mesh create_nodeset rbc ${xloFE} ${xhiFE} ${xloFE} ${xhiFE} ${zhiFE} ${zhiFE} units box
fix_modify AtC mesh create_nodeset bot ${xloFE} ${xloFE} ${yloFE} ${yhiFE} ${zloFE} ${zhiFE} units box
fix_modify AtC mesh create_nodeset top ${xhiFE} ${xhiFE} ${yloFE} ${yhiFE} ${zloFE} ${zhiFE} units box
# boundary conditions
fix_modify AtC fix displacement x lbc 0.
fix_modify AtC fix displacement y lbc 0.
fix_modify AtC fix displacement z lbc 0.
fix_modify AtC fix velocity x lbc 0.
fix_modify AtC fix velocity y lbc 0.
fix_modify AtC fix velocity z lbc 0.
fix_modify AtC fix electric_potential lbc linear 0 0 0 $E 0 0 $V
#fix_modify AtC fix electric_potential rbc linear 0 0 0 $E 0 0 $V
##fix_modify AtC fix electric_potential top linear 0 0 0 $E 0 0 $V
fix_modify AtC fix electric_potential bot linear 0 0 0 $E 0 0 $V
# run
thermo_style custom step cpu etotal ke
thermo $s
fix_modify AtC output cnt_electrostatic2FE $s full_text # binary
fix_modify AtC output index step
# NOTE not recognized as vector by paraview
variable uX atom x-f_AtC[1]
variable uY atom y-f_AtC[2]
variable uZ atom z-f_AtC[3]
variable rho atom mass*f_AtC[4]
dump CONFIG all custom $s cnt_electrostatic2.dmp id type x y z v_uX v_uY v_uZ v_rho
log cnt_electrostatic2.log
#run $s
run 100
# NOTE try fix charge on tip

View File

@ -1,145 +0,0 @@
echo both
units metal
atom_style charge
dielectric 1.
variable type string "_charge"
boundary s s f
# read in CNT
read_data cnt_9_0_100${type}.init
lattice diamond 3.6 # NOTE ???
pair_style airebo 3.0
pair_coeff * * ./CH.airebo C
mass * 12.01
# PARAMETERS-----------------------------
variable dt equal 0.0005
variable L equal zhi-zlo
variable zhi equal zhi
variable zTip equal ${zhi}-2.0
variable zFree equal zhi
variable R equal 12.1/2
variable xhiFE equal 5.0*$R
variable xloFE equal -${xhiFE}
variable yhiFE equal $R
variable yloFE equal -${yhiFE}
variable zloFE equal zlo+10 # create fixed ghosts
variable zhiFE equal zhi+(zhi-${zloFE})/12*2
variable Lfree equal zhi-${zloFE}
variable nx equal 10 # 5
variable nz equal 14 # 12
print "Length $L [${zloFE}, ${zhiFE}] ${zTip}"
#variable E equal 0.1 # bias 1.0
variable Vb equal 0.0 # bias
variable Vg equal 0.5 # gate/modulation
print "bias voltage ${Vb}, gate voltage ${Vg}"
variable n equal 100000
variable s equal 250
# END -----------------------------------
# all atoms simulation
region feRegion block ${xloFE} ${xhiFE} ${yloFE} ${yhiFE} ${zloFE} ${zhiFE} units box
group internal region feRegion
group fixed subtract all internal
fix FIX fixed setforce 0 0 0
thermo 100
#minimize 0 0 1000 1000
#write_restart cnt_in_box0.rst
region TIP block INF INF INF INF ${zTip} INF units box
group TIP region TIP
variable nAll equal count(all)
variable nGhost equal count(all)-count(internal)
variable nTip equal count(TIP)
print ">>> number of stationary ghosts: ${nGhost} of ${nAll}"
print ">>> number of tip atoms : ${nTip}"
neighbor 5. bin
neigh_modify every 10 delay 0 check no
timestep ${dt}
variable tag string "cnt_fixed_charge"
# set charge on tip
variable C equal -0.1 # -0.01 -0.0001102
print "charge $C [e]"
variable c equal $C/${nTip}
set group TIP charge $c
# coupling
fix AtC internal atc electrostatic CNT_id.mat
fix_modify AtC include atomic_charge
fix_modify AtC internal_quadrature off
# note weights don't affect phi or f
fix_modify AtC atom_weight constant internal 1.0
fix_modify AtC extrinsic short_range off
#fix_modify AtC atom_element_map eulerian 1
fix_modify AtC control momentum flux
fix_modify AtC mesh create ${nx} 1 ${nz} feRegion f p f
# initial conditions
fix_modify AtC initial displacement x all 0.0
fix_modify AtC initial displacement y all 0.0
fix_modify AtC initial displacement z all 0.0
fix_modify AtC initial velocity x all 0.0
fix_modify AtC initial velocity y all 0.0
fix_modify AtC initial velocity z all 0.0
fix_modify AtC initial electric_potential all 0.0
# node sets
variable t equal 1.1*$R
fix_modify AtC mesh create_nodeset tube -$t $t -$t $t ${zloFE} ${zFree} units box
fix_modify AtC mesh create_nodeset lefttube -$t $t -$t $t ${zloFE} ${zloFE} units box
fix_modify AtC mesh create_nodeset rbc INF INF INF INF ${zhiFE} ${zhiFE} units box
fix_modify AtC mesh create_nodeset lbc INF INF INF INF ${zloFE} ${zloFE} units box
fix_modify AtC mesh create_nodeset top ${xhiFE} ${xhiFE} INF INF INF INF units box
fix_modify AtC mesh create_nodeset bot ${xloFE} ${xloFE} INF INF INF INF units box
# boundary conditions
fix_modify AtC fix displacement x lbc 0.
fix_modify AtC fix displacement y lbc 0.
fix_modify AtC fix displacement z lbc 0.
fix_modify AtC fix velocity x lbc 0.
fix_modify AtC fix velocity y lbc 0.
fix_modify AtC fix velocity z lbc 0.
# ground
fix_modify AtC fix electric_potential lbc 0
# bias
fix_modify AtC fix electric_potential rbc ${Vb}
# gate
fix_modify AtC fix electric_potential bot ${Vg}
# run
compute CM TIP com
compute q all property/atom q
compute Q all reduce sum c_q
compute FSUM all reduce sum fx fy fz
thermo_style custom step etotal ke c_CM[1] c_CM[2] c_CM[3] &
c_Q f_AtC[4] f_AtC[5] f_AtC[6] f_AtC[7] f_FIX[1] f_FIX[2] f_FIX[3] f_AtC c_FSUM[1]
thermo $s
log ${tag}.log
#run $n
#run $n
thermo 10
timestep 0.0
min_modify line quadratic
minimize 0 0 1000 1000
# u = F L^3 / 3 EI --> EI = F L^3 / 3 u
variable u equal c_CM[1]
variable F equal f_AtC[5]
# [eV/A * A^2] --> [N m]
variable eV2J equal 1.60217646e-19
variable A2m equal 1.e-10
variable EI equal $F*${Lfree}*${Lfree}*${Lfree}/3./$u
variable EI equal ${EI}*${eV2J}*${A2m}
print "flexural rigidity ${EI} [Nm^2] NOTE z force"
# flexural rigidity 6.716732985e-25 [Nm^2]
fix_modify AtC output ${tag}FE 1 full_text
fix_modify AtC output index step
run 1

View File

@ -1,186 +0,0 @@
echo both
units metal
atom_style charge
dielectric 1.
variable type string "_charge"
boundary s s f
# read in CNT
read_data cnt_9_0_100${type}.init
lattice diamond 3.6 # NOTE ???
pair_style airebo 3.0
pair_coeff * * ./CH.airebo C
mass * 12.01
# PARAMETERS-----------------------------
variable dt equal 0.0005
variable L equal zhi-zlo
variable zhi equal zhi
variable zTip equal ${zhi}-2.0 # 2 4
variable zFree equal zhi
variable R equal 12.1/2
variable xhiFE equal 5.0*$R
variable xloFE equal -${xhiFE}
variable yhiFE equal $R
variable yloFE equal -${yhiFE}
variable zloFE equal zlo+10 # create fixed ghosts
variable zhiFE equal zhi+(zhi-${zloFE})/12*2
variable Lfree equal zhi-${zloFE}
variable nx equal 10 # 5
variable nz equal 14 # 12
print "Length $L [${zloFE}, ${zhiFE}] ${zTip}"
#variable E equal 0.1 # bias 1.0
variable Vb equal 0.1 # 0.1 #0.5 #0.0 # bias
variable Vg equal 0.5 # 1.0 # 5.0 0.5 #50.0 # 0.5 # gate/modulation
print "bias voltage ${Vb}, gate voltage ${Vg}"
variable ng equal 20 # 80 # 10
variable nb equal 2 # 3
variable n equal 100000
variable s equal 250
# END -----------------------------------
region TIP block INF INF INF INF ${zTip} INF units box
group TIP region TIP
#region FIXED block INF INF INF INF INF ${zLoFE} units box
#group FIXED region FIXED
#group FREE subtract all FIXED
region feRegion block ${xloFE} ${xhiFE} ${yloFE} ${yhiFE} ${zloFE} ${zhiFE} units box
group internal region feRegion
group FIXED subtract all internal
fix FIX FIXED setforce 0 0 0
variable nAll equal count(all)
variable nGhost equal count(all)-count(internal)
variable nTip equal count(TIP)
print ">>> number of stationary ghosts: ${nGhost} of ${nAll}"
print ">>> number of tip atoms : ${nTip}"
neighbor 5. bin
neigh_modify every 10 delay 0 check no
timestep ${dt}
thermo 100
variable tag string "electrostatic_bending"
# set charge on tip
variable C equal -0.025
print "charge $C [e]"
variable c equal $C/${nTip}
set group TIP charge $c
# coupling
fix AtC internal atc electrostatic CNT_id.mat
fix_modify AtC include atomic_charge
fix_modify AtC internal_quadrature off
# note weights don't affect phi or f
fix_modify AtC atom_weight constant internal 1.0
fix_modify AtC extrinsic short_range off
#fix_modify AtC atom_element_map eulerian 1
fix_modify AtC control momentum flux
fix_modify AtC mesh create ${nx} 1 ${nz} feRegion f p f
# initial conditions
fix_modify AtC initial displacement x all 0.0
fix_modify AtC initial displacement y all 0.0
fix_modify AtC initial displacement z all 0.0
fix_modify AtC initial velocity x all 0.0
fix_modify AtC initial velocity y all 0.0
fix_modify AtC initial velocity z all 0.0
fix_modify AtC initial electric_potential all 0.0
# node sets
variable t equal 1.1*$R
fix_modify AtC mesh create_nodeset tube -$t $t -$t $t ${zloFE} ${zFree} units box
fix_modify AtC mesh create_nodeset lefttube -$t $t -$t $t ${zloFE} ${zloFE} units box
fix_modify AtC mesh create_nodeset rbc INF INF INF INF ${zhiFE} ${zhiFE} units box
fix_modify AtC mesh create_nodeset lbc INF INF INF INF ${zloFE} ${zloFE} units box
fix_modify AtC mesh create_nodeset top ${xhiFE} ${xhiFE} INF INF INF INF units box
fix_modify AtC mesh create_nodeset bot ${xloFE} ${xloFE} INF INF INF INF units box
# boundary conditions
fix_modify AtC fix displacement x lbc 0.
fix_modify AtC fix displacement y lbc 0.
fix_modify AtC fix displacement z lbc 0.
fix_modify AtC fix velocity x lbc 0.
fix_modify AtC fix velocity y lbc 0.
fix_modify AtC fix velocity z lbc 0.
# ground
fix_modify AtC fix electric_potential lbc 0
# bias
fix_modify AtC fix electric_potential rbc ${Vb}
# gate
fix_modify AtC fix electric_potential bot ${Vg}
# run
compute CM TIP com
compute q all property/atom q
compute Q all reduce sum c_q
compute FSUM all reduce sum fx fy fz
compute RSUM internal reduce sum fx fy fz
thermo_style custom step etotal ke c_CM[1] c_CM[2] c_CM[3] &
c_Q f_AtC[4] f_AtC[5] f_AtC[6] f_AtC[7] f_FIX[1] f_FIX[2] f_FIX[3] f_AtC c_FSUM[1] c_RSUM[1]
thermo $s
fix_modify AtC output ${tag}FE 100000000 full_text # $s full_text #binary
fix_modify AtC output index step
# NOTE not recognized as vector by paraview
variable uX atom x-f_AtC[1]
variable uY atom y-f_AtC[2]
variable uZ atom z-f_AtC[3]
variable rho atom mass*f_AtC[4]
dump CONFIG all custom $s ${tag}.dmp id type x y z v_uX v_uY v_uZ v_rho
reset_timestep 0
log ${tag}.log
# [eV/A * A^2] --> [N m]
variable eV2J equal 1.60217646e-19
variable A2m equal 1.e-10
thermo 10
timestep 0.0
min_modify line quadratic
variable Vg equal 0.1
variable Lx equal 1.0
variable ng equal 4
#compute RSUM FREE reduce sum fx fy fz
#dump CONFIG all custom 10000 ${tag}.dmp id type x y z c_U[1] c_U[2] c_U[3] fx fy fz
variable a equal 0
variable i loop ${ng}
label loop_i
variable b equal ($i-1)*${Vg}/(${ng}-1)/${Lx}
fix_modify AtC fix electric_potential all linear 0 0 0 $b 0 $a 0
min_style cg
min_modify line quadratic
#minimize 0 0 100000 100000
minimize 0 0 1000 1000
min_style sd
min_modify line backtrack
#minimize 0 0 100000 100000
minimize 0 0 1000 1000
fix_modify AtC output now
# u = F L^3 / 3 EI --> EI = F L^3 / 3 u
variable u equal c_CM[1]
variable uz equal c_CM[3]
# variable F equal f_AtC[5]
# variable Fz equal f_AtC[7]
variable F equal c_RSUM[1]
variable Fz equal c_RSUM[3]
variable R equal $F-$C*$b
variable Rz equal ${Fz}-$C*$a
variable EI equal $F*${Lfree}*${Lfree}*${Lfree}/3./$u
variable EI equal ${EI}*${eV2J}*${A2m}
#print "flexural rigidity ${EI} [Nm^2] NOTE z force"
print ">> V $b $a F $F ${Fz} u $u ${uz} c $c phi 0 EI ${EI} R $R ${Rz}"
next i
jump SELF loop_i

View File

@ -1,164 +0,0 @@
echo both
units metal
atom_style charge
dielectric 1.
boundary s s f
# read in CNT
read_data min_CNT_dos.data
set group all charge 0
lattice diamond 3.6
pair_style airebo 3.0
pair_coeff * * ./CH.airebo C
mass * 12.01
compute q all property/atom q
compute Q all reduce sum c_q
# PARAMETERS-----------------------------
# [eV/A * A^2] --> [N m]
variable eV2J equal 1.60217646e-19
variable A2m equal 1.e-10
variable Lx equal xhi-xlo
variable L equal zhi-zlo
variable zTip equal zhi-3.5
variable zFree equal zhi
variable R equal 12.1/2
variable xhiFE equal 5.0*$R
variable xloFE equal -${xhiFE}
variable yhiFE equal $R
variable yloFE equal -${yhiFE}
variable zloFE equal zlo+10 # create fixed ghosts
variable zhiFE equal zhi+(zhi-${zloFE})/12*2
variable Lfree equal zhi-${zloFE}
variable nx equal 10 # 5
variable nz equal 14 # 12
print "Length $L [${zloFE}, ${zhiFE}] ${zTip}"
variable Vb equal 0.1
variable Vg equal 0.15
variable V0 equal 1. # 2.
print "bias voltage ${Vb}, gate voltage ${Vg}"
variable ng equal 3
variable n equal 100000
variable s equal 250
# END -----------------------------------
region TIP block INF INF INF INF ${zTip} INF units box
group TIP region TIP
region feRegion block ${xloFE} ${xhiFE} ${yloFE} ${yhiFE} ${zloFE} ${zhiFE} units box
group internal region feRegion
group FIXED subtract all internal
fix FIX FIXED setforce 0 0 0
thermo 10
set group all image 0 0 0
compute CM TIP com
thermo_style custom step c_Q etotal c_CM[1] c_CM[3]
#minimize 0 0 1000 1000
#write_restart min_CNT_dos.rst
run 0
#EXIT
variable L equal c_CM[1]
variable Lx equal $L
variable dx equal c_CM[1]-${Lx}
variable L equal c_CM[3]
variable Lz equal $L
variable dz equal c_CM[3]-${Lz}
print "initial ${Lx} ${Lz} "
variable nAll equal count(all)
variable nGhost equal count(all)-count(internal)
print ">>> number of stationary ghosts: ${nGhost} of ${nAll}"
neighbor 5. bin
neigh_modify every 10 delay 0 check no
timestep 0
thermo 100
# coupling ............................................................
fix AtC internal atc electrostatic CNT_electrostatic2.mat
fix_modify AtC omit atomic_charge
#fix_modify AtC internal_quadrature off ## NOTE active -> error
# note weights don't affect phi or f i.e. they divide out
fix_modify AtC atom_weight constant internal 1.0
fix_modify AtC extrinsic short_range off
fix_modify AtC source_integration atom
fix_modify AtC atom_element_map eulerian 1
fix_modify AtC control momentum none # flux
fix_modify AtC mesh create ${nx} 1 ${nz} feRegion f p f
# node sets ............................................................
variable t equal 1.1*$R
fix_modify AtC mesh create_nodeset tube -$t $t -$t $t ${zloFE} ${zFree} units box
fix_modify AtC mesh create_nodeset lefttube -$t $t -$t $t ${zloFE} ${zloFE} units box
fix_modify AtC mesh create_nodeset rbc INF INF INF INF ${zhiFE} ${zhiFE} units box
fix_modify AtC mesh create_nodeset lbc INF INF INF INF ${zloFE} ${zloFE} units box
fix_modify AtC mesh create_nodeset top ${xhiFE} ${xhiFE} INF INF INF INF units box
fix_modify AtC mesh create_nodeset bot ${xloFE} ${xloFE} INF INF INF INF units box
# boundary conditions ..................................................
fix_modify AtC fix displacement x lbc 0.
fix_modify AtC fix displacement y lbc 0.
fix_modify AtC fix displacement z lbc 0.
fix_modify AtC fix velocity x lbc 0.
fix_modify AtC fix velocity y lbc 0.
fix_modify AtC fix velocity z lbc 0.
# minimize .............................................................
compute FSUM all reduce sum fx fy fz
compute RSUM internal reduce sum fx fy fz
thermo $s
fix_modify AtC output electrostatic_bending_dosFE 100000000 full_text binary
fix_modify AtC output index step
# store original (reference) coordinates
fix X all store/state 0 x y z
# NOTE not recognized as vector by paraview - due to dump2ensight
variable uX atom x-f_X[1]
variable uY atom y-f_X[2]
variable uZ atom z-f_X[3]
#variable uX atom x-f_AtC[1]
#variable uY atom y-f_AtC[2]
#variable uZ atom z-f_AtC[3]
variable rho atom mass*f_AtC[4]
dump CONFIG all custom 100000 electrostatic_bending_dos.dmp id type x y z c_q v_uX v_uY v_uZ v_rho
reset_timestep 0
log electrostatic_bending_dos.log
thermo 10 # 1 # 10
min_modify line quadratic
variable a equal 0
variable i loop ${ng}
thermo_style custom step c_Q pe v_dx v_dz f_FIX[1] f_FIX[3]
label loop_i
variable b equal ($i-1)*${Vg}/${ng}/${Lz}
fix_modify AtC fix electric_potential all linear 0 0 0 $b 0 $a ${V0} # <<<ALL
min_style cg
min_modify line quadratic
minimize 0 0 1000 1000
#min_style sd
#min_modify line backtrack
#minimize 0 0 1000 1000
fix_modify AtC output now
# u = F L^3 / 3 EI --> EI = F L^3 / 3 u
variable Q equal c_Q
variable ux equal ${dx}
variable uz equal ${dz}
variable Fx equal f_FIX[1]
variable Fz equal f_FIX[3]
variable EI equal ${Fx}*${Lfree}*${Lfree}*${Lfree}/3./${ux}
variable EI equal ${EI}*${eV2J}*${A2m}
print ">> V $b $a F ${Fx} ${Fz} u ${ux} ${uz} Q $Q EI ${EI}"
next i
jump SELF loop_i