thermophysicalTransportModel: New abstract base-class for all thermophysical transport

the new fluidThermophysicalTransportModel and solidThermophysicalTransportModel
are derived from thermophysicalTransportModel providing a consistent and unified
interface for heat transport within and between regions.  Coupled and external
heat-transfer boundary conditions can now be written independent of the
thermophysical properties or transport modelling of the regions providing
greater flexibility, simpler code and reduces the maintenance overhead.
This commit is contained in:
Henry Weller
2022-10-23 04:13:52 +01:00
parent 3521ab03a2
commit 5af5413542
81 changed files with 421 additions and 867 deletions

View File

@ -74,8 +74,7 @@ Foam::fv::compressible::VoFTurbulenceDamping::VoFTurbulenceDamping
interface_(mixture_),
turbulence_
(
mesh.lookupObject<compressibleMomentumTransportModel>
(IOobject::groupName(momentumTransportModel::typeName, phaseName_))
mesh.lookupType<compressibleMomentumTransportModel>(phaseName_)
),
C2_("C2", dimless, 0),
betaStar_("betaStar", dimless, 0),

View File

@ -2,6 +2,7 @@ EXE_INC = \
-I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/thermophysicalTransportModel/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/solid/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
@ -10,6 +11,7 @@ EXE_INC = \
LIB_LIBS = \
-lsolidThermo \
-lsolidThermophysicalTransportModels \
-lcoupledThermophysicalTransportModels \
-lspecie \
-lfiniteVolume \
-lmeshTools \

View File

@ -71,8 +71,7 @@ Foam::fv::VoFTurbulenceDamping::VoFTurbulenceDamping
interface_(mixture_),
turbulence_
(
mesh.lookupObject<incompressibleMomentumTransportModel>
(IOobject::groupName(momentumTransportModel::typeName, phaseName_))
mesh.lookupType<incompressibleMomentumTransportModel>(phaseName_)
),
C2_("C2", dimless, 0),
betaStar_("betaStar", dimless, 0),

View File

@ -192,14 +192,7 @@ Foam::fv::interfaceTurbulenceDamping::interfaceTurbulenceDamping
),
turbulence_
(
mesh.lookupObject<phaseCompressible::momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
phaseName_
)
)
mesh.lookupType<phaseCompressible::momentumTransportModel>(phaseName_)
),
C2_("C2", dimless, 0),
betaStar_("betaStar", dimless, 0),

View File

@ -93,13 +93,9 @@ void Foam::fv::phaseTurbulenceStabilisation::addSup
if (movingPhases[phasei] != phase_)
{
const phaseCompressible::momentumTransportModel& turbulence =
mesh.lookupObject<phaseCompressible::momentumTransportModel>
mesh.lookupType<phaseCompressible::momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
phaseName_
)
phaseName_
);
if (notNull(turbulence))
@ -149,13 +145,9 @@ Foam::fv::phaseTurbulenceStabilisation::phaseTurbulenceStabilisation
),
turbulence_
(
mesh.lookupObject<phaseCompressible::momentumTransportModel>
mesh.lookupType<phaseCompressible::momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
phaseName_
)
phaseName_
)
)
{

View File

@ -170,9 +170,9 @@ alphatPhaseJayatillekeWallFunctionFvPatchScalarField::calcAlphat
// Retrieve turbulence properties from model
const phaseCompressible::momentumTransportModel& turbModel =
db().lookupObject<phaseCompressible::momentumTransportModel>
db().lookupType<phaseCompressible::momentumTransportModel>
(
IOobject::groupName(momentumTransportModel::typeName, phase.name())
phase.name()
);
const nutWallFunctionFvPatchScalarField& nutw =

View File

@ -337,22 +337,14 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
{
// Retrieve turbulence properties from models
const phaseCompressible::momentumTransportModel& turbModel
= db().lookupObject<phaseCompressible::momentumTransportModel>
= db().lookupType<phaseCompressible::momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
liquid.name()
)
liquid.name()
);
const phaseCompressible::momentumTransportModel& vaporTurbModel
= db().lookupObject<phaseCompressible::momentumTransportModel>
= db().lookupType<phaseCompressible::momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
vapor.name()
)
vapor.name()
);
const nutWallFunctionFvPatchScalarField& nutw =

View File

@ -1121,13 +1121,9 @@ const Foam::phaseCompressible::momentumTransportModel&
Foam::diameterModels::populationBalanceModel::continuousTurbulence() const
{
return
mesh_.lookupObject<phaseCompressible::momentumTransportModel>
mesh_.lookupType<phaseCompressible::momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
continuousPhase_.name()
)
continuousPhase_.name()
);
}

View File

@ -6,6 +6,7 @@ EXE_INC = \
-I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/thermophysicalTransportModel/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/solid/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude

View File

@ -5,6 +5,7 @@ EXE_INC = \
-ItractionDisplacementCorrection \
-I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/thermophysicalTransportModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/solid/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -26,14 +26,6 @@ License
#include "compressibleMomentumTransportModel.H"
#include "surfaceInterpolate.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// namespace Foam
// {
// defineTypeNameAndDebug(compressibleMomentumTransportModel, 0);
// }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::compressibleMomentumTransportModel::compressibleMomentumTransportModel

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,10 +67,6 @@ protected:
public:
//- Runtime type information
// TypeName("compressibleMomentumTransportModel");
// Declare run-time constructor selection table
declareRunTimeNewSelectionTable

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -26,14 +26,6 @@ License
#include "incompressibleMomentumTransportModel.H"
#include "fvMatrix.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
// namespace Foam
// {
// defineTypeNameAndDebug(incompressibleMomentumTransportModel, 0);
// }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::incompressibleMomentumTransportModel::incompressibleMomentumTransportModel

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,10 +67,6 @@ protected:
public:
//- Runtime type information
// TypeName("incompressibleMomentumTransportModel");
// Declare run-time constructor selection table
declareRunTimeNewSelectionTable

View File

@ -114,15 +114,9 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs()
}
// Lookup Cmu corresponding to the turbulence model selected
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const scalar Cmu =
turbModel.coeffDict().lookupOrDefault<scalar>("Cmu", 0.09);

