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:
Henry Weller
2021-07-30 17:19:54 +01:00
parent 4aacb80bae
commit 65ef2cf331
1103 changed files with 10982 additions and 11445 deletions

View File

@ -1,4 +1,4 @@
#include "readTransportProperties.H" #include "readPhysicalProperties.H"
Info<< "Reading field p\n" << endl; Info<< "Reading field p\n" << endl;
volScalarField p volScalarField p

View File

@ -1,10 +1,10 @@
Info<< "Reading transportProperties\n" << endl; Info<< "Reading physicalProperties\n" << endl;
IOdictionary transportProperties IOdictionary physicalProperties
( (
IOobject IOobject
( (
"transportProperties", "physicalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ_IF_MODIFIED, IOobject::MUST_READ_IF_MODIFIED,
@ -16,5 +16,5 @@
( (
"nu", "nu",
dimViscosity, dimViscosity,
transportProperties physicalProperties
); );

View File

@ -14,13 +14,13 @@ volScalarField T
); );
Info<< "Reading transportProperties\n" << endl; Info<< "Reading physicalProperties\n" << endl;
IOdictionary transportProperties IOdictionary physicalProperties
( (
IOobject IOobject
( (
"transportProperties", "physicalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ_IF_MODIFIED, IOobject::MUST_READ_IF_MODIFIED,
@ -33,7 +33,7 @@ Info<< "Reading diffusivity DT\n" << endl;
dimensionedScalar DT dimensionedScalar DT
( (
transportProperties.lookup("DT") physicalProperties.lookup("DT")
); );
#include "createFvModels.H" #include "createFvModels.H"

View File

@ -30,13 +30,13 @@ volVectorField U
); );
Info<< "Reading transportProperties\n" << endl; Info<< "Reading physicalProperties\n" << endl;
IOdictionary transportProperties IOdictionary physicalProperties
( (
IOobject IOobject
( (
"transportProperties", "physicalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ_IF_MODIFIED, IOobject::MUST_READ_IF_MODIFIED,
@ -49,7 +49,7 @@ Info<< "Reading diffusivity DT\n" << endl;
dimensionedScalar DT dimensionedScalar DT
( (
transportProperties.lookup("DT") physicalProperties.lookup("DT")
); );
#include "createPhi.H" #include "createPhi.H"

View File

@ -20,7 +20,7 @@ EXE_INC = \
-IPDRModels/turbulence/PDRkEpsilon \ -IPDRModels/turbulence/PDRkEpsilon \
-IlaminarFlameSpeed/SCOPE \ -IlaminarFlameSpeed/SCOPE \
-I$(LIB_SRC)/engine/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/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \

View File

@ -69,7 +69,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "psiuReactionThermo.H" #include "psiuReactionThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "fluidThermophysicalTransportModel.H" #include "fluidThermophysicalTransportModel.H"
#include "laminarFlameSpeed.H" #include "laminarFlameSpeed.H"
#include "XiModel.H" #include "XiModel.H"

View File

@ -58,7 +58,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "dynamicFvMesh.H" #include "dynamicFvMesh.H"
#include "psiuReactionThermo.H" #include "psiuReactionThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "laminarFlameSpeed.H" #include "laminarFlameSpeed.H"
#include "XiModel.H" #include "XiModel.H"
#include "PDRDragModel.H" #include "PDRDragModel.H"

View File

@ -38,7 +38,7 @@ SourceFiles
#include "IOdictionary.H" #include "IOdictionary.H"
#include "psiuReactionThermo.H" #include "psiuReactionThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "multivariateSurfaceInterpolationScheme.H" #include "multivariateSurfaceInterpolationScheme.H"
#include "runTimeSelectionTables.H" #include "runTimeSelectionTables.H"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -113,7 +113,7 @@ Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const
U_.db().lookupObject<volScalarField>("betav"); U_.db().lookupObject<volScalarField>("betav");
DragDcu = 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; return tDragDcu;
@ -143,8 +143,11 @@ Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const
U_.db().lookupObject<volSymmTensorField>("CT"); U_.db().lookupObject<volSymmTensorField>("CT");
Gk = Gk =
(0.5*rho_)*mag(U_)*(U_ & CT & U_) rho_
+ Csk*betav*turbulence_.muEff()*sqr(Aw_)*magSqr(U_); *(
0.5*mag(U_)*(U_ & CT & U_)
+ Csk*betav*turbulence_.nuEff()*sqr(Aw_)*magSqr(U_)
);
} }
return tGk; return tGk;

View File

@ -50,7 +50,7 @@ PDRkEpsilon::PDRkEpsilon
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const dynamicTransportModel& transport, const viscosity& transport,
const word& modelName const word& modelName
) )
: :

View File

@ -61,7 +61,7 @@ SourceFiles
#define compressible_PDRkEpsilon_H #define compressible_PDRkEpsilon_H
#include "kEpsilon.H" #include "kEpsilon.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -102,7 +102,7 @@ public:
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const dynamicTransportModel& transport, const viscosity& transport,
const word& modelName = typeName const word& modelName = typeName
); );

View File

@ -43,7 +43,7 @@ SourceFiles
#include "IOdictionary.H" #include "IOdictionary.H"
#include "psiuReactionThermo.H" #include "psiuReactionThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "runTimeSelectionTables.H" #include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -137,10 +137,7 @@ public:
// Member Functions // Member Functions
//- Return the flame-wrinkling XiEq //- Return the flame-wrinkling XiEq
virtual tmp<volScalarField> XiEq() const virtual tmp<volScalarField> XiEq() const = 0;
{
return turbulence_.muEff();
}
//- Return the sub-grid Schelkin effect //- Return the sub-grid Schelkin effect
tmp<volScalarField> calculateSchelkinEffect(const scalar) const; tmp<volScalarField> calculateSchelkinEffect(const scalar) const;

View File

@ -40,7 +40,7 @@ SourceFiles
#include "IOdictionary.H" #include "IOdictionary.H"
#include "psiuReactionThermo.H" #include "psiuReactionThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "runTimeSelectionTables.H" #include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -133,7 +133,11 @@ public:
//- Return the flame diffusivity //- Return the flame diffusivity
virtual tmp<volScalarField> Db() const virtual tmp<volScalarField> Db() const
{ {
return turbulence_.muEff(); return volScalarField::New
(
"Db",
turbulence_.rho()*turbulence_.nuEff()
);
} }
//- Update properties from given dictionary //- Update properties from given dictionary

View File

@ -92,7 +92,7 @@ SourceFiles
#include "IOdictionary.H" #include "IOdictionary.H"
#include "psiuReactionThermo.H" #include "psiuReactionThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "multivariateSurfaceInterpolationScheme.H" #include "multivariateSurfaceInterpolationScheme.H"
#include "fvcDiv.H" #include "fvcDiv.H"
#include "runTimeSelectionTables.H" #include "runTimeSelectionTables.H"
@ -208,7 +208,11 @@ public:
//- Return the flame diffusivity //- Return the flame diffusivity
virtual tmp<volScalarField> Db() const virtual tmp<volScalarField> Db() const
{ {
return turbulence_.muEff(); return volScalarField::New
(
"Db",
turbulence_.rho()*turbulence_.nuEff()
);
} }
//- Add Xi to the multivariateSurfaceInterpolationScheme table //- Add Xi to the multivariateSurfaceInterpolationScheme table

View File

@ -9,7 +9,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
) )
); );
volScalarField Db("Db", turbulence->muEff()); volScalarField Db("Db", rho*turbulence->nuEff());
if (ign.ignited()) if (ign.ignited())
{ {

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/engine/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/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \

View File

@ -4,7 +4,7 @@ EXE_INC = \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/engine/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/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \

View File

@ -52,7 +52,7 @@ Description
#include "engineTime.H" #include "engineTime.H"
#include "engineMesh.H" #include "engineMesh.H"
#include "psiuReactionThermo.H" #include "psiuReactionThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "fluidThermophysicalTransportModel.H" #include "fluidThermophysicalTransportModel.H"
#include "laminarFlameSpeed.H" #include "laminarFlameSpeed.H"
#include "ignition.H" #include "ignition.H"

View File

@ -51,7 +51,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "psiuReactionThermo.H" #include "psiuReactionThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "fluidThermophysicalTransportModel.H" #include "fluidThermophysicalTransportModel.H"
#include "laminarFlameSpeed.H" #include "laminarFlameSpeed.H"
#include "ignition.H" #include "ignition.H"

View File

@ -1,5 +1,5 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/transportModels/lnInclude \ -I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \

View File

@ -4,7 +4,7 @@ EXE_INC = \
-I../XiFoam \ -I../XiFoam \
-I../../compressible/rhoPimpleFoam \ -I../../compressible/rhoPimpleFoam \
-I$(LIB_SRC)/engine/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/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \

View File

@ -33,7 +33,7 @@ Description
#include "engineTime.H" #include "engineTime.H"
#include "engineMesh.H" #include "engineMesh.H"
#include "psiThermo.H" #include "psiThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "fluidThermophysicalTransportModel.H" #include "fluidThermophysicalTransportModel.H"
#include "OFstream.H" #include "OFstream.H"
#include "fvModels.H" #include "fvModels.H"

View File

@ -3,7 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \ -I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/fluidReactionThermo/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/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \

View File

@ -5,7 +5,7 @@ EXE_INC = \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \ -I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/fluidReactionThermo/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/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \

View File

@ -38,7 +38,7 @@ Description
#include "dynamicFvMesh.H" #include "dynamicFvMesh.H"
#include "fluidReactionThermo.H" #include "fluidReactionThermo.H"
#include "combustionModel.H" #include "combustionModel.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "fluidReactionThermophysicalTransportModel.H" #include "fluidReactionThermophysicalTransportModel.H"
#include "multivariateScheme.H" #include "multivariateScheme.H"
#include "pimpleControl.H" #include "pimpleControl.H"

View File

@ -10,7 +10,7 @@ EXE_INC = \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \ -I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/fluidReactionThermo/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/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \

View File

@ -32,7 +32,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "engineMesh.H" #include "engineMesh.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "fluidReactionThermophysicalTransportModel.H" #include "fluidReactionThermophysicalTransportModel.H"
#include "combustionModel.H" #include "combustionModel.H"
#include "fvModels.H" #include "fvModels.H"

View File

@ -37,7 +37,7 @@ Description
#include "dynamicFvMesh.H" #include "dynamicFvMesh.H"
#include "fluidReactionThermo.H" #include "fluidReactionThermo.H"
#include "combustionModel.H" #include "combustionModel.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "fluidReactionThermophysicalTransportModel.H" #include "fluidReactionThermophysicalTransportModel.H"
#include "multivariateScheme.H" #include "multivariateScheme.H"
#include "pimpleControl.H" #include "pimpleControl.H"

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/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/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -178,7 +178,7 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
// Prandtl number reading consistent with rhoCentralFoam // Prandtl number reading consistent with rhoCentralFoam
const dictionary& thermophysicalProperties = const dictionary& thermophysicalProperties =
db().lookupObject<IOdictionary>(basicThermo::dictName); db().lookupObject<IOdictionary>(physicalProperties::typeName);
dimensionedScalar Pr dimensionedScalar Pr
( (

View File

@ -1,7 +1,7 @@
EXE_INC = \ EXE_INC = \
-IBCs/lnInclude \ -IBCs/lnInclude \
-I$(LIB_SRC)/finiteVolume/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/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \

View File

@ -33,7 +33,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "dynamicFvMesh.H" #include "dynamicFvMesh.H"
#include "psiThermo.H" #include "psiThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "fluidThermophysicalTransportModel.H" #include "fluidThermophysicalTransportModel.H"
#include "fixedRhoFvPatchScalarField.H" #include "fixedRhoFvPatchScalarField.H"
#include "directionInterpolate.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); 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)))); volTensorField tauMC("tauMC", muEff*dev2(Foam::T(fvc::grad(U))));
// --- Solve density // --- Solve density

View File

@ -1,5 +1,5 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/transportModels/lnInclude \ -I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \

View File

@ -36,7 +36,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "dynamicFvMesh.H" #include "dynamicFvMesh.H"
#include "fluidThermo.H" #include "fluidThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "fluidThermophysicalTransportModel.H" #include "fluidThermophysicalTransportModel.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "pressureReference.H" #include "pressureReference.H"

View File

@ -1,5 +1,5 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/transportModels/lnInclude \ -I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \

View File

@ -1,7 +1,7 @@
EXE_INC = \ EXE_INC = \
-I. \ -I. \
-I.. \ -I.. \
-I$(LIB_SRC)/transportModels/lnInclude \ -I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \

View File

@ -32,7 +32,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "fluidThermo.H" #include "fluidThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "fluidThermophysicalTransportModel.H" #include "fluidThermophysicalTransportModel.H"
#include "simpleControl.H" #include "simpleControl.H"
#include "pressureReference.H" #include "pressureReference.H"

View File

@ -31,7 +31,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "fluidThermo.H" #include "fluidThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "fluidThermophysicalTransportModel.H" #include "fluidThermophysicalTransportModel.H"
#include "simpleControl.H" #include "simpleControl.H"
#include "pressureReference.H" #include "pressureReference.H"

View File

@ -12,13 +12,13 @@
mesh mesh
); );
Info<< "Reading transportProperties\n" << endl; Info<< "Reading physicalProperties\n" << endl;
IOdictionary transportProperties IOdictionary physicalProperties
( (
IOobject IOobject
( (
"transportProperties", "physicalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ_IF_MODIFIED, IOobject::MUST_READ_IF_MODIFIED,
@ -26,7 +26,7 @@
) )
); );
List<magnet> magnets(transportProperties.lookup("magnets")); List<magnet> magnets(physicalProperties.lookup("magnets"));
surfaceScalarField murf surfaceScalarField murf
( (
@ -58,7 +58,7 @@
if (magnetZonei == -1) if (magnetZonei == -1)
{ {
FatalIOErrorIn(args.executable().c_str(), transportProperties) FatalIOErrorIn(args.executable().c_str(), physicalProperties)
<< "Cannot find faceZone for magnet " << magnets[i].name() << "Cannot find faceZone for magnet " << magnets[i].name()
<< exit(FatalIOError); << exit(FatalIOError);
} }

View File

@ -1,10 +1,10 @@
Info<< "Reading transportProperties\n" << endl; Info<< "Reading physicalProperties\n" << endl;
IOdictionary transportProperties IOdictionary physicalProperties
( (
IOobject IOobject
( (
"transportProperties", "physicalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ_IF_MODIFIED, IOobject::MUST_READ_IF_MODIFIED,
@ -16,28 +16,28 @@ dimensionedScalar rho
( (
"rho", "rho",
dimDensity, dimDensity,
transportProperties physicalProperties
); );
dimensionedScalar nu dimensionedScalar nu
( (
"nu", "nu",
dimViscosity, dimViscosity,
transportProperties physicalProperties
); );
dimensionedScalar mu dimensionedScalar mu
( (
"mu", "mu",
dimensionSet(1, 1, -2, 0, 0, -2, 0), dimensionSet(1, 1, -2, 0, 0, -2, 0),
transportProperties physicalProperties
); );
dimensionedScalar sigma dimensionedScalar sigma
( (
"sigma", "sigma",
dimensionSet(-1, -3, 3, 0, 0, 2, 0), dimensionSet(-1, -3, 3, 0, 0, 2, 0),
transportProperties physicalProperties
); );
Info<< "Reading field p\n" << endl; Info<< "Reading field p\n" << endl;

View File

@ -1,7 +1,7 @@
EXE_INC = \ EXE_INC = \
-I. \ -I. \
-I../../compressible/rhoPimpleFoam \ -I../../compressible/rhoPimpleFoam \
-I$(LIB_SRC)/transportModels/lnInclude \ -I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \

View File

@ -37,7 +37,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "dynamicFvMesh.H" #include "dynamicFvMesh.H"
#include "fluidThermo.H" #include "fluidThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "fluidThermophysicalTransportModel.H" #include "fluidThermophysicalTransportModel.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "pressureReference.H" #include "pressureReference.H"

View File

@ -3,7 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/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)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \

View File

@ -31,7 +31,7 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "fluidThermophysicalTransportModel.H" #include "fluidThermophysicalTransportModel.H"
#include "simpleControl.H" #include "simpleControl.H"
#include "pressureReference.H" #include "pressureReference.H"

View File

@ -9,7 +9,7 @@ EXE_INC = \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/finiteVolume/cfdTools \ -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/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \

View File

@ -32,7 +32,7 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "fluidReactionThermophysicalTransportModel.H" #include "fluidReactionThermophysicalTransportModel.H"
#include "fluidReactionThermo.H" #include "fluidReactionThermo.H"
#include "combustionModel.H" #include "combustionModel.H"

View File

@ -2,7 +2,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/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)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \

View File

@ -31,7 +31,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "fluidThermo.H" #include "fluidThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "fluidThermophysicalTransportModel.H" #include "fluidThermophysicalTransportModel.H"
#include "LESModel.H" #include "LESModel.H"
#include "fvModels.H" #include "fvModels.H"

View File

@ -4,14 +4,14 @@ EXE_INC = \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/incompressible/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/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)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
EXE_LIBS = \ EXE_LIBS = \
-lmomentumTransportModels \ -lmomentumTransportModels \
-lincompressibleMomentumTransportModels \ -lincompressibleMomentumTransportModels \
-ltransportModels \ -lphysicalProperties \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools \
-lfvModels \ -lfvModels \

View File

@ -46,8 +46,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "singlePhaseTransportModel.H" #include "viscosityModel.H"
#include "kinematicMomentumTransportModel.H" #include "incompressibleMomentumTransportModels.H"
#include "simpleControl.H" #include "simpleControl.H"
#include "pressureReference.H" #include "pressureReference.H"
#include "fvModels.H" #include "fvModels.H"
@ -91,7 +91,7 @@ int main(int argc, char *argv[])
{ {
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
laminarTransport.lookup("lambda") >> lambda; viscosity->lookup("lambda") >> lambda;
// alpha += // alpha +=
// mesh.relaxationFactor("alpha") // mesh.relaxationFactor("alpha")
@ -238,7 +238,7 @@ int main(int argc, char *argv[])
fvConstraints.constrain(Ua); fvConstraints.constrain(Ua);
} }
laminarTransport.correct(); viscosity->correct();
turbulence->correct(); turbulence->correct();
runTime.write(); runTime.write();

View File

@ -77,19 +77,19 @@ setRefCell
mesh.setFluxRequired(pa.name()); mesh.setFluxRequired(pa.name());
singlePhaseTransportModel laminarTransport(U, phi); autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
autoPtr<incompressible::momentumTransportModel> turbulence autoPtr<incompressible::momentumTransportModel> turbulence
( (
incompressible::momentumTransportModel::New(U, phi, laminarTransport) incompressible::momentumTransportModel::New(U, phi, viscosity)
); );
dimensionedScalar zeroSensitivity("0", dimVelocity*dimVelocity, 0.0); dimensionedScalar zeroSensitivity("0", dimVelocity*dimVelocity, 0.0);
dimensionedScalar zeroAlpha("0", dimless/dimTime, 0.0); dimensionedScalar zeroAlpha("0", dimless/dimTime, 0.0);
dimensionedScalar lambda(laminarTransport.lookup("lambda")); dimensionedScalar lambda(viscosity->lookup("lambda"));
dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax")); dimensionedScalar alphaMax(viscosity->lookup("alphaMax"));
const labelList& inletCells = mesh.boundary()["inlet"].faceCells(); const labelList& inletCells = mesh.boundary()["inlet"].faceCells();
//const labelList& outletCells = mesh.boundary()["outlet"].faceCells(); //const labelList& outletCells = mesh.boundary()["outlet"].faceCells();

View File

@ -1,7 +1,7 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/incompressible/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)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude -I$(LIB_SRC)/sampling/lnInclude
@ -9,7 +9,7 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lmomentumTransportModels \ -lmomentumTransportModels \
-lincompressibleMomentumTransportModels \ -lincompressibleMomentumTransportModels \
-ltransportModels \ -lphysicalProperties \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools \
-lfvModels \ -lfvModels \

View File

@ -36,8 +36,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "singlePhaseTransportModel.H" #include "viscosityModel.H"
#include "kinematicMomentumTransportModel.H" #include "incompressibleMomentumTransportModels.H"
#include "fvModels.H" #include "fvModels.H"
#include "fvConstraints.H" #include "fvConstraints.H"
#include "wallFvPatch.H" #include "wallFvPatch.H"
@ -91,7 +91,7 @@ int main(int argc, char *argv[])
U += (Ubar - UbarStar); U += (Ubar - UbarStar);
gradP += (Ubar - UbarStar)/(1.0/UEqn.A())().weightedAverage(mesh.V()); gradP += (Ubar - UbarStar)/(1.0/UEqn.A())().weightedAverage(mesh.V());
laminarTransport.correct(); viscosity->correct();
turbulence->correct(); turbulence->correct();
Info<< "Uncorrected Ubar = " << (flowDirection & UbarStar.value()) Info<< "Uncorrected Ubar = " << (flowDirection & UbarStar.value())

View File

@ -29,14 +29,14 @@ surfaceScalarField phi
); );
singlePhaseTransportModel laminarTransport(U, phi); autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
autoPtr<incompressible::momentumTransportModel> turbulence 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(); vector flowDirection = (Ubar/mag(Ubar)).value();
tensor flowMask = sqr(flowDirection); tensor flowMask = sqr(flowDirection);

View File

@ -1,10 +1,10 @@
Info<< "Reading transportProperties\n" << endl; Info<< "Reading physicalProperties\n" << endl;
IOdictionary transportProperties IOdictionary physicalProperties
( (
IOobject IOobject
( (
"transportProperties", "physicalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ_IF_MODIFIED, IOobject::MUST_READ_IF_MODIFIED,
@ -16,7 +16,7 @@ dimensionedScalar nu
( (
"nu", "nu",
dimViscosity, dimViscosity,
transportProperties.lookup("nu") physicalProperties.lookup("nu")
); );
Info<< "Reading field p\n" << endl; Info<< "Reading field p\n" << endl;

View File

@ -1,3 +0,0 @@
nonNewtonianIcoFoam.C
EXE = $(FOAM_APPBIN)/nonNewtonianIcoFoam

View File

@ -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

View File

@ -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());

View File

@ -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;
}
// ************************************************************************* //

View File

@ -1,7 +1,7 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/incompressible/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)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \
@ -11,7 +11,7 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lmomentumTransportModels \ -lmomentumTransportModels \
-lincompressibleMomentumTransportModels \ -lincompressibleMomentumTransportModels \
-ltransportModels \ -lphysicalProperties \
-lfiniteVolume \ -lfiniteVolume \
-lfvModels \ -lfvModels \
-lfvConstraints \ -lfvConstraints \

View File

@ -3,7 +3,7 @@ EXE_INC = \
-I.. \ -I.. \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/incompressible/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)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude -I$(LIB_SRC)/sampling/lnInclude
@ -11,7 +11,7 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lmomentumTransportModels \ -lmomentumTransportModels \
-lincompressibleMomentumTransportModels \ -lincompressibleMomentumTransportModels \
-ltransportModels \ -lphysicalProperties \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools \
-lfvModels \ -lfvModels \

View File

@ -33,8 +33,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "singlePhaseTransportModel.H" #include "viscosityModel.H"
#include "kinematicMomentumTransportModel.H" #include "incompressibleMomentumTransportModels.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "pressureReference.H" #include "pressureReference.H"
#include "SRFModel.H" #include "SRFModel.H"
@ -89,7 +89,7 @@ int main(int argc, char *argv[])
if (pimple.turbCorr()) if (pimple.turbCorr())
{ {
laminarTransport.correct(); viscosity->correct();
turbulence->correct(); turbulence->correct();
} }
} }

