src: Changed tmp<volField> construction to use the new simpler "New" method

avoiding unnecessary database registration of temporary fields
This commit is contained in:
Henry Weller
2018-12-21 07:14:52 +00:00
parent d6a13f6425
commit 819eb06657
66 changed files with 406 additions and 1408 deletions

View File

@ -336,6 +336,34 @@ DimensionedField<Type, GeoMesh>::New
}
template<class Type, class GeoMesh>
Foam::tmp<Foam::DimensionedField<Type, GeoMesh>>
DimensionedField<Type, GeoMesh>::New
(
const word& newName,
const DimensionedField<Type, GeoMesh>& df
)
{
return tmp<DimensionedField<Type, GeoMesh>>
(
new DimensionedField<Type, GeoMesh>
(
IOobject
(
newName,
df.instance(),
df.local(),
df.db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
df
)
);
}
template<class Type, class GeoMesh>
Foam::tmp<Foam::DimensionedField<Type, GeoMesh>>
DimensionedField<Type, GeoMesh>::New

View File

@ -254,7 +254,14 @@ public:
const dimensioned<Type>&
);
//- Rename temporary field and return
//- Return a temporary field constructed from name and a field
static tmp<DimensionedField<Type, GeoMesh>> New
(
const word& newName,
const DimensionedField<Type, GeoMesh>&
);
//- Return renamed temporary field
static tmp<DimensionedField<Type, GeoMesh>> New
(
const word& newName,

View File

@ -183,21 +183,10 @@ template<class ReactionThermo>
Foam::tmp<Foam::volScalarField>
Foam::combustionModels::EDC<ReactionThermo>::Qdot() const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
this->thermo().phasePropertyName(typeName + ":Qdot"),
this->mesh().time().timeName(),
this->mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
kappa_*this->chemistryPtr_->Qdot()
)
this->thermo().phasePropertyName(typeName + ":Qdot"),
kappa_*this->chemistryPtr_->Qdot()
);
}

View File