View File

@ -114,15 +114,9 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs()
}
// Lookup Cmu corresponding to the turbulence model selected
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const scalar Cmu =
turbModel.coeffDict().lookupOrDefault<scalar>("Cmu", 0.09);

View File

@ -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-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -91,14 +91,7 @@ void Foam::fixedShearStressFvPatchVectorField::updateCoeffs()
}
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
scalarField nuEff(turbModel.nuEff(patch().index()));

View File

@ -131,14 +131,7 @@ void Foam::porousBafflePressureFvPatchField::updateCoeffs()
const scalarField magUn(mag(Un));
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
jump_ =
-sign(Un)

View File

@ -352,14 +352,7 @@ void Foam::epsilonWallFunctionFvPatchScalarField::updateCoeffs()
}
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
setMaster();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -93,14 +93,8 @@ void fWallFunctionFvPatchScalarField::updateCoeffs()
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const v2fBase& v2fModel = refCast<const v2fBase>(turbModel);
const nutWallFunctionFvPatchScalarField& nutw =

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -94,14 +94,7 @@ void kLowReWallFunctionFvPatchScalarField::updateCoeffs()
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const nutWallFunctionFvPatchScalarField& nutw =
nutWallFunctionFvPatchScalarField::nutw(turbModel, patchi);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -92,15 +92,10 @@ nutLowReWallFunctionFvPatchScalarField::nutLowReWallFunctionFvPatchScalarField
tmp<scalarField> nutLowReWallFunctionFvPatchScalarField::yPlus() const
{
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const scalarField& y = turbModel.y()[patchi];
const tmp<scalarField> tnuw = turbModel.nu(patchi);
const scalarField& nuw = tnuw();

View File

@ -41,14 +41,8 @@ tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::nut() const
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const scalarField& y = turbModel.y()[patchi];
const tmp<scalarField> tnuw = turbModel.nu(patchi);
const scalarField& nuw = tnuw();
@ -88,14 +82,8 @@ tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::yPlus
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const scalarField& y = turbModel.y()[patchi];
const tmp<scalarField> tnuw = turbModel.nu(patchi);
const scalarField& nuw = tnuw();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,14 +41,8 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::nut() const
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi];
const scalarField magGradU(mag(Uw.snGrad()));
const tmp<scalarField> tnuw = turbModel.nu(patchi);
@ -70,14 +64,8 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcUTau
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const scalarField& y = turbModel.y()[patchi];
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi];
@ -185,14 +173,8 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::yPlus() const
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const scalarField& y = turbModel.y()[patchi];
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi];
const tmp<scalarField> tnuw = turbModel.nu(patchi);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,14 +41,8 @@ tmp<scalarField> nutUWallFunctionFvPatchScalarField::nut() const
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const tmp<scalarField> tnuw = turbModel.nu(patchi);
const scalarField& nuw = tnuw();
@ -81,14 +75,8 @@ tmp<scalarField> nutUWallFunctionFvPatchScalarField::yPlus
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const scalarField& y = turbModel.y()[patchi];
const tmp<scalarField> tnuw = turbModel.nu(patchi);
const scalarField& nuw = tnuw();
@ -175,15 +163,11 @@ nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField
tmp<scalarField> nutUWallFunctionFvPatchScalarField::yPlus() const
{
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi];
const scalarField magUp(mag(Uw.patchInternalField() - Uw));

View File

@ -71,14 +71,7 @@ tmp<scalarField> nutkRoughWallFunctionFvPatchScalarField::nut() const
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const scalarField& y = turbModel.y()[patchi];

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -42,14 +42,7 @@ tmp<scalarField> nutkWallFunctionFvPatchScalarField::nut() const
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const scalarField& y = turbModel.y()[patchi];
const tmp<volScalarField> tk = turbModel.k();
@ -130,14 +123,7 @@ tmp<scalarField> nutkWallFunctionFvPatchScalarField::yPlus() const
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const scalarField& y = turbModel.y()[patchi];

View File

@ -395,14 +395,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
}
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
setMaster();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -91,15 +91,9 @@ void v2WallFunctionFvPatchScalarField::updateCoeffs()
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const nutWallFunctionFvPatchScalarField& nutw =
nutWallFunctionFvPatchScalarField::nutw(turbModel, patchi);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -108,14 +108,7 @@ continuousGasKEqn<BasicMomentumTransportModel>::liquidTurbulence() const
const phaseModel& liquid = fluid.otherPhase(gas);
liquidTurbulencePtr_ =
&U.db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
liquid.name()
)
);
&U.db().lookupType<momentumTransportModel>(liquid.name());
}
return *liquidTurbulencePtr_;

View File