View File

@ -63,11 +63,12 @@ volVectorField U
Urel + SRF->U() Urel + SRF->U()
); );
singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
autoPtr<incompressible::momentumTransportModel> turbulence autoPtr<incompressible::momentumTransportModel> turbulence
( (
incompressible::momentumTransportModel::New(U, phi, laminarTransport) incompressible::momentumTransportModel::New(U, phi, viscosity)
); );
#include "createFvModels.H" #include "createFvModels.H"

View File

@ -35,11 +35,11 @@ pressureReference pressureReference(p, pimple.dict());
mesh.setFluxRequired(p.name()); mesh.setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(U, phi); autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
autoPtr<incompressible::momentumTransportModel> turbulence autoPtr<incompressible::momentumTransportModel> turbulence
( (
incompressible::momentumTransportModel::New(U, phi, laminarTransport) incompressible::momentumTransportModel::New(U, phi, viscosity)
); );
#include "createMRF.H" #include "createMRF.H"

View File

@ -34,8 +34,8 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "dynamicFvMesh.H" #include "dynamicFvMesh.H"
#include "singlePhaseTransportModel.H" #include "viscosityModel.H"
#include "kinematicMomentumTransportModel.H" #include "incompressibleMomentumTransportModels.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "pressureReference.H" #include "pressureReference.H"
#include "CorrectPhi.H" #include "CorrectPhi.H"
@ -125,7 +125,7 @@ int main(int argc, char *argv[])
if (pimple.turbCorr()) if (pimple.turbCorr())
{ {
laminarTransport.correct(); viscosity->correct();
turbulence->correct(); turbulence->correct();
} }
} }

