mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
working tutorial case for 3 layer shrink - only chem resist active
This commit is contained in:
@ -11,6 +11,7 @@ cd $casePath/CFD
|
||||
cleanCase
|
||||
rm $casePath/CFD/shrink*.dat
|
||||
rm $casePath/CFD/rmass*.dat
|
||||
rm $casePath/CFD/rel*.dat
|
||||
rm $casePath/log*
|
||||
#rm $casePath/run_error.log
|
||||
#cp -R 0/Org/p 0/p
|
||||
|
||||
@ -0,0 +1,50 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.6 |
|
||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object N;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -3 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
side-walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,51 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object N2;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0.0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
side-walls
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -31,7 +31,7 @@ FoamFile
|
||||
|
||||
modelType "A"; // A or B
|
||||
|
||||
couplingInterval 100;//1000;
|
||||
couplingInterval 1;//1000;
|
||||
|
||||
voidFractionModel divided;//centre;//
|
||||
|
||||
@ -106,6 +106,8 @@ speciesProps
|
||||
voidfractionFieldName "voidfraction";
|
||||
totalMoleFieldName "N";
|
||||
partMoleName "partN";
|
||||
pressureFieldName "p";
|
||||
partPName "partP";
|
||||
}
|
||||
|
||||
SyamlalThermCondProps
|
||||
|
||||
@ -19,14 +19,14 @@ convertToMeters 1.0;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(1.5 0 0)
|
||||
(1.5 0.5 0)
|
||||
(0 0.5 0)
|
||||
(0 0 0.5)
|
||||
(1.5 0 0.5)
|
||||
(1.5 0.5 0.5)
|
||||
(0 0.5 0.5)
|
||||
(0 0 0)
|
||||
(15 0 0)
|
||||
(15 5 0)
|
||||
(0 5 0)
|
||||
(0 0 5)
|
||||
(15 0 5)
|
||||
(15 5 5)
|
||||
(0 5 5)
|
||||
);
|
||||
|
||||
blocks
|
||||
|
||||
@ -23,7 +23,7 @@ startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0.08;
|
||||
endTime 0.8;
|
||||
|
||||
deltaT 0.000001;
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ newton off
|
||||
units si
|
||||
processors 2 2 1
|
||||
|
||||
region reg block 0. 1.5 0. 0.5 0. 0.5 units box
|
||||
region reg block 0. 15 0. 5 0. 5 units box
|
||||
create_box 1 reg
|
||||
|
||||
neighbor 0.0005 bin
|
||||
@ -28,27 +28,27 @@ pair_style gran model hertz tangential history # Hertzian without cohesion
|
||||
pair_coeff * *
|
||||
|
||||
# timestep, gravity
|
||||
timestep 1e-8
|
||||
timestep 0.000001
|
||||
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
|
||||
fix xwalls2 all wall/gran model hertz tangential history primitive type 1 xplane 1.5
|
||||
fix xwalls2 all wall/gran model hertz tangential history primitive type 1 xplane 15
|
||||
fix ywalls1 all wall/gran model hertz tangential history primitive type 1 yplane 0.0
|
||||
fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplane 0.5
|
||||
fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplane 5
|
||||
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
|
||||
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 5
|
||||
|
||||
# create single particle in a specific spot
|
||||
#create_atoms 1 single 0.25 .25 0.25 units box
|
||||
#set atom 1 diameter 0.07 density 2267 vx 0 vy 0 vz 0
|
||||
create_atoms 1 single 7.5 2 2 units box
|
||||
set atom 1 diameter 0.2 density 2267 vx 0 vy 0 vz 0
|
||||
|
||||
# particle distributions and insertion
|
||||
region bc block 0.25 1.25 0. 0.5 0. 0.5 units box
|
||||
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 2267 radius constant 0.07
|
||||
fix pdd1 all particledistribution/discrete 1 1 pts1 1.0
|
||||
#region bc block 0.25 1.25 0. 0.5 0. 0.5 units box
|
||||
#fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 2267 radius constant 0.02
|
||||
#fix pdd1 all particledistribution/discrete 1 1 pts1 1.0
|
||||
|
||||
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 1 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 1 region bc
|
||||
|
||||
# apply nve integration to all particles that are inserted as single particles
|
||||
#fix integr all nve/sphere
|
||||
|
||||
@ -31,7 +31,7 @@ pair_style gran model hertz tangential history # Hertzian without cohesion
|
||||
pair_coeff * *
|
||||
|
||||
# timestep, gravity
|
||||
timestep 1e-8
|
||||
timestep 0.000001
|
||||
fix gravi all gravity 0.0 vector 0.0 -1.0 0.0
|
||||
|
||||
# walls
|
||||
@ -55,17 +55,13 @@ fix cfd3 all couple/cfd/chemistry n_species 4 species_names CO CO2 O2 N2
|
||||
|
||||
# Activate for 3-layer unreacted core shrink model
|
||||
#fix OreReductionCO all chem/shrink/core speciesA O2 molMassA 31.99 speciesC CO2 molMassC 44.01
|
||||
fix cfd5 all chem/shrink/core speciesA CO molMassA 28.01 speciesC CO2 molMassC 44.01
|
||||
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_OreReductionCO vector 2700 25 17
|
||||
#fix Ea all property/global Ea_OreReductionCO vector 113.859 73.674 69.488
|
||||
fix k0 all property/global k0_cfd5 vector 2700 25 17
|
||||
fix Ea all property/global Ea_cfd5 vector 113.859 73.674 69.488
|
||||
fix Ea all property/global Ea_cfd5 vector 113859 73674 69488
|
||||
|
||||
# Material properties for unreacted chemical shrink core (activate only when chem/shrink/core is active)
|
||||
#fix density Ore property/global density_all vector 5.24 5.17 5.74 7.87
|
||||
#fix molMass Ore property/global molMass_all vector 156 231.533 71.844 55.845
|
||||
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
|
||||
|
||||
@ -75,11 +71,6 @@ fix layerRelRad all property/atom relRadii vector yes no no 0.3 0.5 0.6
|
||||
# apply nve integration to all particles that are inserted as single particles
|
||||
fix integr all nve/sphere
|
||||
|
||||
# print radius change according to timestep
|
||||
compute radChange all property/atom radius
|
||||
compute radreduce all reduce sum c_radChange
|
||||
fix shrink all ave/time 25 1 25 c_radreduce file shrink.dat
|
||||
|
||||
compute masschange all property/atom mass
|
||||
compute massreduce all reduce sum c_masschange
|
||||
fix rmass all ave/time 25 1 25 c_massreduce file rmass.dat
|
||||
|
||||
@ -1,43 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
grep -n "Co2 Mass" log_Particle_in_Duct > CO2concentration-output
|
||||
sed -r 's/.{12}//' CO2concentration-output > changeOfCO2
|
||||
rm CO2concentration-output
|
||||
sed -r 's/^s //' changeOfCO2 > changeOfCO2-2
|
||||
rm changeOfCO2
|
||||
sed -r 's/^ss //' changeOfCO2-2 > changeOfCO2-3
|
||||
rm changeOfCO2-2
|
||||
sed -r 's/^ass //' changeOfCO2-3 > changeOfCO2
|
||||
rm changeOfCO2-3
|
||||
|
||||
|
||||
grep -n "O2 Mass" log_Particle_in_Duct > O2concentration-file
|
||||
sed -r 's/.{12}//' O2concentration-file > O2_file_2
|
||||
rm O2concentration-file
|
||||
sed -r 's/^s //' O2_file_2 > O2_output
|
||||
rm O2_file_2
|
||||
sed -r 's/^ss //' O2_output > O2_output_2
|
||||
rm O2_output
|
||||
sed -r 's/^ass //' O2_output_2 > changeOfO2
|
||||
rm O2_output_2
|
||||
|
||||
|
||||
grep -n "Gas Density" log_Particle_in_Duct > rhogas_file
|
||||
sed -r 's/.{16}//' rhogas_file > rhogas_file_2
|
||||
rm rhogas_file
|
||||
sed -r 's/^y //' rhogas_file_2 > rhogas_output
|
||||
rm rhogas_file_2
|
||||
sed -r 's/^ty //' rhogas_output > rhogas_
|
||||
rm rhogas_output
|
||||
|
||||
grep -n "Particle Mass" log_Particle_in_Duct > pmass_file
|
||||
sed -r 's/.{18}//' pmass_file > pmass_file_2
|
||||
rm pmass_file
|
||||
sed -r 's/^s //' pmass_file_2 > pmass_file_3
|
||||
rm pmass_file_2
|
||||
sed -r 's/^ss //' pmass_file_3 > pmass_file_4
|
||||
rm pmass_file_3
|
||||
sed -r 's/^ass //' pmass_file_4 > pmass_
|
||||
rm pmass_file_4
|
||||
grep -n "x0_:" log_Particle_in_Duct > x0_values
|
||||
grep -n "check N" log_Particle_in_Duct > total_mole
|
||||
grep -n "check mass frac" log_Particle_in_Duct > mass_frac
|
||||
grep -n "dY_" log_Particle_in_Duct > delta_reduction_rate
|
||||
grep -n "dmA_" log_Particle_in_Duct > layer_mass_transfer
|
||||
grep -n "dens_" log_Particle_in_Duct > layer_Densities
|
||||
grep -n "pre-particle density" log_Particle_in_Duct > total_particle_density
|
||||
grep -n "pre-particle mass" log_Particle_in_Duct > pre_particle_mass
|
||||
grep -n "post-particle mass" log_Particle_in_Duct > post_particle_mass
|
||||
grep -n "post redox radius of" log_Particle_in_Duct > post_particle_radius
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user