@ -162,14 +162,7 @@ continuousGasKEpsilon<BasicMomentumTransportModel>::liquidTurbulence() const
const phaseModel& liquid = fluid.otherPhase(gas);
liquidTurbulencePtr_ =
&U.db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
liquid.name()
)
);
&U.db().lookupType<momentumTransportModel>(liquid.name());
}
return *liquidTurbulencePtr_;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -26,15 +26,6 @@ License
#include "phaseCompressibleMomentumTransportModel.H"
#include "surfaceInterpolate.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(phaseCompressibleMomentumTransportModel, 0);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::phaseCompressibleMomentumTransportModel::

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,10 +67,6 @@ protected:
public:
//- Runtime type information
TypeName("phaseCompressibleMomentumTransportModel");
// Declare run-time constructor selection table
declareRunTimeNewSelectionTable

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -26,14 +26,6 @@ License
#include "phaseIncompressibleMomentumTransportModel.H"
#include "fvMatrix.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(phaseIncompressibleMomentumTransportModel, 0);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::phaseIncompressibleMomentumTransportModel::

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,10 +67,6 @@ protected:
public:
//- Runtime type information
TypeName("phaseIncompressibleMomentumTransportModel");
// Declare run-time constructor selection table
declareRunTimeNewSelectionTable

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -197,14 +197,24 @@ public:
template<class Type>
HashTable<Type*> lookupClass(const bool strict = false);
//- Is the named Type found?
//- Is the named Type in registry
template<class Type>
bool foundObject(const word& name) const;
//- Lookup and return the object of the given Type
//- Lookup and return the object of the given Type and name
template<class Type>
const Type& lookupObject(const word& name) const;
//- Is the Type in registry
// the name is derived from the type name and given group
template<class Type>
bool foundType(const word& group = word::null) const;
//- Lookup and return the object of the given Type
// the name is derived from the type name and given group
template<class Type>
const Type& lookupType(const word& group = word::null) const;
//- Lookup and return the object reference of the given Type
template<class Type>
Type& lookupObjectRef(const word& name) const;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -216,6 +216,20 @@ const Type& Foam::objectRegistry::lookupObject(const word& name) const
}
template<class Type>
bool Foam::objectRegistry::foundType(const word& group) const
{
return foundObject<Type>(IOobject::groupName(Type::typeName, group));
}
template<class Type>
const Type& Foam::objectRegistry::lookupType(const word& group) const
{
return lookupObject<Type>(IOobject::groupName(Type::typeName, group));
}
template<class Type>
Type& Foam::objectRegistry::lookupObjectRef(const word& name) const
{

View File

@ -1,5 +1,4 @@
externalTemperature/externalTemperatureFvPatchScalarField.C
patchKappa/patchKappa.C
coupledTemperature/coupledTemperatureFvPatchScalarField.C
LIB = $(FOAM_LIBBIN)/libcoupledThermophysicalTransportModels

View File

@ -1,21 +1,9 @@
EXE_INC = \
-I$(LIB_SRC)/ThermophysicalTransportModels/thermophysicalTransportModel/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/fluid/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/solid/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
LIB_LIBS = \
-lthermophysicalTransportModel \
-lfluidThermophysicalModels \
-lsolidThermo \
-lfluidThermoThermophysicalTransportModels \
-lmomentumTransportModels \
-lsolidThermophysicalTransportModels \
-lfiniteVolume \
-lmeshTools

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "coupledTemperatureFvPatchScalarField.H"
#include "patchKappa.H"
#include "thermophysicalTransportModel.H"
#include "volFields.H"
#include "fvPatchFieldMapper.H"
#include "mappedPatchBase.H"
@ -222,15 +222,23 @@ void Foam::coupledTemperatureFvPatchScalarField::updateCoeffs()
: mpp.distribute(coupledTemperatureNbr)
);
const scalarField kappa(patchKappa(patch()).kappa());
const scalarField kappa
(
patch().boundaryMesh().mesh()
.lookupType<thermophysicalTransportModel>().kappaEff(patch().index())
);
const scalarField KDelta(kappa*patch().deltaCoeffs());
const scalarField KDeltaNbr
(
contactRes_ == 0
? mpp.distribute(patchKappa(patchNbr).kappa()
*patchNbr.deltaCoeffs())
? mpp.distribute
(
patchNbr.boundaryMesh().mesh()
.lookupType<thermophysicalTransportModel>().kappaEff(patchiNbr)
*patchNbr.deltaCoeffs()
)
: tmp<scalarField>(new scalarField(size(), contactRes_))
);

View File

@ -38,9 +38,6 @@ Description
where KDelta is heat-transfer coefficient K*deltaCoeffs
and qs is the optional source heat flux.
The thermal conductivity \c kappa can either be retrieved from various
possible sources, as detailed in the class patchKappa.
Usage
\table
Property | Description | Required | Default value
@ -68,12 +65,13 @@ Usage
Needs to be on underlying mapped(Wall)FvPatch.
The patch thermal conductivity \c kappa is obtained from the region
thermophysicalTransportModel so that this boundary condition can be applied
directly to either fluid or solid regions.
Note that in order to provide an optional heat source either qs or Qs
should be specified, not both.
See also
Foam::patchKappa
SourceFiles
coupledTemperatureFvPatchScalarField.C

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "externalTemperatureFvPatchScalarField.H"
#include "patchKappa.H"
#include "thermophysicalTransportModel.H"
#include "volFields.H"
#include "physicoChemicalConstants.H"
#include "addToRunTimeSelectionTable.H"
@ -307,7 +307,11 @@ void Foam::externalTemperatureFvPatchScalarField::updateCoeffs()
qTot += q_;
}
const scalarField kappa(patchKappa(patch()).kappa());
const scalarField kappa
(
patch().boundaryMesh().mesh()
.lookupType<thermophysicalTransportModel>().kappaEff(patch().index())
);
// Evaluate
if (!haveh_)

View File

@ -46,8 +46,8 @@ Description
resistances can be specified through thicknessLayers and kappaLayers
entries.
The patch thermal conductivity \c kappa is obtained from the
Foam::patchKappa base class so that this boundary condition can be applied
The patch thermal conductivity \c kappa is obtained from the region
thermophysicalTransportModel so that this boundary condition can be applied
directly to either fluid or solid regions.
The ambient temperature Ta is specified as a Foam::Function1 of time but

View File

@ -1,89 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2022 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/>.
\*---------------------------------------------------------------------------*/
#include "patchKappa.H"
#include "thermophysicalTransportModel.H"
#include "solidThermophysicalTransportModel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::patchKappa::patchKappa(const fvPatch& patch)
:
patch_(patch)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::scalarField> Foam::patchKappa::kappa() const
{
const fvMesh& mesh = patch_.boundaryMesh().mesh();
const label patchi = patch_.index();
if
(
mesh.foundObject<thermophysicalTransportModel>
(
thermophysicalTransportModel::typeName
)
)
{
const thermophysicalTransportModel& ttm =
mesh.lookupObject<thermophysicalTransportModel>
(
thermophysicalTransportModel::typeName
);
return ttm.kappaEff(patchi);
}
else if
(
mesh.foundObject<solidThermophysicalTransportModel>
(
solidThermophysicalTransportModel::typeName
)
)
{
const solidThermophysicalTransportModel& sttm =
mesh.lookupObject<solidThermophysicalTransportModel>
(
solidThermophysicalTransportModel::typeName
);
return sttm.kappa(patchi);
}
else
{
FatalErrorInFunction
<< "Cannot find a thermophysicalTransportModel "
"or solidThermophysicalTransportModel instance"
<< exit(FatalError);
return scalarField::null();
}
}
// ************************************************************************* //