View File

@ -1,7 +1,7 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/incompressible/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)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude -I$(LIB_SRC)/sampling/lnInclude
@ -9,7 +9,7 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lmomentumTransportModels \ -lmomentumTransportModels \
-lincompressibleMomentumTransportModels \ -lincompressibleMomentumTransportModels \
-ltransportModels \ -lphysicalProperties \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools \
-lfvModels \ -lfvModels \

View File

@ -34,11 +34,11 @@ pressureReference pressureReference(p, piso.dict());
mesh.setFluxRequired(p.name()); mesh.setFluxRequired(p.name());
singlePhaseTransportModel laminarTransport(U, phi); autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
autoPtr<incompressible::momentumTransportModel> turbulence autoPtr<incompressible::momentumTransportModel> turbulence
( (
incompressible::momentumTransportModel::New(U, phi, laminarTransport) incompressible::momentumTransportModel::New(U, phi, viscosity)
); );
#include "createMRF.H" #include "createMRF.H"

View File

@ -35,8 +35,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "singlePhaseTransportModel.H" #include "viscosityModel.H"
#include "kinematicMomentumTransportModel.H" #include "incompressibleMomentumTransportModels.H"
#include "pisoControl.H" #include "pisoControl.H"
#include "pressureReference.H" #include "pressureReference.H"
#include "fvModels.H" #include "fvModels.H"
@ -80,7 +80,7 @@ int main(int argc, char *argv[])
} }
} }
laminarTransport.correct(); viscosity->correct();
turbulence->correct(); turbulence->correct();
runTime.write(); runTime.write();