@ -148,16 +148,9 @@ void FSD<ReactionThermo, ThermoType>::calculateSourceNorm()
tmp<volScalarField> tPc
(
new volScalarField
volScalarField::New
(
IOobject
(
this->thermo().phasePropertyName("Pc"),
U.time().timeName(),
U.db(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
this->thermo().phasePropertyName("Pc"),
U.mesh(),
dimensionedScalar(dimless, 0)
)
@ -167,16 +160,9 @@ void FSD<ReactionThermo, ThermoType>::calculateSourceNorm()
tmp<volScalarField> tomegaFuel
(
new volScalarField
volScalarField::New
(
IOobject
(
this->thermo().phasePropertyName("omegaFuelBar"),
U.time().timeName(),
U.db(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
this->thermo().phasePropertyName("omegaFuelBar"),
U.mesh(),
dimensionedScalar(omegaFuel.dimensions(), 0)
)
@ -293,16 +279,9 @@ void FSD<ReactionThermo, ThermoType>::calculateSourceNorm()
tmp<volScalarField> tproducts
(
new volScalarField
volScalarField::New
(
IOobject
(
this->thermo().phasePropertyName("products"),
U.time().timeName(),
U.db(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
this->thermo().phasePropertyName("products"),
U.mesh(),
dimensionedScalar(dimless, 0)
)

View File

@ -82,16 +82,9 @@ Foam::tmp<Foam::volScalarField> Foam::consumptionSpeed::omega0Sigma
{
tmp<volScalarField> tomega0
(
new volScalarField
volScalarField::New
(
IOobject
(
"omega0",
sigma.time().timeName(),
sigma.db(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
"omega0",
sigma.mesh(),
dimensionedScalar
(

View File

@ -109,13 +109,10 @@ template<class ReactionThermo>
Foam::tmp<Foam::volScalarField>
Foam::combustionModels::PaSR<ReactionThermo>::Qdot() const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
this->thermo().phasePropertyName(typeName + ":Qdot"),
kappa_*laminar<ReactionThermo>::Qdot()
)
this->thermo().phasePropertyName(typeName + ":Qdot"),
kappa_*laminar<ReactionThermo>::Qdot()
);
}

View File

@ -75,22 +75,11 @@ template<class ReactionThermo>
Foam::tmp<Foam::volScalarField>
Foam::combustionModels::noCombustion<ReactionThermo>::Qdot() const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
this->thermo().phasePropertyName(typeName + ":Qdot"),
this->mesh().time().timeName(),
this->mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
this->mesh(),
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
)
this->thermo().phasePropertyName(typeName + ":Qdot"),
this->mesh(),
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
);
}

View File

@ -121,20 +121,10 @@ const Foam::dimensionedVector& Foam::SRF::SRFModel::omega() const
Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh>>
Foam::SRF::SRFModel::Fcoriolis() const
{
return tmp<volVectorField::Internal>
return volVectorField::Internal::New
(
new volVectorField::Internal
(
IOobject
(
"Fcoriolis",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
2.0*omega_ ^ Urel_
)
"Fcoriolis",
2.0*omega_ ^ Urel_
);
}
@ -142,20 +132,10 @@ Foam::SRF::SRFModel::Fcoriolis() const
Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh>>
Foam::SRF::SRFModel::Fcentrifugal() const
{
return tmp<volVectorField::Internal>
return volVectorField::Internal::New
(
new volVectorField::Internal
(
IOobject
(
"Fcentrifugal",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
omega_ ^ (omega_ ^ (mesh_.C() - origin_))
)
"Fcentrifugal",
omega_ ^ (omega_ ^ (mesh_.C() - origin_))
);
}

View File

@ -75,14 +75,9 @@ bool Foam::functionObjects::CourantNo::calc()
tmp<volScalarField> tCo
(
new volScalarField
volScalarField::New
(
IOobject
(
resultName_,
mesh_.time().timeName(),
mesh_
),
resultName_,
mesh_,
dimensionedScalar(dimless, 0),
zeroGradientFvPatchScalarField::typeName

View File

@ -76,14 +76,9 @@ bool Foam::functionObjects::processorField::execute()
tmp<volScalarField> tprocField
(
new volScalarField
volScalarField::New
(
IOobject
(
name,
mesh_.time().timeName(),
mesh_
),
name,
mesh_,
dimensionedScalar(name, dimless, Pstream::myProcNo())
)

View File

@ -67,14 +67,9 @@ Foam::functionObjects::wallHeatFlux::calcWallHeatFlux
{
tmp<volScalarField> twallHeatFlux
(
new volScalarField
volScalarField::New
(
IOobject
(
type(),
mesh_.time().timeName(),
mesh_
),
type(),
mesh_,
dimensionedScalar(dimMass/pow3(dimTime), 0)
)

View File

@ -72,14 +72,9 @@ Foam::functionObjects::wallHeatTransferCoeff::calcHeatTransferCoeff
{
tmp<volScalarField> twallHeatTransferCoeff
(
new volScalarField
volScalarField::New
(
IOobject
(
type(),
mesh_.time().timeName(),
mesh_
),
type(),
mesh_,
dimensionedScalar
(

View File

@ -65,14 +65,9 @@ Foam::functionObjects::wallShearStress::calcShearStress
{
tmp<volVectorField> twallShearStress
(
new volVectorField
volVectorField::New
(
IOobject
(
type(),
mesh_.time().timeName(),
mesh_
),
type(),
mesh_,
dimensionedVector("0", Reff.dimensions(), Zero)
)

View File

@ -69,14 +69,9 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::yPlus::calcYPlus
{
tmp<volScalarField> tyPlus
(
new volScalarField
volScalarField::New
(
IOobject
(
type(),
mesh_.time().timeName(),
mesh_
),
type(),
mesh_,
dimensionedScalar(dimless, 0)
)

View File

@ -331,19 +331,11 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::forces::rho() const
{
if (rhoName_ == "rhoInf")
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
"rho",
mesh_.time().timeName(),
mesh_
),
mesh_,
dimensionedScalar(dimDensity, rhoRef_)
)
"rho",
mesh_,
dimensionedScalar(dimDensity, rhoRef_)
);
}
else

View File

@ -65,21 +65,11 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::scalarTransport::D
if (constantD_)
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
Dname,
mesh_.time().timeName(),
mesh_.time(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar(Dname, phi.dimensions()/dimLength, D_)
)
Dname,
mesh_,
dimensionedScalar(Dname, phi.dimensions()/dimLength, D_)
);
}
else if (mesh_.foundObject<icoModel>(turbulenceModel::propertiesName))
@ -102,21 +92,11 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::scalarTransport::D
}
else
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
Dname,
mesh_.time().timeName(),
mesh_.time(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar(Dname, phi.dimensions()/dimLength, 0)
)
Dname,
mesh_,
dimensionedScalar(Dname, phi.dimensions()/dimLength, 0)
);
}
}

View File

@ -244,7 +244,8 @@ void Foam::fv::meanVelocityForce::constrain
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
IOobject::NO_WRITE,
false
),
1.0/eqn.A()
)

View File

@ -85,26 +85,16 @@ Foam::fv::solidificationMeltingSource::Cp() const
{
scalar CpRef = readScalar(coeffs_.lookup("CpRef"));
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
name_ + ":Cp",
mesh_,
dimensionedScalar
(
IOobject
(
name_ + ":Cp",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar
(
dimEnergy/dimMass/dimTemperature,
CpRef
),
extrapolatedCalculatedFvPatchScalarField::typeName
)
dimEnergy/dimMass/dimTemperature,
CpRef
),
extrapolatedCalculatedFvPatchScalarField::typeName
);
}
else

View File

@ -179,18 +179,7 @@ void Foam::fv::interRegionHeatTransferModel::addSup
tmp<volScalarField> tTmapped
(
new volScalarField
(
IOobject
(
type() + ":Tmapped",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
T
)
volScalarField::New(type() + ":Tmapped", T)
);
volScalarField& Tmapped = tTmapped.ref();

View File

@ -32,16 +32,9 @@ Foam::coalCloudList::UTrans() const
{
tmp<volVectorField::Internal> tfld
(
new volVectorField::Internal
volVectorField::Internal::New
(
IOobject
(
"UTransEff",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
"UTransEff",
mesh_,
dimensionedVector("zero", dimMass*dimVelocity, Zero)
)
@ -80,16 +73,9 @@ Foam::coalCloudList::hsTrans() const
{
tmp<volScalarField::Internal> tfld
(
new volScalarField::Internal
volScalarField::Internal::New
(
IOobject
(
"hsTransEff",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
"hsTransEff",
mesh_,
dimensionedScalar(dimEnergy, 0)
)
@ -146,16 +132,9 @@ Foam::coalCloudList::rhoTrans() const
{
tmp<volScalarField::Internal> tfld
(
new volScalarField::Internal
volScalarField::Internal::New
(
IOobject
(
"rhoTransEff",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
"rhoTransEff",
mesh_,
dimensionedScalar(dimMass, 0)
)
@ -182,16 +161,9 @@ Foam::coalCloudList::Srho() const
{
tmp<volScalarField::Internal> tfld
(
new volScalarField::Internal
volScalarField::Internal::New
(
IOobject
(
"rhoTransEff",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
"rhoTransEff",
mesh_,
dimensionedScalar(dimDensity/dimTime, 0)
)
@ -216,16 +188,9 @@ Foam::coalCloudList::Srho
{
tmp<volScalarField::Internal> tfld
(
new volScalarField::Internal
volScalarField::Internal::New
(
IOobject
(
"rhoTransEff",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
"rhoTransEff",
mesh_,
dimensionedScalar(dimDensity/dimTime, 0)
)

View File

@ -457,17 +457,9 @@ Foam::KinematicCloud<CloudType>::vDotSweep() const
{
tmp<volScalarField> tvDotSweep
(
new volScalarField
volScalarField::New
(
IOobject
(
this->name() + ":vDotSweep",
this->db().time().timeName(),
this->db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
this->name() + ":vDotSweep",
mesh_,
dimensionedScalar(dimless/dimTime, 0),
extrapolatedCalculatedFvPatchScalarField::typeName
@ -496,17 +488,9 @@ Foam::KinematicCloud<CloudType>::theta() const
{
tmp<volScalarField> ttheta
(
new volScalarField
volScalarField::New
(
IOobject
(
this->name() + ":theta",
this->db().time().timeName(),
this->db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
this->name() + ":theta",
mesh_,
dimensionedScalar(dimless, 0),
extrapolatedCalculatedFvPatchScalarField::typeName
@ -535,17 +519,9 @@ Foam::KinematicCloud<CloudType>::alpha() const
{
tmp<volScalarField> talpha
(
new volScalarField
volScalarField::New
(
IOobject
(
this->name() + ":alpha",
this->db().time().timeName(),
this->db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
this->name() + ":alpha",
mesh_,
dimensionedScalar(dimless, 0)
)
@ -572,17 +548,9 @@ Foam::KinematicCloud<CloudType>::rhoEff() const
{
tmp<volScalarField> trhoEff
(
new volScalarField
volScalarField::New
(
IOobject
(
this->name() + ":rhoEff",
this->db().time().timeName(),
this->db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
this->name() + ":rhoEff",
mesh_,
dimensionedScalar(dimDensity, 0)
)

View File

@ -111,17 +111,9 @@ inline Foam::tmp<Foam::fvScalarMatrix> Foam::ReactingCloud<CloudType>::SYi
{
tmp<volScalarField> trhoTrans
(
new volScalarField
volScalarField::New
(
IOobject
(
this->name() + ":rhoTrans",
this->db().time().timeName(),
this->db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
this->name() + ":rhoTrans",
this->mesh(),
dimensionedScalar(dimMass/dimTime/dimVolume, 0)
)
@ -159,17 +151,9 @@ Foam::ReactingCloud<CloudType>::Srho(const label i) const
{
tmp<volScalarField::Internal> tRhoi
(
new volScalarField::Internal
volScalarField::Internal::New
(
IOobject
(
this->name() + ":rhoTrans",
this->db().time().timeName(),
this->db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
this->name() + ":rhoTrans",
this->mesh(),
dimensionedScalar
(
@ -195,17 +179,9 @@ Foam::ReactingCloud<CloudType>::Srho() const
{
tmp<volScalarField::Internal> trhoTrans
(
new volScalarField::Internal
volScalarField::Internal::New
(
IOobject
(
this->name() + ":rhoTrans",
this->db().time().timeName(),
this->db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
this->name() + ":rhoTrans",
this->mesh(),
dimensionedScalar
(
@ -238,17 +214,9 @@ Foam::ReactingCloud<CloudType>::Srho(volScalarField& rho) const
{
tmp<volScalarField> trhoTrans
(
new volScalarField
volScalarField::New
(
IOobject
(
this->name() + ":rhoTrans",
this->db().time().timeName(),
this->db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
this->name() + ":rhoTrans",
this->mesh(),
dimensionedScalar(dimMass/dimTime/dimVolume, 0)
)

View File

@ -264,17 +264,9 @@ inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::Ep() const
{
tmp<volScalarField> tEp
(
new volScalarField
volScalarField::New
(
IOobject
(
this->name() + ":radiation:Ep",
this->db().time().timeName(),
this->db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
this->name() + ":radiation:Ep",
this->mesh(),
dimensionedScalar(dimMass/dimLength/pow3(dimTime), 0)
)
@ -300,17 +292,9 @@ inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::ap() const
{
tmp<volScalarField> tap
(
new volScalarField
volScalarField::New
(
IOobject
(
this->name() + ":radiation:ap",
this->db().time().timeName(),
this->db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
this->name() + ":radiation:ap",
this->mesh(),
dimensionedScalar(dimless/dimLength, 0)
)
@ -337,17 +321,9 @@ Foam::ThermoCloud<CloudType>::sigmap() const
{
tmp<volScalarField> tsigmap
(
new volScalarField
volScalarField::New
(
IOobject
(
this->name() + ":radiation:sigmap",
this->db().time().timeName(),
this->db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
this->name() + ":radiation:sigmap",
this->mesh(),
dimensionedScalar(dimless/dimLength, 0)
)

View File

@ -301,14 +301,10 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store)
}
// correction velocity
uCorrect_ = tmp<volVectorField>
uCorrect_ = volVectorField::New
(
new volVectorField
(
cloudName + ":uCorrect",
fvc::reconstruct(phiCorrect_())
)
cloudName + ":uCorrect",
fvc::reconstruct(phiCorrect_())
);
uCorrect_->correctBoundaryConditions();

View File

@ -72,17 +72,9 @@ Foam::radiation::cloudAbsorptionEmission::aDisp(const label) const
{
tmp<volScalarField> ta
(
new volScalarField
volScalarField::New
(
IOobject
(
"a",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"a",
mesh_,
dimensionedScalar(dimless/dimLength, 0)
)
@ -107,17 +99,9 @@ Foam::radiation::cloudAbsorptionEmission::eDisp(const label bandI) const
{
tmp<volScalarField> te
(
new volScalarField
volScalarField::New
(
IOobject
(
"e",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"e",
mesh_,
dimensionedScalar(dimless/dimLength, 0)
)
@ -132,17 +116,9 @@ Foam::radiation::cloudAbsorptionEmission::EDisp(const label bandI) const
{
tmp<volScalarField> tE
(
new volScalarField
volScalarField::New
(
IOobject
(
"E",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"E",
mesh_,
dimensionedScalar(dimMass/dimLength/pow3(dimTime), 0)
)

View File

@ -72,17 +72,9 @@ Foam::radiation::cloudScatter::sigmaEff() const
{
tmp<volScalarField> tsigma
(
new volScalarField
volScalarField::New
(
IOobject
(
"sigma",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"sigma",
mesh_,
dimensionedScalar(dimless/dimLength, 0)
)

View File

@ -162,42 +162,22 @@ void kinematicSingleLayer::transferPrimaryRegionSourceFields()
tmp<volScalarField> kinematicSingleLayer::pu()
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
typeName + ":pu",
time_.timeName(),
regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
pPrimary_ // pressure (mapped from primary region)
- pSp_ // accumulated particle impingement
- fvc::laplacian(sigma_, delta_) // surface tension
)
typeName + ":pu",
pPrimary_ // pressure (mapped from primary region)
- pSp_ // accumulated particle impingement
- fvc::laplacian(sigma_, delta_) // surface tension
);
}
tmp<volScalarField> kinematicSingleLayer::pp()
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
typeName + ":pp",
time_.timeName(),
regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
-rho_*gNormClipped() // hydrostatic effect only
)
typeName + ":pp",
-rho_*gNormClipped() // hydrostatic effect only
);
}
@ -1101,22 +1081,11 @@ void kinematicSingleLayer::info()
tmp<volScalarField::Internal> kinematicSingleLayer::Srho() const
{
return tmp<volScalarField::Internal>
return volScalarField::Internal::New
(
new volScalarField::Internal
(
IOobject
(
typeName + ":Srho",
time().timeName(),
primaryMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
primaryMesh(),
dimensionedScalar(dimMass/dimVolume/dimTime, 0)
)
typeName + ":Srho",
primaryMesh(),
dimensionedScalar(dimMass/dimVolume/dimTime, 0)
);
}
@ -1126,44 +1095,22 @@ tmp<volScalarField::Internal> kinematicSingleLayer::Srho
const label i
) const
{
return tmp<volScalarField::Internal>
return volScalarField::Internal::New
(
new volScalarField::Internal
(
IOobject
(
typeName + ":Srho(" + Foam::name(i) + ")",
time().timeName(),
primaryMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
primaryMesh(),
dimensionedScalar(dimMass/dimVolume/dimTime, 0)
)
typeName + ":Srho(" + Foam::name(i) + ")",
primaryMesh(),
dimensionedScalar(dimMass/dimVolume/dimTime, 0)
);
}
tmp<volScalarField::Internal> kinematicSingleLayer::Sh() const
{
return tmp<volScalarField::Internal>
return volScalarField::Internal::New
(
new volScalarField::Internal
(
IOobject
(
typeName + ":Sh",
time().timeName(),
primaryMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
primaryMesh(),
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
)
typeName + ":Sh",
primaryMesh(),
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
);
}

View File

@ -208,23 +208,7 @@ inline tmp<volScalarField> kinematicSingleLayer::deltaMass() const
inline tmp<volScalarField> kinematicSingleLayer::gNorm() const
{
tmp<volScalarField> tgNorm
(
new volScalarField
(
IOobject
(
"gNorm",
time().timeName(),
regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
g_ & nHat()
)
);
return tgNorm;
return volScalarField::New("gNorm", g_ & nHat());
}
@ -232,18 +216,7 @@ inline tmp<volScalarField> kinematicSingleLayer::gNormClipped() const
{
tmp<volScalarField> tgNormClipped
(
new volScalarField
(
IOobject
(
"gNormClipped",
time().timeName(),
regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
g_ & nHat()
)
volScalarField::New("gNormClipped", g_ & nHat())
);
volScalarField& gNormClipped = tgNormClipped.ref();
@ -255,23 +228,7 @@ inline tmp<volScalarField> kinematicSingleLayer::gNormClipped() const
inline tmp<volVectorField> kinematicSingleLayer::gTan() const
{
tmp<volVectorField> tgTan
(
new volVectorField
(
IOobject
(
"gTan",
time().timeName(),
regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
g_ - nHat()*gNorm()
)
);
return tgTan;
return volVectorField::New("gTan", g_ - nHat()*gNorm());
}

View File

@ -72,66 +72,33 @@ Foam::scalar noFilm::CourantNumber() const
tmp<volScalarField::Internal> noFilm::Srho() const
{
return tmp<volScalarField::Internal>
return volScalarField::Internal::New
(
new volScalarField::Internal
(
IOobject
(
"noFilm::Srho",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
dimensionedScalar(dimMass/dimVolume/dimTime, 0)
)
"noFilm::Srho",
mesh_,
dimensionedScalar(dimMass/dimVolume/dimTime, 0)
);
}
tmp<volScalarField::Internal> noFilm::Srho(const label i) const
{
return tmp<volScalarField::Internal>
return volScalarField::Internal::New
(
new volScalarField::Internal
(
IOobject
(
"noFilm::Srho(" + Foam::name(i) + ")",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
dimensionedScalar(dimMass/dimVolume/dimTime, 0)
)
"noFilm::Srho(" + Foam::name(i) + ")",
mesh_,
dimensionedScalar(dimMass/dimVolume/dimTime, 0)
);
}
tmp<volScalarField::Internal> noFilm::Sh() const
{
return tmp<volScalarField::Internal>
return volScalarField::Internal::New
(
new volScalarField::Internal
(
IOobject
(
"noFilm::Sh",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
)
"noFilm::Sh",
mesh_,
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
);
}

View File

@ -261,16 +261,9 @@ tmp<volScalarField> constantFilmThermo::rho() const
{
tmp<volScalarField> trho
(
new volScalarField
volScalarField::New
(
IOobject
(
type() + ':' + rho0_.name_,
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
type() + ':' + rho0_.name_,
film().regionMesh(),
dimensionedScalar(dimDensity, 0),
extrapolatedCalculatedFvPatchScalarField::typeName
@ -288,16 +281,9 @@ tmp<volScalarField> constantFilmThermo::mu() const
{
tmp<volScalarField> tmu
(
new volScalarField
volScalarField::New
(
IOobject
(
type() + ':' + mu0_.name_,
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
type() + ':' + mu0_.name_,
film().regionMesh(),
dimensionedScalar(dimPressure*dimTime, 0),
extrapolatedCalculatedFvPatchScalarField::typeName
@ -315,16 +301,9 @@ tmp<volScalarField> constantFilmThermo::sigma() const
{
tmp<volScalarField> tsigma
(
new volScalarField
volScalarField::New
(
IOobject
(
type() + ':' + sigma0_.name_,
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
type() + ':' + sigma0_.name_,
film().regionMesh(),
dimensionedScalar(dimMass/sqr(dimTime), 0),
extrapolatedCalculatedFvPatchScalarField::typeName
@ -342,16 +321,9 @@ tmp<volScalarField> constantFilmThermo::Cp() const
{
tmp<volScalarField> tCp
(
new volScalarField
volScalarField::New
(
IOobject
(
type() + ':' + Cp0_.name_,
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
type() + ':' + Cp0_.name_,
film().regionMesh(),
dimensionedScalar(dimEnergy/dimMass/dimTemperature, 0),
extrapolatedCalculatedFvPatchScalarField::typeName
@ -369,16 +341,9 @@ tmp<volScalarField> constantFilmThermo::kappa() const
{
tmp<volScalarField> tkappa
(
new volScalarField
volScalarField::New
(
IOobject
(
type() + ':' + kappa0_.name_,
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
type() + ':' + kappa0_.name_,
film().regionMesh(),
dimensionedScalar(dimPower/dimLength/dimTemperature, 0),
extrapolatedCalculatedFvPatchScalarField::typeName

View File

@ -240,16 +240,9 @@ tmp<volScalarField> liquidFilmThermo::rho() const
{
tmp<volScalarField> trho
(
new volScalarField
volScalarField::New
(
IOobject
(
type() + ":rho",
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
type() + ":rho",
film().regionMesh(),
dimensionedScalar(dimDensity, 0),
extrapolatedCalculatedFvPatchScalarField::typeName
@ -288,16 +281,9 @@ tmp<volScalarField> liquidFilmThermo::mu() const
{
tmp<volScalarField> tmu
(
new volScalarField
volScalarField::New
(
IOobject
(
type() + ":mu",
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
type() + ":mu",
film().regionMesh(),
dimensionedScalar(dimPressure*dimTime, 0),
extrapolatedCalculatedFvPatchScalarField::typeName
@ -336,16 +322,9 @@ tmp<volScalarField> liquidFilmThermo::sigma() const
{
tmp<volScalarField> tsigma
(
new volScalarField
volScalarField::New
(
IOobject
(
type() + ":sigma",
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
type() + ":sigma",
film().regionMesh(),
dimensionedScalar(dimMass/sqr(dimTime), 0),
extrapolatedCalculatedFvPatchScalarField::typeName
@ -384,16 +363,9 @@ tmp<volScalarField> liquidFilmThermo::Cp() const
{
tmp<volScalarField> tCp
(
new volScalarField
volScalarField::New
(
IOobject
(
type() + ":Cp",
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
type() + ":Cp",
film().regionMesh(),
dimensionedScalar(dimEnergy/dimMass/dimTemperature, 0),
extrapolatedCalculatedFvPatchScalarField::typeName
@ -432,16 +404,9 @@ tmp<volScalarField> liquidFilmThermo::kappa() const
{
tmp<volScalarField> tkappa
(
new volScalarField
volScalarField::New
(
IOobject
(
type() + ":kappa",
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
type() + ":kappa",
film().regionMesh(),
dimensionedScalar(dimPower/dimLength/dimTemperature, 0),
extrapolatedCalculatedFvPatchScalarField::typeName

View File

@ -72,16 +72,9 @@ tmp<volVectorField> laminar::Us() const
{
tmp<volVectorField> tUs
(
new volVectorField
volVectorField::New
(
IOobject
(
typeName + ":Us",
filmModel_.regionMesh().time().timeName(),
filmModel_.regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
typeName + ":Us",
filmModel_.regionMesh(),
dimensionedVector("zero", dimVelocity, Zero),
extrapolatedCalculatedFvPatchVectorField::typeName
@ -100,16 +93,9 @@ tmp<volScalarField> laminar::mut() const
{
return tmp<volScalarField>
(
new volScalarField
volScalarField::New
(
IOobject
(
typeName + ":mut",
filmModel_.regionMesh().time().timeName(),
filmModel_.regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
typeName + ":mut",
filmModel_.regionMesh(),
dimensionedScalar(dimMass/dimLength/dimTime, 0)
)

View File

@ -131,16 +131,9 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U)
{
tmp<volVectorField> tForce
(
new volVectorField
volVectorField::New
(
IOobject
(
typeName + ":contactForce",
filmModel_.time().timeName(),
filmModel_.regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
typeName + ":contactForce",
filmModel_.regionMesh(),
dimensionedVector("zero", dimForce/dimArea, Zero)
)

View File

@ -74,14 +74,9 @@ tmp<volScalarField> distributionContactAngleForce::theta() const
{
tmp<volScalarField> ttheta
(
new volScalarField
volScalarField::New
(
IOobject
(
typeName + ":theta",
filmModel_.time().timeName(),
filmModel_.regionMesh()
),
typeName + ":theta",
filmModel_.regionMesh(),
dimensionedScalar(dimless, 0)
)

View File

@ -83,14 +83,9 @@ perturbedTemperatureDependentContactAngleForce::theta() const
{
tmp<volScalarField> ttheta
(
new volScalarField
volScalarField::New
(
IOobject
(
typeName + ":theta",
filmModel_.time().timeName(),
filmModel_.regionMesh()
),
typeName + ":theta",
filmModel_.regionMesh(),
dimensionedScalar(dimless, 0)
)

View File

@ -71,14 +71,9 @@ tmp<volScalarField> temperatureDependentContactAngleForce::theta() const
{
tmp<volScalarField> ttheta
(
new volScalarField
volScalarField::New
(
IOobject
(
typeName + ":theta",
filmModel_.time().timeName(),
filmModel_.regionMesh()
),
typeName + ":theta",
filmModel_.regionMesh(),
dimensionedScalar(dimless, 0)
)

View File

@ -65,7 +65,7 @@ tmp<volScalarField> curvatureSeparation::calcInvR1
/*
tmp<volScalarField> tinvR1
(
new volScalarField("invR1", fvc::div(film().nHat()))
volScalarField::New("invR1", fvc::div(film().nHat()))
);
*/
@ -74,7 +74,7 @@ tmp<volScalarField> curvatureSeparation::calcInvR1
volVectorField UHat(U/(mag(U) + smallU));
tmp<volScalarField> tinvR1
(
new volScalarField("invR1", UHat & (UHat & gradNHat_))
volScalarField::New("invR1", UHat & (UHat & gradNHat_))
);

View File

@ -105,16 +105,9 @@ tmp<volScalarField> constantRadiation::Shs()
{
tmp<volScalarField> tShs
(
new volScalarField
volScalarField::New
(
IOobject
(
typeName + ":Shs",
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
typeName + ":Shs",
film().regionMesh(),
dimensionedScalar(dimMass/pow3(dimTime), 0)
)

View File

@ -73,21 +73,11 @@ void noRadiation::correct()
tmp<volScalarField> noRadiation::Shs()
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
typeName + ":Shs",
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
film().regionMesh(),
dimensionedScalar(dimMass/pow3(dimTime), 0)
)
typeName + ":Shs",
film().regionMesh(),
dimensionedScalar(dimMass/pow3(dimTime), 0)
);
}

View File

@ -92,16 +92,9 @@ tmp<volScalarField> primaryRadiation::Shs()
{
tmp<volScalarField> tShs
(
new volScalarField
volScalarField::New
(
IOobject
(
typeName + ":Shs",
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
typeName + ":Shs",
film().regionMesh(),
dimensionedScalar(dimMass/pow3(dimTime), 0)
)

View File

@ -109,16 +109,9 @@ tmp<volScalarField> standardRadiation::Shs()
{
tmp<volScalarField> tShs
(
new volScalarField
volScalarField::New
(
IOobject
(
typeName + ":Shs",
film().time().timeName(),
film().regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
typeName + ":Shs",
film().regionMesh(),
dimensionedScalar(dimMass/pow3(dimTime), 0)
)

View File

@ -74,25 +74,14 @@ void constantHeatTransfer::correct()
tmp<volScalarField> constantHeatTransfer::h() const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
"htc",
filmModel_.regionMesh(),
dimensionedScalar
(
IOobject
(
"htc",
filmModel_.time().timeName(),
filmModel_.regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
filmModel_.regionMesh(),
dimensionedScalar
(
dimEnergy/dimTime/sqr(dimLength)/dimTemperature,
c0_
)
dimEnergy/dimTime/sqr(dimLength)/dimTemperature,
c0_
)
);
}

View File

@ -726,17 +726,9 @@ tmp<volScalarField::Internal> thermoSingleLayer::Srho() const
{
tmp<volScalarField::Internal> tSrho
(
new volScalarField::Internal
volScalarField::Internal::New
(
IOobject
(
"thermoSingleLayer::Srho",
time().timeName(),
primaryMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"thermoSingleLayer::Srho",
primaryMesh(),
dimensionedScalar(dimMass/dimVolume/dimTime, 0)
)
@ -778,17 +770,9 @@ tmp<volScalarField::Internal> thermoSingleLayer::Srho
tmp<volScalarField::Internal> tSrho
(
new volScalarField::Internal
volScalarField::Internal::New
(
IOobject
(
"thermoSingleLayer::Srho(" + Foam::name(i) + ")",
time_.timeName(),
primaryMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"thermoSingleLayer::Srho(" + Foam::name(i) + ")",
primaryMesh(),
dimensionedScalar(dimMass/dimVolume/dimTime, 0)
)
@ -828,17 +812,9 @@ tmp<volScalarField::Internal> thermoSingleLayer::Sh() const
{
tmp<volScalarField::Internal> tSh
(
new volScalarField::Internal
volScalarField::Internal::New
(
IOobject
(
"thermoSingleLayer::Sh",
time().timeName(),
primaryMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"thermoSingleLayer::Sh",
primaryMesh(),
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
)

View File

@ -61,20 +61,10 @@ inline tmp<volScalarField> thermoSingleLayer::hs
const volScalarField& T
) const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
"hs(" + T.name() + ")",
time().timeName(),
regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
Cp_*(T - Tref)
)
"hs(" + T.name() + ")",
Cp_*(T - Tref)
);
}
@ -86,18 +76,7 @@ inline tmp<volScalarField> thermoSingleLayer::T
{
tmp<volScalarField> tT
(
new volScalarField
(
IOobject
(
"T(" + hs.name() + ")",
time().timeName(),
regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
hs/Cp_ + Tref
)
volScalarField::New("T(" + hs.name() + ")", hs/Cp_ + Tref)
);
tT.ref().min(Tmax_);

View File

@ -93,17 +93,9 @@ const tmp<volScalarField> noThermo::Cp() const
return tmp<volScalarField>
(
new volScalarField
volScalarField::New
(
IOobject
(
"noThermo::Cp",
time().timeName(),
primaryMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"noThermo::Cp",
primaryMesh(),
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
)

View File

@ -75,17 +75,9 @@ void thermalBaffle::solveEnergy()
tmp<volScalarField> tQ
(
new volScalarField
volScalarField::New
(
IOobject
(
"tQ",
regionMesh().time().timeName(),
regionMesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"tQ",
regionMesh(),
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
)

View File

@ -170,17 +170,9 @@ Foam::tmp<Foam::volScalarField> Foam::heThermo<BasicThermo, MixtureType>::he
tmp<volScalarField> the
(
new volScalarField
volScalarField::New
(
IOobject
(
"he",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"he",
mesh,
he_.dimensions()
)
@ -265,17 +257,9 @@ Foam::heThermo<BasicThermo, MixtureType>::hc() const
tmp<volScalarField> thc
(
new volScalarField
volScalarField::New
(
IOobject
(
"hc",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"hc",
mesh,
he_.dimensions()
)
@ -334,17 +318,9 @@ Foam::heThermo<BasicThermo, MixtureType>::Cp() const
tmp<volScalarField> tCp
(
new volScalarField
volScalarField::New
(
IOobject
(
"Cp",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"Cp",
mesh,
dimEnergy/dimMass/dimTemperature
)
@ -407,17 +383,9 @@ Foam::heThermo<BasicThermo, MixtureType>::Cv() const
tmp<volScalarField> tCv
(
new volScalarField
volScalarField::New
(
IOobject
(
"Cv",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"Cv",
mesh,
dimEnergy/dimMass/dimTemperature
)
@ -476,17 +444,9 @@ Foam::heThermo<BasicThermo, MixtureType>::gamma() const
tmp<volScalarField> tgamma
(
new volScalarField
volScalarField::New
(
IOobject
(
"gamma",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"gamma",
mesh,
dimless
)
@ -551,17 +511,9 @@ Foam::heThermo<BasicThermo, MixtureType>::Cpv() const
tmp<volScalarField> tCpv
(
new volScalarField
volScalarField::New
(
IOobject
(
"Cpv",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"Cpv",
mesh,
dimEnergy/dimMass/dimTemperature
)
@ -623,17 +575,9 @@ Foam::heThermo<BasicThermo, MixtureType>::CpByCpv() const
tmp<volScalarField> tCpByCpv
(
new volScalarField
volScalarField::New
(
IOobject
(
"CpByCpv",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"CpByCpv",
mesh,
dimless
)
@ -729,17 +673,9 @@ Foam::tmp<Foam::volScalarField> Foam::heThermo<BasicThermo, MixtureType>::W
tmp<volScalarField> tW
(
new volScalarField
volScalarField::New
(
IOobject
(
"W",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"W",
mesh,
dimMass/dimMoles
)

View File

@ -276,17 +276,9 @@ Foam::StandardChemistryModel<ReactionThermo, ThermoType>::tc() const
{
tmp<volScalarField> ttc
(
new volScalarField
volScalarField::New
(
IOobject
(
"tc",
this->time().timeName(),
this->mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"tc",
this->mesh(),
dimensionedScalar(dimTime, small),
extrapolatedCalculatedFvPatchScalarField::typeName
@ -350,17 +342,9 @@ Foam::StandardChemistryModel<ReactionThermo, ThermoType>::Qdot() const
{
tmp<volScalarField> tQdot
(
new volScalarField
volScalarField::New
(
IOobject
(
"Qdot",
this->mesh_.time().timeName(),
this->mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"Qdot",
this->mesh_,
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
)
@ -394,16 +378,9 @@ Foam::StandardChemistryModel<ReactionThermo, ThermoType>::calculateRR
{
tmp<volScalarField::Internal> tRR
(
new volScalarField::Internal
volScalarField::Internal::New
(
IOobject
(
"RR",
this->mesh().time().timeName(),
this->mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
"RR",
this->mesh(),
dimensionedScalar(dimMass/dimVolume/dimTime, 0)
)

View File

@ -112,17 +112,9 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::Su0pTphi
{
tmp<volScalarField> tSu0
(
new volScalarField
volScalarField::New
(
IOobject
(
"Su0",
p.time().timeName(),
p.db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"Su0",
p.mesh(),
dimensionedScalar(dimVelocity, 0)
)
@ -165,17 +157,9 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::Su0pTphi
{
tmp<volScalarField> tSu0
(
new volScalarField
volScalarField::New
(
IOobject
(
"Su0",
p.time().timeName(),
p.db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"Su0",
p.mesh(),
dimensionedScalar(dimVelocity, 0)
)

View File

@ -112,17 +112,9 @@ Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi
{
tmp<volScalarField> tSu0
(
new volScalarField
volScalarField::New
(
IOobject
(
"Su0",
p.time().timeName(),
p.db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"Su0",
p.mesh(),
dimensionedScalar(dimVelocity, 0)
)
@ -167,17 +159,9 @@ Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi
{
tmp<volScalarField> tSu0
(
new volScalarField
volScalarField::New
(
IOobject
(
"Su0",
p.time().timeName(),
p.db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"Su0",
p.mesh(),
dimensionedScalar(dimVelocity, 0)
)

View File

@ -327,17 +327,9 @@ Foam::laminarFlameSpeedModels::RaviPetersen::operator()() const
tmp<volScalarField> tSu0
(
new volScalarField
volScalarField::New
(
IOobject
(
"Su0",
p.time().timeName(),
p.db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
"Su0",
p.mesh(),
dimensionedScalar(dimVelocity, 0)
)

View File

@ -69,22 +69,11 @@ Foam::laminarFlameSpeedModels::constant::~constant()
Foam::tmp<Foam::volScalarField>
Foam::laminarFlameSpeedModels::constant::operator()() const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
"Su0",
psiuReactionThermo_.T().time().timeName(),
psiuReactionThermo_.T().db(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
psiuReactionThermo_.T().mesh(),
Su_
)
"Su0",
psiuReactionThermo_.T().mesh(),
Su_
);
}

View File

@ -259,21 +259,10 @@ void Foam::radiation::P1::calculate()
Foam::tmp<Foam::volScalarField> Foam::radiation::P1::Rp() const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
"Rp",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
4.0*absorptionEmission_->eCont()*physicoChemical::sigma
)
"Rp",
4.0*absorptionEmission_->eCont()*physicoChemical::sigma
);
}

View File

@ -206,16 +206,9 @@ Foam::radiation::blackBodyEmission::deltaLambdaT
{
tmp<volScalarField> deltaLambdaT
(
new volScalarField
volScalarField::New
(
IOobject
(
"deltaLambdaT",
T.mesh().time().timeName(),
T.mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
"deltaLambdaT",
T.mesh(),
dimensionedScalar(dimless, 1.0)
)
@ -244,16 +237,9 @@ Foam::radiation::blackBodyEmission::EbDeltaLambdaT
{
tmp<volScalarField> Eb
(
new volScalarField
volScalarField::New
(
IOobject
(
"Eb",
T.mesh().time().timeName(),
T.mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
"Eb",
physicoChemical::sigma*pow4(T)
)
);

View File

@ -448,23 +448,13 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::fvDOM::Rp() const
// Construct using contribution from first frequency band
tmp<volScalarField> tRp
(
new volScalarField
volScalarField::New
(
IOobject
(
"Rp",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
(
4
*physicoChemical::sigma
*(aLambda_[0] - absorptionEmission_->aDisp(0)())
*blackBody_.deltaLambdaT(T_, absorptionEmission_->bands(0))
)
"Rp",
4
*physicoChemical::sigma
*(aLambda_[0] - absorptionEmission_->aDisp(0)())
*blackBody_.deltaLambdaT(T_, absorptionEmission_->bands(0))
)
);

View File

@ -84,24 +84,14 @@ bool Foam::radiation::noRadiation::read()
Foam::tmp<Foam::volScalarField> Foam::radiation::noRadiation::Rp() const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
"Rp",
mesh_,
dimensionedScalar
(
IOobject
(
"Rp",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar
(
constant::physicoChemical::sigma.dimensions()/dimLength,
0
)
constant::physicoChemical::sigma.dimensions()/dimLength,
0
)
);
}
@ -110,21 +100,11 @@ 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>
return volScalarField::Internal::New
(
new volScalarField::Internal
(
IOobject
(
"Ru",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar(dimMass/dimLength/pow3(dimTime), 0)
)
"Ru",
mesh_,
dimensionedScalar(dimMass/dimLength/pow3(dimTime), 0)
);
}

View File

@ -81,24 +81,14 @@ void Foam::radiation::opaqueSolid::calculate()
Foam::tmp<Foam::volScalarField> Foam::radiation::opaqueSolid::Rp() const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
"Rp",
mesh_,
dimensionedScalar
(
IOobject
(
"Rp",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar
(
constant::physicoChemical::sigma.dimensions()/dimLength,
0
)
constant::physicoChemical::sigma.dimensions()/dimLength,
0
)
);
}
@ -107,21 +97,11 @@ 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>
return volScalarField::Internal::New
(
new volScalarField::Internal
(
IOobject
(
"Ru",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar(dimMass/dimLength/pow3(dimTime), 0)
)
"Ru",
mesh_,
dimensionedScalar(dimMass/dimLength/pow3(dimTime), 0)
);
}

View File

@ -677,25 +677,14 @@ void Foam::radiation::viewFactor::calculate()
Foam::tmp<Foam::volScalarField> Foam::radiation::viewFactor::Rp() const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
"Rp",
mesh_,
dimensionedScalar
(
IOobject
(
"Rp",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
dimensionedScalar
(
dimMass/pow3(dimTime)/dimLength/pow4(dimTemperature),
0
)
dimMass/pow3(dimTime)/dimLength/pow4(dimTemperature),
0
)
);
}
@ -704,22 +693,11 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::viewFactor::Rp() const
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
Foam::radiation::viewFactor::Ru() const
{
return tmp<volScalarField::Internal>
return volScalarField::Internal::New
(
new volScalarField::Internal
(
IOobject
(
"Ru",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
dimensionedScalar(dimMass/dimLength/pow3(dimTime), 0)
)
"Ru",
mesh_,
dimensionedScalar(dimMass/dimLength/pow3(dimTime), 0)
);
}

View File

@ -67,22 +67,11 @@ Foam::radiation::absorptionEmissionModel::a(const label bandI) const
Foam::tmp<Foam::volScalarField>
Foam::radiation::absorptionEmissionModel::aCont(const label bandI) const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
"aCont",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
dimensionedScalar(dimless/dimLength, 0)
)
"aCont",
mesh_,
dimensionedScalar(dimless/dimLength, 0)
);
}
@ -90,22 +79,11 @@ Foam::radiation::absorptionEmissionModel::aCont(const label bandI) const
Foam::tmp<Foam::volScalarField>
Foam::radiation::absorptionEmissionModel::aDisp(const label bandI) const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
"aDisp",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
dimensionedScalar(dimless/dimLength, 0)
)
"aDisp",
mesh_,
dimensionedScalar(dimless/dimLength, 0)
);
}
@ -120,22 +98,11 @@ Foam::radiation::absorptionEmissionModel::e(const label bandI) const
Foam::tmp<Foam::volScalarField>
Foam::radiation::absorptionEmissionModel::eCont(const label bandI) const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
"eCont",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
dimensionedScalar(dimless/dimLength, 0)
)
"eCont",
mesh_,
dimensionedScalar(dimless/dimLength, 0)
);
}
@ -143,22 +110,11 @@ Foam::radiation::absorptionEmissionModel::eCont(const label bandI) const
Foam::tmp<Foam::volScalarField>
Foam::radiation::absorptionEmissionModel::eDisp(const label bandI) const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
"eDisp",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
dimensionedScalar(dimless/dimLength, 0)
)
"eDisp",
mesh_,
dimensionedScalar(dimless/dimLength, 0)
);
}
@ -173,22 +129,11 @@ Foam::radiation::absorptionEmissionModel::E(const label bandI) const
Foam::tmp<Foam::volScalarField>
Foam::radiation::absorptionEmissionModel::ECont(const label bandI) const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
"ECont",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
dimensionedScalar(dimMass/dimLength/pow3(dimTime), 0)
)
"ECont",
mesh_,
dimensionedScalar(dimMass/dimLength/pow3(dimTime), 0)
);
}
@ -196,22 +141,11 @@ Foam::radiation::absorptionEmissionModel::ECont(const label bandI) const
Foam::tmp<Foam::volScalarField>
Foam::radiation::absorptionEmissionModel::EDisp(const label bandI) const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
"EDisp",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
dimensionedScalar(dimMass/dimLength/pow3(dimTime), 0)
)
"EDisp",
mesh_,
dimensionedScalar(dimMass/dimLength/pow3(dimTime), 0)
);
}

View File

@ -71,75 +71,36 @@ Foam::radiation::constantAbsorptionEmission::~constantAbsorptionEmission()
Foam::tmp<Foam::volScalarField>
Foam::radiation::constantAbsorptionEmission::aCont(const label bandI) const
{
tmp<volScalarField> ta
return volScalarField::New
(
new volScalarField
(
IOobject
(
"a",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
a_
)
"a",
mesh_,
a_
);
return ta;
}
Foam::tmp<Foam::volScalarField>
Foam::radiation::constantAbsorptionEmission::eCont(const label bandI) const
{
tmp<volScalarField> te
return volScalarField::New
(
new volScalarField
(
IOobject
(
"e",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
e_
)
"e",
mesh_,
e_
);
return te;
}
Foam::tmp<Foam::volScalarField>
Foam::radiation::constantAbsorptionEmission::ECont(const label bandI) const
{
tmp<volScalarField> tE
return volScalarField::New
(
new volScalarField
(
IOobject
(
"E",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
E_
)
"E",
mesh_,
E_
);
return tE;
}

View File

@ -186,16 +186,9 @@ Foam::radiation::greyMeanAbsorptionEmission::aCont(const label bandI) const
tmp<volScalarField> ta
(
new volScalarField
volScalarField::New
(
IOobject
(
"aCont" + name(bandI),
mesh().time().timeName(),
mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
"aCont" + name(bandI),
mesh(),
dimensionedScalar(dimless/dimLength, 0),
extrapolatedCalculatedFvPatchVectorField::typeName
@ -267,16 +260,9 @@ Foam::radiation::greyMeanAbsorptionEmission::ECont(const label bandI) const
{
tmp<volScalarField> E
(
new volScalarField
volScalarField::New
(
IOobject
(
"ECont" + name(bandI),
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
"ECont" + name(bandI),
mesh_,
dimensionedScalar(dimMass/dimLength/pow3(dimTime), 0)
)

View File

@ -201,16 +201,9 @@ Foam::radiation::wideBandAbsorptionEmission::aCont(const label bandi) const
tmp<volScalarField> ta
(
new volScalarField
volScalarField::New
(
IOobject
(
"a",
mesh().time().timeName(),
mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
"a",
mesh(),
dimensionedScalar(dimless/dimLength, 0)
)
@ -285,16 +278,9 @@ Foam::radiation::wideBandAbsorptionEmission::ECont(const label bandi) const
{
tmp<volScalarField> E
(
new volScalarField
volScalarField::New
(
IOobject
(
"E",
mesh().time().timeName(),
mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
"E",
mesh(),
dimensionedScalar(dimMass/dimLength/pow3(dimTime), 0)
)

View File

@ -70,22 +70,11 @@ Foam::radiation::constantScatter::~constantScatter()
Foam::tmp<Foam::volScalarField>
Foam::radiation::constantScatter::sigmaEff() const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
"sigma",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
sigma_*(3.0 - C_)
)
"sigma",
mesh_,
sigma_*(3.0 - C_)
);
}

View File

@ -60,22 +60,11 @@ Foam::radiation::noScatter::~noScatter()
Foam::tmp<Foam::volScalarField> Foam::radiation::noScatter::sigmaEff() const
{
return tmp<volScalarField>
return volScalarField::New
(
new volScalarField
(
IOobject
(
"sigma",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_,
dimensionedScalar(dimless/dimLength, 0)
)
"sigma",
mesh_,
dimensionedScalar(dimless/dimLength, 0)
);
}

View File

@ -1,4 +1,4 @@
elements
elements
5
(
O
@ -9,7 +9,7 @@ Ar
)
;
species
species
36
(
H2
@ -60,7 +60,7 @@ reactions
A 1.2e+11;
beta -1;
Ta 0;
coeffs
coeffs
36
(
(H2 2.4)
@ -109,7 +109,7 @@ reactions
A 5e+11;
beta -1;
Ta 0;
coeffs
coeffs
36
(
(H2 2)
@ -244,7 +244,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -454,7 +454,7 @@ reactions
A 2.8e+12;
beta -0.86;
Ta 0;
coeffs
coeffs
36
(
(H2 1)
@ -543,7 +543,7 @@ reactions
A 1e+12;
beta -1;
Ta 0;
coeffs
coeffs
36
(
(H2 0)
@ -616,7 +616,7 @@ reactions
A 2.2e+16;
beta -2;
Ta 0;
coeffs
coeffs
36
(
(H2 0.73)
@ -731,7 +731,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -807,7 +807,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -883,7 +883,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -959,7 +959,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -1027,7 +1027,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -1103,7 +1103,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -1195,7 +1195,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -1311,7 +1311,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -1379,7 +1379,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -1447,7 +1447,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -1523,7 +1523,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -1599,7 +1599,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -1715,7 +1715,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -1791,7 +1791,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -1931,7 +1931,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -2279,7 +2279,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -2411,7 +2411,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -2527,7 +2527,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -2675,7 +2675,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -2789,7 +2789,7 @@ reactions
A 1.87e+14;
beta -1;
Ta 8554.25106;
coeffs
coeffs
36
(
(H2 2)
@ -2904,7 +2904,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -3036,7 +3036,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -3216,7 +3216,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -3340,7 +3340,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -3448,7 +3448,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -3524,7 +3524,7 @@ reactions
}
thirdBodyEfficiencies
{
coeffs
coeffs
36
(
(H2 2)
@ -3611,3 +3611,4 @@ reactions
Tlow 250;
Thigh 5000;

View File

@ -18,17 +18,17 @@ application reactingFoam;
startFrom startTime;
startTime 1500;
startTime 0;
stopAt endTime;
endTime 5000;
endTime 1500;
deltaT 1;
writeControl runTime;
writeInterval 100;
writeInterval 1500;
purgeWrite 0;