TUT: icoReactingMultiphaseInterFoam: new tutorial oxideFormation

Co-authored-by: sergio <s.ferraris@opencfd.co.uk>
This commit is contained in:
Kutalmis Bercin
2021-12-09 11:35:45 +00:00
committed by Andrew Heather
parent 60f3d416a6
commit 1fca0d8d23
19 changed files with 975 additions and 0 deletions

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 1013.15;
boundaryField
{
bottomInlet
{
type fixedValue;
value $internalField;
}
topOutlet
{
type inletOutlet;
value $internalField;
inletValue $internalField;
}
"(left|right|front|back|bottomLeft|bottomRight)"
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
bottomInlet
{
type fixedValue;
value uniform (0 0 0.1);
}
topOutlet
{
type pressureInletOutletVelocity;
inletValue $internalField;
value $internalField;
}
"(left|right|front|back|bottomLeft|bottomRight)"
{
type noSlip;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object alpha.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField
{
bottomInlet
{
type fixedValue;
value uniform 0;
}
topOutlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
"(left|right|front|back|bottomLeft|bottomRight)"
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object alpha.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
bottomInlet
{
type fixedValue;
value uniform 1;
}
topOutlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
"(left|right|front|back|bottomLeft|bottomRight)"
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object alpha.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
bottomInlet
{
type fixedValue;
value $internalField;
}
topOutlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
"(left|right|front|back|bottomLeft|bottomRight)"
{
type timeVaryingMassSorption;
kabs 1e1;
max 1e-3;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 1 -1 -2 0 0 0 0 ];
internalField uniform 1e5;
boundaryField
{
bottomInlet
{
type fixedFluxPressure;
value $internalField;
}
topOutlet
{
type prghTotalPressure;
p0 $internalField;
value $internalField;
}
"(left|right|front|back|bottomLeft|bottomRight)"
{
type fixedFluxPressure;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,8 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
cleanCase0
#------------------------------------------------------------------------------

View File

@ -0,0 +1,31 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
restore0Dir
runApplication blockMesh
runApplication decomposePar
runParallel $(getApplication)
runApplication reconstructPar
# restart
latestTime=$(foamListTimes -latestTime)
mv -f "$latestTime" "$latestTime".bak
rm -rf processor*
runParallel -s decompose redistributePar -decompose -latestTime
runParallel -s 2 $(getApplication)
runParallel -s reconstruct redistributePar -reconstruct -latestTime
#------------------------------------------------------------------------------

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value (0 0 -9.81);
// ************************************************************************* //

View File

@ -0,0 +1,73 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object phaseProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type massTransferMultiphaseSystem;
phases (oxide liquid gas);
liquid
{
type pureMovingPhaseModel;
}
oxide
{
type pureMovingPhaseModel;
}
gas
{
type pureMovingPhaseModel;
}
surfaceTension
(
(gas and liquid)
{
type constant;
sigma 0.0;
}
(oxide and liquid)
{
type constant;
sigma 0.0;
}
(oxide and gas)
{
type constant;
sigma 0.0;
}
);
massTransferModel
(
(liquid to oxide)
{
type interfaceOxideRate;
C 20;
Tsolidus 823.15;
Tliquidus 884.15;
oxideCrit 1e-3;
isoAlpha 0.9;
includeVolChange false;
}
);
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object thermophysicalProperties.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState incompressiblePerfectGas;
specie specie;
energy sensibleEnthalpy;
}
mixture
{
specie
{
nMoles 1;
molWeight 28.97;
}
equationOfState
{
pRef 1e5;
}
thermodynamics
{
Hf 0;
Cp 1135;
}
transport
{
Pr 0.7092;
mu 4.111e-5;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object thermophysicalProperties.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
}
mixture
{
specie
{
nMoles 1;
molWeight 50;
}
equationOfState
{
rho 2416;
}
thermodynamics
{
Hf 0;
Cp 1190;
}
transport
{
mu 2.8e-3;
Pr 0.031;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object thermophysicalProperties.oxide;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
}
mixture
{
specie
{
nMoles 1;
molWeight 50;
}
equationOfState
{
rho 2416;
}
thermodynamics
{
Hf 0;
Cp 1190;
}
transport
{
mu 2.8e-3;
Pr 0.031;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar;
// ************************************************************************* //

View File

@ -0,0 +1,136 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
scale 0.001;
x0 70.0;
x1 130.0;
x2 200.0;
y 10.0;
z 100.0;
nx1 35;
nx2 30;
nx3 35;
ny 5;
nz 50;
vertices
(
(0 0 0)
($x0 0 0)
($x0 $y 0)
(0 $y 0)
(0 0 $z)
($x0 0 $z)
($x0 $y $z)
(0 $y $z)
($x1 0 0)
($x1 0 $z)
($x1 $y 0)
($x1 $y $z)
($x2 0 0)
($x2 0 $z)
($x2 $y 0)
($x2 $y $z)
);
blocks
(
hex (0 1 2 3 4 5 6 7) ($nx1 $ny $nz) simpleGrading (1 1 1)
hex (8 1 5 9 10 2 6 11) ($nx2 $nz $ny) simpleGrading (1 1 1)
hex (12 8 9 13 14 10 11 15) ($nx3 $nz $ny) simpleGrading (1 1 1)
);
boundary
(
left
{
type wall;
faces
(
(0 3 7 4)
);
}
right
{
type wall;
faces
(
(12 13 15 14)
);
}
front
{
type wall;
faces
(
(0 4 5 1)
(1 5 9 8)
(8 9 13 12)
);
}
back
{
type wall;
faces
(
(3 2 6 7)
(2 10 11 6)
(10 14 15 11)
);
}
bottomLeft
{
type wall;
faces
(
(0 3 2 1)
);
}
bottomInlet
{
type patch;
faces
(
(1 2 10 8)
);
}
bottomRight
{
type wall;
faces
(
(8 10 14 12)
);
}
topOutlet
{
type patch;
faces
(
(4 5 6 7)
(5 9 11 6)
(9 13 15 11)
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,77 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoReactingMultiphaseInterFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 3;
deltaT 1e-3;
writeControl adjustableRunTime;
writeInterval 0.1;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
compression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep yes;
maxDeltaT 1e-1;
maxCo 1;
maxAlphaCo 1;
maxAlphaDdt 1;
functions
{
mass
{
type volFieldValue;
libs (fieldFunctionObjects);
writeControl timeStep;
writeInterval 10;
writeFields false;
log true;
operation volIntegrate;
fields
(
dmdt.liquidToOxide
);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,27 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
method simple;
coeffs
{
n (2 2 1);
}
// ************************************************************************* //

View File

@ -0,0 +1,73 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
div(rhoPhi,U) Gauss linearUpwind default;
"div\(phi,alpha.*\)" Gauss vanLeer;
"div\(phir,alpha.*\)" Gauss linear;
"div\(Yiphir,alpha.*\)" Gauss linear;
"div\(phi,.*\.gas.*\)" Gauss vanLeer;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
div(phi,T) Gauss upwind;
div((alpha.gas*U)) Gauss linear;
div((alpha.liquid*U)) Gauss linear;
div((p*U)) Gauss linear;
}
laplacianSchemes
{
default Gauss linear orthogonal;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default orthogonal;
}
fluxRequired
{
default no;
p_rgh ;
alpha.gas ;
alpha.liquid ;
alpha.oxide ;
}
// ************************************************************************* //

View File

@ -0,0 +1,91 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"alpha.*"
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-08;
relTol 0.0;
cAlphas (
(liquid and gas) 1
(oxide and gas) 1
(oxide and liquid) 1
);
nAlphaCorr 2;
nAlphaSubCycles 2;
}
p_rgh
{
solver PCG;
preconditioner DIC;
tolerance 1e-09;
relTol 0.02;
}
p_rghFinal
{
$p_rgh;
relTol 0;
}
"pcorr.*"
{
$p_rgh;
}
"U.*"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-06;
relTol 0;
}
"T.*"
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-08;
relTol 0.01;
}
}
PIMPLE
{
momentumPredictor no;
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
fields
{
}
equations
{
".*" 1;
}
}
// ************************************************************************* //