View File

@ -1,7 +1,7 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/incompressible/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)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude -I$(LIB_SRC)/sampling/lnInclude
@ -9,7 +9,7 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lmomentumTransportModels \ -lmomentumTransportModels \
-lincompressibleMomentumTransportModels \ -lincompressibleMomentumTransportModels \
-ltransportModels \ -lphysicalProperties \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools \
-lfvModels \ -lfvModels \

View File

@ -2,7 +2,7 @@ EXE_INC = \
-I.. \ -I.. \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/incompressible/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)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude -I$(LIB_SRC)/sampling/lnInclude
@ -11,7 +11,7 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lmomentumTransportModels \ -lmomentumTransportModels \
-lincompressibleMomentumTransportModels \ -lincompressibleMomentumTransportModels \
-ltransportModels \ -lphysicalProperties \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools \
-lfvModels \ -lfvModels \

View File

@ -31,8 +31,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "singlePhaseTransportModel.H" #include "viscosityModel.H"
#include "kinematicMomentumTransportModel.H" #include "incompressibleMomentumTransportModels.H"
#include "SRFModel.H" #include "SRFModel.H"
#include "simpleControl.H" #include "simpleControl.H"
#include "pressureReference.H" #include "pressureReference.H"
@ -72,7 +72,7 @@ int main(int argc, char *argv[])
U = Urel + SRF->U(); U = Urel + SRF->U();
laminarTransport.correct(); viscosity->correct();
turbulence->correct(); turbulence->correct();
runTime.write(); runTime.write();

