Skip to content
Permalink
Browse files

GeometricField: Temporary fields are no longer registered on the data…

…base by default

Registration occurs when the temporary field is transferred to a non-temporary
field via a constructor or if explicitly transferred to the database via the
regIOobject "store" methods.
  • Loading branch information...
Henry Weller
Henry Weller committed Dec 20, 2018
1 parent 6faadcb commit 146a59e46c591fc3b5294b515a06c2befec75f1f
Showing 307 changed files with 707 additions and 1,042 deletions.
@@ -98,7 +98,7 @@ volScalarField Phi
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("Phi", dimLength*dimVelocity, 0),
dimensionedScalar(dimLength*dimVelocity, 0),
PhiBCTypes
);

@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
{
fvScalarMatrix PhiEqn
(
fvm::laplacian(dimensionedScalar("1", dimless, 1), Phi)
fvm::laplacian(dimensionedScalar(dimless, 1), Phi)
==
fvc::div(phi)
);
@@ -87,7 +87,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
volScalarField magU(mag(U));
volVectorField Uhat
(
U/(mag(U) + dimensionedScalar("Usmall", U.dimensions(), 1e-4))
U/(mag(U) + dimensionedScalar(U.dimensions(), 1e-4))
);

const scalarField Cw = pow(mesh.V(), 2.0/3.0);
@@ -103,7 +103,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("zero", Nv.dimensions(), 0)
dimensionedScalar(Nv.dimensions(), 0)
);
N.primitiveFieldRef() = Nv.primitiveField()*Cw;

@@ -143,7 +143,7 @@ Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const
IOobject::NO_WRITE
),
U_.mesh(),
dimensionedScalar("zero", dimMass/dimLength/pow(dimTime, 3), 0)
dimensionedScalar(dimMass/dimLength/pow(dimTime, 3), 0)
)
);

@@ -146,7 +146,7 @@ void PDRkEpsilon::correct()
volScalarField GR(drag.Gk());

volScalarField LI
(C4_*(Lobs + dimensionedScalar("minLength", dimLength, rootVSmall)));
(C4_*(Lobs + dimensionedScalar(dimLength, rootVSmall)));

// Dissipation equation
tmp<fvScalarMatrix> epsEqn
@@ -84,7 +84,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::Gulder::XiEq() const
up
/ (
sqrt(epsilon*tauEta)
+ dimensionedScalar("1e-8", up.dimensions(), 1e-8)
+ dimensionedScalar(up.dimensions(), 1e-8)
)
);

@@ -105,7 +105,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
IOobject::NO_WRITE
),
epsilon.mesh(),
dimensionedScalar("XiEq", dimless, 0)
dimensionedScalar(dimless, 0)
)
);
volScalarField& xieq = tXiEq.ref();
@@ -110,7 +110,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
false
),
mesh,
dimensionedScalar("zero", Nv.dimensions(), 0)
dimensionedScalar(Nv.dimensions(), 0)
)
);
volScalarField& N = tN.ref();
@@ -138,7 +138,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const

const volVectorField Uhat
(
U/(mag(U) + dimensionedScalar("Usmall", U.dimensions(), 1e-4))
U/(mag(U) + dimensionedScalar(U.dimensions(), 1e-4))
);

const volScalarField nr(sqrt(max(N - (Uhat & ns & Uhat), scalar(1e-4))));
@@ -68,7 +68,7 @@ volScalarField dpdt
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
dimensionedScalar(p.dimensions()/dimTime, 0)
);

Info<< "Creating field kinetic energy K\n" << endl;
@@ -255,7 +255,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
IOobject::NO_WRITE
),
p.mesh(),
dimensionedScalar("Su0", dimVelocity, 0)
dimensionedScalar(dimVelocity, 0)
)
);

@@ -304,7 +304,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
IOobject::NO_WRITE
),
p.mesh(),
dimensionedScalar("Su0", dimVelocity, 0)
dimensionedScalar(dimVelocity, 0)
)
);

@@ -358,7 +358,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Ma
IOobject::NO_WRITE
),
phi.mesh(),
dimensionedScalar("Ma", dimless, 0)
dimensionedScalar(dimless, 0)
)
);

@@ -418,7 +418,7 @@ Foam::laminarFlameSpeedModels::SCOPE::Ma() const
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("Ma", dimless, Ma(equivalenceRatio_))
dimensionedScalar(dimless, Ma(equivalenceRatio_))
)
);
}
@@ -18,7 +18,7 @@ if (ign.ignited())
dimensionedScalar dMgb = 1.0e-3*
(b*c*mgb)().weightedAverage(mesh.V())
/((b*c)().weightedAverage(mesh.V()) + small)
+ dimensionedScalar("ddMgb", mgb.dimensions(), small);
+ dimensionedScalar(mgb.dimensions(), small);

mgb += dMgb;

@@ -91,12 +91,12 @@ if (ign.ignited())
up
/ (
sqrt(epsilon*tauEta)
+ dimensionedScalar("1e-8", up.dimensions(), 1e-8)
+ dimensionedScalar(up.dimensions(), 1e-8)
)
);

// volScalarField l = 0.337*k*sqrt(k)/epsilon;
// Reta *= max((l - dimensionedScalar("dl", dimLength, 1.5e-3))/l, 0);
// Reta *= max((l - dimensionedScalar(dimLength, 1.5e-3))/l, 0);

// Calculate Xi flux
// ~~~~~~~~~~~~~~~~~
@@ -243,7 +243,7 @@ if (ign.ignited())
rho*max
(
sigmat - sigmas,
dimensionedScalar("0", sigmat.dimensions(), 0)
dimensionedScalar(sigmat.dimensions(), 0)
),
Xi
)
@@ -68,7 +68,7 @@ volScalarField dpdt
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
dimensionedScalar(p.dimensions()/dimTime, 0)
);

