mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Up to date icoReactingMultiphaseInterFoam solver and libs
Adding tutorials and other minor changes
This commit is contained in:
@ -0,0 +1,82 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus.develop |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(1 0 0)
|
||||
(1 1 0)
|
||||
(0 1 0)
|
||||
(0 0 1)
|
||||
(1 0 1)
|
||||
(1 1 1)
|
||||
(0 1 1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (100 100 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
|
||||
boundary
|
||||
(
|
||||
bottom
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(1 5 4 0)
|
||||
);
|
||||
}
|
||||
top
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(3 7 6 2)
|
||||
);
|
||||
}
|
||||
left
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
);
|
||||
}
|
||||
right
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(2 6 5 1)
|
||||
);
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(4 5 6 7)
|
||||
(0 1 2 3)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,56 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus.develop |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application icoReactingMultiphaseInterFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0.35;
|
||||
|
||||
deltaT 1e-5;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.02;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 1;
|
||||
|
||||
maxDeltaT 0.2;
|
||||
|
||||
maxAlphaCo 1;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,78 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus.develop |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(rhoPhi,U) Gauss linearUpwind gradU;
|
||||
|
||||
"div\(phi,alpha.*\)" Gauss vanLeer;
|
||||
"div\(phir,alpha.*\)" Gauss linear;
|
||||
|
||||
"div\(phi,alpha.*\)" Gauss vanLeer;
|
||||
"div\(Yiphir,alpha.*)" Gauss vanLeer;
|
||||
|
||||
"div\(phi,.*.gas*\)" Gauss vanLeer;
|
||||
"div\(phi,.*.liquid*\)" Gauss vanLeer;
|
||||
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
|
||||
div(phi,T) Gauss linearUpwind gradT;
|
||||
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear orthogonal;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default orthogonal;
|
||||
}
|
||||
|
||||
wallDist
|
||||
{
|
||||
method meshWave;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p_rgh ;
|
||||
Xvapour.gas;
|
||||
XCO2.gas;
|
||||
XO2.liquid;
|
||||
"alpha.*";
|
||||
}
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,119 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus.develop |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
".*(rho|rhoFinal)"
|
||||
{
|
||||
solver diagonal;
|
||||
}
|
||||
|
||||
"alpha.*"
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-08;
|
||||
relTol 0.0;
|
||||
|
||||
cAlphas (
|
||||
(liquid and gas) 1
|
||||
(mercury and gas) 1
|
||||
(oil and gas) 1
|
||||
(mercury and liquid) 1
|
||||
(mercury and oil) 1
|
||||
(liquid and oil) 1
|
||||
);
|
||||
|
||||
nAlphaCorr 2;
|
||||
nAlphaSubCycles 2;
|
||||
|
||||
// Compressiion factor for species in each alpha phase
|
||||
// NOTE: It should be similar to cAlpha
|
||||
cYi 1;
|
||||
|
||||
}
|
||||
|
||||
"U.*"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-7;
|
||||
relTol 0;
|
||||
};
|
||||
|
||||
"(T.*)"
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-08;
|
||||
relTol 0.0;
|
||||
residualAlpha 1e-7;
|
||||
}
|
||||
|
||||
"XCO2.gas.*|Xvapour.gas.*|XO2.liquid.*"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-7;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-9;
|
||||
relTol 0.01;
|
||||
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
|
||||
cacheAgglomeration true;
|
||||
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
};
|
||||
|
||||
p_rghFinal
|
||||
{
|
||||
$p_rgh;
|
||||
relTol 0;
|
||||
};
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor false;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 4;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
}
|
||||
equations
|
||||
{
|
||||
".*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,85 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus.develop |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object setFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// NOTE: The inert specie is defined everywhere.
|
||||
// As it is not solved it fullfills the thermo requirement of Sum Y = 1
|
||||
// in phases where there are not species
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.gas 0
|
||||
volScalarFieldValue alpha.liquid 0
|
||||
volScalarFieldValue alpha.oil 0
|
||||
volScalarFieldValue alpha.mercury 0
|
||||
|
||||
volScalarFieldValue air.gas 1
|
||||
volScalarFieldValue vapour.gas 0
|
||||
volScalarFieldValue CoO2.gas 0
|
||||
|
||||
volScalarFieldValue O2.liquid 0
|
||||
volScalarFieldValue water.liquid 1
|
||||
);
|
||||
|
||||
regions
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box (-0.1 -0.1 0) (0.5 0.5 1);
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.liquid 1
|
||||
|
||||
volScalarFieldValue O2.liquid 0.01
|
||||
volScalarFieldValue water.liquid 0.99
|
||||
);
|
||||
}
|
||||
|
||||
boxToCell
|
||||
{
|
||||
box (0.5 0 0) (1 0.5 1);
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.oil 1
|
||||
);
|
||||
}
|
||||
|
||||
boxToCell
|
||||
{
|
||||
box (0.5 0.5 0) (1 1.1 1);
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.mercury 1
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
boxToCell
|
||||
{
|
||||
box (0 0.5 0) (0.5 1.1 1);
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.gas 1
|
||||
|
||||
volScalarFieldValue vapour.gas 0.3
|
||||
volScalarFieldValue CO2.gas 0.2
|
||||
volScalarFieldValue air.gas 0.5
|
||||
);
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user