solvers::multiphaseEuler: New solver module for Euler-Euler multiphase simulations

executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations.  Replaces multiphaseEulerFoam and all the
corresponding tutorials have been updated and moved to
tutorials/modules/multiphaseEuler.

Class
    Foam::solvers::multiphaseEuler

Description
    Solver module for a system of any number of compressible fluid phases with a
    common pressure, but otherwise separate properties. The type of phase model
    is run time selectable and can optionally represent multiple species and
    in-phase reactions. The phase system is also run time selectable and can
    optionally represent different types of momentum, heat and mass transfer.

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

    Optional fvModels and fvConstraints are provided to enhance the simulation
    in many ways including adding various sources, Lagrangian
    particles, surface film etc. and constraining or limiting the solution.

SourceFiles
    multiphaseEuler.C

See also
    Foam::solvers::compressibleVoF
    Foam::solvers::fluidSolver
    Foam::solvers::incompressibleFluid
This commit is contained in:
Henry Weller
2022-11-03 14:49:56 +00:00
parent 879f852b80
commit cec0359871
1621 changed files with 127852 additions and 0 deletions

View File

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object T.air1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 300;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object T.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 300;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object T.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 300;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volVectorField;
object U.air1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type mappedInternalValue;
interpolationScheme cell;
value $internalField;
}
outlet
{
type pressureInletOutletVelocity;
phi phi.air1;
value $internalField;
}
walls
{
type slip;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volVectorField;
object U.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type mappedInternalValue;
interpolationScheme cell;
value $internalField;
}
outlet
{
type pressureInletOutletVelocity;
phi phi.air2;
value $internalField;
}
walls
{
type slip;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volVectorField;
object U.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 1.6);
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type mappedInternalValue;
average (0 0 1.6);
interpolationScheme cell;
value $internalField;
}
outlet
{
type pressureInletOutletVelocity;
phi phi.water;
value $internalField;
}
walls
{
type noSlip;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object alpha.air1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value uniform 0;
}
outlet
{
type inletOutlet;
phi phi.air1;
inletValue uniform 0;
value uniform 0;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object alpha.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value uniform 0;
}
outlet
{
type inletOutlet;
phi phi.air2;
inletValue uniform 0;
value uniform 0;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value uniform 1;
}
outlet
{
type inletOutlet;
phi phi.water;
inletValue uniform 1;
value uniform 1;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object alphat.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type calculated;
value $internalField;
}
outlet
{
type calculated;
value $internalField;
}
walls
{
type compressible::alphatWallFunction;
Prt 0.85;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object f.air1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object f.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1.0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type zeroGradient;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object k.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.01;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type mappedInternalValue;
interpolationScheme cell;
value $internalField;
}
outlet
{
type zeroGradient;
}
walls
{
type kqRWallFunction;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object nut.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 1e-4;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type calculated;
value $internalField;
}
outlet
{
type calculated;
value $internalField;
}
walls
{
type nutkWallFunction;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object omega.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 -1 0 0 0 0];
internalField uniform 100;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type mappedInternalValue;
interpolationScheme cell;
value $internalField;
}
outlet
{
type zeroGradient;
}
walls
{
type omegaWallFunction;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1e5;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type calculated;
value $internalField;
}
outlet
{
type calculated;
value $internalField;
}
walls
{
type calculated;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1e5;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedFluxPressure;
value $internalField;
}
outlet
{
type prghPressure;
p $internalField;
value $internalField;
}
walls
{
type fixedFluxPressure;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,13 @@
#!/bin/sh
# Run from this directory
cd "${0%/*}" || exit 1
# Source clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase && rm -f *.eps
(cd 0 && rm -rf uniform d.* *Force.water)
#------------------------------------------------------------------------------

View File

@ -0,0 +1,18 @@
#!/bin/sh
# Run from this directory
cd "${0%/*}" || exit 1
# Source run functions
. "$WM_PROJECT_DIR/bin/tools/RunFunctions"
# Run case
runApplication blockMesh
runApplication topoSet
runApplication decomposePar
runParallel $(getApplication)
runApplication reconstructPar
( cd validation && ./createGraphs )
#------------------------------------------------------------------------------

View File

@ -0,0 +1,39 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
location "constant";
object fvModels;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
massSource
{
type massSource;
cellZone injection;
massFlowRate 6e-7;
phase air1;
rho rho.air1;
fieldValues
{
f1.air1 0;
f2.air1 0;
f3.air1 1;
f4.air1 0;
f5.air1 0;
U.air1 (0 0 0);
}
}
// ************************************************************************* //

View File

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

View File

@ -0,0 +1,18 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object momentumTransport.air1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar;
// ************************************************************************* //

View File

@ -0,0 +1,18 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object momentumTransport.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "momentumTransport.air1"
// ************************************************************************* //

View File

@ -0,0 +1,26 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object momentumTransport.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
model kOmegaSSTSato;
turbulence on;
printCoeffs on;
}
// ************************************************************************* //

View File

