mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
update tutorial case
This commit is contained in:
@ -6,10 +6,20 @@
|
||||
# Christoph Goniva - Sept. 2010
|
||||
#===================================================================#
|
||||
|
||||
#- source CFDEM env vars
|
||||
. ~/.bashrc
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
|
||||
|
||||
#- define variables
|
||||
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
|
||||
export casePath
|
||||
headerText="test_case"
|
||||
logfileName="$casePath/log_$headerText"
|
||||
solverName="cfdemSolverRhoPimpleChem"
|
||||
nrProcs="4"
|
||||
|
||||
export casePath
|
||||
# check if mesh was built
|
||||
if [ -f "$casePath/CFD/constant/polyMesh/points" ]; then
|
||||
echo "mesh was built before - using old mesh"
|
||||
@ -26,6 +36,11 @@ else
|
||||
$casePath/parDEMrun.sh
|
||||
fi
|
||||
|
||||
#echo "Run Simulation"
|
||||
#cd $casePath/CFD
|
||||
#decomposePar
|
||||
#mpirun -np $nrProcs $solverName -parallel | tee -a $logfileName
|
||||
|
||||
#- run parallel CFD-DEM in new terminal
|
||||
gnome-terminal -e "bash $casePath/parCFDDEMrun.sh"
|
||||
#bash $casePath/parCFDDEMrun.sh
|
||||
#gnome-terminal -e "bash $casePath/parCFDDEMrun.sh"
|
||||
bash $casePath/parCFDDEMrun.sh
|
||||
@ -23,13 +23,13 @@ startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0.5;
|
||||
endTime 3;
|
||||
|
||||
deltaT 0.0001;
|
||||
|
||||
writeControl adjustableRunTime; // timeStep; // //runTime;//
|
||||
|
||||
writeInterval 0.05;
|
||||
writeInterval 0.5;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
|
||||
@ -60,19 +60,19 @@ fix cfd3 all couple/cfd/chemistry n_species 4 species_names CO CO2 O2 N2
|
||||
fix cfd5 all chem/shrink/core speciesA CO molMassA 28.01 speciesC CO2 molMassC 44.01
|
||||
|
||||
# Chemical properties for unreacted shrink core (activate only when chem/shrink/core is active)
|
||||
#fix k0 all property/global k0_cfd5 vector 2700 25 17
|
||||
#fix Ea all property/global Ea_cfd5 vector 113859 73674 69488
|
||||
fix k0 all property/global k0_cfd5 vector 17 25 2700
|
||||
fix Ea all property/global Ea_cfd5 vector 69488 73674 113859
|
||||
|
||||
# particle porosities adn tortuosity
|
||||
fix porosity all property/global porosity_ scalar 0.15
|
||||
fix tortuosity all property/global tortuosity_ scalar 3
|
||||
fix pore_diameter all property/global pore_diameter_ scalar 3.91e-6
|
||||
|
||||
# Material properties for unreacted chemical shrink core (activate only when chem/shrink/core is active)
|
||||
#fix density all property/global density_all vector 5240 5170 5740 7870
|
||||
#fix molMass all property/global molMass_all vector 156 231.533 71.844 55.845
|
||||
fix density all property/global density_all vector 7870 5740 5170 5240
|
||||
fix molMass all property/global molMass_all vector 55.845 71.844 231.533 156
|
||||
|
||||
# define layer radius
|
||||
#fix layerRelRad all property/atom relRadii vector yes no no 0.3 0.5 0.6 1.0
|
||||
fix layerRelRad all property/atom relRadii vector yes no no 1.0 0.6 0.5 0.3
|
||||
|
||||
# apply nve integration to all particles that are inserted as single particles
|
||||
@ -82,7 +82,7 @@ fix integr all nve/sphere
|
||||
## DEBUG ##
|
||||
compute masschange all property/atom mass
|
||||
compute massreduce all reduce sum c_masschange
|
||||
fix rmass all ave/time 1 1 25 c_massreduce file rmass.dat
|
||||
fix rmass all ave/time 100 1 100 c_massreduce file rmass.dat
|
||||
|
||||
compute layerRad1 all reduce sum f_layerRelRad[1]
|
||||
fix redRad1 all ave/time 100 1 100 c_layerRad1 file relRad1.dat
|
||||
@ -99,19 +99,19 @@ fix redRad4 all ave/time 100 1 100 c_layerRad4 file relRad4.dat
|
||||
|
||||
variable rad_fe atom "f_layerRelRad[1]*radius"
|
||||
compute r_fe all reduce sum v_rad_fe
|
||||
fix r_fe1 all ave/time 25 1 25 c_r_fe file rfe.dat
|
||||
fix r_fe1 all ave/time 100 1 100 c_r_fe file rfe.dat
|
||||
|
||||
variable rad_w atom "f_layerRelRad[2]*radius"
|
||||
compute r_w all reduce sum v_rad_w
|
||||
fix r_w1 all ave/time 25 1 25 c_r_w file rw.dat
|
||||
fix r_w1 all ave/time 100 1 100 c_r_w file rw.dat
|
||||
|
||||
variable rad_m atom "f_layerRelRad[3]*radius"
|
||||
compute r_m all reduce sum v_rad_m
|
||||
fix r_m1 all ave/time 25 1 25 c_r_m file rm.dat
|
||||
fix r_m1 all ave/time 100 1 100 c_r_m file rm.dat
|
||||
|
||||
variable rad_h atom "f_layerRelRad[4]*radius"
|
||||
compute r_h all reduce sum v_rad_h
|
||||
fix r_h1 all ave/time 25 1 25 c_r_h file rh.dat
|
||||
fix r_h1 all ave/time 100 1 100 c_r_h file rh.dat
|
||||
|
||||
###############################################
|
||||
# screen output
|
||||
@ -121,6 +121,6 @@ thermo 1000
|
||||
thermo_modify lost ignore norm no
|
||||
compute_modify thermo_temp dynamic yes
|
||||
|
||||
dump dmp all custom 100 ../DEM/post/dump.liggghts_run id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
|
||||
dump dmp all custom 10000 ../DEM/post/dump.liggghts_run id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
|
||||
|
||||
run 1
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
grep "dmB\[0]" log_3layerUnreactedShrinkingCore > dmB0.dat
|
||||
grep "dmB\[1]" log_3layerUnreactedShrinkingCore > dmB1.dat
|
||||
grep "dmB\[2]" log_3layerUnreactedShrinkingCore > dmB2.dat
|
||||
grep "dmB\[3]" log_3layerUnreactedShrinkingCore > dmB3.dat
|
||||
grep "dmB\[0]" log_test_case > dmB0.dat
|
||||
grep "dmB\[1]" log_test_case > dmB1.dat
|
||||
grep "dmB\[2]" log_test_case > dmB2.dat
|
||||
grep "dmB\[3]" log_test_case > dmB3.dat
|
||||
#grep -n "pre-layerMass[0]:" log_3layerUnreactedShrinkingCore > pre_particle_mass0.dat
|
||||
#grep -n "pre-layerMass[1]:" log_3layerUnreactedShrinkingCore > pre_particle_mass1.dat
|
||||
#grep -n "pre-layerMass[2]:" log_3layerUnreactedShrinkingCore > pre_particle_mass2.dat
|
||||
|
||||
Reference in New Issue
Block a user