ENH: use tmp field factory methods [7] (#2723)
- thermophysicalModels, transportModels
This commit is contained in:
parent
71d4a23ec0
commit
51f150d84c
@ -253,11 +253,9 @@ baffleThickness() const
|
||||
nbrPatch.template lookupPatchField<volScalarField>(TName_)
|
||||
);
|
||||
|
||||
tmp<scalarField> tthickness
|
||||
(
|
||||
new scalarField(nbrField.baffleThickness())
|
||||
);
|
||||
scalarField& thickness = tthickness.ref();
|
||||
auto tthickness = tmp<scalarField>::New(nbrField.baffleThickness());
|
||||
auto& thickness = tthickness.ref();
|
||||
|
||||
mapDist.distribute(thickness);
|
||||
return tthickness;
|
||||
}
|
||||
@ -284,8 +282,9 @@ tmp<scalarField> thermalBaffle1DFvPatchScalarField<solidType>::qs() const
|
||||
nbrPatch.template lookupPatchField<volScalarField>(TName_)
|
||||
);
|
||||
|
||||
tmp<scalarField> tqs(new scalarField(nbrField.qs()));
|
||||
scalarField& qs = tqs.ref();
|
||||
auto tqs = tmp<scalarField>::New(nbrField.qs());
|
||||
auto& qs = tqs.ref();
|
||||
|
||||
mapDist.distribute(qs);
|
||||
return tqs;
|
||||
}
|
||||
|
@ -433,20 +433,8 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::coeffs
|
||||
<< "which has more functionalities and it can handle "
|
||||
<< "the assemble coupled option for energy. "
|
||||
<< abort(FatalError);
|
||||
/*
|
||||
const label index(this->patch().index());
|
||||
|
||||
const label nSubFaces(matrix.lduMesh().cellBoundMap()[mat][index].size());
|
||||
|
||||
Field<scalar> mapCoeffs(nSubFaces, Zero);
|
||||
|
||||
label subFaceI = 0;
|
||||
forAll(*this, faceI)
|
||||
{
|
||||
|
||||
}
|
||||
*/
|
||||
return tmp<Field<scalar>>(new Field<scalar>());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -804,7 +804,7 @@ tmp<Field<scalar>> turbulentTemperatureRadCoupledMixedFvPatchScalarField::coeffs
|
||||
<< "the assemble coupled option for energy. "
|
||||
<< abort(FatalError);
|
||||
|
||||
return tmp<Field<scalar>>(new Field<scalar>());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -285,8 +285,9 @@ Foam::basicThermo::basicThermo
|
||||
phasePropertyName(dictName, phaseName),
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::READ_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
)
|
||||
),
|
||||
|
||||
@ -303,11 +304,12 @@ Foam::basicThermo::basicThermo
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:alpha"),
|
||||
phaseScopedName("thermo", "alpha"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), Zero)
|
||||
@ -332,7 +334,8 @@ Foam::basicThermo::basicThermo
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
dict
|
||||
),
|
||||
@ -350,11 +353,12 @@ Foam::basicThermo::basicThermo
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:alpha"),
|
||||
phaseScopedName("thermo", "alpha"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), Zero)
|
||||
@ -378,8 +382,9 @@ Foam::basicThermo::basicThermo
|
||||
dictionaryName,
|
||||
mesh.time().constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::READ_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
)
|
||||
),
|
||||
|
||||
@ -396,11 +401,12 @@ Foam::basicThermo::basicThermo
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:alpha"),
|
||||
phaseScopedName("thermo", "alpha"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), Zero)
|
||||
|
@ -218,25 +218,15 @@ Foam::tmp<Foam::volScalarField> Foam::heThermo<BasicThermo, MixtureType>::he
|
||||
{
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
tmp<volScalarField> the
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto the = volScalarField::New
|
||||
(
|
||||
"he",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh,
|
||||
he_.dimensions()
|
||||
)
|
||||
);
|
||||
auto& he = the.ref();
|
||||
|
||||
volScalarField& he = the.ref();
|
||||
scalarField& heCells = he.primitiveFieldRef();
|
||||
const scalarField& pCells = p;
|
||||
const scalarField& TCells = T;
|
||||
@ -274,8 +264,8 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::he
|
||||
const labelList& cells
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> the(new scalarField(T.size()));
|
||||
scalarField& he = the.ref();
|
||||
auto the = tmp<scalarField>::New(T.size());
|
||||
auto& he = the.ref();
|
||||
|
||||
forAll(T, celli)
|
||||
{
|
||||
@ -294,8 +284,8 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::he
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> the(new scalarField(T.size()));
|
||||
scalarField& he = the.ref();
|
||||
auto the = tmp<scalarField>::New(T.size());
|
||||
auto& he = the.ref();
|
||||
|
||||
forAll(T, facei)
|
||||
{
|
||||
@ -313,25 +303,15 @@ Foam::heThermo<BasicThermo, MixtureType>::hc() const
|
||||
{
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
tmp<volScalarField> thc
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto thc = volScalarField::New
|
||||
(
|
||||
"hc",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh,
|
||||
he_.dimensions()
|
||||
)
|
||||
);
|
||||
auto& hcf = thc.ref();
|
||||
|
||||
volScalarField& hcf = thc.ref();
|
||||
scalarField& hcCells = hcf.primitiveFieldRef();
|
||||
|
||||
forAll(hcCells, celli)
|
||||
@ -363,8 +343,8 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::Cp
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> tCp(new scalarField(T.size()));
|
||||
scalarField& cp = tCp.ref();
|
||||
auto tCp = tmp<scalarField>::New(T.size());
|
||||
auto& cp = tCp.ref();
|
||||
|
||||
forAll(T, facei)
|
||||
{
|
||||
@ -404,25 +384,14 @@ Foam::heThermo<BasicThermo, MixtureType>::Cp() const
|
||||
{
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
tmp<volScalarField> tCp
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tCp = volScalarField::New
|
||||
(
|
||||
"Cp",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh,
|
||||
dimEnergy/dimMass/dimTemperature
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& cp = tCp.ref();
|
||||
auto& cp = tCp.ref();
|
||||
|
||||
forAll(this->T_, celli)
|
||||
{
|
||||
@ -458,8 +427,8 @@ Foam::heThermo<BasicThermo, MixtureType>::Cv
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> tCv(new scalarField(T.size()));
|
||||
scalarField& cv = tCv.ref();
|
||||
auto tCv = tmp<scalarField>::New(T.size());
|
||||
auto& cv = tCv.ref();
|
||||
|
||||
forAll(T, facei)
|
||||
{
|
||||
@ -499,25 +468,14 @@ Foam::heThermo<BasicThermo, MixtureType>::Cv() const
|
||||
{
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
tmp<volScalarField> tCv
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tCv = volScalarField::New
|
||||
(
|
||||
"Cv",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh,
|
||||
dimEnergy/dimMass/dimTemperature
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& cv = tCv.ref();
|
||||
auto& cv = tCv.ref();
|
||||
|
||||
forAll(this->T_, celli)
|
||||
{
|
||||
@ -549,8 +507,8 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::gamma
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> tgamma(new scalarField(T.size()));
|
||||
scalarField& gamma = tgamma.ref();
|
||||
auto tgamma = tmp<scalarField>::New(T.size());
|
||||
auto& gamma = tgamma.ref();
|
||||
|
||||
forAll(T, facei)
|
||||
{
|
||||
@ -568,25 +526,14 @@ Foam::heThermo<BasicThermo, MixtureType>::gamma() const
|
||||
{
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
tmp<volScalarField> tgamma
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tgamma = volScalarField::New
|
||||
(
|
||||
"gamma",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh,
|
||||
dimless
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& gamma = tgamma.ref();
|
||||
auto& gamma = tgamma.ref();
|
||||
|
||||
forAll(this->T_, celli)
|
||||
{
|
||||
@ -624,8 +571,8 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::Cpv
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> tCpv(new scalarField(T.size()));
|
||||
scalarField& Cpv = tCpv.ref();
|
||||
auto tCpv = tmp<scalarField>::New(T.size());
|
||||
auto& Cpv = tCpv.ref();
|
||||
|
||||
forAll(T, facei)
|
||||
{
|
||||
@ -643,25 +590,14 @@ Foam::heThermo<BasicThermo, MixtureType>::Cpv() const
|
||||
{
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
tmp<volScalarField> tCpv
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tCpv = volScalarField::New
|
||||
(
|
||||
"Cpv",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh,
|
||||
dimEnergy/dimMass/dimTemperature
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& Cpv = tCpv.ref();
|
||||
auto& Cpv = tCpv.ref();
|
||||
|
||||
forAll(this->T_, celli)
|
||||
{
|
||||
@ -696,8 +632,8 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::CpByCpv
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> tCpByCpv(new scalarField(T.size()));
|
||||
scalarField& CpByCpv = tCpByCpv.ref();
|
||||
auto tCpByCpv = tmp<scalarField>::New(T.size());
|
||||
auto& CpByCpv = tCpByCpv.ref();
|
||||
|
||||
forAll(T, facei)
|
||||
{
|
||||
@ -715,25 +651,14 @@ Foam::heThermo<BasicThermo, MixtureType>::CpByCpv() const
|
||||
{
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
tmp<volScalarField> tCpByCpv
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tCpByCpv = volScalarField::New
|
||||
(
|
||||
"CpByCpv",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh,
|
||||
dimless
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& CpByCpv = tCpByCpv.ref();
|
||||
auto& CpByCpv = tCpByCpv.ref();
|
||||
|
||||
forAll(this->T_, celli)
|
||||
{
|
||||
@ -776,8 +701,8 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::THE
|
||||
const labelList& cells
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> tT(new scalarField(h.size()));
|
||||
scalarField& T = tT.ref();
|
||||
auto tT = tmp<scalarField>::New(h.size());
|
||||
auto& T = tT.ref();
|
||||
|
||||
forAll(h, celli)
|
||||
{
|
||||
@ -799,8 +724,9 @@ Foam::tmp<Foam::scalarField> Foam::heThermo<BasicThermo, MixtureType>::THE
|
||||
) const
|
||||
{
|
||||
|
||||
tmp<scalarField> tT(new scalarField(h.size()));
|
||||
scalarField& T = tT.ref();
|
||||
auto tT = tmp<scalarField>::New(h.size());
|
||||
auto& T = tT.ref();
|
||||
|
||||
forAll(h, facei)
|
||||
{
|
||||
T[facei] = this->patchFaceMixture
|
||||
@ -821,25 +747,15 @@ Foam::tmp<Foam::volScalarField> Foam::heThermo<BasicThermo, MixtureType>::W
|
||||
{
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
tmp<volScalarField> tW
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tW = volScalarField::New
|
||||
(
|
||||
"W",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh,
|
||||
dimMass/dimMoles
|
||||
)
|
||||
);
|
||||
auto& W = tW.ref();
|
||||
|
||||
volScalarField& W = tW.ref();
|
||||
scalarField& WCells = W.primitiveFieldRef();
|
||||
|
||||
forAll(WCells, celli)
|
||||
@ -847,7 +763,7 @@ Foam::tmp<Foam::volScalarField> Foam::heThermo<BasicThermo, MixtureType>::W
|
||||
WCells[celli] = this->cellMixture(celli).W();
|
||||
}
|
||||
|
||||
volScalarField::Boundary& WBf = W.boundaryFieldRef();
|
||||
auto& WBf = W.boundaryFieldRef();
|
||||
|
||||
forAll(WBf, patchi)
|
||||
{
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2017 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -48,11 +48,12 @@ Foam::psiThermo::psiThermo(const fvMesh& mesh, const word& phaseName)
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:psi"),
|
||||
phaseScopedName("thermo", "psi"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimensionSet(0, -2, 2, 0, 0)
|
||||
@ -62,11 +63,12 @@ Foam::psiThermo::psiThermo(const fvMesh& mesh, const word& phaseName)
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:mu"),
|
||||
phaseScopedName("thermo", "mu"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimensionSet(1, -1, -1, 0, 0)
|
||||
@ -87,11 +89,12 @@ Foam::psiThermo::psiThermo
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:psi"),
|
||||
phaseScopedName("thermo", "psi"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimensionSet(0, -2, 2, 0, 0)
|
||||
@ -101,11 +104,12 @@ Foam::psiThermo::psiThermo
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:mu"),
|
||||
phaseScopedName("thermo", "mu"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimensionSet(1, -1, -1, 0, 0)
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2017 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -47,11 +47,12 @@ Foam::rhoThermo::rhoThermo(const fvMesh& mesh, const word& phaseName)
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:rho"),
|
||||
phaseScopedName("thermo", "rho"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimDensity
|
||||
@ -61,11 +62,12 @@ Foam::rhoThermo::rhoThermo(const fvMesh& mesh, const word& phaseName)
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:psi"),
|
||||
phaseScopedName("thermo", "psi"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimensionSet(0, -2, 2, 0, 0)
|
||||
@ -75,11 +77,12 @@ Foam::rhoThermo::rhoThermo(const fvMesh& mesh, const word& phaseName)
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:mu"),
|
||||
phaseScopedName("thermo", "mu"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimensionSet(1, -1, -1, 0, 0)
|
||||
@ -99,11 +102,12 @@ Foam::rhoThermo::rhoThermo
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:rho"),
|
||||
phaseScopedName("thermo", "rho"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimDensity
|
||||
@ -113,11 +117,12 @@ Foam::rhoThermo::rhoThermo
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:psi"),
|
||||
phaseScopedName("thermo", "psi"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimensionSet(0, -2, 2, 0, 0)
|
||||
@ -127,11 +132,12 @@ Foam::rhoThermo::rhoThermo
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:mu"),
|
||||
phaseScopedName("thermo", "mu"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimensionSet(1, -1, -1, 0, 0)
|
||||
@ -151,11 +157,12 @@ Foam::rhoThermo::rhoThermo
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:rho"),
|
||||
phaseScopedName("thermo", "rho"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimDensity
|
||||
@ -165,11 +172,12 @@ Foam::rhoThermo::rhoThermo
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:psi"),
|
||||
phaseScopedName("thermo", "psi"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimensionSet(0, -2, 2, 0, 0)
|
||||
@ -179,11 +187,12 @@ Foam::rhoThermo::rhoThermo
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
phasePropertyName("thermo:mu"),
|
||||
phaseScopedName("thermo", "mu"),
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh,
|
||||
dimensionSet(1, -1, -1, 0, 0)
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020-2021,2023 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -470,25 +470,14 @@ template<class ReactionThermo, class ThermoType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::StandardChemistryModel<ReactionThermo, ThermoType>::tc() const
|
||||
{
|
||||
tmp<volScalarField> ttc
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto ttc = volScalarField::New
|
||||
(
|
||||
"tc",
|
||||
this->time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh(),
|
||||
dimensionedScalar(word::null, dimTime, SMALL),
|
||||
fvPatchFieldBase::extrapolatedCalculatedType()
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& tc = ttc.ref();
|
||||
|
||||
tmp<volScalarField> trho(this->thermo().rho());
|
||||
@ -544,22 +533,12 @@ template<class ReactionThermo, class ThermoType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::StandardChemistryModel<ReactionThermo, ThermoType>::Qdot() const
|
||||
{
|
||||
tmp<volScalarField> tQdot
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tQdot = volScalarField::New
|
||||
(
|
||||
"Qdot",
|
||||
this->mesh_.time().timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh_,
|
||||
dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
if (this->chemistry_)
|
||||
@ -592,24 +571,14 @@ Foam::StandardChemistryModel<ReactionThermo, ThermoType>::calculateRR
|
||||
scalar pf, cf, pr, cr;
|
||||
label lRef, rRef;
|
||||
|
||||
tmp<volScalarField::Internal> tRR
|
||||
(
|
||||
new volScalarField::Internal
|
||||
(
|
||||
IOobject
|
||||
auto tRR = volScalarField::Internal::New
|
||||
(
|
||||
"RR",
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh(),
|
||||
dimensionedScalar(dimMass/dimVolume/dimTime, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField::Internal& RR = tRR.ref();
|
||||
auto& RR = tRR.ref();
|
||||
|
||||
tmp<volScalarField> trho(this->thermo().rho());
|
||||
const scalarField& rho = trho();
|
||||
|
@ -112,25 +112,14 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::Su0pTphi
|
||||
scalar phi
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> tSu0
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tSu0 = volScalarField::New
|
||||
(
|
||||
"Su0",
|
||||
p.time().timeName(),
|
||||
p.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
p.mesh(),
|
||||
dimensionedScalar(dimVelocity, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& Su0 = tSu0.ref();
|
||||
auto& Su0 = tSu0.ref();
|
||||
|
||||
forAll(Su0, celli)
|
||||
{
|
||||
@ -165,25 +154,14 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::Su0pTphi
|
||||
const volScalarField& phi
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> tSu0
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tSu0 = volScalarField::New
|
||||
(
|
||||
"Su0",
|
||||
p.time().timeName(),
|
||||
p.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
p.mesh(),
|
||||
dimensionedScalar(dimVelocity, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& Su0 = tSu0.ref();
|
||||
auto& Su0 = tSu0.ref();
|
||||
|
||||
forAll(Su0, celli)
|
||||
{
|
||||
|
@ -112,25 +112,14 @@ Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi
|
||||
scalar phi
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> tSu0
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tSu0 = volScalarField::New
|
||||
(
|
||||
"Su0",
|
||||
p.time().timeName(),
|
||||
p.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
p.mesh(),
|
||||
dimensionedScalar(dimVelocity, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& Su0 = tSu0.ref();
|
||||
auto& Su0 = tSu0.ref();
|
||||
|
||||
forAll(Su0, celli)
|
||||
{
|
||||
@ -167,25 +156,14 @@ Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi
|
||||
const volScalarField& egr
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> tSu0
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tSu0 = volScalarField::New
|
||||
(
|
||||
"Su0",
|
||||
p.time().timeName(),
|
||||
p.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
p.mesh(),
|
||||
dimensionedScalar(dimVelocity, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& Su0 = tSu0.ref();
|
||||
auto& Su0 = tSu0.ref();
|
||||
|
||||
forAll(Su0, celli)
|
||||
{
|
||||
|
@ -295,15 +295,7 @@ Foam::laminarFlameSpeedModels::RaviPetersen::operator()() const
|
||||
|
||||
volScalarField EqR
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"EqR",
|
||||
p.time().timeName(),
|
||||
p.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
p.db().newIOobject("EqR"),
|
||||
p.mesh(),
|
||||
dimensionedScalar(dimless, Zero)
|
||||
);
|
||||
@ -323,25 +315,14 @@ Foam::laminarFlameSpeedModels::RaviPetersen::operator()() const
|
||||
EqR = equivalenceRatio_;
|
||||
}
|
||||
|
||||
tmp<volScalarField> tSu0
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tSu0 = volScalarField::New
|
||||
(
|
||||
"Su0",
|
||||
p.time().timeName(),
|
||||
p.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
p.mesh(),
|
||||
dimensionedScalar(dimVelocity, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& Su0 = tSu0.ref();
|
||||
auto& Su0 = tSu0.ref();
|
||||
|
||||
forAll(Su0, celli)
|
||||
{
|
||||
|
@ -71,22 +71,12 @@ Foam::laminarFlameSpeedModels::constant::~constant()
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::laminarFlameSpeedModels::constant::operator()() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"Su0",
|
||||
psiuReactionThermo_.T().time().timeName(),
|
||||
psiuReactionThermo_.T().db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
psiuReactionThermo_.T().mesh(),
|
||||
Su_
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ updateCoeffs()
|
||||
Foam::tmp<Foam::scalarField> Foam::radiation::
|
||||
greyDiffusiveViewFactorFixedValueFvPatchScalarField::qro(label bandI) const
|
||||
{
|
||||
tmp<scalarField> tqrt(new scalarField(qro_));
|
||||
auto tqrt = tmp<scalarField>::New(qro_);
|
||||
|
||||
const viewFactor& radiation =
|
||||
db().lookupObject<viewFactor>("radiationProperties");
|
||||
|
@ -215,18 +215,13 @@ void Foam::radiation::P1::calculate()
|
||||
const dimensionedScalar a0("a0", a_.dimensions(), ROOTVSMALL);
|
||||
|
||||
// Construct diffusion
|
||||
const volScalarField gamma
|
||||
(
|
||||
IOobject
|
||||
const auto tgamma = volScalarField::New
|
||||
(
|
||||
"gammaRad",
|
||||
G_.mesh().time().timeName(),
|
||||
G_.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::REGISTER, // used by boundary conditions
|
||||
1.0/(3.0*a_ + sigmaEff + a0)
|
||||
);
|
||||
const auto& gamma = tgamma();
|
||||
|
||||
// Solve G transport equation
|
||||
solve
|
||||
@ -254,21 +249,11 @@ void Foam::radiation::P1::calculate()
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::radiation::P1::Rp() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"Rp",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
4.0*absorptionEmission_->eCont()*physicoChemical::sigma
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -201,21 +201,12 @@ Foam::radiation::blackBodyEmission::deltaLambdaT
|
||||
const Vector2D<scalar>& band
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> deltaLambdaT
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto deltaLambdaT = volScalarField::New
|
||||
(
|
||||
"deltaLambdaT",
|
||||
T.mesh().time().timeName(),
|
||||
T.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
T.mesh(),
|
||||
dimensionedScalar("deltaLambdaT", dimless, 1.0)
|
||||
)
|
||||
);
|
||||
|
||||
if (band != Vector2D<scalar>::one)
|
||||
@ -239,20 +230,11 @@ Foam::radiation::blackBodyEmission::EbDeltaLambdaT
|
||||
const Vector2D<scalar>& band
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> Eb
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto Eb = volScalarField::New
|
||||
(
|
||||
"Eb",
|
||||
T.mesh().time().timeName(),
|
||||
T.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
physicoChemical::sigma*pow4(T)
|
||||
)
|
||||
);
|
||||
|
||||
if (band != Vector2D<scalar>::one)
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -356,7 +356,8 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T)
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
IOobject::AUTO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass/pow3(dimTime), Zero)
|
||||
@ -369,7 +370,8 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T)
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
IOobject::AUTO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass/pow3(dimTime), Zero)
|
||||
@ -395,7 +397,8 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T)
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
IOobject::AUTO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass/pow3(dimTime), Zero)
|
||||
@ -462,7 +465,8 @@ Foam::radiation::fvDOM::fvDOM
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
IOobject::AUTO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass/pow3(dimTime), Zero)
|
||||
@ -475,7 +479,8 @@ Foam::radiation::fvDOM::fvDOM
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
IOobject::AUTO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass/pow3(dimTime), Zero)
|
||||
@ -501,7 +506,8 @@ Foam::radiation::fvDOM::fvDOM
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
IOobject::AUTO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass/pow3(dimTime), Zero)
|
||||
@ -645,29 +651,18 @@ void Foam::radiation::fvDOM::calculate()
|
||||
Foam::tmp<Foam::volScalarField> Foam::radiation::fvDOM::Rp() const
|
||||
{
|
||||
// Construct using contribution from first frequency band
|
||||
tmp<volScalarField> tRp
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tRp = volScalarField::New
|
||||
(
|
||||
"Rp",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
(
|
||||
4
|
||||
* physicoChemical::sigma
|
||||
* (aLambda_[0] - absorptionEmission_->aDisp(0)())
|
||||
* blackBody_.deltaLambdaT(T_, absorptionEmission_->bands(0))
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField& Rp=tRp.ref();
|
||||
auto& Rp = tRp.ref();
|
||||
|
||||
// Add contributions over remaining frequency bands
|
||||
for (label j=1; j < nLambda_; j++)
|
||||
@ -688,25 +683,14 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::fvDOM::Rp() const
|
||||
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
|
||||
Foam::radiation::fvDOM::Ru() const
|
||||
{
|
||||
tmp<DimensionedField<scalar, volMesh>> tRu
|
||||
(
|
||||
new DimensionedField<scalar, volMesh>
|
||||
(
|
||||
IOobject
|
||||
auto tRu = DimensionedField<scalar, volMesh>::New
|
||||
(
|
||||
"Ru",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimensionSet(1, -1, -3, 0, 0), Zero)
|
||||
)
|
||||
);
|
||||
|
||||
DimensionedField<scalar, volMesh>& Ru=tRu.ref();
|
||||
auto& Ru = tRu.ref();
|
||||
|
||||
// Sum contributions over all frequency bands
|
||||
for (label j=0; j < nLambda_; j++)
|
||||
|
@ -82,16 +82,10 @@ void Foam::radiation::noRadiation::calculate()
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::radiation::noRadiation::Rp() const
|
||||
{
|
||||
return tmp<volScalarField>::New
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"Rp",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
@ -104,16 +98,10 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::noRadiation::Rp() const
|
||||
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
|
||||
Foam::radiation::noRadiation::Ru() const
|
||||
{
|
||||
return tmp<volScalarField::Internal>::New
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::Internal::New
|
||||
(
|
||||
"Ru",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero)
|
||||
);
|
||||
|
@ -83,16 +83,10 @@ void Foam::radiation::opaqueSolid::calculate()
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::radiation::opaqueSolid::Rp() const
|
||||
{
|
||||
return tmp<volScalarField>::New
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"Rp",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
@ -105,16 +99,10 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::opaqueSolid::Rp() const
|
||||
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
|
||||
Foam::radiation::opaqueSolid::Ru() const
|
||||
{
|
||||
return tmp<volScalarField::Internal>::New
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::Internal::New
|
||||
(
|
||||
"Ru",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero)
|
||||
);
|
||||
@ -126,4 +114,5 @@ Foam::label Foam::radiation::opaqueSolid::nBands() const
|
||||
return absorptionEmission_->nBands();
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -58,7 +58,8 @@ void Foam::faceReflecting::initialise(const dictionary& coeffs)
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
IOobject::AUTO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass/pow3(dimTime), Zero)
|
||||
@ -393,17 +394,8 @@ void Foam::faceReflecting::calculate()
|
||||
PtrList<List<scalarField>> patcha(patches.size());
|
||||
forAll(patchr, patchi)
|
||||
{
|
||||
patchr.set
|
||||
(
|
||||
patchi,
|
||||
new List<scalarField>(nBands)
|
||||
);
|
||||
|
||||
patcha.set
|
||||
(
|
||||
patchi,
|
||||
new List<scalarField>(nBands)
|
||||
);
|
||||
patchr.emplace_set(patchi, nBands);
|
||||
patcha.emplace_set(patchi, nBands);
|
||||
}
|
||||
|
||||
// Fill patchr
|
||||
|
@ -214,22 +214,15 @@ void Foam::faceShading::calculate()
|
||||
|
||||
if (debug)
|
||||
{
|
||||
auto thitFaces = tmp<surfaceScalarField>::New
|
||||
(
|
||||
IOobject
|
||||
auto thitFaces = surfaceScalarField::New
|
||||
(
|
||||
"hitFaces",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimless, Zero)
|
||||
);
|
||||
auto& hitFaces = thitFaces.ref();
|
||||
|
||||
surfaceScalarField& hitFaces = thitFaces.ref();
|
||||
surfaceScalarField::Boundary& hitFacesBf = hitFaces.boundaryFieldRef();
|
||||
|
||||
hitFacesBf = 0.0;
|
||||
|
@ -911,17 +911,10 @@ void Foam::radiation::solarLoad::calculate()
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::radiation::solarLoad::Rp() const
|
||||
{
|
||||
return tmp<volScalarField>::New
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"Rp",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
|
@ -1133,17 +1133,10 @@ void Foam::radiation::viewFactor::calculate()
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::radiation::viewFactor::Rp() const
|
||||
{
|
||||
return tmp<volScalarField>::New
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"Rp",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
@ -1156,17 +1149,10 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::viewFactor::Rp() const
|
||||
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
|
||||
Foam::radiation::viewFactor::Ru() const
|
||||
{
|
||||
return tmp<DimensionedField<scalar, volMesh>>::New
|
||||
(
|
||||
IOobject
|
||||
return DimensionedField<scalar, volMesh>::New
|
||||
(
|
||||
"Ru",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero)
|
||||
);
|
||||
|
@ -69,22 +69,12 @@ Foam::radiation::absorptionEmissionModel::a(const label bandI) const
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::absorptionEmissionModel::aCont(const label bandI) const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"aCont",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimless/dimLength, Zero)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -92,22 +82,12 @@ Foam::radiation::absorptionEmissionModel::aCont(const label bandI) const
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::absorptionEmissionModel::aDisp(const label bandI) const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"aDisp",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimless/dimLength, Zero)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -122,22 +102,12 @@ Foam::radiation::absorptionEmissionModel::e(const label bandI) const
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::absorptionEmissionModel::eCont(const label bandI) const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"eCont",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimless/dimLength, Zero)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -145,22 +115,12 @@ Foam::radiation::absorptionEmissionModel::eCont(const label bandI) const
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::absorptionEmissionModel::eDisp(const label bandI) const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"eDisp",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimless/dimLength, Zero)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -175,22 +135,12 @@ Foam::radiation::absorptionEmissionModel::E(const label bandI) const
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::absorptionEmissionModel::ECont(const label bandI) const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"ECont",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -198,22 +148,12 @@ Foam::radiation::absorptionEmissionModel::ECont(const label bandI) const
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::absorptionEmissionModel::EDisp(const label bandI) const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"EDisp",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -67,75 +67,39 @@ Foam::radiation::constantAbsorptionEmission::constantAbsorptionEmission
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::constantAbsorptionEmission::aCont(const label bandI) const
|
||||
{
|
||||
tmp<volScalarField> ta
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"a",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
a_
|
||||
)
|
||||
);
|
||||
|
||||
return ta;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::constantAbsorptionEmission::eCont(const label bandI) const
|
||||
{
|
||||
tmp<volScalarField> te
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"e",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
e_
|
||||
)
|
||||
);
|
||||
|
||||
return te;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::constantAbsorptionEmission::ECont(const label bandI) const
|
||||
{
|
||||
tmp<volScalarField> tE
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"E",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
E_
|
||||
)
|
||||
);
|
||||
|
||||
return tE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -194,25 +194,15 @@ Foam::radiation::greyMeanAbsorptionEmission::aCont(const label bandI) const
|
||||
const volScalarField& p = thermo_.p();
|
||||
|
||||
|
||||
tmp<volScalarField> ta
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto ta = volScalarField::New
|
||||
(
|
||||
"aCont" + name(bandI),
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh(),
|
||||
dimensionedScalar(dimless/dimLength, Zero),
|
||||
fvPatchFieldBase::extrapolatedCalculatedType()
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& a = ta.ref().primitiveFieldRef();
|
||||
auto& a = ta.ref().primitiveFieldRef();
|
||||
|
||||
forAll(a, celli)
|
||||
{
|
||||
@ -275,21 +265,12 @@ Foam::radiation::greyMeanAbsorptionEmission::eCont(const label bandI) const
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::greyMeanAbsorptionEmission::ECont(const label bandI) const
|
||||
{
|
||||
tmp<volScalarField> E
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto E = volScalarField::New
|
||||
(
|
||||
"ECont" + name(bandI),
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero)
|
||||
)
|
||||
);
|
||||
|
||||
const volScalarField* QdotPtr = mesh_.findObject<volScalarField>("Qdot");
|
||||
|
@ -56,11 +56,11 @@ greyMeanSolidAbsorptionEmission::X(const word specie) const
|
||||
const volScalarField& T = thermo_.T();
|
||||
const volScalarField& p = thermo_.p();
|
||||
|
||||
tmp<scalarField> tXj(new scalarField(T.primitiveField().size(), Zero));
|
||||
scalarField& Xj = tXj.ref();
|
||||
auto tXj = tmp<scalarField>::New(T.primitiveField().size(), Zero);
|
||||
auto& Xj = tXj.ref();
|
||||
|
||||
tmp<scalarField> tRhoInv(new scalarField(T.primitiveField().size(), Zero));
|
||||
scalarField& rhoInv = tRhoInv.ref();
|
||||
auto tRhoInv = tmp<scalarField>::New(T.primitiveField().size(), Zero);
|
||||
auto& rhoInv = tRhoInv.ref();
|
||||
|
||||
forAll(mixture_.Y(), specieI)
|
||||
{
|
||||
@ -142,25 +142,15 @@ Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::greyMeanSolidAbsorptionEmission::
|
||||
calc(const label propertyId) const
|
||||
{
|
||||
tmp<volScalarField> ta
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto ta = volScalarField::New
|
||||
(
|
||||
"a",
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh(),
|
||||
dimensionedScalar(dimless/dimLength, Zero),
|
||||
fvPatchFieldBase::extrapolatedCalculatedType()
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& a = ta.ref().primitiveFieldRef();
|
||||
auto& a = ta.ref().primitiveFieldRef();
|
||||
|
||||
forAllConstIters(speciesNames_, iter)
|
||||
{
|
||||
@ -194,4 +184,5 @@ Foam::radiation::greyMeanSolidAbsorptionEmission::aCont
|
||||
return calc(absorptivity);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -81,24 +81,13 @@ Foam::radiation::multiBandAbsorptionEmission::aCont
|
||||
const label bandI
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> ta
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"a",
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh(),
|
||||
dimensionedScalar("a", dimless/dimLength, absCoeffs_[bandI])
|
||||
)
|
||||
);
|
||||
|
||||
return ta;
|
||||
}
|
||||
|
||||
|
||||
@ -108,24 +97,13 @@ Foam::radiation::multiBandAbsorptionEmission::eCont
|
||||
const label bandI
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> te
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"e",
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh(),
|
||||
dimensionedScalar("e", dimless/dimLength, emiCoeffs_[bandI])
|
||||
)
|
||||
);
|
||||
|
||||
return te;
|
||||
}
|
||||
|
||||
|
||||
@ -135,24 +113,13 @@ Foam::radiation::multiBandAbsorptionEmission::ECont
|
||||
const label bandI
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> E
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"E",
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh(),
|
||||
dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero)
|
||||
)
|
||||
);
|
||||
|
||||
return E;
|
||||
}
|
||||
|
||||
|
||||
|
@ -108,23 +108,13 @@ Foam::radiation::multiBandZoneAbsorptionEmission::aCont
|
||||
const label bandI
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> ta
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto ta = volScalarField::New
|
||||
(
|
||||
"a",
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh(),
|
||||
dimensionedScalar("a", dimless/dimLength, absCoeffs_[bandI])
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& a = ta.ref().primitiveFieldRef();
|
||||
|
||||
for (const label zonei : zoneIds_)
|
||||
@ -150,23 +140,13 @@ Foam::radiation::multiBandZoneAbsorptionEmission::eCont
|
||||
const label bandI
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> te
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto te = volScalarField::New
|
||||
(
|
||||
"e",
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh(),
|
||||
dimensionedScalar("e", dimless/dimLength, emiCoeffs_[bandI])
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& e = te.ref().primitiveFieldRef();
|
||||
|
||||
for (const label zonei : zoneIds_)
|
||||
@ -192,24 +172,13 @@ Foam::radiation::multiBandZoneAbsorptionEmission::ECont
|
||||
const label bandI
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> E
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"E",
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh(),
|
||||
dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero)
|
||||
)
|
||||
);
|
||||
|
||||
return E;
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -206,23 +206,13 @@ Foam::radiation::wideBandAbsorptionEmission::aCont(const label bandi) const
|
||||
const volScalarField& T = thermo_.T();
|
||||
const volScalarField& p = thermo_.p();
|
||||
|
||||
tmp<volScalarField> ta
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto ta = volScalarField::New
|
||||
(
|
||||
"a",
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh(),
|
||||
dimensionedScalar(dimless/dimLength, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& a = ta.ref().primitiveFieldRef();
|
||||
|
||||
forAll(a, celli)
|
||||
@ -290,21 +280,12 @@ Foam::radiation::wideBandAbsorptionEmission::eCont(const label bandi) const
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::wideBandAbsorptionEmission::ECont(const label bandi) const
|
||||
{
|
||||
tmp<volScalarField> E
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto E = volScalarField::New
|
||||
(
|
||||
"E",
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh(),
|
||||
dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero)
|
||||
)
|
||||
);
|
||||
|
||||
const volScalarField* QdotPtr = mesh().findObject<volScalarField>("Qdot");
|
||||
|
@ -209,7 +209,7 @@ Foam::radiation::boundaryRadiationProperties::emissivity
|
||||
<< "Please add it"
|
||||
<< exit(FatalError);
|
||||
|
||||
return tmp<scalarField>::New();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -268,7 +268,7 @@ Foam::radiation::boundaryRadiationProperties::absorptivity
|
||||
<< "Please add it"
|
||||
<< exit(FatalError);
|
||||
|
||||
return tmp<scalarField>::New();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -327,7 +327,7 @@ Foam::radiation::boundaryRadiationProperties::transmissivity
|
||||
<< "Please add it"
|
||||
<< exit(FatalError);
|
||||
|
||||
return tmp<scalarField>::New();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -394,7 +394,7 @@ Foam::radiation::boundaryRadiationProperties::zoneTransmissivity
|
||||
<< "Please add it"
|
||||
<< exit(FatalError);
|
||||
|
||||
return tmp<scalarField>::New();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -423,7 +423,7 @@ Foam::radiation::boundaryRadiationProperties::diffReflectivity
|
||||
<< "Please add it"
|
||||
<< exit(FatalError);
|
||||
|
||||
return tmp<scalarField>::New();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -482,7 +482,7 @@ Foam::radiation::boundaryRadiationProperties::specReflectivity
|
||||
<< "Please add it"
|
||||
<< exit(FatalError);
|
||||
|
||||
return tmp<scalarField>::New();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -66,22 +66,12 @@ Foam::radiation::constantScatter::constantScatter
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::radiation::constantScatter::sigmaEff() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"sigma",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
sigma_*(3.0 - C_)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -56,22 +56,12 @@ Foam::radiation::noScatter::noScatter
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::radiation::noScatter::sigmaEff() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"sigma",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimensionedScalar(dimless/dimLength, Zero)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ Foam::tmp<Foam::scalarField> Foam::radiation::constantAbsorption::a
|
||||
scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>(new scalarField(pp_.size(), a_));
|
||||
return tmp<scalarField>::New(pp_.size(), a_);
|
||||
}
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ Foam::tmp<Foam::scalarField> Foam::radiation::constantAbsorption::e
|
||||
scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>(new scalarField(pp_.size(), e_));
|
||||
return tmp<scalarField>::New(pp_.size(), e_);
|
||||
}
|
||||
|
||||
|
||||
|
@ -82,7 +82,7 @@ Foam::radiation::multiBandAbsorption::a
|
||||
scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>(new scalarField(pp_.size(), aCoeffs_[bandI]));
|
||||
return tmp<scalarField>::New(pp_.size(), aCoeffs_[bandI]);
|
||||
}
|
||||
|
||||
Foam::scalar Foam::radiation::multiBandAbsorption::a
|
||||
@ -104,7 +104,7 @@ Foam::tmp<Foam::scalarField> Foam::radiation::multiBandAbsorption::e
|
||||
scalarField* T
|
||||
) const
|
||||
{
|
||||
return tmp<scalarField>(new scalarField(pp_.size(), eCoeffs_[bandI]));
|
||||
return tmp<scalarField>::New(pp_.size(), eCoeffs_[bandI]);
|
||||
}
|
||||
|
||||
|
||||
|
@ -98,7 +98,8 @@ Foam::basicMultiComponentMixture::basicMultiComponentMixture
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
);
|
||||
|
||||
IOobject constantIO
|
||||
|
@ -253,7 +253,8 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heheuPsiThermo
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
IOobject::AUTO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh
|
||||
),
|
||||
@ -328,7 +329,8 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heheuPsiThermo
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
IOobject::AUTO_WRITE,
|
||||
IOobject::REGISTER
|
||||
),
|
||||
mesh
|
||||
),
|
||||
@ -429,8 +431,8 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heu
|
||||
const labelList& cells
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> theu(new scalarField(Tu.size()));
|
||||
scalarField& heu = theu.ref();
|
||||
auto theu = tmp<scalarField>::New(Tu.size());
|
||||
auto& heu = theu.ref();
|
||||
|
||||
forAll(Tu, celli)
|
||||
{
|
||||
@ -450,8 +452,8 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heu
|
||||
const label patchi
|
||||
) const
|
||||
{
|
||||
tmp<scalarField> theu(new scalarField(Tu.size()));
|
||||
scalarField& heu = theu.ref();
|
||||
auto theu = tmp<scalarField>::New(Tu.size());
|
||||
auto& heu = theu.ref();
|
||||
|
||||
forAll(Tu, facei)
|
||||
{
|
||||
@ -467,24 +469,14 @@ template<class BasicPsiThermo, class MixtureType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::Tb() const
|
||||
{
|
||||
tmp<volScalarField> tTb
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tTb = volScalarField::New
|
||||
(
|
||||
"Tb",
|
||||
this->T_.time().timeName(),
|
||||
this->T_.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
this->T_
|
||||
)
|
||||
);
|
||||
auto& Tb_ = tTb.ref();
|
||||
|
||||
volScalarField& Tb_ = tTb.ref();
|
||||
scalarField& TbCells = Tb_.primitiveFieldRef();
|
||||
const scalarField& pCells = this->p_;
|
||||
const scalarField& TCells = this->T_;
|
||||
@ -526,25 +518,15 @@ template<class BasicPsiThermo, class MixtureType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::psiu() const
|
||||
{
|
||||
tmp<volScalarField> tpsiu
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tpsiu = volScalarField::New
|
||||
(
|
||||
"psiu",
|
||||
this->psi_.time().timeName(),
|
||||
this->psi_.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
this->psi_.mesh(),
|
||||
this->psi_.dimensions()
|
||||
)
|
||||
);
|
||||
auto& psiu = tpsiu.ref();
|
||||
|
||||
volScalarField& psiu = tpsiu.ref();
|
||||
scalarField& psiuCells = psiu.primitiveFieldRef();
|
||||
const scalarField& TuCells = this->Tu_;
|
||||
const scalarField& pCells = this->p_;
|
||||
@ -580,25 +562,15 @@ template<class BasicPsiThermo, class MixtureType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::psib() const
|
||||
{
|
||||
tmp<volScalarField> tpsib
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tpsib = volScalarField::New
|
||||
(
|
||||
"psib",
|
||||
this->psi_.time().timeName(),
|
||||
this->psi_.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
this->psi_.mesh(),
|
||||
this->psi_.dimensions()
|
||||
)
|
||||
);
|
||||
auto& psib = tpsib.ref();
|
||||
|
||||
volScalarField& psib = tpsib.ref();
|
||||
scalarField& psibCells = psib.primitiveFieldRef();
|
||||
const volScalarField Tb_(Tb());
|
||||
const scalarField& TbCells = Tb_;
|
||||
@ -635,25 +607,15 @@ template<class BasicPsiThermo, class MixtureType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::muu() const
|
||||
{
|
||||
tmp<volScalarField> tmuu
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tmuu = volScalarField::New
|
||||
(
|
||||
"muu",
|
||||
this->T_.time().timeName(),
|
||||
this->T_.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
this->T_.mesh(),
|
||||
dimensionSet(1, -1, -1, 0, 0)
|
||||
)
|
||||
);
|
||||
auto& muu_ = tmuu.ref();
|
||||
|
||||
volScalarField& muu_ = tmuu.ref();
|
||||
scalarField& muuCells = muu_.primitiveFieldRef();
|
||||
const scalarField& pCells = this->p_;
|
||||
const scalarField& TuCells = this->Tu_;
|
||||
@ -693,25 +655,15 @@ template<class BasicPsiThermo, class MixtureType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::mub() const
|
||||
{
|
||||
tmp<volScalarField> tmub
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tmub = volScalarField::New
|
||||
(
|
||||
"mub",
|
||||
this->T_.time().timeName(),
|
||||
this->T_.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
this->T_.mesh(),
|
||||
dimensionSet(1, -1, -1, 0, 0)
|
||||
)
|
||||
);
|
||||
auto& mub_ = tmub.ref();
|
||||
|
||||
volScalarField& mub_ = tmub.ref();
|
||||
scalarField& mubCells = mub_.primitiveFieldRef();
|
||||
const volScalarField Tb_(Tb());
|
||||
const scalarField& pCells = this->p_;
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -621,25 +621,14 @@ Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::gasHs
|
||||
const label index
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> tHs
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tHs = volScalarField::New
|
||||
(
|
||||
"Hs_" + pyrolisisGases_[index],
|
||||
this->mesh_.time().timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh_,
|
||||
dimensionedScalar(dimEnergy/dimMass, Zero)
|
||||
)
|
||||
);
|
||||
|
||||
volScalarField::Internal& gasHs = tHs.ref();
|
||||
auto& gasHs = tHs.ref();
|
||||
|
||||
const GasThermo& mixture = gasThermo_[index];
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -81,26 +82,17 @@ inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
|
||||
Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::
|
||||
RRg() const
|
||||
{
|
||||
tmp<volScalarField::Internal> tRRg
|
||||
(
|
||||
new volScalarField::Internal
|
||||
(
|
||||
IOobject
|
||||
auto tRRg = DimensionedField<scalar, volMesh>::New
|
||||
(
|
||||
"RRg",
|
||||
this->time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh(),
|
||||
dimensionedScalar(dimMass/dimVolume/dimTime, Zero)
|
||||
)
|
||||
);
|
||||
auto& RRg = tRRg.ref();
|
||||
|
||||
if (this->chemistry_)
|
||||
{
|
||||
volScalarField::Internal& RRg = tRRg.ref();
|
||||
for (label i=0; i < nGases_; i++)
|
||||
{
|
||||
RRg += RRg_[i];
|
||||
|
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -116,28 +117,17 @@ template<class CompType, class SolidThermo>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::solidChemistryModel<CompType, SolidThermo>::Qdot() const
|
||||
{
|
||||
tmp<volScalarField> tQdot
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
auto tQdot = volScalarField::New
|
||||
(
|
||||
"Qdot",
|
||||
this->mesh_.time().timeName(),
|
||||
this->mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh_,
|
||||
dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
|
||||
)
|
||||
);
|
||||
scalarField& Qdot = tQdot.ref();
|
||||
|
||||
if (this->chemistry_)
|
||||
{
|
||||
scalarField& Qdot = tQdot.ref();
|
||||
|
||||
forAll(Ys_, i)
|
||||
{
|
||||
forAll(Qdot, celli)
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2016 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -70,26 +70,17 @@ template<class CompType, class SolidThermo>
|
||||
inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
|
||||
Foam::solidChemistryModel<CompType, SolidThermo>::RRs() const
|
||||
{
|
||||
tmp<volScalarField::Internal> tRRs
|
||||
(
|
||||
new volScalarField::Internal
|
||||
(
|
||||
IOobject
|
||||
auto tRRs = DimensionedField<scalar, volMesh>::New
|
||||
(
|
||||
"RRs",
|
||||
this->time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh(),
|
||||
dimensionedScalar(dimMass/dimVolume/dimTime, Zero)
|
||||
)
|
||||
);
|
||||
auto& RRs = tRRs.ref();
|
||||
|
||||
if (this->chemistry_)
|
||||
{
|
||||
volScalarField::Internal& RRs = tRRs.ref();
|
||||
for (label i=0; i < nSolids_; i++)
|
||||
{
|
||||
RRs += RRs_[i];
|
||||
@ -103,27 +94,17 @@ template<class CompType, class SolidThermo>
|
||||
inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
|
||||
Foam::solidChemistryModel<CompType, SolidThermo>::RRsHs() const
|
||||
{
|
||||
tmp<DimensionedField<scalar, volMesh>> tRRsHs
|
||||
(
|
||||
new DimensionedField<scalar, volMesh>
|
||||
(
|
||||
IOobject
|
||||
auto tRRsHs = DimensionedField<scalar, volMesh>::New
|
||||
(
|
||||
"RRsHs",
|
||||
this->time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
this->mesh(),
|
||||
dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
|
||||
)
|
||||
);
|
||||
auto& RRs = tRRsHs.ref();
|
||||
|
||||
if (this->chemistry_)
|
||||
{
|
||||
DimensionedField<scalar, volMesh>& RRs = tRRsHs.ref();
|
||||
|
||||
const volScalarField& T = this->solidThermo().T();
|
||||
const volScalarField& p = this->solidThermo().p();
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -219,24 +219,15 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa() const
|
||||
{
|
||||
const fvMesh& mesh = this->T_.mesh();
|
||||
|
||||
tmp<volVectorField> tKappa
|
||||
(
|
||||
new volVectorField
|
||||
(
|
||||
IOobject
|
||||
auto tKappa = volVectorField::New
|
||||
(
|
||||
"Kappa",
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh,
|
||||
dimEnergy/dimTime/dimLength/dimTemperature
|
||||
)
|
||||
);
|
||||
auto& Kappa = tKappa.ref();
|
||||
|
||||
volVectorField& Kappa = tKappa.ref();
|
||||
vectorField& KappaCells = Kappa.primitiveFieldRef();
|
||||
const scalarField& TCells = this->T_;
|
||||
const scalarField& pCells = this->p_;
|
||||
@ -286,9 +277,9 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa
|
||||
{
|
||||
const scalarField& pp = this->p_.boundaryField()[patchi];
|
||||
const scalarField& Tp = this->T_.boundaryField()[patchi];
|
||||
tmp<vectorField> tKappa(new vectorField(pp.size()));
|
||||
|
||||
vectorField& Kappap = tKappa.ref();
|
||||
auto tKappa = tmp<vectorField>::New(pp.size());
|
||||
auto& Kappap = tKappa.ref();
|
||||
|
||||
forAll(Tp, facei)
|
||||
{
|
||||
|
@ -355,15 +355,15 @@ public:
|
||||
//- Return mass flux
|
||||
tmp<surfaceScalarField> getRhoPhi
|
||||
(
|
||||
const dimensionedScalar rho1,
|
||||
const dimensionedScalar rho2
|
||||
const dimensionedScalar& rho1,
|
||||
const dimensionedScalar& rho2
|
||||
) const
|
||||
{
|
||||
return tmp<surfaceScalarField>
|
||||
(
|
||||
new surfaceScalarField
|
||||
return surfaceScalarField::New
|
||||
(
|
||||
"rhoPhi",
|
||||
IOobject::NO_REGISTER,
|
||||
(
|
||||
(rho1 - rho2)*dVf_/mesh_.time().deltaT() + rho2*phi_
|
||||
)
|
||||
);
|
||||
@ -376,11 +376,11 @@ public:
|
||||
const volScalarField& rho2
|
||||
)
|
||||
{
|
||||
return tmp<surfaceScalarField>
|
||||
(
|
||||
new surfaceScalarField
|
||||
return surfaceScalarField::New
|
||||
(
|
||||
"rhoPhi",
|
||||
IOobject::NO_REGISTER,
|
||||
(
|
||||
fvc::interpolate(rho1 - rho2)*alphaPhi_
|
||||
+ fvc::interpolate(rho2)*phi_
|
||||
)
|
||||
|
@ -130,9 +130,10 @@ Foam::incompressibleTwoPhaseMixture::mu() const
|
||||
clamp(alpha1_, zero_one{})
|
||||
);
|
||||
|
||||
return tmp<volScalarField>::New
|
||||
return volScalarField::New
|
||||
(
|
||||
"mu",
|
||||
IOobject::NO_REGISTER,
|
||||
limitedAlpha1*rho1_*nuModel1_->nu()
|
||||
+ (scalar(1) - limitedAlpha1)*rho2_*nuModel2_->nu()
|
||||
);
|
||||
@ -155,9 +156,10 @@ Foam::incompressibleTwoPhaseMixture::muf() const
|
||||
clamp(fvc::interpolate(alpha1_), zero_one{})
|
||||
);
|
||||
|
||||
return tmp<surfaceScalarField>::New
|
||||
return surfaceScalarField::New
|
||||
(
|
||||
"muf",
|
||||
IOobject::NO_REGISTER,
|
||||
alpha1f*rho1_*fvc::interpolate(nuModel1_->nu())
|
||||
+ (scalar(1) - alpha1f)*rho2_*fvc::interpolate(nuModel2_->nu())
|
||||
);
|
||||
@ -172,9 +174,10 @@ Foam::incompressibleTwoPhaseMixture::nuf() const
|
||||
clamp(fvc::interpolate(alpha1_), zero_one{})
|
||||
);
|
||||
|
||||
return tmp<surfaceScalarField>::New
|
||||
return surfaceScalarField::New
|
||||
(
|
||||
"nuf",
|
||||
IOobject::NO_REGISTER,
|
||||
(
|
||||
alpha1f*rho1_*fvc::interpolate(nuModel1_->nu())
|
||||
+ (scalar(1) - alpha1f)*rho2_*fvc::interpolate(nuModel2_->nu())
|
||||
|
@ -65,17 +65,10 @@ Foam::surfaceTensionModels::constant::~constant()
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::surfaceTensionModels::constant::sigma() const
|
||||
{
|
||||
return tmp<volScalarField>::New
|
||||
(
|
||||
IOobject
|
||||
return volScalarField::New
|
||||
(
|
||||
"sigma",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
sigma_
|
||||
);
|
||||
|
@ -72,17 +72,10 @@ Foam::surfaceTensionModels::temperatureDependent::~temperatureDependent()
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::surfaceTensionModels::temperatureDependent::sigma() const
|
||||
{
|
||||
auto tsigma = tmp<volScalarField>::New
|
||||
(
|
||||
IOobject
|
||||
auto tsigma = volScalarField::New
|
||||
(
|
||||
"sigma",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
IOobject::NO_REGISTER
|
||||
),
|
||||
IOobject::NO_REGISTER,
|
||||
mesh_,
|
||||
dimSigma
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user