Info<< "Creating field kinetic energy K\n" << endl;
@@ -15,7 +15,7 @@ Info<< "Creating base fields for time " << runTime.timeName() << endl;
false
),
mesh,
dimensionedScalar("Ydefault", dimless, 1)
dimensionedScalar(dimless, 1)
);

Ydefault.write();
@@ -32,7 +32,7 @@ Info<< "Creating base fields for time " << runTime.timeName() << endl;
false
),
mesh,
dimensionedScalar("p", dimPressure, p0)
dimensionedScalar(dimPressure, p0)
);

p.write();
@@ -49,7 +49,7 @@ Info<< "Creating base fields for time " << runTime.timeName() << endl;
false
),
mesh,
dimensionedScalar("T", dimTemperature, T0)
dimensionedScalar(dimTemperature, T0)
);

T.write();
@@ -59,9 +59,8 @@
mesh,
dimensionedScalar
(
"zero",
dimensionSet(dimEnergy/dimMass/dimTemperature),
0.0
0
)
);

@@ -85,7 +85,7 @@
Y[i] = Y0[i];
}

thermo.he() = dimensionedScalar("h", dimEnergy/dimMass, h0);
thermo.he() = dimensionedScalar(dimEnergy/dimMass, h0);
thermo.correct();

rho = thermo.rho();
@@ -61,7 +61,7 @@ volScalarField dpdt
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
dimensionedScalar(p.dimensions()/dimTime, 0)
);

Info<< "Creating field kinetic energy K\n" << endl;
@@ -135,7 +135,7 @@ volScalarField Qdot
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0)
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
);


@@ -149,7 +149,7 @@ volScalarField dpdt
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
dimensionedScalar(p.dimensions()/dimTime, 0)
);

Info<< "Creating field kinetic energy K\n" << endl;
@@ -77,7 +77,7 @@ volScalarField dpdt
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
dimensionedScalar(p.dimensions()/dimTime, 0)
);

Info<< "Creating field kinetic energy K\n" << endl;
@@ -103,7 +103,7 @@ volScalarField Qdot
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0)
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
);

#include "createMRF.H"
@@ -99,7 +99,7 @@ volScalarField dpdt
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
dimensionedScalar(p.dimensions()/dimTime, 0)
);

Info<< "Creating field kinetic energy K\n" << endl;
@@ -125,7 +125,7 @@ volScalarField Qdot
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0)
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
);

#include "createMRF.H"
@@ -81,7 +81,7 @@ volScalarField dpdt
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
dimensionedScalar(p.dimensions()/dimTime, 0)
);

Info<< "Creating field kinetic energy K\n" << endl;
@@ -107,7 +107,7 @@ volScalarField Qdot
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0)
dimensionedScalar(dimEnergy/dimVolume/dimTime, 0)
);

#include "createMRF.H"
@@ -104,7 +104,7 @@ License
mesh
),
mesh,
dimensionedScalar("rDeltaTY", rDeltaT.dimensions(), 0)
dimensionedScalar(rDeltaT.dimensions(), 0)
);

bool foundY = false;
@@ -72,7 +72,7 @@ surfaceScalarField pos
mesh
),
mesh,
dimensionedScalar("pos", dimless, 1.0)
dimensionedScalar(dimless, 1.0)
);

surfaceScalarField neg
@@ -84,7 +84,7 @@ surfaceScalarField neg
mesh
),
mesh,
dimensionedScalar("neg", dimless, -1.0)
dimensionedScalar(dimless, -1.0)
);

surfaceScalarField phi("phi", fvc::flux(rhoU));
@@ -13,7 +13,7 @@
// Set the reciprocal time-step from the local Courant number
rDeltaT.ref() = max
(
1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
1/dimensionedScalar(dimTime, maxDeltaT),
fvc::surfaceSum(amaxSf)()()
/((2*maxCo)*mesh.V())
);
@@ -66,7 +66,7 @@ volScalarField dpdt
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
dimensionedScalar(p.dimensions()/dimTime, 0)
);

Info<< "Creating field kinetic energy K\n" << endl;
@@ -28,7 +28,7 @@
// Set the reciprocal time-step from the local Courant number
rDeltaT.ref() = max
(
1/dimensionedScalar("maxDeltaT", dimTime, maxDeltaT),
1/dimensionedScalar(dimTime, maxDeltaT),
fvc::surfaceSum(mag(phi))()()
/((2*maxCo)*mesh.V()*rho())
);
@@ -49,7 +49,7 @@
mesh
),
mesh,
dimensionedScalar("Mr", dimensionSet(0, 1, 0, 0, 0, 1, 0), 0)
dimensionedScalar(dimensionSet(0, 1, 0, 0, 0, 1, 0), 0)
);

forAll(magnets, i)
@@ -82,7 +82,7 @@ volVectorField P
V == max
(
P.component(Foam::vector::X) - strike,
dimensionedScalar("0", V.dimensions(), 0)
dimensionedScalar(V.dimensions(), 0)
);

volScalarField delta
@@ -98,7 +98,7 @@ volScalarField dpdt
mesh
),
mesh,
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
dimensionedScalar(p.dimensions()/dimTime, 0)
);

Info<< "Creating field kinetic energy K\n" << endl;
@@ -27,7 +27,7 @@ if (Y.size())
(
IOobject("Yt", runTime.timeName(), mesh),
mesh,
dimensionedScalar("Yt", dimless, 0)
dimensionedScalar(dimless, 0)
)
);
}

0 comments on commit 146a59e

Please sign in to comment.
You can’t perform that action at this time.