mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
transportModel: remove IOdictionary base-class so that it is entirely abstract
This commit is contained in:
@ -112,7 +112,13 @@ public:
|
||||
|
||||
tmp<volScalarField> nu() const
|
||||
{
|
||||
return thermo_->mu()/thermo_->rho();
|
||||
return thermo_->nu();
|
||||
}
|
||||
|
||||
//- Return the laminar viscosity for patch
|
||||
tmp<scalarField> nu(const label patchi) const
|
||||
{
|
||||
return thermo_->nu(patchi);
|
||||
}
|
||||
|
||||
tmp<volScalarField> kappa() const
|
||||
|
||||
@ -50,6 +50,18 @@ Foam::threePhaseMixture::threePhaseMixture
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
:
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
|
||||
transportModel(U, phi),
|
||||
|
||||
phase1Name_("phase1"),
|
||||
|
||||
@ -35,6 +35,7 @@ SourceFiles
|
||||
#define threePhaseMixture_H
|
||||
|
||||
#include "incompressible/transportModel/transportModel.H"
|
||||
#include "IOdictionary.H"
|
||||
#include "incompressible/viscosityModels/viscosityModel/viscosityModel.H"
|
||||
#include "dimensionedScalar.H"
|
||||
#include "volFields.H"
|
||||
@ -50,6 +51,7 @@ namespace Foam
|
||||
|
||||
class threePhaseMixture
|
||||
:
|
||||
public IOdictionary,
|
||||
public transportModel
|
||||
{
|
||||
// Private data
|
||||
@ -176,6 +178,12 @@ public:
|
||||
return nu_;
|
||||
}
|
||||
|
||||
//- Return the laminar viscosity for patch
|
||||
tmp<scalarField> nu(const label patchi) const
|
||||
{
|
||||
return nu_.boundaryField()[patchi];
|
||||
}
|
||||
|
||||
//- Return the face-interpolated dynamic laminar viscosity
|
||||
tmp<surfaceScalarField> nuf() const;
|
||||
|
||||
|
||||
@ -371,6 +371,18 @@ Foam::multiphaseSystem::multiphaseSystem
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
:
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
|
||||
transportModel(U, phi),
|
||||
|
||||
phases_(lookup("phases"), phaseModel::iNew(U.mesh())),
|
||||
@ -482,18 +494,54 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::rho() const
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::multiphaseSystem::rho(const label patchi) const
|
||||
{
|
||||
PtrDictionary<phaseModel>::const_iterator iter = phases_.begin();
|
||||
|
||||
tmp<scalarField> trho = iter().boundaryField()[patchi]*iter().rho().value();
|
||||
|
||||
for (++iter; iter != phases_.end(); ++iter)
|
||||
{
|
||||
trho() += iter().boundaryField()[patchi]*iter().rho().value();
|
||||
}
|
||||
|
||||
return trho;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::nu() const
|
||||
{
|
||||
PtrDictionary<phaseModel>::const_iterator iter = phases_.begin();
|
||||
|
||||
tmp<volScalarField> tnu = iter()*iter().nu();
|
||||
tmp<volScalarField> tmu = iter()*(iter().rho()*iter().nu());
|
||||
|
||||
for (++iter; iter != phases_.end(); ++iter)
|
||||
{
|
||||
tnu() += iter()*iter().nu();
|
||||
tmu() += iter()*(iter().rho()*iter().nu());
|
||||
}
|
||||
|
||||
return tnu;
|
||||
return tmu/rho();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::multiphaseSystem::nu(const label patchi) const
|
||||
{
|
||||
PtrDictionary<phaseModel>::const_iterator iter = phases_.begin();
|
||||
|
||||
tmp<scalarField> tmu =
|
||||
iter().boundaryField()[patchi]
|
||||
*(iter().rho().value()*iter().nu().value());
|
||||
|
||||
for (++iter; iter != phases_.end(); ++iter)
|
||||
{
|
||||
tmu() +=
|
||||
iter().boundaryField()[patchi]
|
||||
*(iter().rho().value()*iter().nu().value());
|
||||
}
|
||||
|
||||
return tmu/rho(patchi);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -43,6 +43,7 @@ SourceFiles
|
||||
#define multiphaseSystem_H
|
||||
|
||||
#include "incompressible/transportModel/transportModel.H"
|
||||
#include "IOdictionary.H"
|
||||
#include "phaseModel.H"
|
||||
#include "PtrDictionary.H"
|
||||
#include "volFields.H"
|
||||
@ -61,6 +62,7 @@ namespace Foam
|
||||
|
||||
class multiphaseSystem
|
||||
:
|
||||
public IOdictionary,
|
||||
public transportModel
|
||||
{
|
||||
|
||||
@ -255,9 +257,15 @@ public:
|
||||
//- Return the mixture density
|
||||
tmp<volScalarField> rho() const;
|
||||
|
||||
//- Return the mixture density for patch
|
||||
tmp<scalarField> rho(const label patchi) const;
|
||||
|
||||
//- Return the mixture laminar viscosity
|
||||
tmp<volScalarField> nu() const;
|
||||
|
||||
//- Return the laminar viscosity for patch
|
||||
tmp<scalarField> nu(const label patchi) const;
|
||||
|
||||
//- Return the virtual-mass coefficient for the given phase
|
||||
tmp<volScalarField> Cvm(const phaseModel& phase) const;
|
||||
|
||||
|
||||
@ -65,6 +65,18 @@ Foam::multiphaseMixture::multiphaseMixture
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
:
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
|
||||
transportModel(U, phi),
|
||||
phases_(lookup("phases"), phase::iNew(U, phi)),
|
||||
|
||||
@ -116,7 +128,8 @@ Foam::multiphaseMixture::multiphaseMixture
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::rho() const
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::multiphaseMixture::rho() const
|
||||
{
|
||||
PtrDictionary<phase>::const_iterator iter = phases_.begin();
|
||||
|
||||
@ -131,7 +144,24 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::rho() const
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::mu() const
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::multiphaseMixture::rho(const label patchi) const
|
||||
{
|
||||
PtrDictionary<phase>::const_iterator iter = phases_.begin();
|
||||
|
||||
tmp<scalarField> trho = iter().boundaryField()[patchi]*iter().rho().value();
|
||||
|
||||
for (++iter; iter != phases_.end(); ++iter)
|
||||
{
|
||||
trho() += iter().boundaryField()[patchi]*iter().rho().value();
|
||||
}
|
||||
|
||||
return trho;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::multiphaseMixture::mu() const
|
||||
{
|
||||
PtrDictionary<phase>::const_iterator iter = phases_.begin();
|
||||
|
||||
@ -146,7 +176,30 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::mu() const
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseMixture::muf() const
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::multiphaseMixture::mu(const label patchi) const
|
||||
{
|
||||
PtrDictionary<phase>::const_iterator iter = phases_.begin();
|
||||
|
||||
tmp<scalarField> tmu =
|
||||
iter().boundaryField()[patchi]
|
||||
*iter().rho().value()
|
||||
*iter().nu(patchi);
|
||||
|
||||
for (++iter; iter != phases_.end(); ++iter)
|
||||
{
|
||||
tmu() +=
|
||||
iter().boundaryField()[patchi]
|
||||
*iter().rho().value()
|
||||
*iter().nu(patchi);
|
||||
}
|
||||
|
||||
return tmu;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField>
|
||||
Foam::multiphaseMixture::muf() const
|
||||
{
|
||||
PtrDictionary<phase>::const_iterator iter = phases_.begin();
|
||||
|
||||
@ -163,13 +216,22 @@ Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseMixture::muf() const
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::nu() const
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::multiphaseMixture::nu() const
|
||||
{
|
||||
return mu()/rho();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseMixture::nuf() const
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::multiphaseMixture::nu(const label patchi) const
|
||||
{
|
||||
return mu(patchi)/rho(patchi);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceScalarField>
|
||||
Foam::multiphaseMixture::nuf() const
|
||||
{
|
||||
return muf()/fvc::interpolate(rho());
|
||||
}
|
||||
|
||||
@ -43,12 +43,12 @@ SourceFiles
|
||||
#define multiphaseMixture_H
|
||||
|
||||
#include "incompressible/transportModel/transportModel.H"
|
||||
#include "IOdictionary.H"
|
||||
#include "phase.H"
|
||||
#include "PtrDictionary.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -60,6 +60,7 @@ namespace Foam
|
||||
|
||||
class multiphaseMixture
|
||||
:
|
||||
public IOdictionary,
|
||||
public transportModel
|
||||
{
|
||||
public:
|
||||
@ -229,15 +230,24 @@ public:
|
||||
//- Return the mixture density
|
||||
tmp<volScalarField> rho() const;
|
||||
|
||||
//- Return the mixture density for patch
|
||||
tmp<scalarField> rho(const label patchi) const;
|
||||
|
||||
//- Return the dynamic laminar viscosity
|
||||
tmp<volScalarField> mu() const;
|
||||
|
||||
//- Return the dynamic laminar viscosity for patch
|
||||
tmp<scalarField> mu(const label patchi) const;
|
||||
|
||||
//- Return the face-interpolated dynamic laminar viscosity
|
||||
tmp<surfaceScalarField> muf() const;
|
||||
|
||||
//- Return the kinematic laminar viscosity
|
||||
tmp<volScalarField> nu() const;
|
||||
|
||||
//- Return the laminar viscosity for patch
|
||||
tmp<scalarField> nu(const label patchi) const;
|
||||
|
||||
//- Return the face-interpolated dynamic laminar viscosity
|
||||
tmp<surfaceScalarField> nuf() const;
|
||||
|
||||
|
||||
@ -129,6 +129,12 @@ public:
|
||||
return nuModel_->nu();
|
||||
}
|
||||
|
||||
//- Return the laminar viscosity for patch
|
||||
tmp<scalarField> nu(const label patchi) const
|
||||
{
|
||||
return nuModel_->nu(patchi);
|
||||
}
|
||||
|
||||
//- Return const-access to phase1 density
|
||||
const dimensionedScalar& rho() const
|
||||
{
|
||||
|
||||
@ -33,7 +33,7 @@ License
|
||||
#include "fluidThermo.H"
|
||||
#include "incompressible/turbulenceModel/turbulenceModel.H"
|
||||
#include "compressible/turbulenceModel/turbulenceModel.H"
|
||||
#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
|
||||
#include "incompressible/transportModel/transportModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -94,12 +94,11 @@ Foam::tmp<Foam::volSymmTensorField> Foam::forces::devRhoReff() const
|
||||
}
|
||||
else if
|
||||
(
|
||||
obr_.foundObject<singlePhaseTransportModel>("transportProperties")
|
||||
obr_.foundObject<transportModel>("transportProperties")
|
||||
)
|
||||
{
|
||||
const singlePhaseTransportModel& laminarT =
|
||||
obr_.lookupObject<singlePhaseTransportModel>
|
||||
("transportProperties");
|
||||
const transportModel& laminarT =
|
||||
obr_.lookupObject<transportModel>("transportProperties");
|
||||
|
||||
const volVectorField& U = obr_.lookupObject<volVectorField>(UName_);
|
||||
|
||||
@ -138,12 +137,11 @@ Foam::tmp<Foam::volScalarField> Foam::forces::mu() const
|
||||
}
|
||||
else if
|
||||
(
|
||||
obr_.foundObject<singlePhaseTransportModel>("transportProperties")
|
||||
obr_.foundObject<transportModel>("transportProperties")
|
||||
)
|
||||
{
|
||||
const singlePhaseTransportModel& laminarT =
|
||||
obr_.lookupObject<singlePhaseTransportModel>
|
||||
("transportProperties");
|
||||
const transportModel& laminarT =
|
||||
obr_.lookupObject<transportModel>("transportProperties");
|
||||
|
||||
return rho()*laminarT.nu();
|
||||
}
|
||||
|
||||
@ -58,6 +58,17 @@ Foam::incompressibleTwoPhaseMixture::incompressibleTwoPhaseMixture
|
||||
const word& alpha2Name
|
||||
)
|
||||
:
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
transportModel(U, phi),
|
||||
twoPhaseMixture(U.mesh(), *this, alpha1Name, alpha2Name),
|
||||
|
||||
|
||||
@ -38,6 +38,7 @@ SourceFiles
|
||||
#include "incompressible/transportModel/transportModel.H"
|
||||
#include "incompressible/viscosityModels/viscosityModel/viscosityModel.H"
|
||||
#include "twoPhaseMixture.H"
|
||||
#include "IOdictionary.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -51,6 +52,7 @@ namespace Foam
|
||||
|
||||
class incompressibleTwoPhaseMixture
|
||||
:
|
||||
public IOdictionary,
|
||||
public transportModel,
|
||||
public twoPhaseMixture
|
||||
{
|
||||
@ -133,6 +135,12 @@ public:
|
||||
return nu_;
|
||||
}
|
||||
|
||||
//- Return the laminar viscosity for patch
|
||||
virtual tmp<scalarField> nu(const label patchi) const
|
||||
{
|
||||
return nu_.boundaryField()[patchi];
|
||||
}
|
||||
|
||||
//- Return the face-interpolated kinematic laminar viscosity
|
||||
tmp<surfaceScalarField> nuf() const;
|
||||
|
||||
|
||||
@ -36,6 +36,17 @@ Foam::singlePhaseTransportModel::singlePhaseTransportModel
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
:
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
transportModel(U, phi),
|
||||
viscosityModelPtr_(viscosityModel::New("nu", *this, U, phi))
|
||||
{}
|
||||
@ -49,12 +60,20 @@ Foam::singlePhaseTransportModel::~singlePhaseTransportModel()
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::singlePhaseTransportModel::nu() const
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::singlePhaseTransportModel::nu() const
|
||||
{
|
||||
return viscosityModelPtr_->nu();
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::singlePhaseTransportModel::nu(const label patchi) const
|
||||
{
|
||||
return viscosityModelPtr_->nu(patchi);
|
||||
}
|
||||
|
||||
|
||||
void Foam::singlePhaseTransportModel::correct()
|
||||
{
|
||||
viscosityModelPtr_->correct();
|
||||
|
||||
@ -39,6 +39,7 @@ SourceFiles
|
||||
#define singlePhaseTransportModel_H
|
||||
|
||||
#include "incompressible/transportModel/transportModel.H"
|
||||
#include "IOdictionary.H"
|
||||
#include "autoPtr.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -54,6 +55,7 @@ class viscosityModel;
|
||||
|
||||
class singlePhaseTransportModel
|
||||
:
|
||||
public IOdictionary,
|
||||
public transportModel
|
||||
{
|
||||
// Private Data
|
||||
@ -89,10 +91,13 @@ public:
|
||||
// Member Functions
|
||||
|
||||
//- Return the laminar viscosity
|
||||
tmp<volScalarField> nu() const;
|
||||
virtual tmp<volScalarField> nu() const;
|
||||
|
||||
//- Return the laminar viscosity for patch
|
||||
virtual tmp<scalarField> nu(const label patchi) const;
|
||||
|
||||
//- Correct the laminar viscosity
|
||||
void correct();
|
||||
virtual void correct();
|
||||
|
||||
//- Read transportProperties dictionary
|
||||
virtual bool read();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -24,28 +24,21 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "transportModel.H"
|
||||
#include "viscosityModel.H"
|
||||
#include "volFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(transportModel, 0);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::transportModel::transportModel
|
||||
(
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
:
|
||||
IOdictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
const volVectorField&,
|
||||
const surfaceScalarField&
|
||||
)
|
||||
{}
|
||||
|
||||
@ -60,7 +53,7 @@ Foam::transportModel::~transportModel()
|
||||
|
||||
bool Foam::transportModel::read()
|
||||
{
|
||||
return regIOobject::read();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -36,7 +36,7 @@ SourceFiles
|
||||
#ifndef transportModel_H
|
||||
#define transportModel_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "primitiveFieldsFwd.H"
|
||||
#include "volFieldsFwd.H"
|
||||
#include "surfaceFieldsFwd.H"
|
||||
|
||||
@ -50,8 +50,6 @@ namespace Foam
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class transportModel
|
||||
:
|
||||
public IOdictionary
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
@ -64,6 +62,10 @@ class transportModel
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("transportModel");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
@ -71,7 +73,7 @@ public:
|
||||
(
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi
|
||||
);
|
||||
);\
|
||||
|
||||
|
||||
//- Destructor
|
||||
@ -83,6 +85,9 @@ public:
|
||||
//- Return the laminar viscosity
|
||||
virtual tmp<volScalarField> nu() const = 0;
|
||||
|
||||
//- Return the laminar viscosity for patch
|
||||
virtual tmp<scalarField> nu(const label patchi) const = 0;
|
||||
|
||||
//- Correct the laminar viscosity
|
||||
virtual void correct() = 0;
|
||||
|
||||
|
||||
@ -107,6 +107,12 @@ public:
|
||||
return nu_;
|
||||
}
|
||||
|
||||
//- Return the laminar viscosity for patch
|
||||
tmp<scalarField> nu(const label patchi) const
|
||||
{
|
||||
return nu_.boundaryField()[patchi];
|
||||
}
|
||||
|
||||
//- Correct the laminar viscosity
|
||||
void correct()
|
||||
{
|
||||
|
||||
@ -102,6 +102,12 @@ public:
|
||||
return nu_;
|
||||
}
|
||||
|
||||
//- Return the laminar viscosity for patch
|
||||
tmp<scalarField> nu(const label patchi) const
|
||||
{
|
||||
return nu_.boundaryField()[patchi];
|
||||
}
|
||||
|
||||
//- Correct the laminar viscosity
|
||||
void correct()
|
||||
{
|
||||
|
||||
@ -103,6 +103,12 @@ public:
|
||||
return nu_;
|
||||
}
|
||||
|
||||
//- Return the laminar viscosity for patch
|
||||
tmp<scalarField> nu(const label patchi) const
|
||||
{
|
||||
return nu_.boundaryField()[patchi];
|
||||
}
|
||||
|
||||
//- Correct the laminar viscosity
|
||||
void correct()
|
||||
{
|
||||
|
||||
@ -92,6 +92,12 @@ public:
|
||||
return nu_;
|
||||
}
|
||||
|
||||
//- Return the laminar viscosity for patch
|
||||
tmp<scalarField> nu(const label patchi) const
|
||||
{
|
||||
return nu_.boundaryField()[patchi];
|
||||
}
|
||||
|
||||
//- Correct the laminar viscosity (not appropriate, viscosity constant)
|
||||
void correct()
|
||||
{}
|
||||
|
||||
@ -103,6 +103,12 @@ public:
|
||||
return nu_;
|
||||
}
|
||||
|
||||
//- Return the laminar viscosity for patch
|
||||
tmp<scalarField> nu(const label patchi) const
|
||||
{
|
||||
return nu_.boundaryField()[patchi];
|
||||
}
|
||||
|
||||
//- Correct the laminar viscosity
|
||||
void correct()
|
||||
{
|
||||
|
||||
@ -154,6 +154,9 @@ public:
|
||||
//- Return the laminar viscosity
|
||||
virtual tmp<volScalarField> nu() const = 0;
|
||||
|
||||
//- Return the laminar viscosity for patch
|
||||
virtual tmp<scalarField> nu(const label patchi) const = 0;
|
||||
|
||||
//- Correct the laminar viscosity
|
||||
virtual void correct() = 0;
|
||||
|
||||
|
||||
@ -212,9 +212,14 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
|
||||
const tmp<volScalarField> tk = turbModel.k();
|
||||
const volScalarField& k = tk();
|
||||
|
||||
const IOdictionary& transportProperties =
|
||||
db().lookupObject<IOdictionary>("transportProperties");
|
||||
|
||||
// Molecular Prandtl number
|
||||
const scalar
|
||||
Pr(dimensionedScalar(turbModel.transport().lookup("Pr")).value());
|
||||
const scalar Pr
|
||||
(
|
||||
dimensionedScalar(transportProperties.lookup("Pr")).value()
|
||||
);
|
||||
|
||||
// Populate boundary values
|
||||
scalarField& alphatw = *this;
|
||||
|
||||
@ -192,9 +192,9 @@ void turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
|
||||
patch().lookupPatchField<volScalarField, scalar>(alphaEffName_);
|
||||
|
||||
// retrieve (constant) specific heat capacity from transport dictionary
|
||||
const turbulenceModel& turbulence =
|
||||
db().lookupObject<turbulenceModel>("turbulenceModel");
|
||||
const scalar Cp0(readScalar(turbulence.transport().lookup("Cp0")));
|
||||
const IOdictionary& transportProperties =
|
||||
db().lookupObject<IOdictionary>("transportProperties");
|
||||
const scalar Cp0(readScalar(transportProperties.lookup("Cp0")));
|
||||
|
||||
switch (heatSource_)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user