@ -0,0 +1,252 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object phaseProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type populationBalanceMultiphaseSystem;
phases (air1 air2 water);
populationBalances (bubbles);
air1
{
type pureIsothermalPhaseModel;
diameterModel velocityGroup;
velocityGroupCoeffs
{
populationBalance bubbles;
shapeModel spherical;
sizeGroups
(
f1 {dSph 1e-3; value 1.0;}
f2 {dSph 2e-3; value 0.0;}
f3 {dSph 3e-3; value 0.0;}
f4 {dSph 4e-3; value 0.0;}
f5 {dSph 5e-3; value 0.0;}
);
}
residualAlpha 1e-6;
}
air2
{
type pureIsothermalPhaseModel;
diameterModel velocityGroup;
velocityGroupCoeffs
{
populationBalance bubbles;
shapeModel spherical;
sizeGroups
(
f6 {dSph 6e-3; value 1.0;}
f7 {dSph 7e-3; value 0.0;}
f8 {dSph 8e-3; value 0.0;}
f9 {dSph 9e-3; value 0.0;}
f10{dSph 10e-3; value 0.0;}
f11{dSph 11e-3; value 0.0;}
f12{dSph 12e-3; value 0.0;}
);
}
residualAlpha 1e-6;
}
water
{
type pureIsothermalPhaseModel;
diameterModel none;
residualAlpha 1e-6;
}
populationBalanceCoeffs
{
bubbles
{
continuousPhase water;
coalescenceModels
(
LehrMilliesMewes{}
);
binaryBreakupModels
(
LehrMilliesMewes{}
);
breakupModels
();
driftModels
(
densityChange{}
);
nucleationModels
();
}
}
blending
{
default
{
type continuous;
phase water;
}
}
surfaceTension
{
air1_water
{
type constant;
sigma 0.083;
}
air2_water
{
type constant;
sigma 0.083;
}
}
interfaceCompression
{}
drag
{
air1_dispersedIn_water
{
type IshiiZuber;
residualRe 1e-3;
}
air2_dispersedIn_water
{
type IshiiZuber;
residualRe 1e-3;
}
}
virtualMass
{
air1_dispersedIn_water
{
type constantCoefficient;
Cvm 0.5;
}
air2_dispersedIn_water
{
type constantCoefficient;
Cvm 0.5;
}
}
heatTransfer
{}
phaseTransfer
{}
lift
{
air1_dispersedIn_water
{
type wallDamped;
wallDamping
{
type cosine;
Cd 3.0;
}
lift
{
type Tomiyama;
aspectRatio
{
type Wellek;
}
}
}
air2_dispersedIn_water
{
type wallDamped;
wallDamping
{
type cosine;
Cd 3.0;
}
lift
{
type Tomiyama;
aspectRatio
{
type Wellek;
}
}
}
}
wallLubrication
{
air1_dispersedIn_water
{
type Antal;
Cw1 -0.01;
Cw2 0.05;
}
air2_dispersedIn_water
{
type Antal;
Cw1 -0.01;
Cw2 0.05;
}
}
turbulentDispersion
{
air1_dispersedIn_water
{
type Burns;
sigma 0.9;
}
air2_dispersedIn_water
{
type Burns;
sigma 0.9;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,45 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object physicalProperties.air1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState perfectGas;
specie specie;
energy sensibleInternalEnergy;
}
mixture
{
specie
{
molWeight 28.9;
}
thermodynamics
{
Cp 1007;
Hf 0;
}
transport
{
mu 1.84e-05;
Pr 0.7;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,18 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object physicalProperties.air2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "physicalProperties.air1"
// ************************************************************************* //

View File

@ -0,0 +1,49 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object physicalProperties.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleInternalEnergy;
}
mixture
{
specie
{
molWeight 18;
}
equationOfState
{
rho 997;
}
thermodynamics
{
Cp 4195;
Hf 0;
}
transport
{
mu 3.645e-4;
Pr 2.289;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,92 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
(0.0 0.0 -0.1)
(0.025 -2.2e-4 -0.1)
(0.025 2.2e-4 -0.1)
(0.0 0.0 -0.1)
(0.0 0.0 0.9)
(0.025 -2.2e-4 0.9)
(0.025 2.2e-4 0.9)
(0.0 0.0 0.9)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (30 1 200) simpleGrading (0.375 1 1)
);
edges
();
boundary
(
inlet
{
type mappedInternal;
offset (0 0 0.05);
faces
(
(0 3 2 1)
);
}
outlet
{
type patch;
faces
(
(4 5 6 7)
);
}
walls
{
type wall;
faces
(
(1 2 6 5)
);
}
front
{
type wedge;
faces
(
(0 1 5 4)
);
}
back
{
type wedge;
faces
(
(2 3 7 6)
);
}
axis
{
type empty;
faces
(
(3 0 4 7)
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,101 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application foamRun;
solver multiphaseEuler;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 4;
deltaT 1e-4;
writeControl adjustableRunTime;
writeInterval 0.5;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep yes;
maxCo 0.8;
maxDeltaT 1;
functions
{
#includeFunc residuals(p_rgh, k.water, omega.water)
#includeFunc timeStep
#includeFunc writeObjects(d.air1)
#includeFunc writeObjects(d.air2)
#includeFunc phaseForces(phase=water)
#includeFunc graphUniform
(
funcName=graph,
start=(0 0 0.89),
end=(0.025 0 0.89),
nPoints=100,
fields=
(
alpha.air1
alpha.air2
alpha.bubbles
liftForce.water
wallLubricationForce.water
turbulentDispersionForce.water
)
)
#includeFunc populationBalanceSizeDistribution
(
populationBalance=bubbles,
regionType=cellZone,
name=injection,
functionType=volumeDensity,
coordinateType=diameter,
normalise=yes,
funcName=probabilityDensity.injection
)
#includeFunc populationBalanceSizeDistribution
(
populationBalance=bubbles,
regionType=cellZone,
name=outlet,
functionType=volumeDensity,
coordinateType=diameter,
normalise=yes,
funcName=probabilityDensity.outlet
)
}
// ************************************************************************* //

View File

@ -0,0 +1,25 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
method simple;
simpleCoeffs
{
n (1 1 4);
}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object fvConstraints;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
limitp
{
type limitPressure;
min 1e4;
}
// ************************************************************************* //

View File

@ -0,0 +1,58 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
limited cellLimited Gauss linear 1;
}
divSchemes
{
default none;
div(phi,alpha) Gauss vanLeer;
div(phir,alpha,alpha) Gauss vanLeer;
div(alphaRhoPhi,U) Gauss linearUpwind limited;
div(phi,U) Gauss linearUpwind limited;
"div\(alphaRhoPhi,(k|epsilon|omega)\)" Gauss limitedLinear 1;
"div\(alphaPhi,f.*\)" Gauss limitedLinear 1;
div((((alpha*rho)*nuEff)*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear uncorrected;
}
interpolationSchemes
{
default linear;
}
wallDist
{
method Poisson;
nRequired true;
}
// ************************************************************************* //

View File

@ -0,0 +1,81 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"alpha.*"
{
nAlphaCorr 1;
nAlphaSubCycles 2;
}
bubbles
{
nCorr 1;
tolerance 1e-4;
scale true;
solveOnFinalIterOnly true;
sourceUpdateInterval 1;
}
"p_rgh.*"
{
solver GAMG;
smoother DIC;
tolerance 1e-8;
relTol 0;
}
"(k|omega).*"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-7;
relTol 0;
minIter 1;
}
"f.*"
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-6;
relTol 0;
}
yPsi
{
solver PCG;
preconditioner none;
tolerance 1e-10;
relTol 0;
}
}
PIMPLE
{
nOuterCorrectors 2;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
faceMomentum true;
}
relaxationFactors
{
}
// ************************************************************************* //

View File

@ -0,0 +1,51 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name injection;
type cellSet;
action new;
source boxToCell;
box (0 -1 0.0) (0.005 1 0.01);
}
{
name injection;
type cellZoneSet;
action new;
source setToCellZone;
set injection;
}
{
name outlet;
type cellSet;
action new;
source boxToCell;
box (0 -1 0.89) (0.025 1 0.9);
}
{
name outlet;
type cellZoneSet;
action new;
source setToCellZone;
set outlet;
}
);
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
#!/bin/sh
if ! which gnuplot > /dev/null 2>&1
then
echo 'gnuplot not found - skipping graph creation' >&2
exit 1
fi
time=$(foamListTimes -case .. -latestTime)
graphFile=../postProcessing/graph/$time/line.xy
gnuplot<<EOF
set terminal postscript eps color enhanced font "Helvetica,20"
set output '../void_fraction.eps'
set xlabel 'r (mm)'
set ylabel '{/Symbol a} (-)'
plot "$graphFile" u (\$1*1000):4 w l lw 3 lc rgb 'black' t 'total',\
"$graphFile" u (\$1*1000):2 w l lw 2 lc rgb 'green' t 'd < 5.5mm',\
"$graphFile" u (\$1*1000):3 w l lw 2 lc rgb 'red' t 'd > 5.5mm'
set output '../nonDragForces.eps'
set ylabel 'F_{r} (N/m^3)'
plot "$graphFile" u (\$1*1000):(-\$5) w l lw 2 t 'Lift',\
"$graphFile" u (\$1*1000):(-\$8) w l lw 2 t 'Wall lubrication',\
"$graphFile" u (\$1*1000):(-\$11) w l lw 2 t 'Turbulent dispersion'
EOF
injectionFile=../postProcessing/probabilityDensity.injection/$time/probabilityDensity.injection.xy
outletFile=../postProcessing/probabilityDensity.outlet/$time/probabilityDensity.outlet.xy
gnuplot<<EOF
set terminal postscript eps color enhanced font "Helvetica,20"
set output '../volumeDensity.eps'
set xlabel 'd (mm)'
set ylabel '({/Symbol a}/{/Symbol a}_{tot})/{/Symbol D}d (mm^{-1})'
set xtics 1
plot "$injectionFile" u (\$1/1e-3):(\$2/1e3) w histeps lw 3 lc rgb 'green' t 'injection',\
"$outletFile" u (\$1/1e-3):(\$2/1e3) w histeps lw 3 lc rgb 'red' t 'outlet'
EOF
#------------------------------------------------------------------------------