View File

@ -1,88 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2022 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/>.
Class
Foam::patchKappa
Description
Provides the patch thermal conductivity \c kappa for the fluid or solid
region an appropriate.
For fluid regions \c kappaEff is obtained from the
Foam::thermophysicalTransportModel and for solid regions
\c kappa is obtained from the Foam::solidThermophysicalTransportModel.
SourceFiles
patchKappa.C
\*---------------------------------------------------------------------------*/
#ifndef patchKappa_H
#define patchKappa_H
#include "fvPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class patchKappa Declaration
\*---------------------------------------------------------------------------*/
class patchKappa
{
// Private data
//- Reference to the region patch
const fvPatch& patch_;
public:
// Constructors
//- Construct from patch
patchKappa
(
const fvPatch& patch
);
// Member Functions
//- Thermal conductivity for patch [W/m/K]
tmp<scalarField> kappa() const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,4 +1,4 @@
#fluidThermophysicalTransportModel/fluidThermophysicalTransportModel.C
fluidThermophysicalTransportModel/fluidThermophysicalTransportModel.C
BCs = derivedFvPatchFields
$(BCs)/thermalBaffle1D/thermalBaffle1DFvPatchScalarFields.C

View File

@ -37,7 +37,7 @@ ThermophysicalTransportModel
const thermoModel& thermo
)
:
thermophysicalTransportModel(momentumTransport),
fluidThermophysicalTransportModel(momentumTransport),
momentumTransport_(momentumTransport),
thermo_(thermo)
{}

View File

@ -35,7 +35,7 @@ SourceFiles
#ifndef ThermophysicalTransportModel_H
#define ThermophysicalTransportModel_H
#include "thermophysicalTransportModel.H"
#include "fluidThermophysicalTransportModel.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -50,7 +50,7 @@ namespace Foam
template<class MomentumTransportModel, class ThermoModel>
class ThermophysicalTransportModel
:
public thermophysicalTransportModel
public fluidThermophysicalTransportModel
{
public:

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "alphatJayatillekeWallFunctionFvPatchScalarField.H"
#include "thermophysicalTransportModel.H"
#include "fluidThermophysicalTransportModel.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -148,14 +148,10 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
const label patchi = patch().index();
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>
const fluidThermophysicalTransportModel& ttm =
db().lookupType<fluidThermophysicalTransportModel>
(
IOobject::groupName
(
thermophysicalTransportModel::typeName,
internalField().group()
)
internalField().group()
);
const compressibleMomentumTransportModel& turbModel =

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "alphatWallFunctionFvPatchScalarField.H"
#include "thermophysicalTransportModel.H"
#include "fluidThermophysicalTransportModel.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -94,14 +94,10 @@ void alphatWallFunctionFvPatchScalarField::updateCoeffs()
const label patchi = patch().index();
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>
const fluidThermophysicalTransportModel& ttm =
db().lookupType<fluidThermophysicalTransportModel>
(
IOobject::groupName
(
thermophysicalTransportModel::typeName,
internalField().group()
)
internalField().group()
);
const compressibleMomentumTransportModel& turbModel =

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "convectiveHeatTransferFvPatchScalarField.H"
#include "thermophysicalTransportModel.H"
#include "fluidThermophysicalTransportModel.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -98,14 +98,10 @@ void convectiveHeatTransferFvPatchScalarField::updateCoeffs()
const label patchi = patch().index();
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>
const fluidThermophysicalTransportModel& ttm =
db().lookupType<fluidThermophysicalTransportModel>
(
IOobject::groupName
(
thermophysicalTransportModel::typeName,
internalField().group()
)
internalField().group()
);
const compressibleMomentumTransportModel& turbModel =

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "externalCoupledTemperatureMixedFvPatchScalarField.H"
#include "thermophysicalTransportModel.H"
#include "fluidThermophysicalTransportModel.H"
#include "OFstream.H"
#include "addToRunTimeSelectionTable.H"
@ -114,42 +114,17 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::transferData
// heat flux [W/m^2]
scalarField qDot(this->patch().size(), 0.0);
static word ttmName
(
IOobject::groupName
const fluidThermophysicalTransportModel& ttm =
db().lookupType<fluidThermophysicalTransportModel>
(
thermophysicalTransportModel::typeName,
internalField().group()
)
);
);
static word thermoName(physicalProperties::typeName);
const basicThermo& thermo = ttm.thermo();
if (db().foundObject<thermophysicalTransportModel>(ttmName))
{
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>(ttmName);
const fvPatchScalarField& hep = thermo.he().boundaryField()[patchi];
const basicThermo& thermo = ttm.thermo();
const fvPatchScalarField& hep = thermo.he().boundaryField()[patchi];
qDot = ttm.alphaEff(patchi)*hep.snGrad();
}
else if (db().foundObject<basicThermo>(thermoName))
{
const basicThermo& thermo = db().lookupObject<basicThermo>(thermoName);
const fvPatchScalarField& hep = thermo.he().boundaryField()[patchi];
qDot = thermo.alphahe(patchi)*hep.snGrad();
}
else
{
FatalErrorInFunction
<< "Condition requires either compressible turbulence and/or "
<< "thermo model to be available" << exit(FatalError);
}
qDot = ttm.alphaEff(patchi)*hep.snGrad();
// patch temperature [K]
const scalarField Tp(*this);

View File

@ -25,7 +25,7 @@ License
#include "totalFlowRateAdvectiveDiffusiveFvPatchScalarField.H"
#include "surfaceFields.H"
#include "thermophysicalTransportModel.H"
#include "fluidThermophysicalTransportModel.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -148,14 +148,10 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs()
const label patchi = patch().index();
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>
const fluidThermophysicalTransportModel& ttm =
db().lookupType<fluidThermophysicalTransportModel>
(
IOobject::groupName
(
thermophysicalTransportModel::typeName,
internalField().group()
)
internalField().group()
);
const fvsPatchField<scalar>& phip =

View File