View File

@ -61,11 +61,12 @@ volVectorField U
Urel + SRF->U() Urel + SRF->U()
); );
singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
autoPtr<incompressible::momentumTransportModel> turbulence autoPtr<incompressible::momentumTransportModel> turbulence
( (
incompressible::momentumTransportModel::New(U, phi, laminarTransport) incompressible::momentumTransportModel::New(U, phi, viscosity)
); );
#include "createFvModels.H" #include "createFvModels.H"

View File

@ -28,17 +28,15 @@ volVectorField U
#include "createPhi.H" #include "createPhi.H"
pressureReference pressureReference(p, simple.dict()); pressureReference pressureReference(p, simple.dict());
mesh.setFluxRequired(p.name()); mesh.setFluxRequired(p.name());
autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<incompressible::momentumTransportModel> turbulence autoPtr<incompressible::momentumTransportModel> turbulence
( (
incompressible::momentumTransportModel::New(U, phi, laminarTransport) incompressible::momentumTransportModel::New(U, phi, viscosity)
); );
#include "createMRF.H" #include "createMRF.H"

View File

@ -2,7 +2,7 @@ EXE_INC = \
-I.. \ -I.. \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/incompressible/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)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude -I$(LIB_SRC)/sampling/lnInclude
@ -11,7 +11,7 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lmomentumTransportModels \ -lmomentumTransportModels \
-lincompressibleMomentumTransportModels \ -lincompressibleMomentumTransportModels \
-ltransportModels \ -lphysicalProperties \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools \
-lfvModels \ -lfvModels \

View File

@ -32,8 +32,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "singlePhaseTransportModel.H" #include "viscosityModel.H"
#include "kinematicMomentumTransportModel.H" #include "incompressibleMomentumTransportModels.H"
#include "simpleControl.H" #include "simpleControl.H"
#include "pressureReference.H" #include "pressureReference.H"
#include "IOporosityModelList.H" #include "IOporosityModelList.H"
@ -73,7 +73,7 @@ int main(int argc, char *argv[])
#include "pEqn.H" #include "pEqn.H"
} }
laminarTransport.correct(); viscosity->correct();
turbulence->correct(); turbulence->correct();
runTime.write(); runTime.write();

View File

@ -31,8 +31,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "fvCFD.H" #include "fvCFD.H"
#include "singlePhaseTransportModel.H" #include "viscosityModel.H"
#include "kinematicMomentumTransportModel.H" #include "incompressibleMomentumTransportModels.H"
#include "simpleControl.H" #include "simpleControl.H"
#include "pressureReference.H" #include "pressureReference.H"
#include "fvModels.H" #include "fvModels.H"
@ -69,7 +69,7 @@ int main(int argc, char *argv[])
#include "pEqn.H" #include "pEqn.H"
} }
laminarTransport.correct(); viscosity->correct();
turbulence->correct(); turbulence->correct();
runTime.write(); runTime.write();

View File

@ -1,7 +1,7 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/parcel/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/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
@ -18,7 +18,7 @@ EXE_LIBS = \
-llagrangian \ -llagrangian \
-llagrangianParcel \ -llagrangianParcel \
-llagrangianParcelTurbulence \ -llagrangianParcelTurbulence \
-ltransportModels \ -lphysicalProperties \
-lmomentumTransportModels \ -lmomentumTransportModels \
-lincompressibleMomentumTransportModels \ -lincompressibleMomentumTransportModels \
-lphaseIncompressibleMomentumTransportModels \ -lphaseIncompressibleMomentumTransportModels \

