diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/Allclean.sh b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/Allclean.sh new file mode 100755 index 00000000..665e1d5d --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/Allclean.sh @@ -0,0 +1,15 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cd CFD +cleanCase +cd - + +rm -f log* + +rm ./DEM/post/dump* + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/Allrun.sh b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/Allrun.sh new file mode 100755 index 00000000..a9ffa601 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/Allrun.sh @@ -0,0 +1,34 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# Allrun script for fluidized bed R3 chemistry test case +# run R3_FB test case +# Daniel Queteschiner - March 2022 +#------------------------------------------------------------------------------ + +#- source CFDEM env vars +. ~/.bashrc + +#- include functions +source $CFDEM_PROJECT_DIR/etc/functions.sh + +#- define variables +casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" + +#- check if mesh was built +if [ -f "$casePath/CFD/constant/polyMesh/points" ]; then + echo "mesh was built before - using old mesh" +else + echo "mesh needs to be built" + cd $casePath/CFD + blockMesh +fi + +if [ -f "$casePath/DEM/post/restart/liggghts.restart" ]; then + echo "LIGGGHTS init was run before - using existing restart file" +else + #- run parallel DEM + $casePath/parDEMrun.sh +fi + +#- run parallel CFD-DEM +bash $casePath/parCFDDEMrun.sh diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/CO b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/CO new file mode 100755 index 00000000..5fa3e6ef --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/CO @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object CO; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.230; //0.301; + +boundaryField +{ + side-walls + { + type zeroGradient; + } + + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/CO2 b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/CO2 new file mode 100755 index 00000000..6ccc1932 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/CO2 @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object CO2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.493; //0.412; + +boundaryField +{ + side-walls + { + type zeroGradient; + } + + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/H2 b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/H2 new file mode 100755 index 00000000..a2271475 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/H2 @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object H2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.009; + +boundaryField +{ + side-walls + { + type zeroGradient; + } + + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/H2O b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/H2O new file mode 100755 index 00000000..5e5d1c43 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/H2O @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object H2O; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.042; //0.044; + +boundaryField +{ + side-walls + { + type zeroGradient; + } + + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/Ksl b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/Ksl new file mode 100755 index 00000000..4456a8e8 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/Ksl @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object Ksl; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -3 -1 0 0 0 0]; + +internalField uniform 0.0; + +boundaryField +{ + side-walls + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + outlet + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/N2 b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/N2 new file mode 100755 index 00000000..f6d1441c --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/N2 @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ 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.226; //0.234; + +boundaryField +{ + side-walls + { + type zeroGradient; + } + + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/T b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/T new file mode 100755 index 00000000..611ff02e --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/T @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 753.15; + +boundaryField +{ + side-walls + { + type zeroGradient; + } + + inlet + { + type fixedValue; + value $internalField; + } + + outlet + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/U b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/U new file mode 100755 index 00000000..458c6889 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/U @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0.0 0.0 0.0); + +boundaryField +{ + side-walls + { + type noSlip; + } + + inlet + { + type fixedValue; + value uniform (0.0 0.25 0.0); + } + + outlet + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/Us b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/Us new file mode 100755 index 00000000..e07d0a52 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/Us @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object Us; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + side-walls + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + outlet + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/dSauter b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/dSauter new file mode 100755 index 00000000..52395c16 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/dSauter @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object dSauter; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform 0.00022; + +boundaryField +{ + side-walls + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + outlet + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/p b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/p new file mode 100755 index 00000000..ec4bbadb --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/p @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 140000; + +boundaryField +{ + side-walls + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + outlet + { + type fixedValue; + value uniform 140000; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/voidfraction b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/voidfraction new file mode 100755 index 00000000..94201af2 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/voidfraction @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object voidfraction; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + side-walls + { + type zeroGradient; + } + + inlet + { + type fixedValue; + value uniform 1; + } + + outlet + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/wallQFactor b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/wallQFactor new file mode 100755 index 00000000..5c278fe9 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/0/wallQFactor @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object wallQFactor; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + side-walls + { + type fixedValue; + value uniform 1; + } + + inlet + { + type fixedValue; + value uniform 1; + } + + outlet + { + type fixedValue; + value uniform 1; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/chemistryProperties b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/chemistryProperties new file mode 100755 index 00000000..fcec6c16 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/chemistryProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object chemistryProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +chemistry off; + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/combustionProperties b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/combustionProperties new file mode 100755 index 00000000..6227a78e --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/combustionProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object combustionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// OF5 -> OF6: noCombustion<> -> none (template parameters are no longer required) +//combustionModel noCombustion; +combustionModel none; // OF6 + +active false; + +//noCombustionCoeffs +noneCoeffs +{ +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/couplingProperties b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/couplingProperties new file mode 100755 index 00000000..ec4f928f --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/couplingProperties @@ -0,0 +1,170 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant";; + object couplingProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// sub-models & settings + +modelType "A"; // A or B or Bfull + +couplingInterval 50; + +voidFractionModel divided; + +locateModel engine; + +meshMotionModel noMeshMotion; + +regionModel allRegion; + +IOModel basicIO; + +probeModel off; + +dataExchangeModel twoWayMPI; + +averagingModel dense; + +clockModel off; + +smoothingModel off; + +forceModels +( + GidaspowDrag + gradPForce + viscForce +); + +energyModels +( + heatTransferGunn + reactionHeat +); + +thermCondModel SyamlalThermCond; + +chemistryModels +( + species + diffusionCoefficients + massTransferCoeff +); + +momCoupleModels +( + implicitCouple +); + +turbulenceModelType "turbulenceProperties"; + +// sub-model properties + +reactionHeatProps +{ + reactionHeatName "reactionHeat"; + verbose false; +} + +heatTransferGunnProps +{ + partTempName "Temp"; + partHeatFluxName "convectiveHeatFlux"; + calcPartTempField true; + partRefTemp 753; + implicit true; + interpolation false; +} + +speciesProps +{ + ChemistryFile "$FOAM_CASE/constant/foam.inp"; + Nevery 1; + verbose false; + interpolation false; +} + +diffusionCoefficientsProps +{ + verbose false; + interpolation false; + ChemistryFile "$FOAM_CASE/constant/foam.inp"; + diffusantGasNames ( CO + H2 + ); +} + +massTransferCoeffProps +{ + verbose false; + interpolation false; +} + +reactantPerParticleProps +{ +} + +SyamlalThermCondProps +{ + voidfractionFieldName "voidfraction"; +} + +implicitCoupleProps +{ + velFieldName "U"; + granVelFieldName "Us"; + voidfractionFieldName "voidfraction"; +} + +gradPForceProps +{ + pFieldName "p"; + voidfractionFieldName "voidfraction"; + velocityFieldName "U"; + interpolation true; +} + +viscForceProps +{ + velocityFieldName "U"; + interpolation true; +} + +GidaspowDragProps +{ + velFieldName "U"; + granVelFieldName "Us"; + voidfractionFieldName "voidfraction"; + interpolation true; + phi 1; +} + +engineProps +{ + treeSearch true; +} + +dividedProps +{ + alphaMin 0.01; + scaleUpVol 1.0; +} + +twoWayMPIProps +{ + liggghtsPath "../DEM/in.liggghts_run"; +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/foam.dat b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/foam.dat new file mode 100755 index 00000000..c53576d4 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/foam.dat @@ -0,0 +1,113 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object foam.dat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +H2 +{ + specie + { + nMoles 1; + molWeight 2.02; + } + thermodynamics + { + Cp 15016.8; + Hf 2.544e+06; + } + transport + { + mu 8.42e-05; + Pr 0.76; + } +} + +H2O +{ + specie + { + nMoles 1; + molWeight 18.015; + } + thermodynamics + { + Cp 2304.1; + Hf 2.544e+06; + } + transport + { + mu 1.7e-05; + Pr 0.99; + } +} + +CO +{ + specie + { + nMoles 1; + molWeight 28.01; + } + thermodynamics + { + Cp 1189.14; + Hf 2.544e+06; + } + transport + { + mu 1.66e-05; + Pr 0.792; + } +} + +CO2 +{ + specie + { + nMoles 1; + molWeight 44.01; + } + thermodynamics + { + Cp 1239.98; + Hf 2.544e+06; + } + transport + { + mu 1.37e-05; + Pr 0.69; + } +} + +N2 +{ + specie + { + nMoles 1; + molWeight 28.0134; + } + thermodynamics + { + Cp 1171.6; + Hf 2.544e+06; + } + transport + { + mu 1.66e-05; + Pr 0.69; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/foam.inp b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/foam.inp new file mode 100755 index 00000000..bc4eead8 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/foam.inp @@ -0,0 +1,14 @@ +species +( + CO + CO2 + H2 + H2O + N2 +); + +reactions +{ +} + + diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/g b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/g new file mode 100755 index 00000000..54aee0d6 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/g @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value ( 0 -9.81 0 ); + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/liggghtsCommands b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/liggghtsCommands new file mode 100755 index 00000000..ecac2231 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/liggghtsCommands @@ -0,0 +1,31 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object liggghtsCommands; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +liggghtsCommandModels +( + runLiggghts + writeLiggghts +); + +writeLiggghtsProps +{ + writeLast on; + writeName "post/restart/liggghts.restartCFDEM"; + overwrite on; +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/thermophysicalProperties b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/thermophysicalProperties new file mode 100755 index 00000000..8975e867 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/thermophysicalProperties @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; //hePsiThermo; + mixture reactingMixture; //species and reactions are listed in chemistry file + transport const; + thermo hConst; + equationOfState perfectGas; + energy sensibleInternalEnergy; //sensibleEnthalpy; + specie specie; +} + +chemistryReader foamChemistryReader; + +foamChemistryThermoFile "$FOAM_CASE/constant/foam.dat"; + +foamChemistryFile "$FOAM_CASE/constant/foam.inp"; + +inertSpecie N2; + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/transportProperties b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/transportProperties new file mode 100755 index 00000000..d5da36a4 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/transportProperties @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu nu [ 0 2 -1 0 0 0 0 ] 1.126e-05; + +kf kf [ 1 1 -3 -1 0 0 0 ] 0.0507; + +Cp Cp [ 0 2 -2 -1 0 0 0 ] 1118.15; + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/turbulenceProperties b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/turbulenceProperties new file mode 100755 index 00000000..f6d9d4cb --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/constant/turbulenceProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/octave/R3_experiment.dat b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/octave/R3_experiment.dat new file mode 100755 index 00000000..1c4d5dca --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/octave/R3_experiment.dat @@ -0,0 +1,172 @@ +#time fr_OV_exp +11.730205278592393 0.5646359583952467 +22.287390029325366 1.1589895988112922 +32.844574780058565 1.9910846953937593 +41.6422287390028 1.7236255572065389 +46.92082111436946 0.029717682020802272 +64.51612903225794 0.059435364041604544 +69.79472140762459 0.8618127786032694 +76.8328445747801 2.1099554234769684 +85.63049853372434 1.0995542347696876 +87.39002932551307 0.2971768202080227 +94.42815249266857 0.8023774145616649 +97.94721407624627 1.961367013372957 +104.98533724340166 3.7741456166419027 +115.54252199413486 3.1797919762258537 +131.3782991202346 3.5066864784546823 +145.4545454545455 3.922734026745914 +164.8093841642227 4.160475482912336 +168.32844574780063 3.4472511144130777 +178.8856304985336 4.546805349182765 +185.9237536656891 6.092124814264491 +200 6.181277860326897 +208.79765395894424 6.686478454680536 +214.0762463343109 8.647845468053493 +235.19061583577707 8.410104011887075 +249.26686217008796 8.172362555720655 +259.82404692082105 7.518573551263001 +273.90029325513194 7.072808320950967 +284.457478005865 6.6270430906389315 +284.457478005865 7.845468053491828 +289.73607038123157 10.371471025260032 +300.29325513196477 9.598811292719168 +312.6099706744867 9.301634472511145 +321.40762463343094 8.945022288261518 +326.6862170087975 9.598811292719168 +328.44574780058656 11.441307578008916 +337.2434017595308 10.401188707280832 +351.3196480938416 9.390787518573552 +354.8387096774193 11.322436849925708 +365.39589442815236 9.836552748885588 +368.91495601173006 11.381872213967311 +379.47214076246337 9.361069836552751 +391.7888563049853 11.322436849925708 +400.58651026392954 9.569093610698367 +402.3460410557184 10.698365527488857 +414.6627565982403 9.777117384843983 +423.46041055718456 11.2332838038633 +426.97947214076225 13.997028231797922 +444.57478005865096 11.589895988112929 +453.3724340175952 12.332838038632989 +462.17008797653966 11.85735512630015 +470.9677419354839 12.362555720653791 +472.7272727272725 13.343239227340268 +479.76539589442814 12.838038632986628 +493.8416422287389 12.421991084695394 +500.8797653958943 11.827637444279349 +509.67741935483855 11.411589895988113 +520.2346041055719 10.193164933135217 +530.791788856305 10.430906389301636 +541.348973607038 10.936106983655275 +560.7038123167154 11.203566121842497 +578.2991202346041 11.679049034175335 +590.615835777126 11.35215453194651 +590.615835777126 12.213967310549778 +602.9325513196479 13.135215453194652 +606.4516129032256 12.154531946508174 +617.0087976539587 11.768202080237742 +622.2873900293255 10.936106983655275 +629.3255131964809 11.679049034175335 +639.882697947214 10.757800891530463 +643.4017595307919 13.937592867756317 +650.4398826979473 12.332838038632989 +664.5161290322578 11.500742942050522 +669.7947214076246 12.184249628528976 +669.7947214076246 13.016344725111443 +687.3900293255131 15.09658246656761 +685.6304985337242 12.719167904903419 +697.9472140762464 11.530460624071324 +708.5043988269795 9.777117384843983 +713.782991202346 11.381872213967311 +717.3020527859237 13.640416047548293 +726.099706744868 11.322436849925708 +736.656891495601 12.303120356612185 +738.4164222873899 10.460624071322437 +748.973607038123 11.708766716196138 +761.2903225806451 12.689450222882616 +764.8093841642226 12.154531946508174 +787.6832844574778 11.619613670133731 +789.4428152492669 12.808320950965825 +801.7595307917886 13.907875185735515 +812.3167155425217 12.60029717682021 +815.8357771260996 11.946508172362556 +829.9120234604104 11.768202080237742 +836.950146627566 11.35215453194651 +842.2287390029323 12.808320950965825 +849.2668621700877 10.96582466567608 +859.824046920821 10.579494799405648 +863.3431085043987 11.797919762258545 +872.140762463343 11.263001485884102 +882.6979472140763 12.511144130757803 +887.9765395894426 11.530460624071324 +895.014662756598 9.925705794947994 +905.5718475073313 12.719167904903419 +910.8504398826976 11.025260029717684 +916.1290322580644 9.331352154531947 +926.6862170087975 10.936106983655275 +931.964809384164 9.153046062407133 +940.7624633431083 10.460624071322437 +951.3196480938416 9.628528974739972 +953.0791788856304 10.846953937592868 +958.3577712609967 9.034175334323924 +968.91495601173 8.826151560178307 +968.91495601173 10.549777117384844 +979.4721407624631 12.124814264487371 +990.0293255131965 10.10401188707281 +997.0674486803518 10.787518573551264 +1012.9032258064515 10.341753343239228 +1019.9413489736071 11.97622585438336 +1032.2580645161288 12.065378900445767 +1041.055718475073 12.689450222882616 +1051.6129032258063 11.916790490341754 +1063.9296187683283 10.757800891530463 +1065.6891495601174 12.511144130757803 +1076.2463343108502 13.283803863298663 +1083.2844574780058 11.47102526002972 +1093.841642228739 12.511144130757803 +1097.3607038123166 10.96582466567608 +1106.1583577712609 12.24368499257058 +1114.956011730205 10.817236255572068 +1118.4750733137828 12.511144130757803 +1129.032258064516 10.668647845468055 +1134.3108504398824 12.332838038632989 +1144.8680351906157 13.402674591381874 +1151.9061583577711 11.173848439821695 +1157.184750733138 12.154531946508174 +1167.741935483871 11.797919762258545 +1167.741935483871 12.630014858841012 +1178.2991202346038 14.502228826151562 +1185.3372434017595 12.540861812778605 +1188.856304985337 10.312035661218426 +1199.4134897360702 12.303120356612185 +1208.2111436950145 11.619613670133731 +1209.9706744868033 12.659732540861814 +1220.5278592375366 14.264487369985144 +1229.3255131964809 13.194650817236257 +1238.123167155425 14.205052005943537 +1241.6422287390026 10.72808320950966 +1253.9589442815247 10.549777117384844 +1262.756598240469 13.075780089153048 +1264.5161290322578 12.154531946508174 +1269.7947214076244 11.35215453194651 +1283.8709677419354 12.481426448737 +1283.8709677419354 10.936106983655275 +1297.9472140762462 10.757800891530463 +1296.1876832844575 12.005943536404162 +1304.9853372434018 13.10549777117385 +1313.782991202346 12.630014858841012 +1322.5806451612902 12.124814264487371 +1333.1378299120233 10.609212481426448 +1345.454545454545 11.292719167904904 +1356.0117302052786 12.332838038632989 +1371.847507331378 11.887072808320951 +1382.404692082111 11.35215453194651 +1387.6832844574778 13.075780089153048 +1399.9999999999995 11.381872213967311 +1410.557184750733 11.73848439821694 +1419.354838709677 10.87667161961367 +1421.1143695014662 12.362555720653791 +1429.9120234604102 13.194650817236257 +1440.4692082111437 12.362555720653791 +1452.7859237536654 11.084695393759288 +1466.8621700879762 12.213967310549778 diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/octave/plotData.m b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/octave/plotData.m new file mode 100755 index 00000000..4520c5da --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/octave/plotData.m @@ -0,0 +1,70 @@ +#!/usr/bin/octave --silent + +%% clear workspace +clear all +close all +clc + +dirfile = '../../DEM/post'; +filepattern = '*.dat'; + +% time column in the data matrix +col_t = 1; + +% read all data + +listfile = dir(fullfile(dirfile,filepattern)); +data = readData(dirfile,listfile); +nFiles = length(listfile); +dataexp = importdata('R3_experiment.dat', ' '); + +% init figures +hFig(1) = figure; + +cmap = colormap(jet(16)); +linS = {'-';'--';'-.';':';'-';'--';'-.';':';'-';'--';'-.';':'}; +markers = {'+';'o';'*';'x';'s';'d';'^';'v';'>';'<';'p';'h';'.'}; + +for ii=1:nFiles + + fname = data(ii).name; + fbasename = strtrunc(fname,index(fname,".dat")-1); + stepsize = 2; + timesteps = data(ii).values(1:stepsize:end,col_t)*10; + nColumns = columns(data(ii).values); + + figure(hFig(1)); + clf reset; + hold on; + + for jj=2:nColumns + xvalue = data(ii).values(1:stepsize:end,jj); + %if (strncmp(fbasename,"Aterm",5) || strncmp(fbasename,"Bterm",5)) + % semilogy(timesteps,xvalue,'Color',cmap(jj,:),'LineStyle',linS{jj-1},'Marker',markers{jj-1},'MarkerSize',5); + %else + plot(timesteps,xvalue,'Color',cmap(jj,:),'LineStyle',linS{jj-1},'Marker',markers{jj-1},'MarkerSize',5); + %endif + end + if (strncmp(fbasename,"fr_OV",5)) + timesteps = dataexp.data(1:stepsize:end,col_t); + xvalue = dataexp.data(1:stepsize:end,2)*0.01; + plot(timesteps-65,xvalue,'Color','red','LineStyle','none','Marker','.','MarkerSize',10);%,'MarkerFaceColor','auto'); + endif + xlim ([0.0, 1000.0]); + ylim auto; + xlabel('time (s)'); + ylabel(fbasename); + grid on; + + headerline = substr(data(ii).header{1},7); + + if (strncmp(fbasename,"fr_OV",5)) + headerline = [headerline, " fr_exp_OV"]; + endif + + legend(strsplit(headerline, " "),'location','eastoutside'); + + print(hFig(1),fullfile(dirfile,['figure_',fbasename,'.eps']),'-color','-deps'); +end + + diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/octave/readData.m b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/octave/readData.m new file mode 100755 index 00000000..426ac266 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/octave/readData.m @@ -0,0 +1,27 @@ +#!/usr/bin/octave --silent + +function [ data ] = readData( dirfile,filelist ) +%READLOGDATA Summary of this function goes here +% Detailed explanation goes here + +% get from file name: +% fieldname after underscore (lower case) +% Number of case (Upper case or number) +%expr = '((?<=[_.])[a-z]*)|((?<=[_.][a-z]*)([A-Z0-9]*(\.[0-9]+)?(e\-[0-9]+)?))'; + +nFiles = length(filelist); + +for ii=1:nFiles + % name + iName = filelist(ii).name; + disp(['Processing ',iName,' ...']); + % values + rdata = importdata(fullfile(dirfile,iName), ' '); + + data(ii).name = iName; + data(ii).header = rdata.textdata; + data(ii).values = rdata.data; +end + +end + diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/blockMeshDict b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/blockMeshDict new file mode 100755 index 00000000..b1ba0e16 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/blockMeshDict @@ -0,0 +1,139 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant/polyMesh"; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1.0; + +// 68 mm column diameter +// 150 mm length + +// Width of middle square section + +// how many cells in the square section 7 +// how many cells from square section to perimeter 3 +// how many cells from top to bottom 24 + +vertices +( + ( 0.017 0.0 0.017) // Vertex fiveoclocksqb = 0 + (-0.017 0.0 0.017) // Vertex sevenoclocksqb = 1 + (-0.017 0.0 -0.017) // Vertex elevenoclocksqb = 2 + ( 0.017 0.0 -0.017) // Vertex oneoclocksqb = 3 + + ( 0.0240416305819187 0.0 0.0240416305387665) // Vertex fiveoclockcb = 4 + (-0.0240416305819187 0.0 0.0240416305387665) // Vertex sevenoclockcb = 5 + (-0.0240416305819187 0.0 -0.0240416305387665) // Vertex elevenoclockcb = 6 + ( 0.0240416305819187 0.0 -0.0240416305387665) // Vertex oneoclockcb = 7 + + ( 0.017 0.150 0.017) // Vertex fiveoclocksqt = 8 + (-0.017 0.150 0.017) // Vertex sevenoclocksqt = 9 + (-0.017 0.150 -0.017) // Vertex elevenoclocksqt = 10 + ( 0.017 0.150 -0.017) // Vertex oneoclocksqt = 11 + + ( 0.0240416305819187 0.150 0.0240416305387665) // Vertex fiveoclockct = 12 + (-0.0240416305819187 0.150 0.0240416305387665) // Vertex sevenoclockct = 13 + (-0.0240416305819187 0.150 -0.0240416305387665) // Vertex elevenoclockct = 14 + ( 0.0240416305819187 0.150 -0.0240416305387665) // Vertex oneoclockct = 15 +); + +blocks +( + //square block + hex ( + 1 0 3 2 + 9 8 11 10 + ) + (7 7 24) + simpleGrading (1 1 1) + + //slice1 + hex ( + 5 4 0 1 + 13 12 8 9 + ) + (7 3 24) + simpleGrading (1 1 1) + + //slice2 + hex ( + 1 2 6 5 + 9 10 14 13 + ) + (7 3 24) + simpleGrading (1 1 1) + + //slice3 + hex ( + 2 3 7 6 + 10 11 15 14 + ) + (7 3 24) + simpleGrading (1 1 1) + + //slice4 + hex ( + 3 0 4 7 + 11 8 12 15 + ) + (7 3 24) + simpleGrading (1 1 1) + +); + + +// create the quarter circles +edges +( + arc 4 5 ( 0.000 0.0 0.034) + arc 5 6 (-0.034 0.0 0.000) + arc 6 7 ( 0.000 0.0 -0.034) + arc 7 4 ( 0.034 0.0 0.000) + + arc 12 13 ( 0.000 0.150 0.034) + arc 13 14 (-0.034 0.150 0.000) + arc 14 15 ( 0.000 0.150 -0.034) + arc 15 12 ( 0.034 0.150 0.000) +); + +patches +( + patch inlet + ( + (0 3 2 1) + (0 4 7 3) + (4 0 1 5) + (1 2 6 5) + (3 7 6 2) + ) + + patch outlet + ( + (8 11 10 9) + (8 12 15 11) + (12 8 9 13) + (9 10 14 13) + (11 15 14 10) + ) + + wall side-walls + ( + (5 4 12 13) + (5 13 14 6) + (6 14 15 7) + (7 15 12 4) + ) +); + diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/controlDict b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/controlDict new file mode 100755 index 00000000..1c4b7099 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/controlDict @@ -0,0 +1,271 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application cfdemSolverRhoPimpleChem; + +startFrom startTime; + +startTime 0.0; + +stopAt endTime; + +endTime 100.0; + +deltaT 0.00025; + +writeControl runTime; + +writeInterval 0.25; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +adjustTimeStep no; + +maxCo 0.5; + +maxDeltaT 0.1; + + +// ************************************************************************* // +libs +( + "libfieldFunctionObjects.so" +); + +functions +{ + moleFrac + { + type rhoReactionThermoMoleFractions; + } + + probes + { + type probes; + + functionObjectLibs ("libsampling.so"); + + // Name of the directory for probe data + name probes; + + // Locations to be probed. + probeLocations + ( + (0.03 0.025 0.0) + (0.03 0.050 0.0) + (0.03 0.075 0.0) + (0.03 0.090 0.0) + (0.03 0.120 0.0) + ); + + fields + ( + rho + p + T + Cpv + N2 + CO2 + CO + H2 + H2O + ModSpeciesMassField_N2 + ModSpeciesMassField_CO2 + ModSpeciesMassField_CO + ModSpeciesMassField_H2 + ModSpeciesMassField_H2O + X_CO + X_CO2 + X_H2 + X_N2 + X_H2O + ); + + writeControl timeStep; + writeInterval 10000; + } + + + fieldMinMax_T + { + type fieldMinMax; + libs ("libfieldFunctionObjects.so"); + fields (T); + // Report the location of the field extrema + location yes; + // Type of extrema for rank > 0 primitives + mode magnitude; // magnitude | component + } + + fieldMinMax_Cpv + { + type fieldMinMax; + libs ("libfieldFunctionObjects.so"); + fields (Cpv); + // Report the location of the field extrema + location yes; + // Type of extrema for rank > 0 primitives + mode magnitude; // magnitude | component + } + + fieldMinMax_partTemp + { + type fieldMinMax; + libs ("libfieldFunctionObjects.so"); + fields (partTemp); + location yes; + mode magnitude; + } + + globalMassFrac + { + //type volRegion; // OF4 + type volFieldValue; // OF5,OF6 + libs ("libfieldFunctionObjects.so"); + writeControl timeStep;//outputTime; + writeInterval 1; + log true; + writeFields false; + regionType all; + name c0; + operation weightedVolAverage; + weightField rhoeps; + fields + ( + H2 + H2O + CO2 + CO + N2 + ); + } + + globalMass + { + //type volRegion; // OF4 + type volFieldValue; // OF5,OF6 + libs ("libfieldFunctionObjects.so"); + writeControl timeStep;//outputTime; + writeInterval 1; + log true; + writeFields false; + regionType all; + name c1; + operation volIntegrate; + fields + ( + rhoeps + rho + ); + } + + inflow_GasSpecies + { + //type surfaceRegion; // OF4 + type surfaceFieldValue; // OF5,OF6 + libs ("libfieldFunctionObjects.so"); + writeControl timeStep; + writeInterval 100; + log true; + // Output field values as well + writeFields false; + regionType patch; + name inlet; + operation sum;//areaIntegrate; + + fields + ( + CO + CO2 + H2 + H2O + N2 + ); + } + + inflow_phi + { + //type surfaceRegion; // OF4 + type surfaceFieldValue; // OF5,OF6 + libs ("libfieldFunctionObjects.so"); + writeControl timeStep; + writeInterval 100; + log true; + // Output field values as well + writeFields false; + regionType patch; + name inlet; + operation sum;//areaIntegrate; + + fields + ( + phi + ); + } + + inflow_U + { + //type surfaceRegion; // OF4 + type surfaceFieldValue; // OF5,OF6 + libs ("libfieldFunctionObjects.so"); + writeControl timeStep; + writeInterval 100; + log true; + // Output field values as well + writeFields false; + regionType patch; + name inlet; + operation sum;//areaIntegrate; + + fields + ( + U + ); + } + + outflow_GasSpecies + { + $inflow_GasSpecies; + name outlet; + } + + outflow_phi + { + $inflow_phi; + name outlet; + } + + outflow_U + { + $inflow_U; + name outlet; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/controlDict_test b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/controlDict_test new file mode 100755 index 00000000..948a496e --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/controlDict_test @@ -0,0 +1,271 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application cfdemSolverRhoPimpleChem; + +startFrom startTime; + +startTime 0.0; + +stopAt endTime; + +endTime 0.2; + +deltaT 0.00025; + +writeControl runTime; + +writeInterval 0.02; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +adjustTimeStep no; + +maxCo 0.5; + +maxDeltaT 0.1; + + +// ************************************************************************* // +libs +( + "libfieldFunctionObjects.so" +); + +functions +{ + moleFrac + { + type rhoReactionThermoMoleFractions; + } + + probes + { + type probes; + + functionObjectLibs ("libsampling.so"); + + // Name of the directory for probe data + name probes; + + // Locations to be probed. + probeLocations + ( + (0.03 0.025 0.0) + (0.03 0.050 0.0) + (0.03 0.075 0.0) + (0.03 0.090 0.0) + (0.03 0.120 0.0) + ); + + fields + ( + rho + p + T + Cpv + N2 + CO2 + CO + H2 + H2O + ModSpeciesMassField_N2 + ModSpeciesMassField_CO2 + ModSpeciesMassField_CO + ModSpeciesMassField_H2 + ModSpeciesMassField_H2O + X_CO + X_CO2 + X_H2 + X_N2 + X_H2O + ); + + writeControl timeStep; + writeInterval 50; + } + + + fieldMinMax_T + { + type fieldMinMax; + libs ("libfieldFunctionObjects.so"); + fields (T); + // Report the location of the field extrema + location yes; + // Type of extrema for rank > 0 primitives + mode magnitude; // magnitude | component + } + + fieldMinMax_Cpv + { + type fieldMinMax; + libs ("libfieldFunctionObjects.so"); + fields (Cpv); + // Report the location of the field extrema + location yes; + // Type of extrema for rank > 0 primitives + mode magnitude; // magnitude | component + } + + fieldMinMax_partTemp + { + type fieldMinMax; + libs ("libfieldFunctionObjects.so"); + fields (partTemp); + location yes; + mode magnitude; + } + + globalMassFrac + { + //type volRegion; // OF4 + type volFieldValue; // OF5,OF6 + libs ("libfieldFunctionObjects.so"); + writeControl timeStep;//outputTime; + writeInterval 1; + log true; + writeFields false; + regionType all; + name c0; + operation weightedVolAverage; + weightField rhoeps; + fields + ( + H2 + H2O + CO2 + CO + N2 + ); + } + + globalMass + { + //type volRegion; // OF4 + type volFieldValue; // OF5,OF6 + libs ("libfieldFunctionObjects.so"); + writeControl timeStep;//outputTime; + writeInterval 1; + log true; + writeFields false; + regionType all; + name c1; + operation volIntegrate; + fields + ( + rhoeps + rho + ); + } + + inflow_GasSpecies + { + //type surfaceRegion; // OF4 + type surfaceFieldValue; // OF5,OF6 + libs ("libfieldFunctionObjects.so"); + writeControl timeStep; + writeInterval 100; + log true; + // Output field values as well + writeFields false; + regionType patch; + name inlet; + operation sum;//areaIntegrate; + + fields + ( + CO + CO2 + H2 + H2O + N2 + ); + } + + inflow_phi + { + //type surfaceRegion; // OF4 + type surfaceFieldValue; // OF5,OF6 + libs ("libfieldFunctionObjects.so"); + writeControl timeStep; + writeInterval 100; + log true; + // Output field values as well + writeFields false; + regionType patch; + name inlet; + operation sum;//areaIntegrate; + + fields + ( + phi + ); + } + + inflow_U + { + //type surfaceRegion; // OF4 + type surfaceFieldValue; // OF5,OF6 + libs ("libfieldFunctionObjects.so"); + writeControl timeStep; + writeInterval 100; + log true; + // Output field values as well + writeFields false; + regionType patch; + name inlet; + operation sum;//areaIntegrate; + + fields + ( + U + ); + } + + outflow_GasSpecies + { + $inflow_GasSpecies; + name outlet; + } + + outflow_phi + { + $inflow_phi; + name outlet; + } + + outflow_U + { + $inflow_U; + name outlet; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/decomposeParDict b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/decomposeParDict new file mode 100755 index 00000000..3eb1ad3c --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/decomposeParDict @@ -0,0 +1,33 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n (2 1 2); + delta 0.001; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/fvSchemes b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/fvSchemes new file mode 100755 index 00000000..60e0f338 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/fvSchemes @@ -0,0 +1,82 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) cellMDLimited leastSquares 0.5; + grad(U) cellMDLimited leastSquares 0.5; + grad(h) cellMDLimited leastSquares 0.5; + grad(e) cellMDLimited leastSquares 0.5; +} + +divSchemes +{ + default Gauss linear; + + div(phi,U) Gauss limitedLinear 1; + div(phid,p) Gauss limitedLinear 1; + div(phi,K) Gauss limitedLinear 1; + div(phi,h) Gauss limitedLinear 1; + div(phi,k) Gauss limitedLinear 1; + div(phi,epsilon) Gauss limitedLinear 1; + div(U) Gauss limitedLinear 1; + div(phi,Yi_h) Gauss multivariateSelection + { + CO limitedLinear01 1; + H2 limitedLinear01 1; + N2 limitedLinear01 1; + H2O limitedLinear01 1; + CO2 limitedLinear01 1; + h limitedLinear 1; + e limitedLinear 1; + } + div((viscousTerm*dev2(grad(U).T()))) Gauss linear; + div((thermo:mu*dev(grad(U).T()))) Gauss linear; + div((nuEff*dev2(T(grad(U))))) Gauss linear; + div(phi,T) Gauss limitedLinear 1; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; + interpolate(U) linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p ; +} + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/fvSolution b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/fvSolution new file mode 100755 index 00000000..121600f9 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/fvSolution @@ -0,0 +1,117 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-6; + relTol 0.01; + } + + pFinal + { + $p; + tolerance 1e-06; + relTol 0; + } + + "(rho|G)" + { + solver PCG; + preconditioner DIC; + tolerance 1e-6; + relTol 0.01; + } + + "(rho|G)Final" + { + $rho; + tolerance 1e-06; + relTol 0; + } + + "(U|h|e|R|k|epsilon)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-05; + relTol 0.1; + maxIter 100; + } + + "(U|h|e|R|k|epsilon)Final" + { + $U; + tolerance 1e-05; + relTol 0; + } + + "(Yi|CO|CO2|H2|H2O|N2)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-06; + relTol 0.01; + maxIter 100; + } + + "(Yi|CO|CO2|H2|H2O|N2)Final" + { + $Yi; + tolerance 1e-06; + relTol 0; + maxIter 100; + } + + T + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-8; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor yes; + nOuterCorrectors 5; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + rhoMin rhoMin [ 1 -3 0 0 0 ] 0.4; + rhoMax rhoMax [ 1 -3 0 0 0 ] 2.0; +} + +relaxationFactors +{ + fields + { + T 0.5; + "(Yi|CO|CO2|H2|H2O|N2)" 0.6; + p 0.6; + } + equations + { + ".*" 0.8; + "(h|e).*" 0.5; + } +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/probesDict b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/probesDict new file mode 100755 index 00000000..892cf783 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/CFD/system/probesDict @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object probesDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + + +fields +( + rho + p + T + Cpv + N2 + CO2 + CO + H2 + H2O + ModSpeciesMassField_N2 + ModSpeciesMassField_CO2 + ModSpeciesMassField_CO + ModSpeciesMassField_H2 + ModSpeciesMassField_H2O + X_CO + X_CO2 + X_H2 + X_N2 + X_H2O + X_N2 +); + +writeControl timeStep; +writeInterval 10000; + + +// Locations to be probed. +probeLocations +( + (0.03 0.025 0.0) + (0.03 0.050 0.0) + (0.03 0.075 0.0) + (0.03 0.090 0.0) + (0.03 0.120 0.0) +); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/DEM/in.liggghts_compute_output b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/DEM/in.liggghts_compute_output new file mode 100755 index 00000000..8940bdfa --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/DEM/in.liggghts_compute_output @@ -0,0 +1,427 @@ +################################################################################ +# write data to files for post-processing + +variable rad1cg equal 0.000063*${cg} +variable rad2cg equal 0.000125*${cg} +variable rad3cg equal 0.000245*${cg} +#inert particle radcg 0.000250*${cg} +variable rad4cg equal 0.000255*${cg} +variable d1condition atom (radiusv_rad1cg)&&(radiusv_rad2cg)&&(radiusv_rad4cg) + +group d1 variable d1condition +group d2 variable d2condition +group d3 variable d3condition +group d4 variable d4condition + +variable Nevery equal 1000 +variable Nrepeat equal 10 +variable time equal time + +################################################################################ +# compute fractional reduction +# d1 +compute fr_d1 d1 reduce ave f_fracRed[1] f_fracRed[2] f_fracRed[3] +fix fr_d1 d1 ave/time ${Nevery} ${Nrepeat} ${WI} c_fr_d1[1] c_fr_d1[2] c_fr_d1[3] +variable fr_d1_1 equal f_fr_d1[1] +variable fr_d1_2 equal f_fr_d1[2] +variable fr_d1_3 equal f_fr_d1[3] +variable fr_d1_OV equal 1/9*(f_fr_d1[3])+2/9*(f_fr_d1[2])+6/9*(f_fr_d1[1]) + +fix printfr1 all print ${WI} "${time} ${fr_d1_1} ${fr_d1_2} ${fr_d1_3} ${fr_d1_OV}" & + file ../DEM/post/fr_d1.dat title "#time fr_d1_1 fr_d1_2 fr_d1_3 fr_d1_overall" screen no + +# d2 +compute fr_d2 d2 reduce ave f_fracRed[1] f_fracRed[2] f_fracRed[3] +fix fr_d2 d2 ave/time ${Nevery} ${Nrepeat} ${WI} c_fr_d2[1] c_fr_d2[2] c_fr_d2[3] +variable fr_d2_1 equal f_fr_d2[1] +variable fr_d2_2 equal f_fr_d2[2] +variable fr_d2_3 equal f_fr_d2[3] +variable fr_d2_OV equal 1/9*(f_fr_d2[3])+2/9*(f_fr_d2[2])+6/9*(f_fr_d2[1]) + +fix printfr2 all print ${WI} "${time} ${fr_d2_1} ${fr_d2_2} ${fr_d2_3} ${fr_d2_OV}" & + file ../DEM/post/fr_d2.dat title "#time fr_d2_1 fr_d2_2 fr_d2_3 fr_d2_overall" screen no + +# d3 +compute fr_d3 d3 reduce ave f_fracRed[1] f_fracRed[2] f_fracRed[3] +fix fr_d3 d3 ave/time ${Nevery} ${Nrepeat} ${WI} c_fr_d3[1] c_fr_d3[2] c_fr_d3[3] +variable fr_d3_1 equal f_fr_d3[1] +variable fr_d3_2 equal f_fr_d3[2] +variable fr_d3_3 equal f_fr_d3[3] +variable fr_d3_OV equal 1/9*(f_fr_d3[3])+2/9*(f_fr_d3[2])+6/9*(f_fr_d3[1]) + +fix printfr3 all print ${WI} "${time} ${fr_d3_1} ${fr_d3_2} ${fr_d3_3} ${fr_d3_OV}" & + file ../DEM/post/fr_d3.dat title "#time fr_d3_1 fr_d3_2 fr_d3_3 fr_d3_overall" screen no + +# d4 +compute fr_d4 d4 reduce ave f_fracRed[1] f_fracRed[2] f_fracRed[3] +fix fr_d4 d4 ave/time ${Nevery} ${Nrepeat} ${WI} c_fr_d4[1] c_fr_d4[2] c_fr_d4[3] +variable fr_d4_1 equal f_fr_d4[1] +variable fr_d4_2 equal f_fr_d4[2] +variable fr_d4_3 equal f_fr_d4[3] +variable fr_d4_OV equal 1/9*(f_fr_d4[3])+2/9*(f_fr_d4[2])+6/9*(f_fr_d4[1]) + +fix printfr4 all print ${WI} "${time} ${fr_d4_1} ${fr_d4_2} ${fr_d4_3} ${fr_d4_OV}" & + file ../DEM/post/fr_d4.dat title "#time fr_d4_1 fr_d4_2 fr_d4_3 fr_d4_overall" screen no + +# mass-based average of all diameters +variable fr_ave_OV equal 0.154*v_fr_d1_OV+0.332*v_fr_d2_OV+0.286*v_fr_d3_OV+0.228*v_fr_d4_OV + +# overall fractional reduction of individual and average of all diameters +fix printfrOV all print ${WI} "${time} ${fr_d1_OV} ${fr_d2_OV} ${fr_d3_OV} ${fr_d4_OV} ${fr_ave_OV}" & + file ../DEM/post/fr_OV.dat title "#time fr_d1_OV fr_d2_OV fr_d3_OV fr_d4_OV fr_ave_OV" screen no + +################################################################################ +# reactant gas mass change +compute dma_CO ore reduce sum f_dmA_cfd5[1] f_dmA_cfd5[2] f_dmA_cfd5[3] +fix dmA_f_CO ore ave/time ${Nevery} ${Nrepeat} ${WI} c_dma_CO[1] c_dma_CO[2] c_dma_CO[3] +variable dmA_CO_1 equal f_dmA_f_CO[1] +variable dmA_CO_2 equal f_dmA_f_CO[2] +variable dmA_CO_3 equal f_dmA_f_CO[3] + +compute dma_H2 ore reduce sum f_dmA_cfd6[1] f_dmA_cfd6[2] f_dmA_cfd6[3] +fix dmA_f_H2 ore ave/time ${Nevery} ${Nrepeat} ${WI} c_dma_H2[1] c_dma_H2[2] c_dma_H2[3] +variable dmA_H2_1 equal f_dmA_f_H2[1] +variable dmA_H2_2 equal f_dmA_f_H2[2] +variable dmA_H2_3 equal f_dmA_f_H2[3] + +# write mass change to file +fix printdmA all print ${WI} "${time} ${dmA_CO_1} ${dmA_CO_2} ${dmA_CO_3} ${dmA_H2_1} ${dmA_H2_2} ${dmA_H2_3}" & + file ../DEM/post/dmA.dat title "#time dmA_CO_1 dmA_CO_2 dmA_CO_3 dmA_H2_1 dmA_H2_2 dmA_H2_3" screen no + +################################################################################ +# compute average resistance terms for d1 +compute Aterm_CO_d1 d1 reduce ave f_Aterm_cfd5[1] f_Aterm_cfd5[2] f_Aterm_cfd5[3] +fix Aterm_CO_d1 d1 ave/time ${Nevery} ${Nrepeat} ${WI} c_Aterm_CO_d1[1] c_Aterm_CO_d1[2] c_Aterm_CO_d1[3] +variable a_CO_d1_1 equal f_Aterm_CO_d1[1] +variable a_CO_d1_2 equal f_Aterm_CO_d1[2] +variable a_CO_d1_3 equal f_Aterm_CO_d1[3] + +compute Aterm_H2_d1 d1 reduce ave f_Aterm_cfd6[1] f_Aterm_cfd6[2] f_Aterm_cfd6[3] +fix Aterm_H2_d1 d1 ave/time ${Nevery} ${Nrepeat} ${WI} c_Aterm_H2_d1[1] c_Aterm_H2_d1[2] c_Aterm_H2_d1[3] +variable a_H2_d1_1 equal f_Aterm_H2_d1[1] +variable a_H2_d1_2 equal f_Aterm_H2_d1[2] +variable a_H2_d1_3 equal f_Aterm_H2_d1[3] + +compute Bterm_CO_d1 d1 reduce ave f_Bterm_cfd5[1] f_Bterm_cfd5[2] f_Bterm_cfd5[3] +fix Bterm_CO_d1 d1 ave/time ${Nevery} ${Nrepeat} ${WI} c_Bterm_CO_d1[1] c_Bterm_CO_d1[2] c_Bterm_CO_d1[3] +variable b_CO_d1_1 equal f_Bterm_CO_d1[1] +variable b_CO_d1_2 equal f_Bterm_CO_d1[2] +variable b_CO_d1_3 equal f_Bterm_CO_d1[3] + +compute Bterm_H2_d1 d1 reduce ave f_Bterm_cfd6[1] f_Bterm_cfd6[2] f_Bterm_cfd6[3] +fix Bterm_H2_d1 d1 ave/time ${Nevery} ${Nrepeat} ${WI} c_Bterm_H2_d1[1] c_Bterm_H2_d1[2] c_Bterm_H2_d1[3] +variable b_H2_d1_1 equal f_Bterm_H2_d1[1] +variable b_H2_d1_2 equal f_Bterm_H2_d1[2] +variable b_H2_d1_3 equal f_Bterm_H2_d1[3] + +compute Massterm_CO_d1 d1 reduce ave f_Massterm_cfd5 +fix Massterm_CO_d1 d1 ave/time ${Nevery} ${Nrepeat} ${WI} c_Massterm_CO_d1 +variable mt_CO_d1 equal f_Massterm_CO_d1 + +compute Massterm_H2_d1 d1 reduce ave f_Massterm_cfd6 +fix Massterm_H2_d1 d1 ave/time ${Nevery} ${Nrepeat} ${WI} c_Massterm_H2_d1 +variable mt_H2_d1 equal f_Massterm_H2_d1 + +fix printAtermd1 all print ${WI} "${time} ${a_CO_d1_1} ${a_CO_d1_2} ${a_CO_d1_3} ${a_H2_d1_1} ${a_H2_d1_2} ${a_H2_d1_3}" & + file ../DEM/post/Aterm_d1.dat title "#time a_CO_d1_1 a_CO_d1_2 a_CO_d1_3 a_H2_d1_1 a_H2_d1_2 a_H2_d1_3" screen no + +fix printBtermd1 all print ${WI} "${time} ${b_CO_d1_1} ${b_CO_d1_2} ${b_CO_d1_3} ${b_H2_d1_1} ${b_H2_d1_2} ${b_H2_d1_3}" & + file ../DEM/post/Bterm_d1.dat title "#time b_CO_d1_1 b_CO_d1_2 b_CO_d1_3 b_H2_d1_1 b_H2_d1_2 b_H2_d1_3" screen no + +fix printMtermd1 all print ${WI} "${time} ${mt_CO_d1} ${mt_H2_d1}" & + file ../DEM/post/Mterm_d1.dat title "#time mt_CO_d1 mt_H2_d1" screen no + +################################################################################ +# compute average resistance terms for d2 +compute Aterm_CO_d2 d2 reduce ave f_Aterm_cfd5[1] f_Aterm_cfd5[2] f_Aterm_cfd5[3] +fix Aterm_CO_d2 d2 ave/time ${Nevery} ${Nrepeat} ${WI} c_Aterm_CO_d2[1] c_Aterm_CO_d2[2] c_Aterm_CO_d2[3] +variable a_CO_d2_1 equal f_Aterm_CO_d2[1] +variable a_CO_d2_2 equal f_Aterm_CO_d2[2] +variable a_CO_d2_3 equal f_Aterm_CO_d2[3] + +compute Aterm_H2_d2 d2 reduce ave f_Aterm_cfd6[1] f_Aterm_cfd6[2] f_Aterm_cfd6[3] +fix Aterm_H2_d2 d2 ave/time ${Nevery} ${Nrepeat} ${WI} c_Aterm_H2_d2[1] c_Aterm_H2_d2[2] c_Aterm_H2_d2[3] +variable a_H2_d2_1 equal f_Aterm_H2_d2[1] +variable a_H2_d2_2 equal f_Aterm_H2_d2[2] +variable a_H2_d2_3 equal f_Aterm_H2_d2[3] + +compute Bterm_CO_d2 d2 reduce ave f_Bterm_cfd5[1] f_Bterm_cfd5[2] f_Bterm_cfd5[3] +fix Bterm_CO_d2 d2 ave/time ${Nevery} ${Nrepeat} ${WI} c_Bterm_CO_d2[1] c_Bterm_CO_d2[2] c_Bterm_CO_d2[3] +variable b_CO_d2_1 equal f_Bterm_CO_d2[1] +variable b_CO_d2_2 equal f_Bterm_CO_d2[2] +variable b_CO_d2_3 equal f_Bterm_CO_d2[3] + +compute Bterm_H2_d2 d2 reduce ave f_Bterm_cfd6[1] f_Bterm_cfd6[2] f_Bterm_cfd6[3] +fix Bterm_H2_d2 d2 ave/time ${Nevery} ${Nrepeat} ${WI} c_Bterm_H2_d2[1] c_Bterm_H2_d2[2] c_Bterm_H2_d2[3] +variable b_H2_d2_1 equal f_Bterm_H2_d2[1] +variable b_H2_d2_2 equal f_Bterm_H2_d2[2] +variable b_H2_d2_3 equal f_Bterm_H2_d2[3] + +compute Massterm_CO_d2 d2 reduce ave f_Massterm_cfd5 +fix Massterm_CO_d2 d2 ave/time ${Nevery} ${Nrepeat} ${WI} c_Massterm_CO_d2 +variable mt_CO_d2 equal f_Massterm_CO_d2 + +compute Massterm_H2_d2 d2 reduce ave f_Massterm_cfd6 +fix Massterm_H2_d2 d2 ave/time ${Nevery} ${Nrepeat} ${WI} c_Massterm_H2_d2 +variable mt_H2_d2 equal f_Massterm_H2_d2 + +fix printAtermd2 all print ${WI} "${time} ${a_CO_d2_1} ${a_CO_d2_2} ${a_CO_d2_3} ${a_H2_d2_1} ${a_H2_d2_2} ${a_H2_d2_3}" & + file ../DEM/post/Aterm_d2.dat title "#time a_CO_d2_1 a_CO_d2_2 a_CO_d2_3 a_H2_d2_1 a_H2_d2_2 a_H2_d2_3" screen no + +fix printBtermd2 all print ${WI} "${time} ${b_CO_d2_1} ${b_CO_d2_2} ${b_CO_d2_3} ${b_H2_d2_1} ${b_H2_d2_2} ${b_H2_d2_3}" & + file ../DEM/post/Bterm_d2.dat title "#time b_CO_d2_1 b_CO_d2_2 b_CO_d2_3 b_H2_d2_1 b_H2_d2_2 b_H2_d2_3" screen no + +fix printMtermd2 all print ${WI} "${time} ${mt_CO_d2} ${mt_H2_d2}" & + file ../DEM/post/Mterm_d2.dat title "#time mt_CO_d2 mt_H2_d2" screen no + +################################################################################ +# compute average resistance terms for d3 +compute Aterm_CO_d3 d3 reduce ave f_Aterm_cfd5[1] f_Aterm_cfd5[2] f_Aterm_cfd5[3] +fix Aterm_CO_d3 d3 ave/time ${Nevery} ${Nrepeat} ${WI} c_Aterm_CO_d3[1] c_Aterm_CO_d3[2] c_Aterm_CO_d3[3] +variable a_CO_d3_1 equal f_Aterm_CO_d3[1] +variable a_CO_d3_2 equal f_Aterm_CO_d3[2] +variable a_CO_d3_3 equal f_Aterm_CO_d3[3] + +compute Aterm_H2_d3 d3 reduce ave f_Aterm_cfd6[1] f_Aterm_cfd6[2] f_Aterm_cfd6[3] +fix Aterm_H2_d3 d3 ave/time ${Nevery} ${Nrepeat} ${WI} c_Aterm_H2_d3[1] c_Aterm_H2_d3[2] c_Aterm_H2_d3[3] +variable a_H2_d3_1 equal f_Aterm_H2_d3[1] +variable a_H2_d3_2 equal f_Aterm_H2_d3[2] +variable a_H2_d3_3 equal f_Aterm_H2_d3[3] + +compute Bterm_CO_d3 d3 reduce ave f_Bterm_cfd5[1] f_Bterm_cfd5[2] f_Bterm_cfd5[3] +fix Bterm_CO_d3 d3 ave/time ${Nevery} ${Nrepeat} ${WI} c_Bterm_CO_d3[1] c_Bterm_CO_d3[2] c_Bterm_CO_d3[3] +variable b_CO_d3_1 equal f_Bterm_CO_d3[1] +variable b_CO_d3_2 equal f_Bterm_CO_d3[2] +variable b_CO_d3_3 equal f_Bterm_CO_d3[3] + +compute Bterm_H2_d3 d3 reduce ave f_Bterm_cfd6[1] f_Bterm_cfd6[2] f_Bterm_cfd6[3] +fix Bterm_H2_d3 d3 ave/time ${Nevery} ${Nrepeat} ${WI} c_Bterm_H2_d3[1] c_Bterm_H2_d3[2] c_Bterm_H2_d3[3] +variable b_H2_d3_1 equal f_Bterm_H2_d3[1] +variable b_H2_d3_2 equal f_Bterm_H2_d3[2] +variable b_H2_d3_3 equal f_Bterm_H2_d3[3] + +compute Massterm_CO_d3 d3 reduce ave f_Massterm_cfd5 +fix Massterm_CO_d3 d3 ave/time ${Nevery} ${Nrepeat} ${WI} c_Massterm_CO_d3 +variable mt_CO_d3 equal f_Massterm_CO_d3 + +compute Massterm_H2_d3 d3 reduce ave f_Massterm_cfd6 +fix Massterm_H2_d3 d3 ave/time ${Nevery} ${Nrepeat} ${WI} c_Massterm_H2_d3 +variable mt_H2_d3 equal f_Massterm_H2_d3 + +fix printAtermd3 all print ${WI} "${time} ${a_CO_d3_1} ${a_CO_d3_2} ${a_CO_d3_3} ${a_H2_d3_1} ${a_H2_d3_2} ${a_H2_d3_3}" & + file ../DEM/post/Aterm_d3.dat title "#time a_CO_d3_1 a_CO_d3_2 a_CO_d3_3 a_H2_d3_1 a_H2_d3_2 a_H2_d3_3" screen no + +fix printBtermd3 all print ${WI} "${time} ${b_CO_d3_1} ${b_CO_d3_2} ${b_CO_d3_3} ${b_H2_d3_1} ${b_H2_d3_2} ${b_H2_d3_3}" & + file ../DEM/post/Bterm_d3.dat title "#time b_CO_d3_1 b_CO_d3_2 b_CO_d3_3 b_H2_d3_1 b_H2_d3_2 b_H2_d3_3" screen no + +fix printMtermd3 all print ${WI} "${time} ${mt_CO_d3} ${mt_H2_d3}" & + file ../DEM/post/Mterm_d3.dat title "#time mt_CO_d3 mt_H2_d3" screen no + +################################################################################ +# compute average resistance terms for d4 +compute Aterm_CO_d4 d4 reduce ave f_Aterm_cfd5[1] f_Aterm_cfd5[2] f_Aterm_cfd5[3] +fix Aterm_CO_d4 d4 ave/time ${Nevery} ${Nrepeat} ${WI} c_Aterm_CO_d4[1] c_Aterm_CO_d4[2] c_Aterm_CO_d4[3] +variable a_CO_d4_1 equal f_Aterm_CO_d4[1] +variable a_CO_d4_2 equal f_Aterm_CO_d4[2] +variable a_CO_d4_3 equal f_Aterm_CO_d4[3] + +compute Aterm_H2_d4 d4 reduce ave f_Aterm_cfd6[1] f_Aterm_cfd6[2] f_Aterm_cfd6[3] +fix Aterm_H2_d4 d4 ave/time ${Nevery} ${Nrepeat} ${WI} c_Aterm_H2_d4[1] c_Aterm_H2_d4[2] c_Aterm_H2_d4[3] +variable a_H2_d4_1 equal f_Aterm_H2_d4[1] +variable a_H2_d4_2 equal f_Aterm_H2_d4[2] +variable a_H2_d4_3 equal f_Aterm_H2_d4[3] + +compute Bterm_CO_d4 d4 reduce ave f_Bterm_cfd5[1] f_Bterm_cfd5[2] f_Bterm_cfd5[3] +fix Bterm_CO_d4 d4 ave/time ${Nevery} ${Nrepeat} ${WI} c_Bterm_CO_d4[1] c_Bterm_CO_d4[2] c_Bterm_CO_d4[3] +variable b_CO_d4_1 equal f_Bterm_CO_d4[1] +variable b_CO_d4_2 equal f_Bterm_CO_d4[2] +variable b_CO_d4_3 equal f_Bterm_CO_d4[3] + +compute Bterm_H2_d4 d4 reduce ave f_Bterm_cfd6[1] f_Bterm_cfd6[2] f_Bterm_cfd6[3] +fix Bterm_H2_d4 d4 ave/time ${Nevery} ${Nrepeat} ${WI} c_Bterm_H2_d4[1] c_Bterm_H2_d4[2] c_Bterm_H2_d4[3] +variable b_H2_d4_1 equal f_Bterm_H2_d4[1] +variable b_H2_d4_2 equal f_Bterm_H2_d4[2] +variable b_H2_d4_3 equal f_Bterm_H2_d4[3] + +compute Massterm_CO_d4 d4 reduce ave f_Massterm_cfd5 +fix Massterm_CO_d4 d4 ave/time ${Nevery} ${Nrepeat} ${WI} c_Massterm_CO_d4 +variable mt_CO_d4 equal f_Massterm_CO_d4 + +compute Massterm_H2_d4 d4 reduce ave f_Massterm_cfd6 +fix Massterm_H2_d4 d4 ave/time ${Nevery} ${Nrepeat} ${WI} c_Massterm_H2_d4 +variable mt_H2_d4 equal f_Massterm_H2_d4 + +fix printAtermd4 all print ${WI} "${time} ${a_CO_d4_1} ${a_CO_d4_2} ${a_CO_d4_3} ${a_H2_d4_1} ${a_H2_d4_2} ${a_H2_d4_3}" & + file ../DEM/post/Aterm_d4.dat title "#time a_CO_d4_1 a_CO_d4_2 a_CO_d4_3 a_H2_d4_1 a_H2_d4_2 a_H2_d4_3" screen no + +fix printBtermd4 all print ${WI} "${time} ${b_CO_d4_1} ${b_CO_d4_2} ${b_CO_d4_3} ${b_H2_d4_1} ${b_H2_d4_2} ${b_H2_d4_3}" & + file ../DEM/post/Bterm_d4.dat title "#time b_CO_d4_1 b_CO_d4_2 b_CO_d4_3 b_H2_d4_1 b_H2_d4_2 b_H2_d4_3" screen no + +fix printMtermd4 all print ${WI} "${time} ${mt_CO_d4} ${mt_H2_d4}" & + file ../DEM/post/Mterm_d4.dat title "#time mt_CO_d4 mt_H2_d4" screen no + +################################################################################ +# compute mass-based average resistance terms for all diameters +variable a_CO_ave_1 equal 0.154*v_a_CO_d1_1+0.332*v_a_CO_d2_1+0.286*v_a_CO_d3_1+0.228*v_a_CO_d4_1 +variable a_CO_ave_2 equal 0.154*v_a_CO_d1_2+0.332*v_a_CO_d2_2+0.286*v_a_CO_d3_2+0.228*v_a_CO_d4_2 +variable a_CO_ave_3 equal 0.154*v_a_CO_d1_3+0.332*v_a_CO_d2_3+0.286*v_a_CO_d3_3+0.228*v_a_CO_d4_3 + +variable a_H2_ave_1 equal 0.154*v_a_H2_d1_1+0.332*v_a_H2_d2_1+0.286*v_a_H2_d3_1+0.228*v_a_H2_d4_1 +variable a_H2_ave_2 equal 0.154*v_a_H2_d1_2+0.332*v_a_H2_d2_2+0.286*v_a_H2_d3_2+0.228*v_a_H2_d4_2 +variable a_H2_ave_3 equal 0.154*v_a_H2_d1_3+0.332*v_a_H2_d2_3+0.286*v_a_H2_d3_3+0.228*v_a_H2_d4_3 + +variable b_CO_ave_1 equal 0.154*v_b_CO_d1_1+0.332*v_b_CO_d2_1+0.286*v_b_CO_d3_1+0.228*v_b_CO_d4_1 +variable b_CO_ave_2 equal 0.154*v_b_CO_d1_2+0.332*v_b_CO_d2_2+0.286*v_b_CO_d3_2+0.228*v_b_CO_d4_2 +variable b_CO_ave_3 equal 0.154*v_b_CO_d1_3+0.332*v_b_CO_d2_3+0.286*v_b_CO_d3_3+0.228*v_b_CO_d4_3 + +variable b_H2_ave_1 equal 0.154*v_b_H2_d1_1+0.332*v_b_H2_d2_1+0.286*v_b_H2_d3_1+0.228*v_b_H2_d4_1 +variable b_H2_ave_2 equal 0.154*v_b_H2_d1_2+0.332*v_b_H2_d2_2+0.286*v_b_H2_d3_2+0.228*v_b_H2_d4_2 +variable b_H2_ave_3 equal 0.154*v_b_H2_d1_3+0.332*v_b_H2_d2_3+0.286*v_b_H2_d3_3+0.228*v_b_H2_d4_3 + +variable mt_CO_ave equal 0.154*v_mt_CO_d1+0.332*v_mt_CO_d2+0.286*v_mt_CO_d3+0.228*v_mt_CO_d4 +variable mt_H2_ave equal 0.154*v_mt_H2_d1+0.332*v_mt_H2_d2+0.286*v_mt_H2_d3+0.228*v_mt_H2_d4 + +fix printAtermAve all print ${WI} "${time} ${a_CO_ave_1} ${a_CO_ave_2} ${a_CO_ave_3} ${a_H2_ave_1} ${a_H2_ave_2} ${a_H2_ave_3}" & + file ../DEM/post/AtermAve.dat title "#time a_CO_ave_1 a_CO_ave_2 a_CO_ave_3 a_H2_ave_1 a_H2_ave_2 a_H2_ave_3" screen no + +fix printBtermAve all print ${WI} "${time} ${b_CO_ave_1} ${b_CO_ave_2} ${b_CO_ave_3} ${b_H2_ave_1} ${b_H2_ave_2} ${b_H2_ave_3}" & + file ../DEM/post/BtermAve.dat title "#time b_CO_ave_1 b_CO_ave_2 b_CO_ave_3 b_H2_ave_1 b_H2_ave_2 b_H2_ave_3" screen no + +fix printMtermAve all print ${WI} "${time} ${mt_CO_ave} ${mt_H2_ave}" & + file ../DEM/post/MtermAve.dat title "#time mt_CO_ave mt_H2_ave" screen no + + +################################################################################ +# compute layer masses +compute mass_layer ore reduce sum f_LayerMasses[1] f_LayerMasses[2] f_LayerMasses[3] f_LayerMasses[4] +fix massLayerPrintout ore ave/time ${Nevery} ${Nrepeat} ${WI} c_mass_layer[1] c_mass_layer[2] c_mass_layer[3] c_mass_layer[4] +variable mL1 equal f_massLayerPrintout[1] +variable mL2 equal f_massLayerPrintout[2] +variable mL3 equal f_massLayerPrintout[3] +variable mL4 equal f_massLayerPrintout[4] + +compute dY_CO ore reduce sum f_dY_cfd5[1] f_dY_cfd5[2] f_dY_cfd5[3] +fix dY_CO_Output ore ave/time ${Nevery} ${Nrepeat} ${WI} c_dY_CO[1] c_dY_CO[2] c_dY_CO[3] +variable dY_CO_1 equal f_dY_CO_Output[1] +variable dY_CO_2 equal f_dY_CO_Output[2] +variable dY_CO_3 equal f_dY_CO_Output[3] + +compute dY_H2 ore reduce sum f_dY_cfd6[1] f_dY_cfd6[2] f_dY_cfd6[3] +fix dY_H2_Output ore ave/time ${Nevery} ${Nrepeat} ${WI} c_dY_H2[1] c_dY_H2[2] c_dY_H2[3] +variable dY_H2_1 equal f_dY_H2_Output[1] +variable dY_H2_2 equal f_dY_H2_Output[2] +variable dY_H2_3 equal f_dY_H2_Output[3] + +compute xA_CO ore reduce ave f_X_CO +fix molarFractionA_CO ore ave/time ${Nevery} ${Nrepeat} ${WI} c_xA_CO +variable xA_CO_1 equal f_molarFractionA_CO + +compute xA_H2 ore reduce ave f_X_H2 +fix molarFractionA_H2 ore ave/time ${Nevery} ${Nrepeat} ${WI} c_xA_H2 +variable xA_H2_1 equal f_molarFractionA_H2 + +compute xC_CO2 ore reduce ave f_X_CO2 +fix molarFractionC_CO2 ore ave/time ${Nevery} ${Nrepeat} ${WI} c_xC_CO2 +variable xC_CO2_1 equal f_molarFractionC_CO2 + +compute xC_H2O ore reduce ave f_X_H2O +fix molarFractionC_H2O ore ave/time ${Nevery} ${Nrepeat} ${WI} c_xC_H2O +variable xC_H2O_1 equal f_molarFractionC_H2O + +fix printMassLayer all print ${WI} "${time} ${mL1} ${mL2} ${mL3} ${mL4}" & + file ../DEM/post/MassLayers.dat title "#time mL_Fe mL_w mL_m mL_h" + +fix printdmYLayer all print ${WI} "${time} ${dY_CO_1} ${dY_CO_2} ${dY_CO_3} ${dY_H2_1} ${dY_H2_2} ${dY_H2_3}" & + file ../DEM/post/dmY.dat title "#time dY_CO_1 dY_CO_2 dY_CO_3 dY_H2_1 dY_H2_2 dY_H2_3" screen no + +fix molarFractions all print ${WI} "${time} ${xA_CO_1} ${xA_H2_1} ${xC_CO2_1} ${xC_H2O_1}" & + file ../DEM/post/molarFractions.dat title "#time x_CO x_H2 x_CO2 x_H2O" screen no + +################################################################################ +# compute effective diffusivity +compute effDiffBinary_red_CO ore reduce ave f_effDiffBinary_cfd5[1] f_effDiffBinary_cfd5[2] f_effDiffBinary_cfd5[3] +fix effDiffBinary1 ore ave/time ${Nevery} ${Nrepeat} ${WI} c_effDiffBinary_red_CO[1] c_effDiffBinary_red_CO[2] c_effDiffBinary_red_CO[3] +variable dij_CO_1 equal f_effDiffBinary1[1] +variable dij_CO_2 equal f_effDiffBinary1[2] +variable dij_CO_3 equal f_effDiffBinary1[3] + +compute effDiffBinary_red_H2 ore reduce ave f_effDiffBinary_cfd6[1] f_effDiffBinary_cfd6[2] f_effDiffBinary_cfd6[3] +fix effDiffBinary2 ore ave/time ${Nevery} ${Nrepeat} ${WI} c_effDiffBinary_red_H2[1] c_effDiffBinary_red_H2[2] c_effDiffBinary_red_H2[3] +variable dij_H2_1 equal f_effDiffBinary2[1] +variable dij_H2_2 equal f_effDiffBinary2[2] +variable dij_H2_3 equal f_effDiffBinary2[3] + +compute effDiffKnud_red_CO ore reduce ave f_effDiffKnud_cfd5[1] f_effDiffKnud_cfd5[2] f_effDiffKnud_cfd5[3] +fix effDiffKnud1 ore ave/time ${Nevery} ${Nrepeat} ${WI} c_effDiffKnud_red_CO[1] c_effDiffKnud_red_CO[2] c_effDiffKnud_red_CO[3] +variable dik_CO_1 equal f_effDiffKnud1[1] +variable dik_CO_2 equal f_effDiffKnud1[2] +variable dik_CO_3 equal f_effDiffKnud1[3] + +compute effDiffKnud_red_H2 ore reduce ave f_effDiffKnud_cfd6[1] f_effDiffKnud_cfd6[2] f_effDiffKnud_cfd6[3] +fix effDiffKnud2 ore ave/time ${Nevery} ${Nrepeat} ${WI} c_effDiffKnud_red_H2[1] c_effDiffKnud_red_H2[2] c_effDiffKnud_red_H2[3] +variable dik_H2_1 equal f_effDiffKnud2[1] +variable dik_H2_2 equal f_effDiffKnud2[2] +variable dik_H2_3 equal f_effDiffKnud2[3] + +fix printDiffTerms all print ${WI} "${time} ${dij_CO_1} ${dij_CO_2} ${dij_CO_3} ${dij_H2_1} ${dij_H2_2} ${dij_H2_3} ${dik_CO_1} ${dik_CO_2} ${dik_CO_3} ${dik_H2_1} ${dik_H2_2} ${dik_H2_3}" & + file ../DEM/post/DiffTerm.dat title "#time dij_CO_1 dij_CO_2 dij_CO_3 dij_H2_1 dij_H2_2 dij_H2_3 dik_CO_1 dik_CO_2 dik_CO_3 dik_H2_1 dik_H2_2 dik_H2_3" screen no + +################################################################################ +# compute relative layer radii +# d1 +compute layerRad_d1 d1 reduce ave f_LayerRelRadii[1] f_LayerRelRadii[2] f_LayerRelRadii[3] f_LayerRelRadii[4] +fix layerRad_d1 d1 ave/time ${Nevery} ${Nrepeat} ${WI} c_layerRad_d1[1] c_layerRad_d1[2] c_layerRad_d1[3] c_layerRad_d1[4] +variable rr1_d1 equal f_layerRad_d1[1] +variable rr2_d1 equal f_layerRad_d1[2] +variable rr3_d1 equal f_layerRad_d1[3] +variable rr4_d1 equal f_layerRad_d1[4] + +fix printRelRadiid1 all print ${WI} "${time} ${rr1_d1} ${rr2_d1} ${rr3_d1} ${rr4_d1}" & + file ../DEM/post/relRadii_d1.dat title "#time relRad_d1_1 relRad_d1_2 relRad_d1_3 relRad_d1_4" screen no + +# d2 +compute layerRad_d2 d2 reduce ave f_LayerRelRadii[1] f_LayerRelRadii[2] f_LayerRelRadii[3] f_LayerRelRadii[4] +fix layerRad_d2 d2 ave/time ${Nevery} ${Nrepeat} ${WI} c_layerRad_d2[1] c_layerRad_d2[2] c_layerRad_d2[3] c_layerRad_d2[4] +variable rr1_d2 equal f_layerRad_d2[1] +variable rr2_d2 equal f_layerRad_d2[2] +variable rr3_d2 equal f_layerRad_d2[3] +variable rr4_d2 equal f_layerRad_d2[4] + +fix printRelRadiid2 all print ${WI} "${time} ${rr1_d2} ${rr2_d2} ${rr3_d2} ${rr4_d2}" & + file ../DEM/post/relRadii_d2.dat title "#time relRad_d2_1 relRad_d2_2 relRad_d2_3 relRad_d2_4" screen no + +# d3 +compute layerRad_d3 d3 reduce ave f_LayerRelRadii[1] f_LayerRelRadii[2] f_LayerRelRadii[3] f_LayerRelRadii[4] +fix layerRad_d3 d3 ave/time ${Nevery} ${Nrepeat} ${WI} c_layerRad_d3[1] c_layerRad_d3[2] c_layerRad_d3[3] c_layerRad_d3[4] +variable rr1_d3 equal f_layerRad_d3[1] +variable rr2_d3 equal f_layerRad_d3[2] +variable rr3_d3 equal f_layerRad_d3[3] +variable rr4_d3 equal f_layerRad_d3[4] + +fix printRelRadiid3 all print ${WI} "${time} ${rr1_d3} ${rr2_d3} ${rr3_d3} ${rr4_d3}" & + file ../DEM/post/relRadii_d3.dat title "#time relRad_d3_1 relRad_d3_2 relRad_d3_3 relRad_d3_4" screen no + +# d4 +compute layerRad_d4 d4 reduce ave f_LayerRelRadii[1] f_LayerRelRadii[2] f_LayerRelRadii[3] f_LayerRelRadii[4] +fix layerRad_d4 d4 ave/time ${Nevery} ${Nrepeat} ${WI} c_layerRad_d4[1] c_layerRad_d4[2] c_layerRad_d4[3] c_layerRad_d4[4] +variable rr1_d4 equal f_layerRad_d4[1] +variable rr2_d4 equal f_layerRad_d4[2] +variable rr3_d4 equal f_layerRad_d4[3] +variable rr4_d4 equal f_layerRad_d4[4] + +fix printRelRadiid4 all print ${WI} "${time} ${rr1_d4} ${rr2_d4} ${rr3_d4} ${rr4_d4}" & + file ../DEM/post/relRadii_d4.dat title "#time relRad_d4_1 relRad_d4_2 relRad_d4_3 relRad_d4_4" screen no + +# mass-based averages of all diameters +variable rr1_ave equal 0.154*v_rr1_d1+0.332*v_rr1_d2+0.286*v_rr1_d3+0.228*v_rr1_d4 +variable rr2_ave equal 0.154*v_rr2_d1+0.332*v_rr2_d2+0.286*v_rr2_d3+0.228*v_rr2_d4 +variable rr3_ave equal 0.154*v_rr3_d1+0.332*v_rr3_d2+0.286*v_rr3_d3+0.228*v_rr3_d4 +variable rr4_ave equal 0.154*v_rr4_d1+0.332*v_rr4_d2+0.286*v_rr4_d3+0.228*v_rr4_d4 + +fix printRelRadiiAve all print ${WI} "${time} ${rr1_ave} ${rr2_ave} ${rr3_ave} ${rr4_ave}" & + file ../DEM/post/relRadiiAve.dat title "#time relRad_1 relRad_2 relRad_3 relRad_4" screen no + + diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/DEM/in.liggghts_init b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/DEM/in.liggghts_init new file mode 100755 index 00000000..7a84ac5f --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/DEM/in.liggghts_init @@ -0,0 +1,97 @@ +################################################################################ +# brief: chemistry in fluidized bed - particle insertion into domain # +# # +# Cf. M.E. Kinaci,T. Lichtenegger,S. Schneiderbauer, Chem. Eng. Sci. 227 (2020)# +# # +# authors: D. Queteschiner # +# date: Mar 2022 # +# copyright: 2022- JKU Linz # +################################################################################ + +variable cg equal 7.0 +coarsegraining ${cg} model_check error +atom_style granular +atom_modify map array + +communicate single vel yes +boundary f f f +newton off + +units si +processors * 1 2 + +region reg block -0.034 0.034 0.000 0.15 -0.034 0.034 +create_box 2 reg + +neighbor 1e-4 bin +neigh_modify delay 0 + +# material properties for granular pair styles +fix m1 all property/global youngsModulus peratomtype 5.e6 5.e6 +fix m2 all property/global poissonsRatio peratomtype 0.45 0.45 +fix m3 all property/global coefficientRestitution peratomtypepair 2 0.3 0.3 0.3 0.3 +fix m4 all property/global coefficientFriction peratomtypepair 2 0.5 0.5 0.5 0.5 + +# pair style +pair_style gran model hertz tangential history +pair_coeff * * + +# timestep, gravity +timestep 1e-6 +fix gravi all gravity 9.81 vector 0.0 -1.0 0.0 + +# walls +fix zwalls1 all wall/gran model hertz tangential history primitive type 1 yplane 0.000 +fix zwalls2 all wall/gran model hertz tangential history primitive type 1 yplane 0.15 +fix cylwalls all wall/gran model hertz tangential history primitive type 1 ycylinder 0.034 0. 0. + +# region for particle insertion +region insreg1 cylinder y 0.0 0.0 0.034 0.00 0.15 units box + +# particle templates and distributions + +# iron-ore range +fix pts1 all particletemplate/sphere 51 atom_type 1 density constant 4300 radius constant 0.000060 +fix pts2 all particletemplate/sphere 41 atom_type 1 density constant 4300 radius constant 0.000105 +fix pts3 all particletemplate/sphere 31 atom_type 1 density constant 4300 radius constant 0.000188 +fix pts4 all particletemplate/sphere 21 atom_type 1 density constant 4300 radius constant 0.000375 + +fix pdd1 all particledistribution/discrete 74671 4 pts1 0.154 pts2 0.332 pts3 0.286 pts4 0.228 + +# quartz particles +fix pts5 all particletemplate/sphere 61 atom_type 2 density constant 2630 radius constant 0.000250 +fix pdd2 all particledistribution/discrete 1 1 pts5 1.0 + +fix ts_check all check/timestep/gran 10 0.1 0.1 + +# apply nve integration to all particles +fix integr all nve/sphere + +# create groups +group ore type 1 +group quartz type 2 + +# screen output +thermo_style custom step atoms ke +thermo 1000 +thermo_modify lost ignore norm no +compute_modify thermo_temp dynamic yes + +# insert quartz particles +fix ins2 all insert/pack seed 5331 distributiontemplate pdd2 & + maxattempt 1000 insert_every once overlapcheck yes all_in yes vel constant 0.0 0.0 0.0 & + region insreg1 mass_in_region 0.2 + +run 150000 + +# insert iron-ore particles +fix ins1 all insert/pack seed 5330 distributiontemplate pdd1 & + maxattempt 1000 insert_every once overlapcheck yes all_in yes vel constant 0.0 0.0 0.0 & + region insreg1 mass_in_region 0.365 + +dump dmp all custom 5000 post/dump.liggghts_init id type x y z vx vy vz fx fy fz radius mass + +run 300000 upto + +write_restart ../DEM/post/restart/liggghts.restart + diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/DEM/in.liggghts_run b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/DEM/in.liggghts_run new file mode 100755 index 00000000..99c2f4c7 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/DEM/in.liggghts_run @@ -0,0 +1,114 @@ +################################################################################ +# brief: chemistry in fluidized bed - reduce Fe2O3 to Fe3O4 at 753K (480°C) # +# # +# Cf. M.E. Kinaci,T. Lichtenegger,S. Schneiderbauer, Chem. Eng. Sci. 227 (2020)# +# Note that the reaction rate is scaled x10 and the reaction point R3 has been # +# shifted from 0.434 to 0.516 (cf. mass fractions in CFD setup) # +# # +# authors: D. Queteschiner # +# date: Mar 2022 # +# copyright: 2022- JKU Linz # +################################################################################ + +log ../DEM/log.liggghts +thermo_log ../DEM/post/thermo.txt + +variable rate_scale equal 10.0 +variable cg equal 7.0 +coarsegraining ${cg} model_check error + +atom_style granular +atom_modify map array +communicate single vel yes + +boundary f f f +newton off + +units si +processors 2 * 2 + +# read the restart file +read_restart ../DEM/post/restart/liggghts.restart + +neighbor 1e-4 bin +neigh_modify delay 0 + +# material properties for granular pair styles +fix m1 all property/global youngsModulus peratomtype 5.e6 5.e6 +fix m2 all property/global poissonsRatio peratomtype 0.45 0.45 +fix m3 all property/global coefficientRestitution peratomtypepair 2 0.3 0.3 0.3 0.3 +fix m4 all property/global coefficientFriction peratomtypepair 2 0.5 0.5 0.5 0.5 + +# pair style +pair_style gran model hertz tangential history +pair_coeff * * + +# timestep, gravity +timestep 0.000005 +fix gravi all gravity 9.81 vector 0.0 -1.0 0.0 + +# walls +fix zwalls1 all wall/gran model hertz tangential history primitive type 1 yplane 0.00 +fix zwalls2 all wall/gran model hertz tangential history primitive type 1 yplane 0.15 +fix cylwalls all wall/gran model hertz tangential history primitive type 1 ycylinder 0.034 0.0 0.0 + +# thermal properties +fix ftco all property/global thermalConductivity peratomtype 1.4 3.0 # [W/(K*m)] +fix ftca all property/global thermalCapacity peratomtype 1000 800 # [J/(kg*K)] + +fix integr all nve/sphere + +# re-create groups +group ore type 1 +group quartz type 2 + +################################################################################ +# cfd coupling +fix cfd all couple/cfd couple_every 50 mpi +fix cfd2 all couple/cfd/force +# transfer per-particle temperature and add convective heat flux +fix tconv all couple/cfd/convection T0 753 + +################################################################################ +# invoke chemistry coupling +fix cfd3 ore couple/cfd/chemistry n_species 5 species_names H2 H2O CO CO2 N2 n_diff 2 diffusant_names CO H2 + +# activate for 3-layer unreacted core shrink model +fix cfd5 ore chem/shrink/core speciesA CO molMassA 0.02801 speciesC CO2 molMassC 0.04401 scale_reduction_rate ${rate_scale} +fix cfd6 ore chem/shrink/core speciesA H2 molMassA 0.00202 speciesC H2O molMassC 0.01801 scale_reduction_rate ${rate_scale} + +# material properties for chemical reaction +fix k0_CO ore property/global k0_cfd5 vector 17 25 2700 +fix Ea_CO ore property/global Ea_cfd5 vector 100000 73674 113859 + +fix k0_H2 ore property/global k0_cfd6 vector 17 23 160 +fix Ea_H2 ore property/global Ea_cfd6 vector 85000 71162 92092 + +# particle parameters +fix porosity ore property/global porosity_ore vector 0.613 0.318 0.187 0.17 +fix tortuosity ore property/global tortuosity_ore scalar 3 +fix pore_diameter ore property/global pore_diameter_ore scalar 1.e-6 +fix layerDensities ore property/global density_ore vector 7870. 5740. 5170. 5240. + +# define initial relative layer radii +fix LayerRelRadii ore property/atom relRadii vector yes no no 1.0 0.999 0.998 0.997 + +################################################################################ +# write data to files for post-processing + +variable WI equal 100000 + +include ../DEM/in.liggghts_compute_output + +################################################################################ +# screen output +thermo_style custom step atoms ke +thermo 250 +thermo_modify lost ignore norm no +compute_modify thermo_temp dynamic yes + +dump dmp all custom ${WI} ../DEM/post/dump*.liggghts_run id type x y z vx vy vz & + fx fy fz radius mass f_fracRed[1] f_fracRed[2] f_fracRed[3] + +run 1 + diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/DEM/post/restart/.gitignore b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/DEM/post/restart/.gitignore new file mode 100755 index 00000000..e69de29b diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/parCFDDEMrun.sh b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/parCFDDEMrun.sh new file mode 100755 index 00000000..9840bdb1 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/parCFDDEMrun.sh @@ -0,0 +1,44 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# parCFDDEMrun script for R3_FB test case +# run R3_FB CFD-DEM +# Daniel Queteschiner - March 2022 +#------------------------------------------------------------------------------ + +#- source CFDEM env vars +. ~/.bashrc + +#- include functions +source $CFDEM_PROJECT_DIR/etc/functions.sh + +#------------------------------------------------------------------------------ +#- define variables +casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" +logpath=$casePath +headerText="R3_FluidizedBed" +logfileName="log_$headerText" +solverName="cfdemSolverRhoPimpleChem" +nrProcs="4" +machineFileName="none" # yourMachinefileName | none +debugMode="off" # on | off| strict +testHarnessPath="$CFDEM_TEST_HARNESS_PATH" +runOctave="true" + +#------------------------------------------------------------------------------ + +#- call function to run a parallel CFD-DEM case +parCFDDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName $debugMode + + +if [ $runOctave == "true" ] + then + #------------------------------# + # octave + + #- change path + cd octave + + #- run octave + octave plotData.m +fi + diff --git a/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/parDEMrun.sh b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/parDEMrun.sh new file mode 100755 index 00000000..224c951a --- /dev/null +++ b/tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R3_FB/parDEMrun.sh @@ -0,0 +1,29 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# parDEMrun script for R3_FB test case +# init R3_FB DEM +# Daniel Queteschiner - March 2022 +#------------------------------------------------------------------------------ + +#- source CFDEM env vars +. ~/.bashrc + +#- include functions +source $CFDEM_PROJECT_DIR/etc/functions.sh + +echo "starting DEM run in parallel..." +#------------------------------------------------------------------------------ +#- define variables +casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" +logpath="$casePath" +headerText="run_liggghts_init_DEM" +logfileName="log_$headerText" +solverName="in.liggghts_init" +nrProcs=4 +machineFileName="none" +debugMode="off" +#------------------------------------------------------------------------------ + +#- call function to run DEM case +parDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName $debugMode +