@ -0,0 +1,44 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2022 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/>.
\*---------------------------------------------------------------------------*/
#include "fluidThermophysicalTransportModel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::fluidThermophysicalTransportModel::fluidThermophysicalTransportModel
(
const compressibleMomentumTransportModel& momentumTransport
)
:
thermophysicalTransportModel
(
momentumTransport.mesh(),
momentumTransport.alphaRhoPhi().group()
),
momentumTransportModel_(momentumTransport)
{}
// ************************************************************************* //

View File

@ -0,0 +1,125 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2022 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/>.
Class
Foam::fluidThermophysicalTransportModel
Description
Abstract base class for fluid thermophysical transport models
RAS, LES and laminar.
SourceFiles
fluidThermophysicalTransportModel.C
\*---------------------------------------------------------------------------*/
#ifndef fluidThermophysicalTransportModel_H
#define fluidThermophysicalTransportModel_H
#include "thermophysicalTransportModel.H"
#include "compressibleMomentumTransportModel.H"
#include "fluidThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class fluidThermophysicalTransportModel Declaration
\*---------------------------------------------------------------------------*/
class fluidThermophysicalTransportModel
:
public thermophysicalTransportModel
{
protected:
// Protected data
const compressibleMomentumTransportModel& momentumTransportModel_;
public:
// Constructors
//- Construct from compressibleMomentumTransportModel
fluidThermophysicalTransportModel
(
const compressibleMomentumTransportModel& momentumTransport
);
//- Destructor
virtual ~fluidThermophysicalTransportModel()
{}
// Member Functions
//- Access function to momentum transport model
const compressibleMomentumTransportModel& momentumTransport() const
{
return momentumTransportModel_;
}
//- Access function to fluid thermophysical properties
virtual const fluidThermo& thermo() const = 0;
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
virtual tmp<volScalarField> alphaEff() const = 0;
//- Effective thermal turbulent diffusivity of mixture
// for patch [kg/m/s]
virtual tmp<scalarField> alphaEff(const label patchi) const = 0;
//- Effective mass diffusion coefficient
// for a given specie mass-fraction [kg/m/s]
virtual tmp<volScalarField> DEff(const volScalarField& Yi) const = 0;
//- Effective mass diffusion coefficient
// for a given specie mass-fraction for patch [kg/m/s]
virtual tmp<scalarField> DEff
(
const volScalarField& Yi,
const label patchi
) const = 0;
//- Return the specie flux for the given specie mass-fraction [kg/m^2/s]
virtual tmp<surfaceScalarField> j(const volScalarField& Yi) const = 0;
//- Return the source term for the given specie mass-fraction equation
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const = 0;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -8,6 +8,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \
LIB_LIBS = \
-lthermophysicalTransportModel \
-lsolidThermo \
-lspecie \
-lfiniteVolume \

View File

@ -30,7 +30,6 @@ License
namespace Foam
{
defineTypeNameAndDebug(solidThermophysicalTransportModel, 0);
defineRunTimeSelectionTable(solidThermophysicalTransportModel, dictionary);
}
@ -55,27 +54,11 @@ Foam::solidThermophysicalTransportModel::solidThermophysicalTransportModel
const solidThermo& thermo
)
:
IOdictionary
(
IOobject
(
typeName,
thermo.mesh().time().constant(),
thermo.mesh(),
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE
)
),
thermophysicalTransportModel(thermo.mesh(), word::null),
thermo_(thermo),
printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)),
coeffDict_(optionalSubDict(type + "Coeffs"))
{
// Add run-time re-reading of thermophysicalTransport dictionary
// after construction to avoid problems if the dictionary is not present
readOpt() = IOobject::MUST_READ_IF_MODIFIED;
addWatch();
}
{}
// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //

View File

@ -25,8 +25,7 @@ Class
Foam::solidThermophysicalTransportModel
Description
Abstract base class for thermophysical transport models
(RAS, LES and laminar).
Abstract base class for solid thermophysical transport models
SourceFiles
solidThermophysicalTransportModel.C
@ -36,6 +35,7 @@ SourceFiles
#ifndef solidThermophysicalTransportModel_H
#define solidThermophysicalTransportModel_H
#include "thermophysicalTransportModel.H"
#include "solidThermo.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -44,12 +44,12 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class solidThermophysicalTransportModel Declaration
Class solidThermophysicalTransportModel Declaration
\*---------------------------------------------------------------------------*/
class solidThermophysicalTransportModel
:
public IOdictionary
public thermophysicalTransportModel
{
protected:
@ -73,10 +73,6 @@ protected:
public:
//- Runtime type information
TypeName("thermophysicalTransport");
// Declare run-time constructor selection table
declareRunTimeSelectionTable
@ -100,12 +96,6 @@ public:
const solidThermo& thermo
);
//- Disallow default bitwise copy construction
solidThermophysicalTransportModel
(
const solidThermophysicalTransportModel&
) = delete;
// Selectors
@ -144,6 +134,20 @@ public:
//- Thermal conductivity for patch [W/m/K]
virtual tmp<scalarField> kappa(const label patchi) const;
//- Effective thermal conductivity
// of mixture [W/m/K]
virtual tmp<volScalarField> kappaEff() const
{
return kappa();
}
//- Effective thermal conductivity
// of mixture for patch [W/m/K]
virtual tmp<scalarField> kappaEff(const label patchi) const
{
return kappa(patchi);
}
//- Return the heat flux [W/m^2]
virtual tmp<surfaceScalarField> q() const = 0;
@ -153,12 +157,6 @@ public:
//- Solve the thermophysical transport model equations
// and correct the transport coefficients
virtual void correct() = 0;
// Member Operators
//- Disallow default bitwise assignment
void operator=(const solidThermophysicalTransportModel&) = delete;
};

View File

