mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
@ -143,10 +143,7 @@ Foam::ThermalDiffusivity<BasicTurbulenceModel>::alphat
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>
|
||||
(
|
||||
new scalarField(this->mesh_.boundary()[patchi].size(), Zero)
|
||||
);
|
||||
return tmp<scalarField>::New(this->mesh_.boundary()[patchi].size(), Zero);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -168,16 +168,10 @@ tmp<volScalarField> DESModel<BasicTurbulenceModel>::Ssigma
|
||||
template<class BasicTurbulenceModel>
|
||||
tmp<volScalarField> DESModel<BasicTurbulenceModel>::fd() const
|
||||
{
|
||||
return tmp<volScalarField>::New
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"fd",
|
||||
this->mesh_.time().timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
"fd",
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh_,
|
||||
dimensionedScalar(dimless, Zero)
|
||||
);
|
||||
|
||||
@ -53,21 +53,12 @@ void Foam::LESModels::IDDESDelta::calcDelta()
|
||||
// Wall-normal vectors
|
||||
const volVectorField& n = wallDist::New(mesh).n();
|
||||
|
||||
tmp<volScalarField> tfaceToFacenMax
|
||||
auto tfaceToFacenMax = volScalarField::New
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"faceToFaceMax",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimLength, Zero)
|
||||
)
|
||||
"faceToFaceMax",
|
||||
IOobject::NO_REGISTER,
|
||||
mesh,
|
||||
dimensionedScalar(dimLength, Zero)
|
||||
);
|
||||
|
||||
scalarField& faceToFacenMax = tfaceToFacenMax.ref().primitiveFieldRef();
|
||||
|
||||
@ -182,19 +182,12 @@ Foam::tmp<Foam::volSymmTensorField> Foam::anisotropicFilter::operator()
|
||||
{
|
||||
correctBoundaryConditions(unFilteredField);
|
||||
|
||||
tmp<volSymmTensorField> tmpFilteredField
|
||||
auto tmpFilteredField = volSymmTensorField::New
|
||||
(
|
||||
new volSymmTensorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"anisotropicFilteredSymmTensorField",
|
||||
mesh().time().timeName(),
|
||||
mesh()
|
||||
),
|
||||
mesh(),
|
||||
unFilteredField().dimensions()
|
||||
)
|
||||
"anisotropicFilteredSymmTensorField",
|
||||
IOobject::NO_REGISTER,
|
||||
mesh(),
|
||||
unFilteredField().dimensions()
|
||||
);
|
||||
|
||||
for (direction d=0; d<symmTensor::nComponents; d++)
|
||||
@ -218,19 +211,12 @@ Foam::tmp<Foam::volTensorField> Foam::anisotropicFilter::operator()
|
||||
{
|
||||
correctBoundaryConditions(unFilteredField);
|
||||
|
||||
tmp<volTensorField> tmpFilteredField
|
||||
auto tmpFilteredField = volTensorField::New
|
||||
(
|
||||
new volTensorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"anisotropicFilteredTensorField",
|
||||
mesh().time().timeName(),
|
||||
mesh()
|
||||
),
|
||||
mesh(),
|
||||
unFilteredField().dimensions()
|
||||
)
|
||||
"anisotropicFilteredTensorField",
|
||||
IOobject::NO_REGISTER,
|
||||
mesh(),
|
||||
unFilteredField().dimensions()
|
||||
);
|
||||
|
||||
for (direction d=0; d<tensor::nComponents; d++)
|
||||
|
||||
@ -138,14 +138,10 @@ void dynamicKEqn<BasicTurbulenceModel>::correctNut()
|
||||
template<class BasicTurbulenceModel>
|
||||
tmp<fvScalarMatrix> dynamicKEqn<BasicTurbulenceModel>::kSource() const
|
||||
{
|
||||
return tmp<fvScalarMatrix>
|
||||
return tmp<fvScalarMatrix>::New
|
||||
(
|
||||
new fvScalarMatrix
|
||||
(
|
||||
k_,
|
||||
dimVolume*this->rho_.dimensions()*k_.dimensions()
|
||||
/dimTime
|
||||
)
|
||||
k_,
|
||||
dimVolume*this->rho_.dimensions()*k_.dimensions()/dimTime
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -52,14 +52,10 @@ void kEqn<BasicTurbulenceModel>::correctNut()
|
||||
template<class BasicTurbulenceModel>
|
||||
tmp<fvScalarMatrix> kEqn<BasicTurbulenceModel>::kSource() const
|
||||
{
|
||||
return tmp<fvScalarMatrix>
|
||||
return tmp<fvScalarMatrix>::New
|
||||
(
|
||||
new fvScalarMatrix
|
||||
(
|
||||
k_,
|
||||
dimVolume*this->rho_.dimensions()*k_.dimensions()
|
||||
/dimTime
|
||||
)
|
||||
k_,
|
||||
dimVolume*this->rho_.dimensions()*k_.dimensions()/dimTime
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -69,14 +69,10 @@ void LaunderSharmaKE<BasicTurbulenceModel>::correctNut()
|
||||
template<class BasicTurbulenceModel>
|
||||
tmp<fvScalarMatrix> LaunderSharmaKE<BasicTurbulenceModel>::kSource() const
|
||||
{
|
||||
return tmp<fvScalarMatrix>
|
||||
return tmp<fvScalarMatrix>::New
|
||||
(
|
||||
new fvScalarMatrix
|
||||
(
|
||||
k_,
|
||||
dimVolume*this->rho_.dimensions()*k_.dimensions()
|
||||
/dimTime
|
||||
)
|
||||
k_,
|
||||
dimVolume*this->rho_.dimensions()*k_.dimensions()/dimTime
|
||||
);
|
||||
}
|
||||
|
||||
@ -84,14 +80,10 @@ tmp<fvScalarMatrix> LaunderSharmaKE<BasicTurbulenceModel>::kSource() const
|
||||
template<class BasicTurbulenceModel>
|
||||
tmp<fvScalarMatrix> LaunderSharmaKE<BasicTurbulenceModel>::epsilonSource() const
|
||||
{
|
||||
return tmp<fvScalarMatrix>
|
||||
return tmp<fvScalarMatrix>::New
|
||||
(
|
||||
new fvScalarMatrix
|
||||
(
|
||||
epsilon_,
|
||||
dimVolume*this->rho_.dimensions()*epsilon_.dimensions()
|
||||
/dimTime
|
||||
)
|
||||
epsilon_,
|
||||
dimVolume*this->rho_.dimensions()*epsilon_.dimensions()/dimTime
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -193,14 +193,10 @@ Foam::RASModel<BasicTurbulenceModel>::epsilon() const
|
||||
{
|
||||
const scalar Cmu = 0.09;
|
||||
|
||||
return tmp<volScalarField>::New
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
||||
this->mesh_.time().timeName(),
|
||||
this->mesh_
|
||||
),
|
||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
Cmu*this->k()*this->omega()
|
||||
);
|
||||
}
|
||||
@ -213,14 +209,10 @@ Foam::RASModel<BasicTurbulenceModel>::omega() const
|
||||
const scalar betaStar = 0.09;
|
||||
const dimensionedScalar k0(sqr(dimLength/dimTime), SMALL);
|
||||
|
||||
return tmp<volScalarField>::New
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
|
||||
this->mesh_.time().timeName(),
|
||||
this->mesh_
|
||||
),
|
||||
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
this->epsilon()/(betaStar*(this->k() + k0))
|
||||
);
|
||||
}
|
||||
|
||||
@ -53,14 +53,10 @@ void RNGkEpsilon<BasicTurbulenceModel>::correctNut()
|
||||
template<class BasicTurbulenceModel>
|
||||
tmp<fvScalarMatrix> RNGkEpsilon<BasicTurbulenceModel>::kSource() const
|
||||
{
|
||||
return tmp<fvScalarMatrix>
|
||||
return tmp<fvScalarMatrix>::New
|
||||
(
|
||||
new fvScalarMatrix
|
||||
(
|
||||
k_,
|
||||
dimVolume*this->rho_.dimensions()*k_.dimensions()
|
||||
/dimTime
|
||||
)
|
||||
k_,
|
||||
dimVolume*this->rho_.dimensions()*k_.dimensions()/dimTime
|
||||
);
|
||||
}
|
||||
|
||||
@ -68,14 +64,10 @@ tmp<fvScalarMatrix> RNGkEpsilon<BasicTurbulenceModel>::kSource() const
|
||||
template<class BasicTurbulenceModel>
|
||||
tmp<fvScalarMatrix> RNGkEpsilon<BasicTurbulenceModel>::epsilonSource() const
|
||||
{
|
||||
return tmp<fvScalarMatrix>
|
||||
return tmp<fvScalarMatrix>::New
|
||||
(
|
||||
new fvScalarMatrix
|
||||
(
|
||||
epsilon_,
|
||||
dimVolume*this->rho_.dimensions()*epsilon_.dimensions()
|
||||
/dimTime
|
||||
)
|
||||
epsilon_,
|
||||
dimVolume*this->rho_.dimensions()*epsilon_.dimensions()/dimTime
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -53,14 +53,10 @@ void kEpsilon<BasicTurbulenceModel>::correctNut()
|
||||
template<class BasicTurbulenceModel>
|
||||
tmp<fvScalarMatrix> kEpsilon<BasicTurbulenceModel>::kSource() const
|
||||
{
|
||||
return tmp<fvScalarMatrix>
|
||||
return tmp<fvScalarMatrix>::New
|
||||
(
|
||||
new fvScalarMatrix
|
||||
(
|
||||
k_,
|
||||
dimVolume*this->rho_.dimensions()*k_.dimensions()
|
||||
/dimTime
|
||||
)
|
||||
k_,
|
||||
dimVolume*this->rho_.dimensions()*k_.dimensions()/dimTime
|
||||
);
|
||||
}
|
||||
|
||||
@ -68,14 +64,10 @@ tmp<fvScalarMatrix> kEpsilon<BasicTurbulenceModel>::kSource() const
|
||||
template<class BasicTurbulenceModel>
|
||||
tmp<fvScalarMatrix> kEpsilon<BasicTurbulenceModel>::epsilonSource() const
|
||||
{
|
||||
return tmp<fvScalarMatrix>
|
||||
return tmp<fvScalarMatrix>::New
|
||||
(
|
||||
new fvScalarMatrix
|
||||
(
|
||||
epsilon_,
|
||||
dimVolume*this->rho_.dimensions()*epsilon_.dimensions()
|
||||
/dimTime
|
||||
)
|
||||
epsilon_,
|
||||
dimVolume*this->rho_.dimensions()*epsilon_.dimensions()/dimTime
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -95,11 +95,11 @@ tmp<volScalarField::Internal> kOmegaSSTLM<BasicTurbulenceModel>::Fthetat
|
||||
const volScalarField::Internal ReOmega(sqr(y)*omega/nu);
|
||||
const volScalarField::Internal Fwake(exp(-sqr(ReOmega/1e5)));
|
||||
|
||||
return tmp<volScalarField::Internal>
|
||||
return volScalarField::Internal::New
|
||||
(
|
||||
new volScalarField::Internal
|
||||
IOobject::groupName("Fthetat", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
(
|
||||
IOobject::groupName("Fthetat", this->alphaRhoPhi_.group()),
|
||||
min
|
||||
(
|
||||
max
|
||||
@ -118,21 +118,14 @@ template<class BasicTurbulenceModel>
|
||||
tmp<volScalarField::Internal>
|
||||
kOmegaSSTLM<BasicTurbulenceModel>::ReThetac() const
|
||||
{
|
||||
tmp<volScalarField::Internal> tReThetac
|
||||
auto tReThetac = volScalarField::Internal::New
|
||||
(
|
||||
new volScalarField::Internal
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("ReThetac", this->alphaRhoPhi_.group()),
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_
|
||||
),
|
||||
this->mesh_,
|
||||
dimless
|
||||
)
|
||||
IOobject::groupName("ReThetac", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh_,
|
||||
dimless
|
||||
);
|
||||
volScalarField::Internal& ReThetac = tReThetac.ref();
|
||||
auto& ReThetac = tReThetac.ref();
|
||||
|
||||
forAll(ReThetac, celli)
|
||||
{
|
||||
@ -161,21 +154,14 @@ tmp<volScalarField::Internal> kOmegaSSTLM<BasicTurbulenceModel>::Flength
|
||||
const volScalarField::Internal& nu
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField::Internal> tFlength
|
||||
auto tFlength = volScalarField::Internal::New
|
||||
(
|
||||
new volScalarField::Internal
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("Flength", this->alphaRhoPhi_.group()),
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_
|
||||
),
|
||||
this->mesh_,
|
||||
dimless
|
||||
)
|
||||
IOobject::groupName("Flength", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh_,
|
||||
dimless
|
||||
);
|
||||
volScalarField::Internal& Flength = tFlength.ref();
|
||||
auto& Flength = tFlength.ref();
|
||||
|
||||
const volScalarField::Internal& omega = this->omega_();
|
||||
const volScalarField::Internal& y = this->y_();
|
||||
@ -226,21 +212,14 @@ tmp<volScalarField::Internal> kOmegaSSTLM<BasicTurbulenceModel>::ReThetat0
|
||||
const volScalarField::Internal& nu
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField::Internal> tReThetat0
|
||||
auto tReThetat0 = volScalarField::Internal::New
|
||||
(
|
||||
new volScalarField::Internal
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("ReThetat0", this->alphaRhoPhi_.group()),
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_
|
||||
),
|
||||
this->mesh_,
|
||||
dimless
|
||||
)
|
||||
IOobject::groupName("ReThetat0", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh_,
|
||||
dimless
|
||||
);
|
||||
volScalarField::Internal& ReThetat0 = tReThetat0.ref();
|
||||
auto& ReThetat0 = tReThetat0.ref();
|
||||
|
||||
const volScalarField& k = this->k_;
|
||||
|
||||
@ -349,13 +328,11 @@ tmp<volScalarField::Internal> kOmegaSSTLM<BasicTurbulenceModel>::Fonset
|
||||
|
||||
const volScalarField::Internal Fonset3(max(1 - pow3(RT/2.5), scalar(0)));
|
||||
|
||||
return tmp<volScalarField::Internal>
|
||||
return volScalarField::Internal::New
|
||||
(
|
||||
new volScalarField::Internal
|
||||
(
|
||||
IOobject::groupName("Fonset", this->alphaRhoPhi_.group()),
|
||||
max(Fonset2 - Fonset3, scalar(0))
|
||||
)
|
||||
IOobject::groupName("Fonset", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
max(Fonset2 - Fonset3, scalar(0))
|
||||
);
|
||||
}
|
||||
|
||||
@ -459,7 +436,8 @@ kOmegaSSTLM<BasicTurbulenceModel>::kOmegaSSTLM
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
IOobject::AUTO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
this->mesh_
|
||||
),
|
||||
@ -472,7 +450,8 @@ kOmegaSSTLM<BasicTurbulenceModel>::kOmegaSSTLM
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
IOobject::AUTO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
this->mesh_
|
||||
),
|
||||
|
||||
@ -101,14 +101,10 @@ void realizableKE<BasicTurbulenceModel>::correctNut()
|
||||
template<class BasicTurbulenceModel>
|
||||
tmp<fvScalarMatrix> realizableKE<BasicTurbulenceModel>::kSource() const
|
||||
{
|
||||
return tmp<fvScalarMatrix>
|
||||
return tmp<fvScalarMatrix>::New
|
||||
(
|
||||
new fvScalarMatrix
|
||||
(
|
||||
k_,
|
||||
dimVolume*this->rho_.dimensions()*k_.dimensions()
|
||||
/dimTime
|
||||
)
|
||||
k_,
|
||||
dimVolume*this->rho_.dimensions()*k_.dimensions()/dimTime
|
||||
);
|
||||
}
|
||||
|
||||
@ -116,14 +112,10 @@ tmp<fvScalarMatrix> realizableKE<BasicTurbulenceModel>::kSource() const
|
||||
template<class BasicTurbulenceModel>
|
||||
tmp<fvScalarMatrix> realizableKE<BasicTurbulenceModel>::epsilonSource() const
|
||||
{
|
||||
return tmp<fvScalarMatrix>
|
||||
return tmp<fvScalarMatrix>::New
|
||||
(
|
||||
new fvScalarMatrix
|
||||
(
|
||||
epsilon_,
|
||||
dimVolume*this->rho_.dimensions()*epsilon_.dimensions()
|
||||
/dimTime
|
||||
)
|
||||
epsilon_,
|
||||
dimVolume*this->rho_.dimensions()*epsilon_.dimensions()/dimTime
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -65,7 +65,8 @@ Foam::eddyViscosity<BasicTurbulenceModel>::eddyViscosity
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
IOobject::AUTO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
this->mesh_
|
||||
)
|
||||
@ -104,22 +105,12 @@ Foam::eddyViscosity<BasicTurbulenceModel>::R() const
|
||||
}
|
||||
}
|
||||
|
||||
return tmp<volSymmTensorField>
|
||||
return volSymmTensorField::New
|
||||
(
|
||||
new volSymmTensorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("R", this->alphaRhoPhi_.group()),
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
((2.0/3.0)*I)*tk() - (nut_)*devTwoSymm(fvc::grad(this->U_)),
|
||||
patchFieldTypes
|
||||
)
|
||||
IOobject::groupName("R", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
((2.0/3.0)*I)*tk() - (nut_)*devTwoSymm(fvc::grad(this->U_)),
|
||||
patchFieldTypes
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -89,17 +89,10 @@ template<class BasicTurbulenceModel>
|
||||
tmp<volScalarField>
|
||||
Stokes<BasicTurbulenceModel>::nut() const
|
||||
{
|
||||
return tmp<volScalarField>::New
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("nut", this->alphaRhoPhi_.group()),
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::groupName("nut", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh_,
|
||||
dimensionedScalar(dimViscosity, Zero)
|
||||
);
|
||||
@ -113,10 +106,7 @@ Stokes<BasicTurbulenceModel>::nut
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>
|
||||
(
|
||||
new scalarField(this->mesh_.boundary()[patchi].size(), Zero)
|
||||
);
|
||||
return tmp<scalarField>::New(this->mesh_.boundary()[patchi].size(), Zero);
|
||||
}
|
||||
|
||||
|
||||
@ -124,12 +114,11 @@ template<class BasicTurbulenceModel>
|
||||
tmp<volScalarField>
|
||||
Stokes<BasicTurbulenceModel>::nuEff() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
return volScalarField::New
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject::groupName("nuEff", this->alphaRhoPhi_.group()), this->nu()
|
||||
)
|
||||
IOobject::groupName("nuEff", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
this->nu()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -189,17 +189,10 @@ template<class BasicTurbulenceModel>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::laminarModel<BasicTurbulenceModel>::nut() const
|
||||
{
|
||||
return tmp<volScalarField>::New
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("nut", this->alphaRhoPhi_.group()),
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::groupName("nut", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh_,
|
||||
dimensionedScalar(dimViscosity, Zero)
|
||||
);
|
||||
@ -213,10 +206,7 @@ Foam::laminarModel<BasicTurbulenceModel>::nut
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>
|
||||
(
|
||||
new scalarField(this->mesh_.boundary()[patchi].size(), Zero)
|
||||
);
|
||||
return tmp<scalarField>::New(this->mesh_.boundary()[patchi].size(), Zero);
|
||||
}
|
||||
|
||||
|
||||
@ -224,12 +214,11 @@ template<class BasicTurbulenceModel>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::laminarModel<BasicTurbulenceModel>::nuEff() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
return volScalarField::New
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject::groupName("nuEff", this->alphaRhoPhi_.group()), this->nu()
|
||||
)
|
||||
IOobject::groupName("nuEff", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
this->nu()
|
||||
);
|
||||
}
|
||||
|
||||
@ -249,17 +238,10 @@ template<class BasicTurbulenceModel>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::laminarModel<BasicTurbulenceModel>::k() const
|
||||
{
|
||||
return tmp<volScalarField>::New
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("k", this->alphaRhoPhi_.group()),
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::groupName("k", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh_,
|
||||
dimensionedScalar(sqr(this->U_.dimensions()), Zero)
|
||||
);
|
||||
@ -270,17 +252,10 @@ template<class BasicTurbulenceModel>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::laminarModel<BasicTurbulenceModel>::epsilon() const
|
||||
{
|
||||
return tmp<volScalarField>::New
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh_,
|
||||
dimensionedScalar(sqr(this->U_.dimensions())/dimTime, Zero)
|
||||
);
|
||||
@ -291,17 +266,10 @@ template<class BasicTurbulenceModel>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::laminarModel<BasicTurbulenceModel>::omega() const
|
||||
{
|
||||
return tmp<volScalarField>::New
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh_,
|
||||
dimensionedScalar(dimless/dimTime, Zero)
|
||||
);
|
||||
@ -312,17 +280,10 @@ template<class BasicTurbulenceModel>
|
||||
Foam::tmp<Foam::volSymmTensorField>
|
||||
Foam::laminarModel<BasicTurbulenceModel>::R() const
|
||||
{
|
||||
return tmp<volSymmTensorField>::New
|
||||
return volSymmTensorField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("R", this->alphaRhoPhi_.group()),
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::groupName("R", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh_,
|
||||
dimensionedSymmTensor(sqr(this->U_.dimensions()), Zero)
|
||||
);
|
||||
|
||||
@ -80,17 +80,10 @@ tmp<volScalarField> kL<BasicTurbulenceModel>::epsilonCanopy() const
|
||||
return Cd*LAD*mag(U)*k_;
|
||||
}
|
||||
|
||||
return tmp<volScalarField>::New
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("epsilonCanopy", this->alphaRhoPhi_.group()),
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::groupName("epsilonCanopy", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh_,
|
||||
dimensionedScalar(sqr(dimLength)/pow3(dimTime), Zero)
|
||||
);
|
||||
@ -118,26 +111,22 @@ tmp<volScalarField> kL<BasicTurbulenceModel>::epsilon() const
|
||||
template<class BasicTurbulenceModel>
|
||||
tmp<volScalarField> kL<BasicTurbulenceModel>::canopyHeight() const
|
||||
{
|
||||
const auto* canopyHeightPtr =
|
||||
this->mesh_.template findObject<volScalarField>("canopyHeight");
|
||||
tmp<volScalarField> tcanopy;
|
||||
|
||||
if (canopyHeightPtr)
|
||||
tcanopy.cref
|
||||
(
|
||||
this->mesh_.template cfindObject<volScalarField>("canopyHeight")
|
||||
);
|
||||
|
||||
if (tcanopy)
|
||||
{
|
||||
const auto& canopyHeight = *canopyHeightPtr;
|
||||
return canopyHeight;
|
||||
return tcanopy;
|
||||
}
|
||||
|
||||
return tmp<volScalarField>::New
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("canopyHeight", this->alphaRhoPhi_.group()),
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::groupName("canopyHeight", this->alphaRhoPhi_.group()),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh_,
|
||||
dimensionedScalar(dimLength, Zero)
|
||||
);
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 IH-Cantabria
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -56,16 +56,10 @@ namespace fv
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::fv::multiphaseMangrovesSource::dragCoeff(const volVectorField& U) const
|
||||
{
|
||||
auto tdragCoeff = tmp<volScalarField>::New
|
||||
auto tdragCoeff = volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ":dragCoeff",
|
||||
mesh_.time().timeName(),
|
||||
mesh_.time(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::scopedName(typeName, "dragCoeff"),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimless/dimTime, Zero)
|
||||
);
|
||||
@ -101,16 +95,10 @@ Foam::fv::multiphaseMangrovesSource::dragCoeff(const volVectorField& U) const
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::fv::multiphaseMangrovesSource::inertiaCoeff() const
|
||||
{
|
||||
auto tinertiaCoeff = tmp<volScalarField>::New
|
||||
auto tinertiaCoeff = volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ":inertiaCoeff",
|
||||
mesh_.time().timeName(),
|
||||
mesh_.time(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::scopedName(typeName, "inertiaCoeff"),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimless, Zero)
|
||||
);
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 IH-Cantabria
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -58,21 +58,14 @@ Foam::fv::multiphaseMangrovesTurbulenceModel::kCoeff
|
||||
const volVectorField& U
|
||||
) const
|
||||
{
|
||||
auto tkCoeff = tmp<volScalarField>::New
|
||||
auto tkCoeff = volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ":kCoeff",
|
||||
mesh_.time().timeName(),
|
||||
mesh_.time(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::scopedName(typeName, "kCoeff"),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimless/dimTime, Zero)
|
||||
);
|
||||
|
||||
volScalarField& kCoeff = tkCoeff.ref();
|
||||
auto& kCoeff = tkCoeff.ref();
|
||||
|
||||
forAll(zoneIDs_, i)
|
||||
{
|
||||
@ -104,21 +97,13 @@ Foam::fv::multiphaseMangrovesTurbulenceModel::epsilonCoeff
|
||||
const volVectorField& U
|
||||
) const
|
||||
{
|
||||
auto tepsilonCoeff = tmp<volScalarField>::New
|
||||
auto tepsilonCoeff = volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ":epsilonCoeff",
|
||||
mesh_.time().timeName(),
|
||||
mesh_.time(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::scopedName(typeName, "epsilonCoeff"),
|
||||
mesh_,
|
||||
dimensionedScalar(dimless/dimTime, Zero)
|
||||
);
|
||||
|
||||
volScalarField& epsilonCoeff = tepsilonCoeff.ref();
|
||||
auto& epsilonCoeff = tepsilonCoeff.ref();
|
||||
|
||||
forAll(zoneIDs_, i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user