latest tutorial with multiple particles
This commit is contained in:
@ -9,7 +9,7 @@ source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
|
||||
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
|
||||
cd $casePath/CFD
|
||||
cleanCase
|
||||
rm $casePath/CFD/shrink.dat
|
||||
rm $casePath/CFD/shrink*.dat
|
||||
rm $casePath/log*
|
||||
rm $casePath/run_error.log
|
||||
#cp -R 0/Org/p 0/p
|
||||
|
||||
@ -23,17 +23,17 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
side-walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
inlet
|
||||
|
||||
@ -23,17 +23,17 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
side-walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
inlet
|
||||
|
||||
@ -23,17 +23,17 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
side-walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
inlet
|
||||
|
||||
@ -23,17 +23,17 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
side-walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
inlet
|
||||
|
||||
@ -23,17 +23,17 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
side-walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
inlet
|
||||
|
||||
@ -23,17 +23,17 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
side-walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
inlet
|
||||
|
||||
@ -24,18 +24,15 @@ boundaryField
|
||||
// Walls in no slip condition
|
||||
top
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
type slip;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
type slip;
|
||||
}
|
||||
side-walls
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
type slip;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
|
||||
@ -23,18 +23,15 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
type slip;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
type slip;
|
||||
}
|
||||
side-walls
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
type slip;
|
||||
}
|
||||
|
||||
inlet
|
||||
|
||||
@ -23,18 +23,15 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
type slip;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
type slip;
|
||||
}
|
||||
side-walls
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
type slip;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
|
||||
@ -23,18 +23,15 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 0.003;
|
||||
type slip;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 0.003;
|
||||
type slip;
|
||||
}
|
||||
side-walls
|
||||
{
|
||||
type compressible::epsilonWallFunction;
|
||||
value uniform 0.003;
|
||||
type slip;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
|
||||
@ -23,18 +23,15 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type compressible::kqRWallFunction;
|
||||
value uniform 0.001;
|
||||
type slip;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type compressible::kqRWallFunction;
|
||||
value uniform 0.001;
|
||||
type slip;
|
||||
}
|
||||
side-walls
|
||||
{
|
||||
type compressible::kqRWallFunction;
|
||||
value uniform 0.001;
|
||||
type slip;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
|
||||
@ -23,18 +23,15 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type mutkWallFunction;
|
||||
value uniform 0;
|
||||
type slip;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type mutkWallFunction;
|
||||
value uniform 0;
|
||||
type slip;
|
||||
}
|
||||
side-walls
|
||||
{
|
||||
type mutkWallFunction;
|
||||
value uniform 0;
|
||||
type slip;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
|
||||
@ -23,17 +23,17 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
side-walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
inlet
|
||||
|
||||
@ -23,15 +23,15 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
side-walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
|
||||
@ -23,27 +23,27 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
side-walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -22,17 +22,17 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
side-walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
inlet
|
||||
|
||||
@ -24,17 +24,17 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
side-walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
inlet
|
||||
|
||||
@ -23,17 +23,17 @@ boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
side-walls
|
||||
{
|
||||
type zeroGradient;
|
||||
type slip;
|
||||
}
|
||||
|
||||
inlet
|
||||
|
||||
@ -91,6 +91,10 @@ turbulenceModelType "RASProperties";//"LESProperties";//
|
||||
|
||||
//===========================================================================//
|
||||
// sub-model properties
|
||||
reactionHeatProps
|
||||
{
|
||||
reactionHeatName "reactionHeat";
|
||||
}
|
||||
|
||||
speciesProps
|
||||
{
|
||||
|
||||
@ -23,7 +23,7 @@ startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 5;
|
||||
endTime 10;
|
||||
|
||||
deltaT 0.0005;
|
||||
|
||||
@ -64,7 +64,7 @@ libs (
|
||||
|
||||
functions
|
||||
{
|
||||
testing
|
||||
/*testing
|
||||
{
|
||||
type writeRegisteredObject;
|
||||
functionObjectLibs ("libIOFunctionObjects.so");
|
||||
@ -75,7 +75,7 @@ functions
|
||||
(
|
||||
"CO2"
|
||||
);
|
||||
}
|
||||
}*/
|
||||
|
||||
CO2-Average1
|
||||
{
|
||||
@ -102,6 +102,7 @@ functions
|
||||
functionObjectLibs ("libfieldValueFunctionObjects.so");
|
||||
enabled true;
|
||||
outputControl timeStep;//outputTime;
|
||||
outputInterval 1,
|
||||
log true;
|
||||
valueOutput false; //true;
|
||||
source all; // Type of cell source or all for the full domain
|
||||
@ -112,6 +113,43 @@ functions
|
||||
CO2
|
||||
);
|
||||
}
|
||||
|
||||
O2-Average1
|
||||
{
|
||||
type fieldAverage;
|
||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||
enabled true;
|
||||
outputControl outputTime;
|
||||
|
||||
fields
|
||||
(
|
||||
O2
|
||||
{
|
||||
mean on;
|
||||
prime2Mean on;
|
||||
base time;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// add CO2 concentration
|
||||
species_O2 // Name also used to identify output folder
|
||||
{
|
||||
type cellSource;
|
||||
functionObjectLibs ("libfieldValueFunctionObjects.so");
|
||||
enabled true;
|
||||
outputControl timeStep;//outputTime;
|
||||
outputInterval 1,
|
||||
log true;
|
||||
valueOutput false; //true;
|
||||
source all; // Type of cell source or all for the full domain
|
||||
sourceName O2;
|
||||
operation sum; // volAverage; //volIntegrate; //weightedAverage; //none;
|
||||
fields
|
||||
(
|
||||
O2
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -5,7 +5,7 @@ echo both
|
||||
|
||||
communicate single vel yes
|
||||
|
||||
boundary m m m
|
||||
boundary f f f
|
||||
newton off
|
||||
|
||||
units si
|
||||
@ -29,7 +29,7 @@ pair_coeff * *
|
||||
|
||||
# timestep, gravity
|
||||
timestep 0.00001
|
||||
fix gravi all gravity 0.0 vector 0.0 0.0 -1.0
|
||||
fix gravi all gravity 0.0 vector 0.0 -1.0 0.0
|
||||
|
||||
# walls
|
||||
fix xwalls1 all wall/gran model hertz tangential history primitive type 1 xplane 0.0
|
||||
@ -39,20 +39,20 @@ fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yp
|
||||
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
|
||||
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.5
|
||||
|
||||
# create single particle in a specific spot
|
||||
create_atoms 1 single .75 .31 0.31 units box
|
||||
set atom 1 diameter 0.07 density 2267 vx 0 vy 0 vz 0
|
||||
#create_atoms 1 random 2 1 NULL
|
||||
#set atom * diameter 0.07 density 2267 vx 0 vy 0 vz 0
|
||||
|
||||
# create single particle in a specific spot
|
||||
#create_atoms 1 single .75 .25 0.25 units box
|
||||
#set atom 1 diameter 0.07 density 2267 vx 0 vy 0 vz 0
|
||||
#create_atoms 1 single 1.25 .40 0.31 units box
|
||||
#set atom 2 diameter 0.07 density 2267 vx 0 vy 0 vz 0
|
||||
#group part2 id 2
|
||||
|
||||
# particle distributions and insertion
|
||||
#region bc block 0. 1.5 0. 0.5 0. 0.5 units box
|
||||
#fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 2000 radius constant 0.01
|
||||
#fix pdd1 all particledistribution/discrete 1 1 pts1 1.0
|
||||
region bc block 0. 1.5 0. 0.5 0. 0.5 units box
|
||||
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 2267 radius constant 0.035
|
||||
fix pdd1 all particledistribution/discrete 1 1 pts1 1.0
|
||||
|
||||
#fix ins all insert/pack seed 1000001 distributiontemplate pdd1 vel constant 0. 0. 0. insert_every 100 overlapcheck yes all_in yes particles_in_region 5 region bc
|
||||
fix ins all insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. 0. insert_every once overlapcheck yes all_in yes particles_in_region 100 region bc
|
||||
|
||||
# apply nve integration to all particles that are inserted as single particles
|
||||
#fix integr all nve/sphere
|
||||
@ -66,7 +66,7 @@ compute_modify thermo_temp dynamic yes
|
||||
|
||||
# insert the first particles so that dump is not empty
|
||||
run 1
|
||||
dump dmp all custom 50 post/dump.liggghts_init id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
|
||||
dump dmp all custom 100 post/dump.liggghts_init id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
|
||||
|
||||
run 10000 upto
|
||||
write_restart post/restart/liggghts.restart
|
||||
|
||||
@ -6,7 +6,7 @@ atom_style granular
|
||||
atom_modify map array
|
||||
communicate single vel yes
|
||||
|
||||
boundary m m m
|
||||
boundary f f f
|
||||
newton off
|
||||
|
||||
units si
|
||||
@ -50,9 +50,8 @@ fix cfd2 all couple/cfd/force
|
||||
fix cfd3 all couple/cfd/chemistry n_species 2 species_names O2 CO2
|
||||
|
||||
# this should shrink the particle
|
||||
#fix cfd4 all chem/shrink speciesA O2 molMassA 31.99 speciesC CO2 molMassC 44.01 molMassB 12.01 k 2.5e3 rdef hertzpct 0.2
|
||||
fix cfd4 all chem/shrink speciesA O2 molMassA 31.99 speciesC CO2 molMassC 44.01 molMassB 12.01 k 2.5e3 rmin 0.003
|
||||
|
||||
#fix cfd4 all chem/shrink speciesA O2 molMassA 31.99 speciesC CO2 molMassC 44.01 molMassB 12.01 k 2.5e3 rdef hertzpct 0.2
|
||||
fix cfd4 all chem/shrink speciesA O2 molMassA 31.99 speciesC CO2 molMassC 44.01 molMassB 12.01 k 2.5e3 rmin 0.005
|
||||
|
||||
# apply nve integration to all particles that are inserted as single particles
|
||||
fix integr all nve/sphere
|
||||
@ -62,8 +61,13 @@ compute radChange all property/atom radius
|
||||
compute radreduce all reduce sum c_radChange
|
||||
fix shrink all ave/time 50 1 50 c_radreduce file shrink.dat
|
||||
|
||||
#compute radChange reduce sum c_radius
|
||||
compute radChange1 all property/atom radius
|
||||
compute radreduce1 all reduce max c_radChange1
|
||||
fix shrink1 all ave/time 50 1 50 c_radreduce1 file shrink-1.dat
|
||||
|
||||
compute radChange2 all property/atom radius
|
||||
compute radreduce2 all reduce min c_radChange2
|
||||
fix shrink2 all ave/time 50 1 50 c_radreduce2 file shrink-2.dat
|
||||
|
||||
# screen output
|
||||
compute rke all erotate/sphere
|
||||
@ -72,6 +76,6 @@ thermo 1000
|
||||
thermo_modify lost ignore norm no
|
||||
compute_modify thermo_temp dynamic yes
|
||||
|
||||
dump dmp all custom 50 ../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 100 ../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
|
||||
|
||||
@ -25,6 +25,7 @@ debugMode="off" # on | off| strict
|
||||
testHarnessPath="$CFDEM_TEST_HARNESS_PATH"
|
||||
runOctave="false"
|
||||
postproc="true"
|
||||
|
||||
#--------------------------------------------------------------------------------#
|
||||
|
||||
#- call function to run a parallel CFD-DEM case
|
||||
@ -52,12 +53,12 @@ if [ $runOctave == "true" ]
|
||||
cp ../../$logfileName $testHarnessPath
|
||||
cp cfdemSolverPiso_ErgunTestMPI.eps $testHarnessPath
|
||||
fi
|
||||
|
||||
|
||||
if [ $postproc == "true" ]
|
||||
then
|
||||
|
||||
#- keep terminal open (if started in new terminal)
|
||||
echo "simulation finisehd? ...press enter to proceed"
|
||||
echo "simulation finished? ...press enter to proceed"
|
||||
read
|
||||
|
||||
#- get VTK data from liggghts dump file
|
||||
@ -73,8 +74,8 @@ if [ $postproc == "true" ]
|
||||
|
||||
#- start paraview
|
||||
paraview
|
||||
|
||||
#- keep terminal open (if started in new terminal)
|
||||
|
||||
#- keep terminal open (if started in new terminal)
|
||||
echo "...press enter to clean up case"
|
||||
echo "press Ctr+C to keep data"
|
||||
read
|
||||
|
||||
Reference in New Issue
Block a user