@ -1,16 +1,7 @@
EXE_INC = \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
LIB_LIBS = \
-lfluidThermophysicalModels \
-lmomentumTransportModels \
-lspecie \
-lfiniteVolume \
-lmeshTools

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -24,7 +24,6 @@ License
\*---------------------------------------------------------------------------*/
#include "thermophysicalTransportModel.H"
#include "surfaceFields.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -38,25 +37,21 @@ namespace Foam
Foam::thermophysicalTransportModel::thermophysicalTransportModel
(
const compressibleMomentumTransportModel& momentumTransport
const fvMesh& mesh,
const word& group
)
:
IOdictionary
(
IOobject
(
IOobject::groupName
(
typeName, momentumTransport.alphaRhoPhi().group()
),
momentumTransport.time().constant(),
momentumTransport.mesh(),
IOobject::groupName(typeName, group),
mesh.time().constant(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE
)
),
momentumTransportModel_(momentumTransport)
)
{
// Add run-time re-reading of thermophysicalTransport dictionary
// after construction to avoid problems if the dictionary is not present

View File

@ -25,8 +25,7 @@ Class
Foam::thermophysicalTransportModel
Description
Abstract base class for thermophysical transport models
(RAS, LES and laminar).
Abstract base class for all fluid and solid thermophysical transport models
SourceFiles
thermophysicalTransportModel.C
@ -36,8 +35,8 @@ SourceFiles
#ifndef thermophysicalTransportModel_H
#define thermophysicalTransportModel_H
#include "compressibleMomentumTransportModel.H"
#include "fluidThermo.H"
#include "IOdictionary.H"
#include "fvMatrix.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -52,12 +51,6 @@ class thermophysicalTransportModel
:
public IOdictionary
{
protected:
// Protected data
const compressibleMomentumTransportModel& momentumTransportModel_;
public:
@ -67,10 +60,11 @@ public:
// Constructors
//- Construct from compressibleMomentumTransportModel
//- Construct from mesh and group
thermophysicalTransportModel
(
const compressibleMomentumTransportModel& momentumTransport
const fvMesh& mesh,
const word& group
);
//- Disallow default bitwise copy construction
@ -90,15 +84,6 @@ public:
//- Read model coefficients if they have changed
virtual bool read() = 0;
//- Access function to momentum transport model
const compressibleMomentumTransportModel& momentumTransport() const
{
return momentumTransportModel_;
}
//- Access function to fluid thermophysical properties
virtual const fluidThermo& thermo() const = 0;
//- Const access to the coefficients dictionary
virtual const dictionary& coeffDict() const = 0;
@ -110,37 +95,12 @@ public:
// of mixture for patch [W/m/K]
virtual tmp<scalarField> kappaEff(const label patchi) const = 0;
//- Effective thermal turbulent diffusivity of mixture [kg/m/s]
virtual tmp<volScalarField> alphaEff() const = 0;
//- Effective thermal turbulent diffusivity of mixture
// for patch [kg/m/s]
virtual tmp<scalarField> alphaEff(const label patchi) const = 0;
//- Effective mass diffusion coefficient
// for a given specie mass-fraction [kg/m/s]
virtual tmp<volScalarField> DEff(const volScalarField& Yi) const = 0;
//- Effective mass diffusion coefficient
// for a given specie mass-fraction for patch [kg/m/s]
virtual tmp<scalarField> DEff
(
const volScalarField& Yi,
const label patchi
) const = 0;
//- Return the heat flux [W/m^2]
virtual tmp<surfaceScalarField> q() const = 0;
//- Return the source term for the energy equation
virtual tmp<fvScalarMatrix> divq(volScalarField& he) const = 0;
//- Return the specie flux for the given specie mass-fraction [kg/m^2/s]
virtual tmp<surfaceScalarField> j(const volScalarField& Yi) const = 0;
//- Return the source term for the given specie mass-fraction equation
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const = 0;
//- Solve the thermophysical transport model equations
// and correct the transport coefficients
virtual void correct() = 0;

View File

@ -41,14 +41,8 @@ tmp<scalarField> nutkAtmRoughWallFunctionFvPatchScalarField::nut() const
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const scalarField& y = turbModel.y()[patchi];
const tmp<volScalarField> tk = turbModel.k();
const volScalarField& k = tk();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -54,10 +54,7 @@ bool Foam::functionObjects::PecletNo::calc()
{
tmp<volScalarField> nuEff
(
mesh_.lookupObject<momentumTransportModel>
(
momentumTransportModel::typeName
).nuEff()
mesh_.lookupType<momentumTransportModel>().nuEff()
);
const surfaceScalarField& phi =

View File

@ -186,11 +186,7 @@ bool Foam::functionObjects::age::execute()
tmp<volScalarField> tnuEff;
if (diffusion_)
{
tnuEff =
mesh_.lookupObject<momentumTransportModel>
(
momentumTransportModel::typeName
).nuEff();
tnuEff = mesh_.lookupType<momentumTransportModel>().nuEff();
}
for (int i=0; i<=nCorr_; i++)
@ -224,11 +220,7 @@ bool Foam::functionObjects::age::execute()
if (diffusion_)
{
tnuEff =
mesh_.lookupObject<momentumTransportModel>
(
momentumTransportModel::typeName
).nuEff();
tnuEff = mesh_.lookupType<momentumTransportModel>().nuEff();
laplacianScheme =
"laplacian(" + tnuEff().name() + ',' + schemesField_ + ")";

View File

@ -25,7 +25,7 @@ License
#include "turbulenceFields.H"
#include "incompressibleMomentumTransportModel.H"
#include "thermophysicalTransportModel.H"
#include "fluidThermophysicalTransportModel.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -158,18 +158,10 @@ bool Foam::functionObjects::turbulenceFields::read(const dictionary& dict)
bool Foam::functionObjects::turbulenceFields::execute()
{
const word modelName
(
IOobject::groupName(momentumTransportModel::typeName, phaseName_)
);
if (obr_.foundObject<thermophysicalTransportModel>(modelName))
if (obr_.foundObject<fluidThermophysicalTransportModel>(phaseName_))
{
const thermophysicalTransportModel& ttm =
obr_.lookupObject<thermophysicalTransportModel>
(
thermophysicalTransportModel::typeName
);
const fluidThermophysicalTransportModel& ttm =
obr_.lookupType<fluidThermophysicalTransportModel>(phaseName_);
const compressibleMomentumTransportModel& model =
ttm.momentumTransport();
@ -227,10 +219,10 @@ bool Foam::functionObjects::turbulenceFields::execute()
}
}
}
else if (obr_.foundObject<compressibleMomentumTransportModel>(modelName))
else if (obr_.foundType<compressibleMomentumTransportModel>(phaseName_))
{
const compressibleMomentumTransportModel& model =
obr_.lookupObject<compressibleMomentumTransportModel>(modelName);
obr_.lookupType<compressibleMomentumTransportModel>(phaseName_);
forAllConstIter(wordHashSet, fieldSet_, iter)
{
@ -282,14 +274,11 @@ bool Foam::functionObjects::turbulenceFields::execute()
}
else if
(
obr_.foundObject<incompressible::momentumTransportModel>(modelName)
obr_.foundType<incompressible::momentumTransportModel>(phaseName_)
)
{
const incompressible::momentumTransportModel& model =
obr_.lookupObject<incompressible::momentumTransportModel>
(
modelName
);
obr_.lookupType<incompressible::momentumTransportModel>(phaseName_);
forAllConstIter(wordHashSet, fieldSet_, iter)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -97,19 +97,10 @@ bool Foam::functionObjects::turbulenceIntensity::read(const dictionary& dict)
bool Foam::functionObjects::turbulenceIntensity::execute()
{
if
(
mesh_.foundObject<momentumTransportModel>
(
momentumTransportModel::typeName
)
)
if (mesh_.foundType<momentumTransportModel>())
{
const momentumTransportModel& turbModel =
mesh_.lookupObject<momentumTransportModel>
(
momentumTransportModel::typeName
);
mesh_.lookupType<momentumTransportModel>();
volScalarField uPrime(sqrt((2.0/3.0)*turbModel.k()));

View File

@ -25,8 +25,6 @@ License
#include "wallHeatFlux.H"
#include "thermophysicalTransportModel.H"
#include "solidThermophysicalTransportModel.H"
#include "solidThermo.H"
#include "surfaceInterpolate.H"
#include "fvcGrad.H"
#include "wallPolyPatch.H"
@ -220,26 +218,10 @@ bool Foam::functionObjects::wallHeatFlux::execute()
return store(fieldName, calcWallHeatFlux(ttm.q()));
}
else if
(
foundObject<solidThermophysicalTransportModel>
(
solidThermophysicalTransportModel::typeName
)
)
{
const solidThermophysicalTransportModel& sttm =
lookupObject<solidThermophysicalTransportModel>
(
solidThermophysicalTransportModel::typeName
);
return store(fieldName, calcWallHeatFlux(sttm.q()));
}
else
{
FatalErrorInFunction
<< "Unable to find compressible turbulence model in the "
<< "Unable to find thermophysicalTransportModel in the "
<< "database" << exit(FatalError);
}

View File

@ -169,14 +169,7 @@ bool Foam::functionObjects::yPlus::execute()
)
{
const momentumTransportModel& model =
mesh_.lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
phaseName_
)
);
mesh_.lookupType<momentumTransportModel>(phaseName_);
word name(IOobject::groupName(type(), phaseName_));

View File

@ -101,10 +101,7 @@ Foam::functionObjects::scalarTransport::D() const
else
{
const momentumTransportModel& turbulence =
mesh_.lookupObject<momentumTransportModel>
(
momentumTransportModel::typeName
);
mesh_.lookupType<momentumTransportModel>();
return alphal_*turbulence.nu() + alphat_*turbulence.nut();
}

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "variable.H"
#include "thermophysicalTransportModel.H"
#include "fluidThermophysicalTransportModel.H"
#include "zeroGradientFvPatchFields.H"
#include "addToRunTimeSelectionTable.H"
@ -114,11 +114,9 @@ Foam::fv::heatTransferModels::variable::~variable()
void Foam::fv::heatTransferModels::variable::correct()
{
const thermophysicalTransportModel& ttm =
mesh().lookupObject<thermophysicalTransportModel>
(
thermophysicalTransportModel::typeName
);
const fluidThermophysicalTransportModel& ttm =
mesh().lookupType<fluidThermophysicalTransportModel>();
const compressibleMomentumTransportModel& mtm =
ttm.momentumTransport();

View File

@ -28,7 +28,7 @@ License
#include "fvmLaplacian.H"
#include "fvcDiv.H"
#include "surfaceInterpolate.H"
#include "thermophysicalTransportModel.H"
#include "fluidThermophysicalTransportModel.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -100,20 +100,14 @@ Foam::tmp<Foam::volScalarField> Foam::fv::volumeFractionSource::D
if (phi.dimensions() == dimVolume/dimTime)
{
const momentumTransportModel& turbulence =
mesh().lookupObject<momentumTransportModel>
(
momentumTransportModel::typeName
);
mesh().lookupType<momentumTransportModel>();
return turbulence.nuEff();
}
else if (phi.dimensions() == dimMass/dimTime)
{
const thermophysicalTransportModel& ttm =
mesh().lookupObject<thermophysicalTransportModel>
(
thermophysicalTransportModel::typeName
);
const fluidThermophysicalTransportModel& ttm =
mesh().lookupType<fluidThermophysicalTransportModel>();
return
fieldName == ttm.thermo().T().name()
@ -127,6 +121,7 @@ Foam::tmp<Foam::volScalarField> Foam::fv::volumeFractionSource::D
FatalErrorInFunction
<< "Dimensions of " << phi.name() << " not recognised"
<< exit(FatalError);
return tmp<volScalarField>(nullptr);
}
}

View File

@ -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-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -34,17 +34,12 @@ Foam::tmp<Foam::volScalarField>
Foam::DispersionRASModel<CloudType>::kModel() const
{
const objectRegistry& obr = this->owner().mesh();
const word turbName =
IOobject::groupName
(
momentumTransportModel::typeName,
this->owner().U().group()
);
if (obr.foundObject<momentumTransportModel>(turbName))
if (obr.foundType<momentumTransportModel>(this->owner().U().group()))
{
const momentumTransportModel& model =
obr.lookupObject<momentumTransportModel>(turbName);
obr.lookupType<momentumTransportModel>(this->owner().U().group());
return model.k();
}
else
@ -64,17 +59,12 @@ Foam::tmp<Foam::volScalarField>
Foam::DispersionRASModel<CloudType>::epsilonModel() const
{
const objectRegistry& obr = this->owner().mesh();
const word turbName =
IOobject::groupName
(
momentumTransportModel::typeName,
this->owner().U().group()
);
if (obr.foundObject<momentumTransportModel>(turbName))
if (obr.foundType<momentumTransportModel>(this->owner().U().group()))
{
const momentumTransportModel& model =
obr.lookupObject<momentumTransportModel>(turbName);
obr.lookupType<momentumTransportModel>(this->owner().U().group());
return model.epsilon();
}
else

View File

@ -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-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,17 +57,12 @@ Foam::tmp<Foam::volScalarField>
Foam::BrownianMotionForce<CloudType>::kModel() const
{
const objectRegistry& obr = this->owner().mesh();
const word turbName =
IOobject::groupName
(
momentumTransportModel::typeName,
this->owner().U().group()
);
if (obr.foundObject<momentumTransportModel>(turbName))
if (obr.foundType<momentumTransportModel>(this->owner().U().group()))
{
const momentumTransportModel& model =
obr.lookupObject<momentumTransportModel>(turbName);
obr.lookupType<momentumTransportModel>(this->owner().U().group());
return model.k();
}
else

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "alphatFilmWallFunctionFvPatchScalarField.H"
#include "thermophysicalTransportModel.H"
#include "fluidThermophysicalTransportModel.H"
#include "surfaceFilm.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
@ -158,14 +158,10 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs()
scalarField mDotFilmp = mDotFilm().boundaryField()[filmPatchi];
filmModel.toPrimary(filmPatchi, mDotFilmp);
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>
const fluidThermophysicalTransportModel& ttm =
db().lookupType<fluidThermophysicalTransportModel>
(
IOobject::groupName
(
thermophysicalTransportModel::typeName,
internalField().group()
)
internalField().group()
);
const compressibleMomentumTransportModel& turbModel =

View File

@ -74,17 +74,9 @@ tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::calcUTau
scalarField mDotFilmp = mDotFilm().boundaryField()[filmPatchi];
filmModel.toPrimary(filmPatchi, mDotFilmp);
// Retrieve RAS turbulence model
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const scalarField& y = turbModel.y()[patchi];
const tmp<volScalarField> tk = turbModel.k();
@ -129,14 +121,7 @@ tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::nut() const
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi];
const scalarField magGradU(mag(Uw.snGrad()));
@ -222,14 +207,7 @@ tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::yPlus() const
const label patchi = patch().index();
const momentumTransportModel& turbModel =
db().lookupObject<momentumTransportModel>
(
IOobject::groupName
(
momentumTransportModel::typeName,
internalField().group()
)
);
db().lookupType<momentumTransportModel>(internalField().group());
const scalarField& y = turbModel.y()[patchi];
const fvPatchVectorField& Uw = turbModel.U().boundaryField()[patchi];

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -26,7 +26,7 @@ License
#include "adsorptionMassFractionFvPatchScalarField.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "thermophysicalTransportModel.H"
#include "fluidThermophysicalTransportModel.H"
#include "basicSpecieMixture.H"
#include "addToRunTimeSelectionTable.H"
@ -98,11 +98,9 @@ Foam::adsorptionMassFractionFvPatchScalarField::calcPhiYp() const
const scalarField Yc(patchInternalField());
// Get the patch delta coefficients multiplied by the diffusivity
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>
(
thermophysicalTransportModel::typeName
);
const fluidThermophysicalTransportModel& ttm =
db().lookupType<fluidThermophysicalTransportModel>();
const scalarField alphaEffDeltap
(
ttm.alphaEff(patch().index())*patch().deltaCoeffs()

View File

@ -27,7 +27,7 @@ License
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "thermophysicalTransportModel.H"
#include "fluidThermophysicalTransportModel.H"
#include "basicSpecieMixture.H"
#include "mappedPatchBase.H"
#include "addToRunTimeSelectionTable.H"
@ -126,15 +126,14 @@ Foam::semiPermeableBaffleMassFractionFvPatchScalarField::calcPhiYp() const
);
// Get the patch delta coefficients multiplied by the diffusivity
const thermophysicalTransportModel& ttm =
db().lookupObject<thermophysicalTransportModel>
(
thermophysicalTransportModel::typeName
);
const fluidThermophysicalTransportModel& ttm =
db().lookupType<fluidThermophysicalTransportModel>();
const scalarField alphaEffDeltap
(
ttm.alphaEff(patch().index())*patch().deltaCoeffs()
);
const scalarField nbrAlphaEffDeltap
(
mpp.distribute

View File

@ -27,7 +27,7 @@ License
#include "specieTransferVelocityFvPatchVectorField.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "thermophysicalTransportModel.H"
#include "fluidThermophysicalTransportModel.H"
#include "fluidMulticomponentThermo.H"
// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
@ -235,10 +235,7 @@ void Foam::specieTransferMassFractionFvPatchScalarField::updateCoeffs()
const scalarField AAlphaEffp
(
patch().magSf()
*db().lookupObject<thermophysicalTransportModel>
(
thermophysicalTransportModel::typeName
)
*db().lookupType<fluidThermophysicalTransportModel>()
.alphaEff(patch().index())
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,7 +28,7 @@ License
#include "specieTransferVelocityFvPatchVectorField.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "thermophysicalTransportModel.H"
#include "fluidThermophysicalTransportModel.H"
#include "basicSpecieMixture.H"
#include "addToRunTimeSelectionTable.H"
@ -154,10 +154,8 @@ void Foam::specieTransferTemperatureFvPatchScalarField::updateCoeffs()
const scalarField AAlphaEffp
(
patch().magSf()
*db().lookupObject<thermophysicalTransportModel>
(
thermophysicalTransportModel::typeName
).alphaEff(patch().index())
*db().lookupType<fluidThermophysicalTransportModel>()
.alphaEff(patch().index())
);
// Get the current energy to linearise around

View File

@ -29,17 +29,11 @@ boundaryField
solid_to_shell
{
type coupledTemperature;
libs ("libcoupledThermophysicalTransportModels.so");
value $internalField;
}
solid_to_tube
{
type coupledTemperature;
libs ("libcoupledThermophysicalTransportModels.so");
value $internalField;
}
}