GeometricField: Rationalized and simplified access to the dimensioned internal field
Given that the type of the dimensioned internal field is encapsulated in the GeometricField class the name need not include "Field"; the type name is "Internal" so volScalarField::DimensionedInternalField -> volScalarField::Internal In addition to the ".dimensionedInternalField()" access function the simpler "()" de-reference operator is also provided to greatly simplify FV equation source term expressions which need not evaluate boundary conditions. To demonstrate this kEpsilon.C has been updated to use dimensioned internal field expressions in the k and epsilon equation source terms.
This commit is contained in:
@ -75,7 +75,7 @@ License
|
||||
// Reaction source time scale
|
||||
if (alphaTemp < 1.0)
|
||||
{
|
||||
volScalarField::DimensionedInternalField rDeltaTT
|
||||
volScalarField::Internal rDeltaTT
|
||||
(
|
||||
mag(reaction->Sh())/(alphaTemp*rho*thermo.Cp()*T)
|
||||
);
|
||||
|
||||
@ -74,7 +74,7 @@ License
|
||||
|
||||
// Reaction source time scale
|
||||
{
|
||||
volScalarField::DimensionedInternalField rDeltaTT
|
||||
volScalarField::Internal rDeltaTT
|
||||
(
|
||||
mag
|
||||
(
|
||||
|
||||
@ -74,7 +74,7 @@ License
|
||||
|
||||
// Reaction source time scale
|
||||
{
|
||||
volScalarField::DimensionedInternalField rDeltaTT
|
||||
volScalarField::Internal rDeltaTT
|
||||
(
|
||||
mag
|
||||
(
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
for (int gCorr=0; gCorr<nAlphaCorr; gCorr++)
|
||||
{
|
||||
volScalarField::DimensionedInternalField Sp
|
||||
volScalarField::Internal Sp
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -18,7 +18,7 @@
|
||||
dimensionedScalar("Sp", dgdt.dimensions(), 0.0)
|
||||
);
|
||||
|
||||
volScalarField::DimensionedInternalField Su
|
||||
volScalarField::Internal Su
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
|
||||
@ -1058,7 +1058,7 @@ void Foam::multiphaseMixtureThermo::solveAlphas
|
||||
surfaceScalarField& alphaPhi = alphaPhiCorrs[phasei];
|
||||
alphaPhi += upwind<scalar>(mesh_, phi_).flux(alpha);
|
||||
|
||||
volScalarField::DimensionedInternalField Sp
|
||||
volScalarField::Internal Sp
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -1070,7 +1070,7 @@ void Foam::multiphaseMixtureThermo::solveAlphas
|
||||
dimensionedScalar("Sp", alpha.dgdt().dimensions(), 0.0)
|
||||
);
|
||||
|
||||
volScalarField::DimensionedInternalField Su
|
||||
volScalarField::Internal Su
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
|
||||
@ -218,7 +218,7 @@ void Foam::multiphaseSystem::solveAlphas()
|
||||
surfaceScalarField& alphaPhic = alphaPhiCorrs[phasei];
|
||||
alphaPhic += upwind<scalar>(mesh_, phi_).flux(phase);
|
||||
|
||||
volScalarField::DimensionedInternalField Sp
|
||||
volScalarField::Internal Sp
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -230,7 +230,7 @@ void Foam::multiphaseSystem::solveAlphas()
|
||||
dimensionedScalar("Sp", divU.dimensions(), 0.0)
|
||||
);
|
||||
|
||||
volScalarField::DimensionedInternalField Su
|
||||
volScalarField::Internal Su
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
|
||||
@ -206,7 +206,7 @@ void Foam::twoPhaseSystem::solve()
|
||||
const surfaceScalarField& phi2 = phase2_.phi();
|
||||
|
||||
// Construct the dilatation rate source term
|
||||
tmp<volScalarField::DimensionedInternalField> tdgdt;
|
||||
tmp<volScalarField::Internal> tdgdt;
|
||||
|
||||
if (phase1_.divU().valid() && phase2_.divU().valid())
|
||||
{
|
||||
@ -257,7 +257,7 @@ void Foam::twoPhaseSystem::solve()
|
||||
|
||||
for (int acorr=0; acorr<nAlphaCorr; acorr++)
|
||||
{
|
||||
volScalarField::DimensionedInternalField Sp
|
||||
volScalarField::Internal Sp
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -269,7 +269,7 @@ void Foam::twoPhaseSystem::solve()
|
||||
dimensionedScalar("Sp", dimless/dimTime, 0.0)
|
||||
);
|
||||
|
||||
volScalarField::DimensionedInternalField Su
|
||||
volScalarField::Internal Su
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
|
||||
@ -392,7 +392,7 @@ void Foam::twoPhaseSystem::solve()
|
||||
|
||||
for (int acorr=0; acorr<nAlphaCorr; acorr++)
|
||||
{
|
||||
volScalarField::DimensionedInternalField Sp
|
||||
volScalarField::Internal Sp
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -404,7 +404,7 @@ void Foam::twoPhaseSystem::solve()
|
||||
dimensionedScalar("Sp", dgdt_.dimensions(), 0.0)
|
||||
);
|
||||
|
||||
volScalarField::DimensionedInternalField Su
|
||||
volScalarField::Internal Su
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user