View File

@ -6,7 +6,7 @@ word continuousPhaseName
( (
IOobject IOobject
( (
"transportProperties", "physicalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ IOobject::MUST_READ
@ -65,13 +65,13 @@ mesh.setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl; Info<< "Creating turbulence model\n" << endl;
singlePhaseTransportModel continuousPhaseTransport(Uc, phic); autoPtr<viscosityModel> continuousPhaseViscosity(viscosityModel::New(mesh));
dimensionedScalar rhocValue dimensionedScalar rhocValue
( (
IOobject::groupName("rho", continuousPhaseName), IOobject::groupName("rho", continuousPhaseName),
dimDensity, dimDensity,
continuousPhaseTransport.lookup continuousPhaseViscosity->lookup
( (
IOobject::groupName("rho", continuousPhaseName) IOobject::groupName("rho", continuousPhaseName)
) )
@ -101,7 +101,7 @@ volScalarField muc
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
rhoc*continuousPhaseTransport.nu() rhoc*continuousPhaseViscosity->nu()
); );
Info << "Creating field alphac\n" << endl; Info << "Creating field alphac\n" << endl;
@ -154,7 +154,7 @@ autoPtr<phaseIncompressible::momentumTransportModel> continuousPhaseTurbulence
Uc, Uc,
alphaPhic, alphaPhic,
phic, phic,
continuousPhaseTransport continuousPhaseViscosity
) )
); );

View File

@ -77,8 +77,8 @@ namespace Foam
#include "fvCFD.H" #include "fvCFD.H"
#include "dynamicFvMesh.H" #include "dynamicFvMesh.H"
#include "singlePhaseTransportModel.H" #include "viscosityModel.H"
#include "phaseKinematicMomentumTransportModel.H" #include "phaseIncompressibleMomentumTransportModel.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "pressureReference.H" #include "pressureReference.H"
#include "CorrectPhi.H" #include "CorrectPhi.H"
@ -130,8 +130,8 @@ int main(int argc, char *argv[])
} }
} }
continuousPhaseTransport.correct(); continuousPhaseViscosity->correct();
muc = rhoc*continuousPhaseTransport.nu(); muc = rhoc*continuousPhaseViscosity->nu();
clouds.evolve(); clouds.evolve();

View File

@ -3,7 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/lagrangian/parcel/lnInclude \ -I$(LIB_SRC)/lagrangian/parcel/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/incompressible/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)/finiteVolume/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
@ -16,7 +16,7 @@ EXE_LIBS = \
-llagrangianParcelTurbulence \ -llagrangianParcelTurbulence \
-lmomentumTransportModels \ -lmomentumTransportModels \
-lincompressibleMomentumTransportModels \ -lincompressibleMomentumTransportModels \
-ltransportModels \ -lphysicalProperties \
-lfiniteVolume \ -lfiniteVolume \
-lregionModels \ -lregionModels \
-lsurfaceFilmModels \ -lsurfaceFilmModels \

View File

@ -16,14 +16,10 @@ volVectorField U
#include "createPhi.H" #include "createPhi.H"
singlePhaseTransportModel laminarTransport(U, phi);
dimensionedScalar rhoInfValue autoPtr<viscosityModel> viscosity(viscosityModel::New(mesh));
(
"rhoInf", dimensionedScalar rhoInfValue("rhoInf", dimDensity, viscosity);
dimDensity,
laminarTransport
);
volScalarField rhoInf volScalarField rhoInf
( (
@ -41,7 +37,7 @@ volScalarField rhoInf
autoPtr<incompressible::momentumTransportModel> turbulence autoPtr<incompressible::momentumTransportModel> turbulence
( (
incompressible::momentumTransportModel::New(U, phi, laminarTransport) incompressible::momentumTransportModel::New(U, phi, viscosity)
); );
volScalarField mu volScalarField mu
@ -54,7 +50,7 @@ volScalarField mu
IOobject::NO_READ, IOobject::NO_READ,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
laminarTransport.nu()*rhoInfValue viscosity->nu()*rhoInfValue
); );
Info<< "Constructing clouds" << endl; Info<< "Constructing clouds" << endl;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,8 +34,8 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "dynamicFvMesh.H" #include "dynamicFvMesh.H"
#include "singlePhaseTransportModel.H" #include "viscosityModel.H"
#include "kinematicMomentumTransportModel.H" #include "incompressibleMomentumTransportModels.H"
#include "parcelCloudList.H" #include "parcelCloudList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -68,8 +68,8 @@ int main(int argc, char *argv[])
U.correctBoundaryConditions(); U.correctBoundaryConditions();
} }
laminarTransport.correct(); viscosity->correct();
mu = laminarTransport.nu()*rhoInfValue; mu = viscosity->nu()*rhoInfValue;
clouds.evolve(); clouds.evolve();

View File

@ -1,7 +1,7 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/parcel/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/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \

View File

@ -34,7 +34,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "dynamicFvMesh.H" #include "dynamicFvMesh.H"
#include "fluidThermo.H" #include "fluidThermo.H"
#include "dynamicMomentumTransportModel.H" #include "compressibleMomentumTransportModels.H"
#include "parcelCloudList.H" #include "parcelCloudList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,5 +1,5 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/transportModels/lnInclude \ -I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/twoPhaseModels/incompressibleTwoPhaseMixture/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/incompressibleTwoPhaseMixture/lnInclude \
-I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \

View File

@ -37,7 +37,7 @@ Description
#include "dynamicFvMesh.H" #include "dynamicFvMesh.H"
#include "barotropicCompressibilityModel.H" #include "barotropicCompressibilityModel.H"
#include "incompressibleTwoPhaseMixture.H" #include "incompressibleTwoPhaseMixture.H"
#include "kinematicMomentumTransportModel.H" #include "incompressibleMomentumTransportModels.H"
#include "CorrectPhi.H" #include "CorrectPhi.H"
#include "pimpleControl.H" #include "pimpleControl.H"

View File

