GeometricField: Changed "New" method to take a name argument instead of using the name of the dimensionedType
This commit is contained in:
@ -750,6 +750,7 @@ template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh>>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::New
|
||||
(
|
||||
const word& name,
|
||||
const Mesh& mesh,
|
||||
const dimensioned<Type>& dt,
|
||||
const word& patchFieldType
|
||||
@ -761,7 +762,7 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
dt.name(),
|
||||
name,
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
@ -776,6 +777,40 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::New
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh>>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::New
|
||||
(
|
||||
const word& name,
|
||||
const Mesh& mesh,
|
||||
const dimensioned<Type>& dt,
|
||||
const wordList& patchFieldTypes,
|
||||
const wordList& actualPatchTypes
|
||||
)
|
||||
{
|
||||
return tmp<GeometricField<Type, PatchField, GeoMesh>>
|
||||
(
|
||||
new GeometricField<Type, PatchField, GeoMesh>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
name,
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dt,
|
||||
patchFieldTypes,
|
||||
actualPatchTypes
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||
Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh>>
|
||||
Foam::GeometricField<Type, PatchField, GeoMesh>::New
|
||||
|
||||
@ -446,11 +446,23 @@ public:
|
||||
// and patch type.
|
||||
static tmp<GeometricField<Type, PatchField, GeoMesh>> New
|
||||
(
|
||||
const word& name,
|
||||
const Mesh&,
|
||||
const dimensioned<Type>&,
|
||||
const word& patchFieldType=PatchField<Type>::calculatedType()
|
||||
);
|
||||
|
||||
//- Return a temporary field constructed from mesh, dimensioned<Type>
|
||||
// and patch types.
|
||||
static tmp<GeometricField<Type, PatchField, GeoMesh>> New
|
||||
(
|
||||
const word& name,
|
||||
const Mesh&,
|
||||
const dimensioned<Type>&,
|
||||
const wordList& patchFieldTypes,
|
||||
const wordList& actualPatchTypes = wordList()
|
||||
);
|
||||
|
||||
//- Rename temporary field and return
|
||||
static tmp<GeometricField<Type, PatchField, GeoMesh>> New
|
||||
(
|
||||
|
||||
@ -120,12 +120,9 @@ Foam::ThermalDiffusivity<BasicTurbulenceModel>::alphat() const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject::groupName("alphat", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
IOobject::groupName("alphat", this->alphaRhoPhi_.group()),
|
||||
dimDensity*dimViscosity, 0
|
||||
)
|
||||
dimensionedScalar(dimDensity*dimViscosity, 0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -106,13 +106,9 @@ Foam::PhaseCompressibleTurbulenceModel<TransportModel>::pPrime() const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject::groupName("pPrime", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
IOobject::groupName("pPrime", this->alphaRhoPhi_.group()),
|
||||
dimPressure,
|
||||
0
|
||||
)
|
||||
dimensionedScalar(dimPressure, 0)
|
||||
);
|
||||
}
|
||||
|
||||
@ -123,13 +119,9 @@ Foam::PhaseCompressibleTurbulenceModel<TransportModel>::pPrimef() const
|
||||
{
|
||||
return surfaceScalarField::New
|
||||
(
|
||||
IOobject::groupName("pPrimef", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
IOobject::groupName("pPrimef", this->alphaRhoPhi_.group()),
|
||||
dimPressure,
|
||||
0
|
||||
)
|
||||
dimensionedScalar(dimPressure, 0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -105,13 +105,9 @@ Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::pPrime() const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject::groupName("pPrime", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
IOobject::groupName("pPrime", this->alphaRhoPhi_.group()),
|
||||
dimPressure,
|
||||
0
|
||||
)
|
||||
dimensionedScalar(dimPressure, 0)
|
||||
);
|
||||
}
|
||||
|
||||
@ -122,13 +118,9 @@ Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::pPrimef() const
|
||||
{
|
||||
return surfaceScalarField::New
|
||||
(
|
||||
IOobject::groupName("pPrimef", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
IOobject::groupName("pPrimef", this->alphaRhoPhi_.group()),
|
||||
dimPressure,
|
||||
0
|
||||
)
|
||||
dimensionedScalar(dimPressure, 0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -53,8 +53,9 @@ void Foam::LESModels::IDDESDelta::calcDelta()
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
"faceToFaceMax",
|
||||
mesh,
|
||||
dimensionedScalar("faceToFaceMax", dimLength, 0)
|
||||
dimensionedScalar(dimLength, 0)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -305,8 +305,9 @@ tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::k() const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
"k",
|
||||
this->mesh_,
|
||||
dimensionedScalar("k", dimensionSet(0, 2, -2, 0, 0), 0)
|
||||
dimensionedScalar(dimensionSet(0, 2, -2, 0, 0), 0)
|
||||
);
|
||||
}
|
||||
|
||||
@ -321,8 +322,9 @@ tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::epsilon() const
|
||||
|
||||
return volScalarField::New
|
||||
(
|
||||
"epsilon",
|
||||
this->mesh_,
|
||||
dimensionedScalar("epsilon", dimensionSet(0, 2, -3, 0, 0), 0)
|
||||
dimensionedScalar(dimensionSet(0, 2, -3, 0, 0), 0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -85,20 +85,17 @@ tmp<volScalarField::Internal> kOmegaSSTLM<BasicTurbulenceModel>::Fthetat
|
||||
const volScalarField::Internal ReOmega(sqr(y)*omega/nu);
|
||||
const volScalarField::Internal Fwake(exp(-sqr(ReOmega/1e5)));
|
||||
|
||||
return tmp<volScalarField::Internal>
|
||||
return volScalarField::Internal::New
|
||||
(
|
||||
new volScalarField::Internal
|
||||
IOobject::groupName("Fthetat", this->alphaRhoPhi_.group()),
|
||||
min
|
||||
(
|
||||
IOobject::groupName("Fthetat", this->alphaRhoPhi_.group()),
|
||||
min
|
||||
max
|
||||
(
|
||||
max
|
||||
(
|
||||
Fwake*exp(-pow4((y/delta))),
|
||||
(1 - sqr((gammaInt_() - 1.0/ce2_)/(1 - 1.0/ce2_)))
|
||||
),
|
||||
scalar(1)
|
||||
)
|
||||
Fwake*exp(-pow4((y/delta))),
|
||||
(1 - sqr((gammaInt_() - 1.0/ce2_)/(1 - 1.0/ce2_)))
|
||||
),
|
||||
scalar(1)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -110,14 +107,9 @@ kOmegaSSTLM<BasicTurbulenceModel>::ReThetac() const
|
||||
{
|
||||
tmp<volScalarField::Internal> tReThetac
|
||||
(
|
||||
new volScalarField::Internal
|
||||
volScalarField::Internal::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("ReThetac", this->alphaRhoPhi_.group()),
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_
|
||||
),
|
||||
IOobject::groupName("ReThetac", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimless
|
||||
)
|
||||
@ -153,14 +145,9 @@ tmp<volScalarField::Internal> kOmegaSSTLM<BasicTurbulenceModel>::Flength
|
||||
{
|
||||
tmp<volScalarField::Internal> tFlength
|
||||
(
|
||||
new volScalarField::Internal
|
||||
volScalarField::Internal::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("Flength", this->alphaRhoPhi_.group()),
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_
|
||||
),
|
||||
IOobject::groupName("Flength", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimless
|
||||
)
|
||||
@ -218,14 +205,9 @@ tmp<volScalarField::Internal> kOmegaSSTLM<BasicTurbulenceModel>::ReThetat0
|
||||
{
|
||||
tmp<volScalarField::Internal> tReThetat0
|
||||
(
|
||||
new volScalarField::Internal
|
||||
volScalarField::Internal::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("ReThetat0", this->alphaRhoPhi_.group()),
|
||||
this->runTime_.timeName(),
|
||||
this->mesh_
|
||||
),
|
||||
IOobject::groupName("ReThetat0", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimless
|
||||
)
|
||||
@ -339,13 +321,10 @@ tmp<volScalarField::Internal> kOmegaSSTLM<BasicTurbulenceModel>::Fonset
|
||||
|
||||
const volScalarField::Internal Fonset3(max(1 - pow3(RT/2.5), scalar(0)));
|
||||
|
||||
return tmp<volScalarField::Internal>
|
||||
return volScalarField::Internal::New
|
||||
(
|
||||
new volScalarField::Internal
|
||||
(
|
||||
IOobject::groupName("Fonset", this->alphaRhoPhi_.group()),
|
||||
max(Fonset2 - Fonset3, scalar(0))
|
||||
)
|
||||
IOobject::groupName("Fonset", this->alphaRhoPhi_.group()),
|
||||
max(Fonset2 - Fonset3, scalar(0))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -88,13 +88,9 @@ Stokes<BasicTurbulenceModel>::nut() const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject::groupName("nut", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
IOobject::groupName("nut", this->alphaRhoPhi_.group()),
|
||||
dimViscosity,
|
||||
0
|
||||
)
|
||||
dimensionedScalar(dimViscosity, 0)
|
||||
);
|
||||
}
|
||||
|
||||
@ -142,13 +138,9 @@ Stokes<BasicTurbulenceModel>::k() const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject::groupName("k", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
IOobject::groupName("k", this->alphaRhoPhi_.group()),
|
||||
sqr(this->U_.dimensions()),
|
||||
0
|
||||
)
|
||||
dimensionedScalar(sqr(this->U_.dimensions()), 0)
|
||||
);
|
||||
}
|
||||
|
||||
@ -159,13 +151,9 @@ Stokes<BasicTurbulenceModel>::epsilon() const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
||||
sqr(this->U_.dimensions())/dimTime,
|
||||
0
|
||||
)
|
||||
dimensionedScalar(sqr(this->U_.dimensions())/dimTime, 0)
|
||||
);
|
||||
}
|
||||
|
||||
@ -176,13 +164,9 @@ Stokes<BasicTurbulenceModel>::R() const
|
||||
{
|
||||
return volSymmTensorField::New
|
||||
(
|
||||
IOobject::groupName("R", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
IOobject::groupName("R", this->alphaRhoPhi_.group()),
|
||||
sqr(this->U_.dimensions()),
|
||||
Zero
|
||||
)
|
||||
dimensionedSymmTensor(sqr(this->U_.dimensions()), Zero)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -113,13 +113,9 @@ generalizedNewtonian<BasicTurbulenceModel>::nut() const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject::groupName("nut", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
IOobject::groupName("nut", this->alphaRhoPhi_.group()),
|
||||
dimViscosity,
|
||||
0
|
||||
)
|
||||
dimensionedScalar(dimViscosity, 0)
|
||||
);
|
||||
}
|
||||
|
||||
@ -167,13 +163,9 @@ generalizedNewtonian<BasicTurbulenceModel>::k() const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject::groupName("k", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
IOobject::groupName("k", this->alphaRhoPhi_.group()),
|
||||
sqr(this->U_.dimensions()),
|
||||
0
|
||||
)
|
||||
dimensionedScalar(sqr(this->U_.dimensions()), 0)
|
||||
);
|
||||
}
|
||||
|
||||
@ -184,13 +176,9 @@ generalizedNewtonian<BasicTurbulenceModel>::epsilon() const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
||||
sqr(this->U_.dimensions())/dimTime,
|
||||
0
|
||||
)
|
||||
dimensionedScalar(sqr(this->U_.dimensions())/dimTime, 0)
|
||||
);
|
||||
}
|
||||
|
||||
@ -201,13 +189,9 @@ generalizedNewtonian<BasicTurbulenceModel>::R() const
|
||||
{
|
||||
return volSymmTensorField::New
|
||||
(
|
||||
IOobject::groupName("R", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
IOobject::groupName("R", this->alphaRhoPhi_.group()),
|
||||
sqr(this->U_.dimensions()),
|
||||
Zero
|
||||
)
|
||||
dimensionedSymmTensor(sqr(this->U_.dimensions()), Zero)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -104,13 +104,9 @@ nu
|
||||
(
|
||||
volScalarField::New
|
||||
(
|
||||
IOobject::groupName(type() + ":nu", nu0.group()),
|
||||
nu0.mesh(),
|
||||
dimensionedScalar
|
||||
(
|
||||
IOobject::groupName(type() + ":nu", nu0.group()),
|
||||
dimViscosity,
|
||||
0
|
||||
)
|
||||
dimensionedScalar(dimViscosity, 0)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -187,13 +187,9 @@ Foam::laminarModel<BasicTurbulenceModel>::nut() const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject::groupName("nut", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
IOobject::groupName("nut", this->alphaRhoPhi_.group()),
|
||||
dimViscosity,
|
||||
0
|
||||
)
|
||||
dimensionedScalar(dimViscosity, 0)
|
||||
);
|
||||
}
|
||||
|
||||
@ -241,13 +237,9 @@ Foam::laminarModel<BasicTurbulenceModel>::k() const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject::groupName("k", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
IOobject::groupName("k", this->alphaRhoPhi_.group()),
|
||||
sqr(this->U_.dimensions()),
|
||||
0
|
||||
)
|
||||
dimensionedScalar(sqr(this->U_.dimensions()), 0)
|
||||
);
|
||||
}
|
||||
|
||||
@ -258,13 +250,9 @@ Foam::laminarModel<BasicTurbulenceModel>::epsilon() const
|
||||
{
|
||||
return volScalarField::New
|
||||
(
|
||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedScalar
|
||||
(
|
||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
||||
sqr(this->U_.dimensions())/dimTime,
|
||||
0
|
||||
)
|
||||
dimensionedScalar(sqr(this->U_.dimensions())/dimTime, 0)
|
||||
);
|
||||
}
|
||||
|
||||
@ -275,13 +263,9 @@ Foam::laminarModel<BasicTurbulenceModel>::R() const
|
||||
{
|
||||
return volSymmTensorField::New
|
||||
(
|
||||
IOobject::groupName("R", this->alphaRhoPhi_.group()),
|
||||
this->mesh_,
|
||||
dimensionedSymmTensor
|
||||
(
|
||||
IOobject::groupName("R", this->alphaRhoPhi_.group()),
|
||||
sqr(this->U_.dimensions()),
|
||||
Zero
|
||||
)
|
||||
dimensionedSymmTensor(sqr(this->U_.dimensions()), Zero)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -184,26 +184,20 @@ public:
|
||||
//- Return the effective diffusivity for k
|
||||
tmp<volScalarField> DkEff() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
return volScalarField::New
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
"DkEff",
|
||||
(this->nut_/sigmak_ + this->nu())
|
||||
)
|
||||
"DkEff",
|
||||
(this->nut_/sigmak_ + this->nu())
|
||||
);
|
||||
}
|
||||
|
||||
//- Return the effective diffusivity for epsilon
|
||||
tmp<volScalarField> DepsilonEff() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
return volScalarField::New
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
"DepsilonEff",
|
||||
(this->nut_/sigmaEps_ + this->nu())
|
||||
)
|
||||
"DepsilonEff",
|
||||
(this->nut_/sigmaEps_ + this->nu())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -168,16 +168,11 @@ Foam::tmp<Foam::volVectorField> Foam::MRFZoneList::DDt
|
||||
{
|
||||
tmp<volVectorField> tacceleration
|
||||
(
|
||||
new volVectorField
|
||||
volVectorField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"MRFZoneList:acceleration",
|
||||
U.mesh().time().timeName(),
|
||||
U.mesh()
|
||||
),
|
||||
"MRFZoneList:acceleration",
|
||||
U.mesh(),
|
||||
dimensionedVector("0", U.dimensions()/dimTime, Zero)
|
||||
dimensionedVector(U.dimensions()/dimTime, Zero)
|
||||
)
|
||||
);
|
||||
volVectorField& acceleration = tacceleration.ref();
|
||||
|
||||
@ -185,21 +185,10 @@ Foam::vectorField Foam::SRF::SRFModel::velocity
|
||||
|
||||
Foam::tmp<Foam::volVectorField> Foam::SRF::SRFModel::U() const
|
||||
{
|
||||
return tmp<volVectorField>
|
||||
return volVectorField::New
|
||||
(
|
||||
new volVectorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Usrf",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
omega_
|
||||
^ ((mesh_.C() - origin_) - axis_*(axis_ & (mesh_.C() - origin_)))
|
||||
)
|
||||
"Usrf",
|
||||
omega_ ^ ((mesh_.C() - origin_) - axis_*(axis_ & (mesh_.C() - origin_)))
|
||||
);
|
||||
}
|
||||
|
||||
@ -210,19 +199,7 @@ Foam::tmp<Foam::volVectorField> Foam::SRF::SRFModel::Uabs() const
|
||||
|
||||
tmp<volVectorField> tUabs
|
||||
(
|
||||
new volVectorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Uabs",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
Usrf
|
||||
)
|
||||
volVectorField::New("Uabs", Usrf)
|
||||
);
|
||||
|
||||
volVectorField& Uabs = tUabs.ref();
|
||||
|
||||
@ -154,16 +154,11 @@ Foam::tmp<Foam::volScalarField> Foam::levelSetFraction
|
||||
|
||||
tmp<volScalarField> tResult
|
||||
(
|
||||
new volScalarField
|
||||
volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"levelSetFraction",
|
||||
mesh.time().timeName(),
|
||||
mesh
|
||||
),
|
||||
"levelSetFraction",
|
||||
mesh,
|
||||
dimensionedScalar("0", dimless, 0)
|
||||
dimensionedScalar(dimless, 0)
|
||||
)
|
||||
);
|
||||
volScalarField& result = tResult.ref();
|
||||
|
||||
@ -47,16 +47,11 @@ tmp<volScalarField> CoEulerDdtScheme<Type>::CorDeltaT() const
|
||||
|
||||
tmp<volScalarField> tcorDeltaT
|
||||
(
|
||||
new volScalarField
|
||||
volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"CorDeltaT",
|
||||
cofrDeltaT.instance(),
|
||||
mesh()
|
||||
),
|
||||
"CorDeltaT",
|
||||
mesh(),
|
||||
dimensionedScalar("CorDeltaT", cofrDeltaT.dimensions(), 0.0),
|
||||
dimensionedScalar(cofrDeltaT.dimensions(), 0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
@ -834,21 +829,11 @@ tmp<surfaceScalarField> CoEulerDdtScheme<Type>::meshPhi
|
||||
const GeometricField<Type, fvPatchField, volMesh>&
|
||||
)
|
||||
{
|
||||
return tmp<surfaceScalarField>
|
||||
return surfaceScalarField::New
|
||||
(
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"meshPhi",
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh(),
|
||||
dimensionedScalar("0", dimVolume/dimTime, 0.0)
|
||||
)
|
||||
"meshPhi",
|
||||
mesh(),
|
||||
dimensionedScalar(dimVolume/dimTime, 0.0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -1618,21 +1618,10 @@ tmp<surfaceScalarField> CrankNicolsonDdtScheme<Type>::meshPhi
|
||||
coef0_(meshPhi0)*mesh().phi().oldTime() - offCentre_(meshPhi0());
|
||||
}
|
||||
|
||||
return tmp<surfaceScalarField>
|
||||
return surfaceScalarField::New
|
||||
(
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
mesh().phi().name(),
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
coef_(meshPhi0)*mesh().phi() - offCentre_(meshPhi0())
|
||||
)
|
||||
mesh().phi().name(),
|
||||
coef_(meshPhi0)*mesh().phi() - offCentre_(meshPhi0())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -97,16 +97,11 @@ tmp<volScalarField> SLTSDdtScheme<Type>::SLrDeltaT() const
|
||||
|
||||
tmp<volScalarField> trDeltaT
|
||||
(
|
||||
new volScalarField
|
||||
volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rDeltaT",
|
||||
phi.instance(),
|
||||
mesh()
|
||||
),
|
||||
"rDeltaT",
|
||||
mesh(),
|
||||
dimensionedScalar("rDeltaT", dimless/dimTime, 0.0),
|
||||
dimensionedScalar(dimless/dimTime, 0),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
@ -837,22 +832,11 @@ tmp<surfaceScalarField> SLTSDdtScheme<Type>::meshPhi
|
||||
const GeometricField<Type, fvPatchField, volMesh>&
|
||||
)
|
||||
{
|
||||
return tmp<surfaceScalarField>
|
||||
return surfaceScalarField::New
|
||||
(
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"meshPhi",
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh(),
|
||||
dimensionedScalar("0", dimVolume/dimTime, 0.0)
|
||||
)
|
||||
"meshPhi",
|
||||
mesh(),
|
||||
dimensionedScalar(dimVolume/dimTime, 0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -984,21 +984,10 @@ tmp<surfaceScalarField> backwardDdtScheme<Type>::meshPhi
|
||||
// Coefficient for t-1/2 (between times n and 0)
|
||||
scalar coefftn_0 = 1 + coefft0_00;
|
||||
|
||||
return tmp<surfaceScalarField>
|
||||
return surfaceScalarField::New
|
||||
(
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
mesh().phi().name(),
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
coefftn_0*mesh().phi() - coefft0_00*mesh().phi().oldTime()
|
||||
)
|
||||
mesh().phi().name(),
|
||||
coefftn_0*mesh().phi() - coefft0_00*mesh().phi().oldTime()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -72,16 +72,13 @@ Foam::tmp<Foam::volScalarField> Foam::fv::localEulerDdt::localRSubDeltaT
|
||||
const label nAlphaSubCycles
|
||||
)
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
return volScalarField::New
|
||||
(
|
||||
new volScalarField
|
||||
rSubDeltaTName,
|
||||
nAlphaSubCycles
|
||||
*mesh.objectRegistry::lookupObject<volScalarField>
|
||||
(
|
||||
rSubDeltaTName,
|
||||
nAlphaSubCycles
|
||||
*mesh.objectRegistry::lookupObject<volScalarField>
|
||||
(
|
||||
rDeltaTName
|
||||
)
|
||||
rDeltaTName
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -640,22 +640,11 @@ tmp<surfaceScalarField> localEulerDdtScheme<Type>::meshPhi
|
||||
const GeometricField<Type, fvPatchField, volMesh>&
|
||||
)
|
||||
{
|
||||
return tmp<surfaceScalarField>
|
||||
return surfaceScalarField::New
|
||||
(
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"meshPhi",
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh(),
|
||||
dimensionedScalar("0", dimVolume/dimTime, 0.0)
|
||||
)
|
||||
"meshPhi",
|
||||
mesh(),
|
||||
dimensionedScalar(dimVolume/dimTime, 0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -404,22 +404,11 @@ tmp<surfaceScalarField> steadyStateDdtScheme<Type>::meshPhi
|
||||
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||
)
|
||||
{
|
||||
return tmp<surfaceScalarField>
|
||||
return surfaceScalarField::New
|
||||
(
|
||||
new surfaceScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"meshPhi",
|
||||
mesh().time().timeName(),
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh(),
|
||||
dimensionedScalar("0", dimVolume/dimTime, 0.0)
|
||||
)
|
||||
"meshPhi",
|
||||
mesh(),
|
||||
dimensionedScalar(dimVolume/dimTime, 0)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -46,18 +46,15 @@ Foam::fvc::cellReduce
|
||||
|
||||
tmp<volFieldType> tresult
|
||||
(
|
||||
new volFieldType
|
||||
volFieldType::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"cellReduce(" + ssf.name() + ')',
|
||||
ssf.instance(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
"cellReduce(" + ssf.name() + ')',
|
||||
mesh,
|
||||
dimensioned<Type>("initialValue", ssf.dimensions(), nullValue),
|
||||
dimensioned<Type>
|
||||
(
|
||||
ssf.dimensions(),
|
||||
nullValue
|
||||
),
|
||||
extrapolatedCalculatedFvPatchField<Type>::typeName
|
||||
)
|
||||
);
|
||||
|
||||
@ -55,20 +55,12 @@ tmp<volScalarField> reconstructMag(const surfaceScalarField& ssf)
|
||||
|
||||
tmp<volScalarField> treconField
|
||||
(
|
||||
new volScalarField
|
||||
volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"reconstruct("+ssf.name()+')',
|
||||
ssf.instance(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
"reconstruct("+ssf.name()+')',
|
||||
mesh,
|
||||
dimensionedScalar
|
||||
(
|
||||
"0",
|
||||
ssf.dimensions()/dimArea,
|
||||
scalar(0)
|
||||
),
|
||||
|
||||
@ -739,16 +739,9 @@ Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Type>::A() const
|
||||
{
|
||||
tmp<volScalarField> tAphi
|
||||
(
|
||||
new volScalarField
|
||||
volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"A("+psi_.name()+')',
|
||||
psi_.instance(),
|
||||
psi_.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
"A("+psi_.name()+')',
|
||||
psi_.mesh(),
|
||||
dimensions_/psi_.dimensions()/dimVol,
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
@ -830,16 +823,9 @@ Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Type>::H1() const
|
||||
{
|
||||
tmp<volScalarField> tH1
|
||||
(
|
||||
new volScalarField
|
||||
volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"H(1)",
|
||||
psi_.instance(),
|
||||
psi_.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
"H(1)",
|
||||
psi_.mesh(),
|
||||
dimensions_/(dimVol*psi_.dimensions()),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
|
||||
@ -212,16 +212,9 @@ Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Foam::scalar>::H() const
|
||||
{
|
||||
tmp<volScalarField> tHphi
|
||||
(
|
||||
new volScalarField
|
||||
volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"H("+psi_.name()+')',
|
||||
psi_.instance(),
|
||||
psi_.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
"H("+psi_.name()+')',
|
||||
psi_.mesh(),
|
||||
dimensions_/dimVol,
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
@ -244,16 +237,9 @@ Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Foam::scalar>::H1() const
|
||||
{
|
||||
tmp<volScalarField> tH1
|
||||
(
|
||||
new volScalarField
|
||||
volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"H(1)",
|
||||
psi_.instance(),
|
||||
psi_.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
"H(1)",
|
||||
psi_.mesh(),
|
||||
dimensions_/(dimVol*psi_.dimensions()),
|
||||
extrapolatedCalculatedFvPatchScalarField::typeName
|
||||
|
||||
@ -80,16 +80,11 @@ bool Foam::patchDistMethods::Poisson::correct
|
||||
{
|
||||
tyPsi_ = tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
volScalarField::New
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"yPsi",
|
||||
mesh_.time().timeName(),
|
||||
mesh_
|
||||
),
|
||||
"yPsi",
|
||||
mesh_,
|
||||
dimensionedScalar("yPsi", sqr(dimLength), 0.0),
|
||||
dimensionedScalar(sqr(dimLength), 0),
|
||||
y.boundaryFieldRef().types()
|
||||
)
|
||||
);
|
||||
|
||||
@ -38,20 +38,12 @@ namespace Foam
|
||||
|
||||
void Foam::wallDist::constructn() const
|
||||
{
|
||||
n_ = tmp<volVectorField>
|
||||
n_ = volVectorField::New
|
||||
(
|
||||
new volVectorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"n" & patchTypeName_,
|
||||
mesh().time().timeName(),
|
||||
mesh()
|
||||
),
|
||||
mesh(),
|
||||
dimensionedVector("n" & patchTypeName_, dimless, Zero),
|
||||
patchDistMethod::patchTypes<vector>(mesh(), patchIDs_)
|
||||
)
|
||||
"n" & patchTypeName_,
|
||||
mesh(),
|
||||
dimensionedVector(dimless, Zero),
|
||||
patchDistMethod::patchTypes<vector>(mesh(), patchIDs_)
|
||||
);
|
||||
|
||||
const fvPatchList& patches = mesh().boundary();
|
||||
|
||||
@ -129,14 +129,11 @@ Foam::incompressibleTwoPhaseMixture::mu() const
|
||||
min(max(alpha1_, scalar(0)), scalar(1))
|
||||
);
|
||||
|
||||
return tmp<volScalarField>
|
||||
return volScalarField::New
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
"mu",
|
||||
limitedAlpha1*rho1_*nuModel1_->nu()
|
||||
+ (scalar(1) - limitedAlpha1)*rho2_*nuModel2_->nu()
|
||||
)
|
||||
"mu",
|
||||
limitedAlpha1*rho1_*nuModel1_->nu()
|
||||
+ (scalar(1) - limitedAlpha1)*rho2_*nuModel2_->nu()
|
||||
);
|
||||
}
|
||||
|
||||
@ -149,14 +146,11 @@ Foam::incompressibleTwoPhaseMixture::muf() const
|
||||
min(max(fvc::interpolate(alpha1_), scalar(0)), scalar(1))
|
||||
);
|
||||
|
||||
return tmp<surfaceScalarField>
|
||||
return surfaceScalarField::New
|
||||
(
|
||||
new surfaceScalarField
|
||||
(
|
||||
"muf",
|
||||
alpha1f*rho1_*fvc::interpolate(nuModel1_->nu())
|
||||
+ (scalar(1) - alpha1f)*rho2_*fvc::interpolate(nuModel2_->nu())
|
||||
)
|
||||
"muf",
|
||||
alpha1f*rho1_*fvc::interpolate(nuModel1_->nu())
|
||||
+ (scalar(1) - alpha1f)*rho2_*fvc::interpolate(nuModel2_->nu())
|
||||
);
|
||||
}
|
||||
|
||||
@ -169,16 +163,13 @@ Foam::incompressibleTwoPhaseMixture::nuf() const
|
||||
min(max(fvc::interpolate(alpha1_), scalar(0)), scalar(1))
|
||||
);
|
||||
|
||||
return tmp<surfaceScalarField>
|
||||
return surfaceScalarField::New
|
||||
(
|
||||
new surfaceScalarField
|
||||
"nuf",
|
||||
(
|
||||
"nuf",
|
||||
(
|
||||
alpha1f*rho1_*fvc::interpolate(nuModel1_->nu())
|
||||
+ (scalar(1) - alpha1f)*rho2_*fvc::interpolate(nuModel2_->nu())
|
||||
)/(alpha1f*rho1_ + (scalar(1) - alpha1f)*rho2_)
|
||||
)
|
||||
alpha1f*rho1_*fvc::interpolate(nuModel1_->nu())
|
||||
+ (scalar(1) - alpha1f)*rho2_*fvc::interpolate(nuModel2_->nu())
|
||||
)/(alpha1f*rho1_ + (scalar(1) - alpha1f)*rho2_)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -63,23 +63,7 @@ Foam::surfaceTensionModels::constant::~constant()
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::surfaceTensionModels::constant::sigma() const
|
||||
{
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"sigma",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh_,
|
||||
sigma_
|
||||
)
|
||||
);
|
||||
return volScalarField::New(sigma_.name(), mesh_, sigma_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -71,20 +71,7 @@ Foam::surfaceTensionModels::temperatureDependent::sigma() const
|
||||
{
|
||||
tmp<volScalarField> tsigma
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"sigma",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh_,
|
||||
dimSigma
|
||||
)
|
||||
volScalarField::New("sigma", mesh_, dimSigma)
|
||||
);
|
||||
volScalarField& sigma = tsigma.ref();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user