physicalProperties: Standardised incompressible and compressible solver fluid properties
to provide a single consistent code and user interface to the specification of
physical properties in both single-phase and multi-phase solvers. This redesign
simplifies usage and reduces code duplication in run-time selectable solver
options such as 'functionObjects' and 'fvModels'.
* physicalProperties
Single abstract base-class for all fluid and solid physical property classes.
Physical properties for a single fluid or solid within a region are now read
from the 'constant/<region>/physicalProperties' dictionary.
Physical properties for a phase fluid or solid within a region are now read
from the 'constant/<region>/physicalProperties.<phase>' dictionary.
This replaces the previous inconsistent naming convention of
'transportProperties' for incompressible solvers and
'thermophysicalProperties' for compressible solvers.
Backward-compatibility is provided by the solvers reading
'thermophysicalProperties' or 'transportProperties' if the
'physicalProperties' dictionary does not exist.
* phaseProperties
All multi-phase solvers (VoF and Euler-Euler) now read the list of phases and
interfacial models and coefficients from the
'constant/<region>/phaseProperties' dictionary.
Backward-compatibility is provided by the solvers reading
'thermophysicalProperties' or 'transportProperties' if the 'phaseProperties'
dictionary does not exist. For incompressible VoF solvers the
'transportProperties' is automatically upgraded to 'phaseProperties' and the
two 'physicalProperties.<phase>' dictionary for the phase properties.
* viscosity
Abstract base-class (interface) for all fluids.
Having a single interface for the viscosity of all types of fluids facilitated
a substantial simplification of the 'momentumTransport' library, avoiding the
need for a layer of templating and providing total consistency between
incompressible/compressible and single-phase/multi-phase laminar, RAS and LES
momentum transport models. This allows the generalised Newtonian viscosity
models to be used in the same form within laminar as well as RAS and LES
momentum transport closures in any solver. Strain-rate dependent viscosity
modelling is particularly useful with low-Reynolds number turbulence closures
for non-Newtonian fluids where the effect of bulk shear near the walls on the
viscosity is a dominant effect. Within this framework it would also be
possible to implement generalised Newtonian models dependent on turbulent as
well as mean strain-rate if suitable model formulations are available.
* visosityModel
Run-time selectable Newtonian viscosity model for incompressible fluids
providing the 'viscosity' interface for 'momentumTransport' models.
Currently a 'constant' Newtonian viscosity model is provided but the structure
supports more complex functions of time, space and fields registered to the
region database.
Strain-rate dependent non-Newtonian viscosity models have been removed from
this level and handled in a more general way within the 'momentumTransport'
library, see section 'viscosity' above.
The 'constant' viscosity model is selected in the 'physicalProperties'
dictionary by
viscosityModel constant;
which is equivalent to the previous entry in the 'transportProperties'
dictionary
transportModel Newtonian;
but backward-compatibility is provided for both the keyword and model
type.
* thermophysicalModels
To avoid propagating the unnecessary constructors from 'dictionary' into the
new 'physicalProperties' abstract base-class this entire structure has been
removed from the 'thermophysicalModels' library. The only use for this
constructor was in 'thermalBaffle' which now reads the 'physicalProperties'
dictionary from the baffle region directory which is far simpler and more
consistent and significantly reduces the amount of constructor code in the
'thermophysicalModels' library.
* compressibleInterFoam
The creation of the 'viscosity' interface for the 'momentumTransport' models
allows the complex 'twoPhaseMixtureThermo' derived from 'rhoThermo' to be
replaced with the much simpler 'compressibleTwoPhaseMixture' derived from the
'viscosity' interface, avoiding the myriad of unused thermodynamic functions
required by 'rhoThermo' to be defined for the mixture.
Same for 'compressibleMultiphaseMixture' in 'compressibleMultiphaseInterFoam'.
This is a significant improvement in code and input consistency, simplifying
maintenance and further development as well as enhancing usability.
Henry G. Weller
CFD Direct Ltd.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
#include "readTransportProperties.H"
|
||||
#include "readPhysicalProperties.H"
|
||||
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
Info<< "Reading physicalProperties\n" << endl;
|
||||
|
||||
IOdictionary transportProperties
|
||||
IOdictionary physicalProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
"physicalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
@ -16,5 +16,5 @@
|
||||
(
|
||||
"nu",
|
||||
dimViscosity,
|
||||
transportProperties
|
||||
physicalProperties
|
||||
);
|
||||
@ -14,13 +14,13 @@ volScalarField T
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
Info<< "Reading physicalProperties\n" << endl;
|
||||
|
||||
IOdictionary transportProperties
|
||||
IOdictionary physicalProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
"physicalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
@ -33,7 +33,7 @@ Info<< "Reading diffusivity DT\n" << endl;
|
||||
|
||||
dimensionedScalar DT
|
||||
(
|
||||
transportProperties.lookup("DT")
|
||||
physicalProperties.lookup("DT")
|
||||
);
|
||||
|
||||
#include "createFvModels.H"
|
||||
|
||||
@ -30,13 +30,13 @@ volVectorField U
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
Info<< "Reading physicalProperties\n" << endl;
|
||||
|
||||
IOdictionary transportProperties
|
||||
IOdictionary physicalProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
"physicalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
@ -49,7 +49,7 @@ Info<< "Reading diffusivity DT\n" << endl;
|
||||
|
||||
dimensionedScalar DT
|
||||
(
|
||||
transportProperties.lookup("DT")
|
||||
physicalProperties.lookup("DT")
|
||||
);
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
@ -20,7 +20,7 @@ EXE_INC = \
|
||||
-IPDRModels/turbulence/PDRkEpsilon \
|
||||
-IlaminarFlameSpeed/SCOPE \
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
|
||||
@ -69,7 +69,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "psiuReactionThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidThermophysicalTransportModel.H"
|
||||
#include "laminarFlameSpeed.H"
|
||||
#include "XiModel.H"
|
||||
|
||||
@ -58,7 +58,7 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "psiuReactionThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "laminarFlameSpeed.H"
|
||||
#include "XiModel.H"
|
||||
#include "PDRDragModel.H"
|
||||
|
||||
@ -38,7 +38,7 @@ SourceFiles
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "psiuReactionThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "multivariateSurfaceInterpolationScheme.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -113,7 +113,7 @@ Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const
|
||||
U_.db().lookupObject<volScalarField>("betav");
|
||||
|
||||
DragDcu =
|
||||
(0.5*rho_)*CR_*mag(U_) + (Csu*I)*betav*turbulence_.muEff()*sqr(Aw_);
|
||||
rho_*(0.5*CR_*mag(U_) + (Csu*I)*betav*turbulence_.nuEff()*sqr(Aw_));
|
||||
}
|
||||
|
||||
return tDragDcu;
|
||||
@ -143,8 +143,11 @@ Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const
|
||||
U_.db().lookupObject<volSymmTensorField>("CT");
|
||||
|
||||
Gk =
|
||||
(0.5*rho_)*mag(U_)*(U_ & CT & U_)
|
||||
+ Csk*betav*turbulence_.muEff()*sqr(Aw_)*magSqr(U_);
|
||||
rho_
|
||||
*(
|
||||
0.5*mag(U_)*(U_ & CT & U_)
|
||||
+ Csk*betav*turbulence_.nuEff()*sqr(Aw_)*magSqr(U_)
|
||||
);
|
||||
}
|
||||
|
||||
return tGk;
|
||||
|
||||
@ -50,7 +50,7 @@ PDRkEpsilon::PDRkEpsilon
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& alphaRhoPhi,
|
||||
const surfaceScalarField& phi,
|
||||
const dynamicTransportModel& transport,
|
||||
const viscosity& transport,
|
||||
const word& modelName
|
||||
)
|
||||
:
|
||||
|
||||
@ -61,7 +61,7 @@ SourceFiles
|
||||
#define compressible_PDRkEpsilon_H
|
||||
|
||||
#include "kEpsilon.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -102,7 +102,7 @@ public:
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& alphaRhoPhi,
|
||||
const surfaceScalarField& phi,
|
||||
const dynamicTransportModel& transport,
|
||||
const viscosity& transport,
|
||||
const word& modelName = typeName
|
||||
);
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ SourceFiles
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "psiuReactionThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -137,10 +137,7 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Return the flame-wrinkling XiEq
|
||||
virtual tmp<volScalarField> XiEq() const
|
||||
{
|
||||
return turbulence_.muEff();
|
||||
}
|
||||
virtual tmp<volScalarField> XiEq() const = 0;
|
||||
|
||||
//- Return the sub-grid Schelkin effect
|
||||
tmp<volScalarField> calculateSchelkinEffect(const scalar) const;
|
||||
|
||||
@ -40,7 +40,7 @@ SourceFiles
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "psiuReactionThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -133,7 +133,11 @@ public:
|
||||
//- Return the flame diffusivity
|
||||
virtual tmp<volScalarField> Db() const
|
||||
{
|
||||
return turbulence_.muEff();
|
||||
return volScalarField::New
|
||||
(
|
||||
"Db",
|
||||
turbulence_.rho()*turbulence_.nuEff()
|
||||
);
|
||||
}
|
||||
|
||||
//- Update properties from given dictionary
|
||||
|
||||
@ -92,7 +92,7 @@ SourceFiles
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "psiuReactionThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "multivariateSurfaceInterpolationScheme.H"
|
||||
#include "fvcDiv.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
@ -208,7 +208,11 @@ public:
|
||||
//- Return the flame diffusivity
|
||||
virtual tmp<volScalarField> Db() const
|
||||
{
|
||||
return turbulence_.muEff();
|
||||
return volScalarField::New
|
||||
(
|
||||
"Db",
|
||||
turbulence_.rho()*turbulence_.nuEff()
|
||||
);
|
||||
}
|
||||
|
||||
//- Add Xi to the multivariateSurfaceInterpolationScheme table
|
||||
|
||||
@ -9,7 +9,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField Db("Db", turbulence->muEff());
|
||||
volScalarField Db("Db", rho*turbulence->nuEff());
|
||||
|
||||
if (ign.ignited())
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
|
||||
@ -4,7 +4,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
|
||||
@ -52,7 +52,7 @@ Description
|
||||
#include "engineTime.H"
|
||||
#include "engineMesh.H"
|
||||
#include "psiuReactionThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidThermophysicalTransportModel.H"
|
||||
#include "laminarFlameSpeed.H"
|
||||
#include "ignition.H"
|
||||
|
||||
@ -51,7 +51,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "psiuReactionThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidThermophysicalTransportModel.H"
|
||||
#include "laminarFlameSpeed.H"
|
||||
#include "ignition.H"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
|
||||
@ -4,7 +4,7 @@ EXE_INC = \
|
||||
-I../XiFoam \
|
||||
-I../../compressible/rhoPimpleFoam \
|
||||
-I$(LIB_SRC)/engine/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
|
||||
@ -33,7 +33,7 @@ Description
|
||||
#include "engineTime.H"
|
||||
#include "engineMesh.H"
|
||||
#include "psiThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidThermophysicalTransportModel.H"
|
||||
#include "OFstream.H"
|
||||
#include "fvModels.H"
|
||||
|
||||
@ -3,7 +3,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/fluidReactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
|
||||
@ -5,7 +5,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/fluidReactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
|
||||
@ -38,7 +38,7 @@ Description
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "fluidReactionThermo.H"
|
||||
#include "combustionModel.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidReactionThermophysicalTransportModel.H"
|
||||
#include "multivariateScheme.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
@ -10,7 +10,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/ThermophysicalTransportModels/fluidReactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||
|
||||
@ -32,7 +32,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "engineMesh.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidReactionThermophysicalTransportModel.H"
|
||||
#include "combustionModel.H"
|
||||
#include "fvModels.H"
|
||||
|
||||
@ -37,7 +37,7 @@ Description
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "fluidReactionThermo.H"
|
||||
#include "combustionModel.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidReactionThermophysicalTransportModel.H"
|
||||
#include "multivariateScheme.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -178,7 +178,7 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
|
||||
|
||||
// Prandtl number reading consistent with rhoCentralFoam
|
||||
const dictionary& thermophysicalProperties =
|
||||
db().lookupObject<IOdictionary>(basicThermo::dictName);
|
||||
db().lookupObject<IOdictionary>(physicalProperties::typeName);
|
||||
|
||||
dimensionedScalar Pr
|
||||
(
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
EXE_INC = \
|
||||
-IBCs/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
|
||||
@ -33,7 +33,7 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "psiThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidThermophysicalTransportModel.H"
|
||||
#include "fixedRhoFvPatchScalarField.H"
|
||||
#include "directionInterpolate.H"
|
||||
@ -191,7 +191,7 @@ int main(int argc, char *argv[])
|
||||
phiEp += mesh.phi()*(a_pos*p_pos + a_neg*p_neg);
|
||||
}
|
||||
|
||||
volScalarField muEff("muEff", turbulence->muEff());
|
||||
volScalarField muEff("muEff", rho*turbulence->nuEff());
|
||||
volTensorField tauMC("tauMC", muEff*dev2(Foam::T(fvc::grad(U))));
|
||||
|
||||
// --- Solve density
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
|
||||
@ -36,7 +36,7 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidThermophysicalTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I. \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
|
||||
@ -32,7 +32,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidThermophysicalTransportModel.H"
|
||||
#include "simpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
|
||||
@ -31,7 +31,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidThermophysicalTransportModel.H"
|
||||
#include "simpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
|
||||
@ -12,13 +12,13 @@
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
Info<< "Reading physicalProperties\n" << endl;
|
||||
|
||||
IOdictionary transportProperties
|
||||
IOdictionary physicalProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
"physicalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
@ -26,7 +26,7 @@
|
||||
)
|
||||
);
|
||||
|
||||
List<magnet> magnets(transportProperties.lookup("magnets"));
|
||||
List<magnet> magnets(physicalProperties.lookup("magnets"));
|
||||
|
||||
surfaceScalarField murf
|
||||
(
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
if (magnetZonei == -1)
|
||||
{
|
||||
FatalIOErrorIn(args.executable().c_str(), transportProperties)
|
||||
FatalIOErrorIn(args.executable().c_str(), physicalProperties)
|
||||
<< "Cannot find faceZone for magnet " << magnets[i].name()
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
Info<< "Reading physicalProperties\n" << endl;
|
||||
|
||||
IOdictionary transportProperties
|
||||
IOdictionary physicalProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
"physicalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
@ -16,28 +16,28 @@ dimensionedScalar rho
|
||||
(
|
||||
"rho",
|
||||
dimDensity,
|
||||
transportProperties
|
||||
physicalProperties
|
||||
);
|
||||
|
||||
dimensionedScalar nu
|
||||
(
|
||||
"nu",
|
||||
dimViscosity,
|
||||
transportProperties
|
||||
physicalProperties
|
||||
);
|
||||
|
||||
dimensionedScalar mu
|
||||
(
|
||||
"mu",
|
||||
dimensionSet(1, 1, -2, 0, 0, -2, 0),
|
||||
transportProperties
|
||||
physicalProperties
|
||||
);
|
||||
|
||||
dimensionedScalar sigma
|
||||
(
|
||||
"sigma",
|
||||
dimensionSet(-1, -3, 3, 0, 0, 2, 0),
|
||||
transportProperties
|
||||
physicalProperties
|
||||
);
|
||||
|
||||
Info<< "Reading field p\n" << endl;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I. \
|
||||
-I../../compressible/rhoPimpleFoam \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
|
||||
@ -37,7 +37,7 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidThermophysicalTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
|
||||
@ -3,7 +3,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
|
||||
@ -31,7 +31,7 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidThermophysicalTransportModel.H"
|
||||
#include "simpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
|
||||
@ -9,7 +9,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
|
||||
@ -32,7 +32,7 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidReactionThermophysicalTransportModel.H"
|
||||
#include "fluidReactionThermo.H"
|
||||
#include "combustionModel.H"
|
||||
|
||||
@ -2,7 +2,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
|
||||
@ -31,7 +31,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "fluidThermophysicalTransportModel.H"
|
||||
#include "LESModel.H"
|
||||
#include "fvModels.H"
|
||||
|
||||
@ -4,14 +4,14 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
|
||||
EXE_LIBS = \
|
||||
-lmomentumTransportModels \
|
||||
-lincompressibleMomentumTransportModels \
|
||||
-ltransportModels \
|
||||
-lphysicalProperties \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lfvModels \
|
||||
|
||||
@ -46,8 +46,8 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "kinematicMomentumTransportModel.H"
|
||||
#include "viscosityModel.H"
|
||||
#include "incompressibleMomentumTransportModels.H"
|
||||
#include "simpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
#include "fvModels.H"
|
||||
@ -91,7 +91,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
laminarTransport.lookup("lambda") >> lambda;
|
||||
viscosity->lookup("lambda") >> lambda;
|
||||
|
||||
// alpha +=
|
||||
// mesh.relaxationFactor("alpha")
|
||||
@ -238,7 +238,7 @@ int main(int argc, char *argv[])
|
||||
fvConstraints.constrain(Ua);
|
||||
}
|
||||
|
||||
laminarTransport.correct();
|
||||
viscosity->correct();
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
@ -77,19 +77,19 @@ setRefCell
|
||||
mesh.setFluxRequired(pa.name());
|
||||
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
|
||||
|
||||
autoPtr<incompressible::momentumTransportModel> turbulence
|
||||
(
|
||||
incompressible::momentumTransportModel::New(U, phi, laminarTransport)
|
||||
incompressible::momentumTransportModel::New(U, phi, viscosity)
|
||||
);
|
||||
|
||||
|
||||
dimensionedScalar zeroSensitivity("0", dimVelocity*dimVelocity, 0.0);
|
||||
dimensionedScalar zeroAlpha("0", dimless/dimTime, 0.0);
|
||||
|
||||
dimensionedScalar lambda(laminarTransport.lookup("lambda"));
|
||||
dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax"));
|
||||
dimensionedScalar lambda(viscosity->lookup("lambda"));
|
||||
dimensionedScalar alphaMax(viscosity->lookup("alphaMax"));
|
||||
|
||||
const labelList& inletCells = mesh.boundary()["inlet"].faceCells();
|
||||
//const labelList& outletCells = mesh.boundary()["outlet"].faceCells();
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
@ -9,7 +9,7 @@ EXE_INC = \
|
||||
EXE_LIBS = \
|
||||
-lmomentumTransportModels \
|
||||
-lincompressibleMomentumTransportModels \
|
||||
-ltransportModels \
|
||||
-lphysicalProperties \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lfvModels \
|
||||
|
||||
@ -36,8 +36,8 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "kinematicMomentumTransportModel.H"
|
||||
#include "viscosityModel.H"
|
||||
#include "incompressibleMomentumTransportModels.H"
|
||||
#include "fvModels.H"
|
||||
#include "fvConstraints.H"
|
||||
#include "wallFvPatch.H"
|
||||
@ -91,7 +91,7 @@ int main(int argc, char *argv[])
|
||||
U += (Ubar - UbarStar);
|
||||
gradP += (Ubar - UbarStar)/(1.0/UEqn.A())().weightedAverage(mesh.V());
|
||||
|
||||
laminarTransport.correct();
|
||||
viscosity->correct();
|
||||
turbulence->correct();
|
||||
|
||||
Info<< "Uncorrected Ubar = " << (flowDirection & UbarStar.value())
|
||||
|
||||
@ -29,14 +29,14 @@ surfaceScalarField phi
|
||||
);
|
||||
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
|
||||
|
||||
autoPtr<incompressible::momentumTransportModel> turbulence
|
||||
(
|
||||
incompressible::momentumTransportModel::New(U, phi, laminarTransport)
|
||||
incompressible::momentumTransportModel::New(U, phi, viscosity)
|
||||
);
|
||||
|
||||
dimensionedVector Ubar("Ubar", dimVelocity, laminarTransport);
|
||||
dimensionedVector Ubar("Ubar", dimVelocity, viscosity);
|
||||
|
||||
vector flowDirection = (Ubar/mag(Ubar)).value();
|
||||
tensor flowMask = sqr(flowDirection);
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
Info<< "Reading physicalProperties\n" << endl;
|
||||
|
||||
IOdictionary transportProperties
|
||||
IOdictionary physicalProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
"physicalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
@ -16,7 +16,7 @@ dimensionedScalar nu
|
||||
(
|
||||
"nu",
|
||||
dimViscosity,
|
||||
transportProperties.lookup("nu")
|
||||
physicalProperties.lookup("nu")
|
||||
);
|
||||
|
||||
Info<< "Reading field p\n" << endl;
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
nonNewtonianIcoFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/nonNewtonianIcoFoam
|
||||
@ -1,9 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-ltransportModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
@ -1,40 +0,0 @@
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
|
||||
singlePhaseTransportModel fluid(U, phi);
|
||||
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
||||
mesh.setFluxRequired(p.name());
|
||||
@ -1,132 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
nonNewtonianIcoFoam
|
||||
|
||||
Description
|
||||
Transient solver for incompressible, laminar flow of non-Newtonian fluids.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "pisoControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCaseLists.H"
|
||||
#include "createTime.H"
|
||||
#include "createMeshNoClear.H"
|
||||
#include "createControl.H"
|
||||
#include "createFields.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "CourantNo.H"
|
||||
|
||||
fluid.correct();
|
||||
|
||||
// Momentum predictor
|
||||
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(U)
|
||||
+ fvm::div(phi, U)
|
||||
- fvm::laplacian(fluid.nu(), U)
|
||||
- (fvc::grad(U) & fvc::grad(fluid.nu()))
|
||||
);
|
||||
|
||||
if (piso.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
}
|
||||
|
||||
// --- PISO loop
|
||||
while (piso.correct())
|
||||
{
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::flux(HbyA)
|
||||
+ fvc::interpolate(rAU)*fvc::ddtCorr(U, phi)
|
||||
);
|
||||
|
||||
adjustPhi(phiHbyA, U, p);
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
constrainPressure(p, U, phiHbyA, rAU);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
while (piso.correctNonOrthogonal())
|
||||
{
|
||||
// Pressure corrector
|
||||
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(rAU, p) == fvc::div(phiHbyA)
|
||||
);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
if (piso.finalNonOrthogonalIter())
|
||||
{
|
||||
phi = phiHbyA - pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrs.H"
|
||||
|
||||
U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,7 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
@ -11,7 +11,7 @@ EXE_INC = \
|
||||
EXE_LIBS = \
|
||||
-lmomentumTransportModels \
|
||||
-lincompressibleMomentumTransportModels \
|
||||
-ltransportModels \
|
||||
-lphysicalProperties \
|
||||
-lfiniteVolume \
|
||||
-lfvModels \
|
||||
-lfvConstraints \
|
||||
|
||||
@ -3,7 +3,7 @@ EXE_INC = \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
@ -11,7 +11,7 @@ EXE_INC = \
|
||||
EXE_LIBS = \
|
||||
-lmomentumTransportModels \
|
||||
-lincompressibleMomentumTransportModels \
|
||||
-ltransportModels \
|
||||
-lphysicalProperties \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lfvModels \
|
||||
|
||||
@ -33,8 +33,8 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "kinematicMomentumTransportModel.H"
|
||||
#include "viscosityModel.H"
|
||||
#include "incompressibleMomentumTransportModels.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
#include "SRFModel.H"
|
||||
@ -89,7 +89,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
laminarTransport.correct();
|
||||
viscosity->correct();
|
||||
turbulence->correct();
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,11 +63,12 @@ volVectorField U
|
||||
Urel + SRF->U()
|
||||
);
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
|
||||
|
||||
autoPtr<incompressible::momentumTransportModel> turbulence
|
||||
(
|
||||
incompressible::momentumTransportModel::New(U, phi, laminarTransport)
|
||||
incompressible::momentumTransportModel::New(U, phi, viscosity)
|
||||
);
|
||||
|
||||
#include "createFvModels.H"
|
||||
|
||||
@ -35,11 +35,11 @@ pressureReference pressureReference(p, pimple.dict());
|
||||
mesh.setFluxRequired(p.name());
|
||||
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
|
||||
|
||||
autoPtr<incompressible::momentumTransportModel> turbulence
|
||||
(
|
||||
incompressible::momentumTransportModel::New(U, phi, laminarTransport)
|
||||
incompressible::momentumTransportModel::New(U, phi, viscosity)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
|
||||
@ -34,8 +34,8 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "kinematicMomentumTransportModel.H"
|
||||
#include "viscosityModel.H"
|
||||
#include "incompressibleMomentumTransportModels.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
#include "CorrectPhi.H"
|
||||
@ -125,7 +125,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
laminarTransport.correct();
|
||||
viscosity->correct();
|
||||
turbulence->correct();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
@ -9,7 +9,7 @@ EXE_INC = \
|
||||
EXE_LIBS = \
|
||||
-lmomentumTransportModels \
|
||||
-lincompressibleMomentumTransportModels \
|
||||
-ltransportModels \
|
||||
-lphysicalProperties \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lfvModels \
|
||||
|
||||
@ -34,11 +34,11 @@ pressureReference pressureReference(p, piso.dict());
|
||||
mesh.setFluxRequired(p.name());
|
||||
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
|
||||
|
||||
autoPtr<incompressible::momentumTransportModel> turbulence
|
||||
(
|
||||
incompressible::momentumTransportModel::New(U, phi, laminarTransport)
|
||||
incompressible::momentumTransportModel::New(U, phi, viscosity)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
|
||||
@ -35,8 +35,8 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "kinematicMomentumTransportModel.H"
|
||||
#include "viscosityModel.H"
|
||||
#include "incompressibleMomentumTransportModels.H"
|
||||
#include "pisoControl.H"
|
||||
#include "pressureReference.H"
|
||||
#include "fvModels.H"
|
||||
@ -80,7 +80,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
laminarTransport.correct();
|
||||
viscosity->correct();
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
@ -9,7 +9,7 @@ EXE_INC = \
|
||||
EXE_LIBS = \
|
||||
-lmomentumTransportModels \
|
||||
-lincompressibleMomentumTransportModels \
|
||||
-ltransportModels \
|
||||
-lphysicalProperties \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lfvModels \
|
||||
|
||||
@ -2,7 +2,7 @@ EXE_INC = \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
@ -11,7 +11,7 @@ EXE_INC = \
|
||||
EXE_LIBS = \
|
||||
-lmomentumTransportModels \
|
||||
-lincompressibleMomentumTransportModels \
|
||||
-ltransportModels \
|
||||
-lphysicalProperties \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lfvModels \
|
||||
|
||||
@ -31,8 +31,8 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "kinematicMomentumTransportModel.H"
|
||||
#include "viscosityModel.H"
|
||||
#include "incompressibleMomentumTransportModels.H"
|
||||
#include "SRFModel.H"
|
||||
#include "simpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
@ -72,7 +72,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
U = Urel + SRF->U();
|
||||
|
||||
laminarTransport.correct();
|
||||
viscosity->correct();
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
@ -61,11 +61,12 @@ volVectorField U
|
||||
Urel + SRF->U()
|
||||
);
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
|
||||
|
||||
autoPtr<incompressible::momentumTransportModel> turbulence
|
||||
(
|
||||
incompressible::momentumTransportModel::New(U, phi, laminarTransport)
|
||||
incompressible::momentumTransportModel::New(U, phi, viscosity)
|
||||
);
|
||||
|
||||
#include "createFvModels.H"
|
||||
|
||||
@ -28,17 +28,15 @@ volVectorField U
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
|
||||
pressureReference pressureReference(p, simple.dict());
|
||||
|
||||
mesh.setFluxRequired(p.name());
|
||||
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
|
||||
|
||||
autoPtr<incompressible::momentumTransportModel> turbulence
|
||||
(
|
||||
incompressible::momentumTransportModel::New(U, phi, laminarTransport)
|
||||
incompressible::momentumTransportModel::New(U, phi, viscosity)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
|
||||
@ -2,7 +2,7 @@ EXE_INC = \
|
||||
-I.. \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
@ -11,7 +11,7 @@ EXE_INC = \
|
||||
EXE_LIBS = \
|
||||
-lmomentumTransportModels \
|
||||
-lincompressibleMomentumTransportModels \
|
||||
-ltransportModels \
|
||||
-lphysicalProperties \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lfvModels \
|
||||
|
||||
@ -32,8 +32,8 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "kinematicMomentumTransportModel.H"
|
||||
#include "viscosityModel.H"
|
||||
#include "incompressibleMomentumTransportModels.H"
|
||||
#include "simpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
#include "IOporosityModelList.H"
|
||||
@ -73,7 +73,7 @@ int main(int argc, char *argv[])
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
laminarTransport.correct();
|
||||
viscosity->correct();
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
@ -31,8 +31,8 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "kinematicMomentumTransportModel.H"
|
||||
#include "viscosityModel.H"
|
||||
#include "incompressibleMomentumTransportModels.H"
|
||||
#include "simpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
#include "fvModels.H"
|
||||
@ -69,7 +69,7 @@ int main(int argc, char *argv[])
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
laminarTransport.correct();
|
||||
viscosity->correct();
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
@ -18,7 +18,7 @@ EXE_LIBS = \
|
||||
-llagrangian \
|
||||
-llagrangianParcel \
|
||||
-llagrangianParcelTurbulence \
|
||||
-ltransportModels \
|
||||
-lphysicalProperties \
|
||||
-lmomentumTransportModels \
|
||||
-lincompressibleMomentumTransportModels \
|
||||
-lphaseIncompressibleMomentumTransportModels \
|
||||
|
||||
@ -6,7 +6,7 @@ word continuousPhaseName
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
"physicalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ
|
||||
@ -65,13 +65,13 @@ mesh.setFluxRequired(p.name());
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
|
||||
singlePhaseTransportModel continuousPhaseTransport(Uc, phic);
|
||||
autoPtr<viscosityModel> continuousPhaseViscosity(viscosityModel::New(mesh));
|
||||
|
||||
dimensionedScalar rhocValue
|
||||
(
|
||||
IOobject::groupName("rho", continuousPhaseName),
|
||||
dimDensity,
|
||||
continuousPhaseTransport.lookup
|
||||
continuousPhaseViscosity->lookup
|
||||
(
|
||||
IOobject::groupName("rho", continuousPhaseName)
|
||||
)
|
||||
@ -101,7 +101,7 @@ volScalarField muc
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
rhoc*continuousPhaseTransport.nu()
|
||||
rhoc*continuousPhaseViscosity->nu()
|
||||
);
|
||||
|
||||
Info << "Creating field alphac\n" << endl;
|
||||
@ -154,7 +154,7 @@ autoPtr<phaseIncompressible::momentumTransportModel> continuousPhaseTurbulence
|
||||
Uc,
|
||||
alphaPhic,
|
||||
phic,
|
||||
continuousPhaseTransport
|
||||
continuousPhaseViscosity
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -77,8 +77,8 @@ namespace Foam
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "phaseKinematicMomentumTransportModel.H"
|
||||
#include "viscosityModel.H"
|
||||
#include "phaseIncompressibleMomentumTransportModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "pressureReference.H"
|
||||
#include "CorrectPhi.H"
|
||||
@ -130,8 +130,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
continuousPhaseTransport.correct();
|
||||
muc = rhoc*continuousPhaseTransport.nu();
|
||||
continuousPhaseViscosity->correct();
|
||||
muc = rhoc*continuousPhaseViscosity->nu();
|
||||
|
||||
clouds.evolve();
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
|
||||
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
@ -16,7 +16,7 @@ EXE_LIBS = \
|
||||
-llagrangianParcelTurbulence \
|
||||
-lmomentumTransportModels \
|
||||
-lincompressibleMomentumTransportModels \
|
||||
-ltransportModels \
|
||||
-lphysicalProperties \
|
||||
-lfiniteVolume \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
|
||||
@ -16,14 +16,10 @@ volVectorField U
|
||||
|
||||
#include "createPhi.H"
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
dimensionedScalar rhoInfValue
|
||||
(
|
||||
"rhoInf",
|
||||
dimDensity,
|
||||
laminarTransport
|
||||
);
|
||||
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
|
||||
|
||||
dimensionedScalar rhoInfValue("rhoInf", dimDensity, viscosity);
|
||||
|
||||
volScalarField rhoInf
|
||||
(
|
||||
@ -41,7 +37,7 @@ volScalarField rhoInf
|
||||
|
||||
autoPtr<incompressible::momentumTransportModel> turbulence
|
||||
(
|
||||
incompressible::momentumTransportModel::New(U, phi, laminarTransport)
|
||||
incompressible::momentumTransportModel::New(U, phi, viscosity)
|
||||
);
|
||||
|
||||
volScalarField mu
|
||||
@ -54,7 +50,7 @@ volScalarField mu
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
laminarTransport.nu()*rhoInfValue
|
||||
viscosity->nu()*rhoInfValue
|
||||
);
|
||||
|
||||
Info<< "Constructing clouds" << endl;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -34,8 +34,8 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "kinematicMomentumTransportModel.H"
|
||||
#include "viscosityModel.H"
|
||||
#include "incompressibleMomentumTransportModels.H"
|
||||
#include "parcelCloudList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -68,8 +68,8 @@ int main(int argc, char *argv[])
|
||||
U.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
laminarTransport.correct();
|
||||
mu = laminarTransport.nu()*rhoInfValue;
|
||||
viscosity->correct();
|
||||
mu = viscosity->nu()*rhoInfValue;
|
||||
|
||||
clouds.evolve();
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
|
||||
@ -34,7 +34,7 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "fluidThermo.H"
|
||||
#include "dynamicMomentumTransportModel.H"
|
||||
#include "compressibleMomentumTransportModels.H"
|
||||
#include "parcelCloudList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/incompressibleTwoPhaseMixture/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
|
||||
|
||||
@ -37,7 +37,7 @@ Description
|
||||
#include "dynamicFvMesh.H"
|
||||
#include "barotropicCompressibilityModel.H"
|
||||
#include "incompressibleTwoPhaseMixture.H"
|
||||
#include "kinematicMomentumTransportModel.H"
|
||||
#include "incompressibleMomentumTransportModels.H"
|
||||
#include "CorrectPhi.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ surfaceScalarField rhoPhi
|
||||
fvc::interpolate(rho)*phi
|
||||
);
|
||||
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
Info<< "Reading phaseProperties\n" << endl;
|
||||
|
||||
incompressibleTwoPhaseMixture mixture(U, phi);
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
wclean libso twoPhaseMixtureThermo
|
||||
wclean libso compressibleTwoPhaseMixture
|
||||
wclean libso surfaceTensionModels
|
||||
wclean libso twoPhaseChange
|
||||
wclean libso compressibleInterPhaseTransportModel
|
||||
|
||||
@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Parse arguments for library compilation
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
wmake $targetType twoPhaseMixtureThermo
|
||||
wmake $targetType compressibleTwoPhaseMixture
|
||||
wmake $targetType surfaceTensionModels
|
||||
wmake $targetType twoPhaseChange
|
||||
wmake $targetType compressibleInterPhaseTransportModel
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
EXE_INC = \
|
||||
-I. \
|
||||
-ItwoPhaseMixtureThermo \
|
||||
-IcompressibleTwoPhaseMixture \
|
||||
-IcompressibleInterPhaseTransportModel/lnInclude \
|
||||
-ItwoPhaseChange/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||
@ -17,10 +17,11 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/fvModels/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-ltwoPhaseMixtureThermo \
|
||||
-lcompressibleTwoPhaseMixture \
|
||||
-ltwoPhaseSurfaceTension \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
EXE_INC = \
|
||||
-I../twoPhaseMixtureThermo \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I../compressibleTwoPhaseMixture \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
|
||||
@ -10,13 +10,13 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-ltwoPhaseMixtureThermo \
|
||||
-lcompressibleTwoPhaseMixture \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-ltwoPhaseMixture \
|
||||
-ltwoPhaseProperties \
|
||||
-linterfaceProperties \
|
||||
-ltransportModels \
|
||||
-lphysicalProperties \
|
||||
-llagrangian \
|
||||
-llagrangianParcel \
|
||||
-llagrangianParcelTurbulence \
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "VoFClouds.H"
|
||||
#include "twoPhaseMixtureThermo.H"
|
||||
#include "compressibleTwoPhaseMixture.H"
|
||||
#include "fvmSup.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
@ -64,14 +64,14 @@ Foam::fv::VoFClouds::VoFClouds
|
||||
(
|
||||
mesh.lookupObject<fluidThermo>
|
||||
(
|
||||
IOobject::groupName(basicThermo::dictName, phaseName_)
|
||||
IOobject::groupName(physicalProperties::typeName, phaseName_)
|
||||
)
|
||||
),
|
||||
carrierThermo_
|
||||
(
|
||||
mesh.lookupObject<fluidThermo>
|
||||
(
|
||||
IOobject::groupName(basicThermo::dictName, carrierPhaseName_)
|
||||
IOobject::groupName(physicalProperties::typeName, carrierPhaseName_)
|
||||
)
|
||||
),
|
||||
clouds_
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "VoFSolidificationMeltingSource.H"
|
||||
#include "twoPhaseMixtureThermo.H"
|
||||
#include "compressibleTwoPhaseMixture.H"
|
||||
#include "fvcDdt.H"
|
||||
#include "zeroGradientFvPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
@ -59,60 +59,13 @@ void Foam::fv::VoFSolidificationMeltingSource::readCoeffs()
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFSolidificationMeltingSource::update() const
|
||||
{
|
||||
if (curTimeIndex_ == mesh().time().timeIndex())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": " << name()
|
||||
<< " - updating solid phase fraction" << endl;
|
||||
}
|
||||
|
||||
alphaSolid_.oldTime();
|
||||
|
||||
const twoPhaseMixtureThermo& thermo
|
||||
(
|
||||
mesh().lookupObject<twoPhaseMixtureThermo>
|
||||
(
|
||||
twoPhaseMixtureThermo::dictName
|
||||
)
|
||||
);
|
||||
|
||||
const volScalarField& TVoF = thermo.thermo1().T();
|
||||
const volScalarField CpVoF(thermo.thermo1().Cp());
|
||||
const volScalarField& alphaVoF = thermo.alpha1();
|
||||
|
||||
const labelList& cells = set_.cells();
|
||||
|
||||
forAll(cells, i)
|
||||
{
|
||||
const label celli = cells[i];
|
||||
|
||||
alphaSolid_[celli] = min
|
||||
(
|
||||
relax_*alphaVoF[celli]*alphaSolidT_->value(TVoF[celli])
|
||||
+ (1 - relax_)*alphaSolid_[celli],
|
||||
alphaVoF[celli]
|
||||
);
|
||||
}
|
||||
|
||||
alphaSolid_.correctBoundaryConditions();
|
||||
|
||||
curTimeIndex_ = mesh().time().timeIndex();
|
||||
}
|
||||
|
||||
|
||||
Foam::word Foam::fv::VoFSolidificationMeltingSource::alphaSolidName() const
|
||||
{
|
||||
const twoPhaseMixtureThermo& thermo
|
||||
const compressibleTwoPhaseMixture& thermo
|
||||
(
|
||||
mesh().lookupObject<twoPhaseMixtureThermo>
|
||||
mesh().lookupObject<compressibleTwoPhaseMixture>
|
||||
(
|
||||
twoPhaseMixtureThermo::dictName
|
||||
"phaseProperties"
|
||||
)
|
||||
);
|
||||
|
||||
@ -152,8 +105,7 @@ Foam::fv::VoFSolidificationMeltingSource::VoFSolidificationMeltingSource
|
||||
mesh,
|
||||
dimensionedScalar(dimless, 0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
),
|
||||
curTimeIndex_(-1)
|
||||
)
|
||||
{
|
||||
readCoeffs();
|
||||
}
|
||||
@ -179,13 +131,11 @@ void Foam::fv::VoFSolidificationMeltingSource::addSup
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
update();
|
||||
|
||||
const twoPhaseMixtureThermo& thermo
|
||||
const compressibleTwoPhaseMixture& thermo
|
||||
(
|
||||
mesh().lookupObject<twoPhaseMixtureThermo>
|
||||
mesh().lookupObject<compressibleTwoPhaseMixture>
|
||||
(
|
||||
twoPhaseMixtureThermo::dictName
|
||||
"phaseProperties"
|
||||
)
|
||||
);
|
||||
|
||||
@ -214,8 +164,6 @@ void Foam::fv::VoFSolidificationMeltingSource::addSup
|
||||
Info<< type() << ": applying source to " << eqn.psi().name() << endl;
|
||||
}
|
||||
|
||||
update();
|
||||
|
||||
scalarField& Sp = eqn.diag();
|
||||
const scalarField& V = mesh().V();
|
||||
|
||||
@ -243,6 +191,46 @@ void Foam::fv::VoFSolidificationMeltingSource::updateMesh
|
||||
}
|
||||
|
||||
|
||||
void Foam::fv::VoFSolidificationMeltingSource::correct()
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Info<< type() << ": " << name()
|
||||
<< " - updating solid phase fraction" << endl;
|
||||
}
|
||||
|
||||
alphaSolid_.oldTime();
|
||||
|
||||
const compressibleTwoPhaseMixture& thermo
|
||||
(
|
||||
mesh().lookupObject<compressibleTwoPhaseMixture>
|
||||
(
|
||||
"phaseProperties"
|
||||
)
|
||||
);
|
||||
|
||||
const volScalarField& TVoF = thermo.thermo1().T();
|
||||
const volScalarField CpVoF(thermo.thermo1().Cp());
|
||||
const volScalarField& alphaVoF = thermo.alpha1();
|
||||
|
||||
const labelList& cells = set_.cells();
|
||||
|
||||
forAll(cells, i)
|
||||
{
|
||||
const label celli = cells[i];
|
||||
|
||||
alphaSolid_[celli] = min
|
||||
(
|
||||
relax_*alphaVoF[celli]*alphaSolidT_->value(TVoF[celli])
|
||||
+ (1 - relax_)*alphaSolid_[celli],
|
||||
alphaVoF[celli]
|
||||
);
|
||||
}
|
||||
|
||||
alphaSolid_.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fv::VoFSolidificationMeltingSource::read(const dictionary& dict)
|
||||
{
|
||||
if (fvModel::read(dict))
|
||||
|
||||
@ -122,9 +122,6 @@ class VoFSolidificationMeltingSource
|
||||
//- Solid phase fraction
|
||||
mutable volScalarField alphaSolid_;
|
||||
|
||||
//- Current time index (used for updating)
|
||||
mutable label curTimeIndex_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
@ -134,9 +131,6 @@ class VoFSolidificationMeltingSource
|
||||
//- Return the name of the solid phase fraction
|
||||
word alphaSolidName() const;
|
||||
|
||||
//- Update the model
|
||||
void update() const;
|
||||
|
||||
//- Helper function to apply to the energy equation
|
||||
template<class RhoFieldType>
|
||||
void apply(const RhoFieldType& rho, fvMatrix<scalar>& eqn) const;
|
||||
@ -200,6 +194,10 @@ public:
|
||||
virtual void updateMesh(const mapPolyMesh&);
|
||||
|
||||
|
||||
//- Correct the model
|
||||
virtual void correct();
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Read source dictionary
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
EXE_INC = \
|
||||
-I../twoPhaseMixtureThermo \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I../compressibleTwoPhaseMixture \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
|
||||
@ -10,13 +10,13 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-ltwoPhaseMixtureThermo \
|
||||
-lcompressibleTwoPhaseMixture \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-ltwoPhaseMixture \
|
||||
-ltwoPhaseProperties \
|
||||
-linterfaceProperties \
|
||||
-ltransportModels \
|
||||
-lphysicalProperties \
|
||||
-lsurfaceFilmModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "VoFPatchTransfer.H"
|
||||
#include "twoPhaseMixtureThermo.H"
|
||||
#include "compressibleTwoPhaseMixture.H"
|
||||
#include "thermoSingleLayer.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
@ -155,11 +155,11 @@ void VoFPatchTransfer::correct
|
||||
const polyBoundaryMesh& pbm = film.regionMesh().boundaryMesh();
|
||||
|
||||
|
||||
const twoPhaseMixtureThermo& thermo
|
||||
const compressibleTwoPhaseMixture& thermo
|
||||
(
|
||||
film.primaryMesh().lookupObject<twoPhaseMixtureThermo>
|
||||
film.primaryMesh().lookupObject<compressibleTwoPhaseMixture>
|
||||
(
|
||||
twoPhaseMixtureThermo::dictName
|
||||
"phaseProperties"
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "VoFSurfaceFilm.H"
|
||||
#include "twoPhaseMixtureThermo.H"
|
||||
#include "compressibleTwoPhaseMixture.H"
|
||||
#include "fvmSup.H"
|
||||
#include "uniformDimensionedFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
@ -63,7 +63,7 @@ Foam::fv::VoFSurfaceFilm::VoFSurfaceFilm
|
||||
(
|
||||
mesh.lookupObject<fluidThermo>
|
||||
(
|
||||
IOobject::groupName(basicThermo::dictName, phaseName_)
|
||||
IOobject::groupName(physicalProperties::typeName, phaseName_)
|
||||
)
|
||||
),
|
||||
film_
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
fvModels.source(alpha1, mixture.thermo1().rho());
|
||||
|
||||
tmp<surfaceScalarField> talphaPhi1(alphaPhi10);
|
||||
tmp<surfaceScalarField> talphaPhi1(alphaPhi1);
|
||||
|
||||
if (nAlphaSubCycles > 1)
|
||||
{
|
||||
@ -15,7 +15,7 @@ if (nAlphaSubCycles > 1)
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(alphaPhi10.dimensions(), 0)
|
||||
dimensionedScalar(alphaPhi1.dimensions(), 0)
|
||||
);
|
||||
|
||||
surfaceScalarField rhoPhiSum
|
||||
@ -45,7 +45,7 @@ if (nAlphaSubCycles > 1)
|
||||
)
|
||||
{
|
||||
#include "alphaEqn.H"
|
||||
talphaPhi1.ref() += (runTime.deltaT()/totalDeltaT)*alphaPhi10;
|
||||
talphaPhi1.ref() += (runTime.deltaT()/totalDeltaT)*alphaPhi1;
|
||||
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
EXE_INC = \
|
||||
-I../twoPhaseMixtureThermo \
|
||||
-I$(LIB_SRC)/transportModels/lnInclude \
|
||||
-I../compressibleTwoPhaseMixture \
|
||||
-I$(LIB_SRC)/physicalProperties/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
|
||||
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
|
||||
@ -11,7 +11,7 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-ltwoPhaseMixtureThermo \
|
||||
-lcompressibleTwoPhaseMixture \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-ltwoPhaseMixture \
|
||||
@ -20,6 +20,6 @@ LIB_LIBS = \
|
||||
-lmomentumTransportModels \
|
||||
-lcompressibleMomentumTransportModels \
|
||||
-lphaseCompressibleMomentumTransportModels \
|
||||
-ltransportModels \
|
||||
-lphysicalProperties \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
||||
|
||||
@ -33,14 +33,14 @@ Foam::compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const surfaceScalarField& rhoPhi,
|
||||
const surfaceScalarField& alphaPhi10,
|
||||
const twoPhaseMixtureThermo& mixture
|
||||
const surfaceScalarField& alphaPhi1,
|
||||
const compressibleTwoPhaseMixture& mixture
|
||||
)
|
||||
:
|
||||
twoPhaseTransport_(false),
|
||||
mixture_(mixture),
|
||||
phi_(phi),
|
||||
alphaPhi10_(alphaPhi10)
|
||||
alphaPhi1_(alphaPhi1)
|
||||
{
|
||||
{
|
||||
IOdictionary momentumTransport
|
||||
@ -79,7 +79,7 @@ Foam::compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject::groupName("alphaRhoPhi", alpha1.group()),
|
||||
fvc::interpolate(rho1)*alphaPhi10_
|
||||
fvc::interpolate(rho1)*alphaPhi1_
|
||||
)
|
||||
);
|
||||
|
||||
@ -88,7 +88,7 @@ Foam::compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject::groupName("alphaRhoPhi", alpha2.group()),
|
||||
fvc::interpolate(rho2)*(phi_ - alphaPhi10_)
|
||||
fvc::interpolate(rho2)*(phi_ - alphaPhi1_)
|
||||
)
|
||||
);
|
||||
|
||||
@ -162,16 +162,20 @@ Foam::compressibleInterPhaseTransportModel::alphaEff() const
|
||||
return
|
||||
mixture_.alpha1()*mixture_.thermo1().alphaEff
|
||||
(
|
||||
turbulence1_->mut()
|
||||
mixture_.thermo1().rho()*turbulence1_->nut()
|
||||
)
|
||||
+ mixture_.alpha2()*mixture_.thermo2().alphaEff
|
||||
(
|
||||
turbulence2_->mut()
|
||||
mixture_.thermo2().rho()*turbulence2_->nut()
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
return mixture_.alphaEff(turbulence_->mut());
|
||||
const volScalarField alphat(mixture_.rho()*turbulence_->nut());
|
||||
|
||||
return
|
||||
mixture_.alpha1()*mixture_.thermo1().alphaEff(alphat)
|
||||
+ mixture_.alpha2()*mixture_.thermo2().alphaEff(alphat);
|
||||
}
|
||||
}
|
||||
|
||||
@ -202,8 +206,8 @@ void Foam::compressibleInterPhaseTransportModel::correctPhasePhi()
|
||||
const volScalarField& rho1 = mixture_.thermo1().rho();
|
||||
const volScalarField& rho2 = mixture_.thermo2().rho();
|
||||
|
||||
alphaRhoPhi1_.ref() = fvc::interpolate(rho1)*alphaPhi10_;
|
||||
alphaRhoPhi2_.ref() = fvc::interpolate(rho2)*(phi_ - alphaPhi10_);
|
||||
alphaRhoPhi1_.ref() = fvc::interpolate(rho1)*alphaPhi1_;
|
||||
alphaRhoPhi2_.ref() = fvc::interpolate(rho2)*(phi_ - alphaPhi1_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user