@ -59,7 +59,7 @@ surfaceScalarField rhoPhi
fvc::interpolate(rho)*phi fvc::interpolate(rho)*phi
); );
Info<< "Reading transportProperties\n" << endl; Info<< "Reading phaseProperties\n" << endl;
incompressibleTwoPhaseMixture mixture(U, phi); incompressibleTwoPhaseMixture mixture(U, phi);

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd ${0%/*} || exit 1 # Run from this directory
wclean libso twoPhaseMixtureThermo wclean libso compressibleTwoPhaseMixture
wclean libso surfaceTensionModels wclean libso surfaceTensionModels
wclean libso twoPhaseChange wclean libso twoPhaseChange
wclean libso compressibleInterPhaseTransportModel wclean libso compressibleInterPhaseTransportModel

View File

@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation # Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
wmake $targetType twoPhaseMixtureThermo wmake $targetType compressibleTwoPhaseMixture
wmake $targetType surfaceTensionModels wmake $targetType surfaceTensionModels
wmake $targetType twoPhaseChange wmake $targetType twoPhaseChange
wmake $targetType compressibleInterPhaseTransportModel wmake $targetType compressibleInterPhaseTransportModel

View File

@ -1,9 +1,9 @@
EXE_INC = \ EXE_INC = \
-I. \ -I. \
-ItwoPhaseMixtureThermo \ -IcompressibleTwoPhaseMixture \
-IcompressibleInterPhaseTransportModel/lnInclude \ -IcompressibleInterPhaseTransportModel/lnInclude \
-ItwoPhaseChange/lnInclude \ -ItwoPhaseChange/lnInclude \
-I$(LIB_SRC)/transportModels/lnInclude \ -I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
@ -17,10 +17,11 @@ EXE_INC = \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/fvModels/lnInclude -I$(LIB_SRC)/fvModels/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-ltwoPhaseMixtureThermo \ -lcompressibleTwoPhaseMixture \
-ltwoPhaseSurfaceTension \ -ltwoPhaseSurfaceTension \
-lfluidThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I../twoPhaseMixtureThermo \ -I../compressibleTwoPhaseMixture \
-I$(LIB_SRC)/transportModels/lnInclude \ -I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
@ -10,13 +10,13 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-ltwoPhaseMixtureThermo \ -lcompressibleTwoPhaseMixture \
-lfluidThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-ltwoPhaseMixture \ -ltwoPhaseMixture \
-ltwoPhaseProperties \ -ltwoPhaseProperties \
-linterfaceProperties \ -linterfaceProperties \
-ltransportModels \ -lphysicalProperties \
-llagrangian \ -llagrangian \
-llagrangianParcel \ -llagrangianParcel \
-llagrangianParcelTurbulence \ -llagrangianParcelTurbulence \

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "VoFClouds.H" #include "VoFClouds.H"
#include "twoPhaseMixtureThermo.H" #include "compressibleTwoPhaseMixture.H"
#include "fvmSup.H" #include "fvmSup.H"
#include "uniformDimensionedFields.H" #include "uniformDimensionedFields.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
@ -64,14 +64,14 @@ Foam::fv::VoFClouds::VoFClouds
( (
mesh.lookupObject<fluidThermo> mesh.lookupObject<fluidThermo>
( (
IOobject::groupName(basicThermo::dictName, phaseName_) IOobject::groupName(physicalProperties::typeName, phaseName_)
) )
), ),
carrierThermo_ carrierThermo_
( (
mesh.lookupObject<fluidThermo> mesh.lookupObject<fluidThermo>
( (
IOobject::groupName(basicThermo::dictName, carrierPhaseName_) IOobject::groupName(physicalProperties::typeName, carrierPhaseName_)
) )
), ),
clouds_ clouds_

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "VoFSolidificationMeltingSource.H" #include "VoFSolidificationMeltingSource.H"
#include "twoPhaseMixtureThermo.H" #include "compressibleTwoPhaseMixture.H"
#include "fvcDdt.H" #include "fvcDdt.H"
#include "zeroGradientFvPatchFields.H" #include "zeroGradientFvPatchFields.H"
#include "addToRunTimeSelectionTable.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 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, mesh,
dimensionedScalar(dimless, 0), dimensionedScalar(dimless, 0),
zeroGradientFvPatchScalarField::typeName zeroGradientFvPatchScalarField::typeName
), )
curTimeIndex_(-1)
{ {
readCoeffs(); readCoeffs();
} }
@ -179,13 +131,11 @@ void Foam::fv::VoFSolidificationMeltingSource::addSup
Info<< type() << ": applying source to " << eqn.psi().name() << endl; Info<< type() << ": applying source to " << eqn.psi().name() << endl;
} }
update(); const compressibleTwoPhaseMixture& thermo
const twoPhaseMixtureThermo& 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; Info<< type() << ": applying source to " << eqn.psi().name() << endl;
} }
update();
scalarField& Sp = eqn.diag(); scalarField& Sp = eqn.diag();
const scalarField& V = mesh().V(); 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) bool Foam::fv::VoFSolidificationMeltingSource::read(const dictionary& dict)
{ {
if (fvModel::read(dict)) if (fvModel::read(dict))

View File

@ -122,9 +122,6 @@ class VoFSolidificationMeltingSource
//- Solid phase fraction //- Solid phase fraction
mutable volScalarField alphaSolid_; mutable volScalarField alphaSolid_;
//- Current time index (used for updating)
mutable label curTimeIndex_;
// Private Member Functions // Private Member Functions
@ -134,9 +131,6 @@ class VoFSolidificationMeltingSource
//- Return the name of the solid phase fraction //- Return the name of the solid phase fraction
word alphaSolidName() const; word alphaSolidName() const;
//- Update the model
void update() const;
//- Helper function to apply to the energy equation //- Helper function to apply to the energy equation
template<class RhoFieldType> template<class RhoFieldType>
void apply(const RhoFieldType& rho, fvMatrix<scalar>& eqn) const; void apply(const RhoFieldType& rho, fvMatrix<scalar>& eqn) const;
@ -200,6 +194,10 @@ public:
virtual void updateMesh(const mapPolyMesh&); virtual void updateMesh(const mapPolyMesh&);
//- Correct the model
virtual void correct();
// IO // IO
//- Read source dictionary //- Read source dictionary

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I../twoPhaseMixtureThermo \ -I../compressibleTwoPhaseMixture \
-I$(LIB_SRC)/transportModels/lnInclude \ -I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
@ -10,13 +10,13 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-ltwoPhaseMixtureThermo \ -lcompressibleTwoPhaseMixture \
-lfluidThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-ltwoPhaseMixture \ -ltwoPhaseMixture \
-ltwoPhaseProperties \ -ltwoPhaseProperties \
-linterfaceProperties \ -linterfaceProperties \
-ltransportModels \ -lphysicalProperties \
-lsurfaceFilmModels \ -lsurfaceFilmModels \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools -lmeshTools

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "VoFPatchTransfer.H" #include "VoFPatchTransfer.H"
#include "twoPhaseMixtureThermo.H" #include "compressibleTwoPhaseMixture.H"
#include "thermoSingleLayer.H" #include "thermoSingleLayer.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
@ -155,11 +155,11 @@ void VoFPatchTransfer::correct
const polyBoundaryMesh& pbm = film.regionMesh().boundaryMesh(); const polyBoundaryMesh& pbm = film.regionMesh().boundaryMesh();
const twoPhaseMixtureThermo& thermo const compressibleTwoPhaseMixture& thermo
( (
film.primaryMesh().lookupObject<twoPhaseMixtureThermo> film.primaryMesh().lookupObject<compressibleTwoPhaseMixture>
( (
twoPhaseMixtureThermo::dictName "phaseProperties"
) )
); );

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "VoFSurfaceFilm.H" #include "VoFSurfaceFilm.H"
#include "twoPhaseMixtureThermo.H" #include "compressibleTwoPhaseMixture.H"
#include "fvmSup.H" #include "fvmSup.H"
#include "uniformDimensionedFields.H" #include "uniformDimensionedFields.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
@ -63,7 +63,7 @@ Foam::fv::VoFSurfaceFilm::VoFSurfaceFilm
( (
mesh.lookupObject<fluidThermo> mesh.lookupObject<fluidThermo>
( (
IOobject::groupName(basicThermo::dictName, phaseName_) IOobject::groupName(physicalProperties::typeName, phaseName_)
) )
), ),
film_ film_

View File

@ -1,6 +1,6 @@
fvModels.source(alpha1, mixture.thermo1().rho()); fvModels.source(alpha1, mixture.thermo1().rho());
tmp<surfaceScalarField> talphaPhi1(alphaPhi10); tmp<surfaceScalarField> talphaPhi1(alphaPhi1);
if (nAlphaSubCycles > 1) if (nAlphaSubCycles > 1)
{ {
@ -15,7 +15,7 @@ if (nAlphaSubCycles > 1)
mesh mesh
), ),
mesh, mesh,
dimensionedScalar(alphaPhi10.dimensions(), 0) dimensionedScalar(alphaPhi1.dimensions(), 0)
); );
surfaceScalarField rhoPhiSum surfaceScalarField rhoPhiSum
@ -45,7 +45,7 @@ if (nAlphaSubCycles > 1)
) )
{ {
#include "alphaEqn.H" #include "alphaEqn.H"
talphaPhi1.ref() += (runTime.deltaT()/totalDeltaT)*alphaPhi10; talphaPhi1.ref() += (runTime.deltaT()/totalDeltaT)*alphaPhi1;
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi; rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
} }

View File

@ -1,6 +1,6 @@
EXE_INC = \ EXE_INC = \
-I../twoPhaseMixtureThermo \ -I../compressibleTwoPhaseMixture \
-I$(LIB_SRC)/transportModels/lnInclude \ -I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/twoPhaseModels/interfaceProperties/lnInclude \
@ -11,7 +11,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-ltwoPhaseMixtureThermo \ -lcompressibleTwoPhaseMixture \
-lfluidThermophysicalModels \ -lfluidThermophysicalModels \
-lspecie \ -lspecie \
-ltwoPhaseMixture \ -ltwoPhaseMixture \
@ -20,6 +20,6 @@ LIB_LIBS = \
-lmomentumTransportModels \ -lmomentumTransportModels \
-lcompressibleMomentumTransportModels \ -lcompressibleMomentumTransportModels \
-lphaseCompressibleMomentumTransportModels \ -lphaseCompressibleMomentumTransportModels \
-ltransportModels \ -lphysicalProperties \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools -lmeshTools

View File

@ -33,14 +33,14 @@ Foam::compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const surfaceScalarField& rhoPhi, const surfaceScalarField& rhoPhi,
const surfaceScalarField& alphaPhi10, const surfaceScalarField& alphaPhi1,
const twoPhaseMixtureThermo& mixture const compressibleTwoPhaseMixture& mixture
) )
: :
twoPhaseTransport_(false), twoPhaseTransport_(false),
mixture_(mixture), mixture_(mixture),
phi_(phi), phi_(phi),
alphaPhi10_(alphaPhi10) alphaPhi1_(alphaPhi1)
{ {
{ {
IOdictionary momentumTransport IOdictionary momentumTransport
@ -79,7 +79,7 @@ Foam::compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel
new surfaceScalarField new surfaceScalarField
( (
IOobject::groupName("alphaRhoPhi", alpha1.group()), IOobject::groupName("alphaRhoPhi", alpha1.group()),
fvc::interpolate(rho1)*alphaPhi10_ fvc::interpolate(rho1)*alphaPhi1_
) )
); );
@ -88,7 +88,7 @@ Foam::compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel
new surfaceScalarField new surfaceScalarField
( (
IOobject::groupName("alphaRhoPhi", alpha2.group()), IOobject::groupName("alphaRhoPhi", alpha2.group()),
fvc::interpolate(rho2)*(phi_ - alphaPhi10_) fvc::interpolate(rho2)*(phi_ - alphaPhi1_)
) )
); );
@ -162,16 +162,20 @@ Foam::compressibleInterPhaseTransportModel::alphaEff() const
return return
mixture_.alpha1()*mixture_.thermo1().alphaEff mixture_.alpha1()*mixture_.thermo1().alphaEff
( (
turbulence1_->mut() mixture_.thermo1().rho()*turbulence1_->nut()
) )
+ mixture_.alpha2()*mixture_.thermo2().alphaEff + mixture_.alpha2()*mixture_.thermo2().alphaEff
( (
turbulence2_->mut() mixture_.thermo2().rho()*turbulence2_->nut()
); );
} }
else 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& rho1 = mixture_.thermo1().rho();
const volScalarField& rho2 = mixture_.thermo2().rho(); const volScalarField& rho2 = mixture_.thermo2().rho();
alphaRhoPhi1_.ref() = fvc::interpolate(rho1)*alphaPhi10_; alphaRhoPhi1_.ref() = fvc::interpolate(rho1)*alphaPhi1_;
alphaRhoPhi2_.ref() = fvc::interpolate(rho2)*(phi_ - alphaPhi10_); alphaRhoPhi2_.ref() = fvc::interpolate(rho2)*(phi_ - alphaPhi1_);
} }
} }

Some files were not shown because too many files have changed in this diff Show More