Commit 8f858af6 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: chtMultiRegionFoam - updated construction of g field

parent 32c174f3
......@@ -3,7 +3,6 @@ PtrList<rhoReactionThermo> thermoFluid(fluidRegions.size());
PtrList<volScalarField> rhoFluid(fluidRegions.size());
PtrList<volVectorField> UFluid(fluidRegions.size());
PtrList<surfaceScalarField> phiFluid(fluidRegions.size());
PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size());
PtrList<uniformDimensionedScalarField> hRefFluid(fluidRegions.size());
PtrList<volScalarField> ghFluid(fluidRegions.size());
PtrList<surfaceScalarField> ghfFluid(fluidRegions.size());
......@@ -26,6 +25,8 @@ PtrList<fv::options> fluidFvOptions(fluidRegions.size());
List<label> pRefCellFluid(fluidRegions.size());
List<scalar> pRefValueFluid(fluidRegions.size());
const uniformDimensionedVectorField& g = meshObjects::gravity::New(runTime);
// Populate fluid field pointer lists
forAll(fluidRegions, i)
{
......@@ -90,23 +91,6 @@ forAll(fluidRegions, i)
)
);
Info<< " Adding to gFluid\n" << endl;
gFluid.set
(
i,
new uniformDimensionedVectorField
(
IOobject
(
"g",
runTime.constant(),
fluidRegions[i],
IOobject::MUST_READ,
IOobject::NO_WRITE
)
)
);
Info<< " Adding to hRefFluid\n" << endl;
hRefFluid.set
(
......@@ -127,10 +111,9 @@ forAll(fluidRegions, i)
dimensionedScalar ghRef
(
mag(gFluid[i].value()) > SMALL
? gFluid[i]
& (cmptMag(gFluid[i].value())/mag(gFluid[i].value()))*hRefFluid[i]
: dimensionedScalar("ghRef", gFluid[i].dimensions()*dimLength, 0)
mag(g.value()) > SMALL
? g & (cmptMag(g.value())/mag(g.value()))*hRefFluid[i]
: dimensionedScalar("ghRef", g.dimensions()*dimLength, 0)
);
Info<< " Adding to ghFluid\n" << endl;
......@@ -140,7 +123,7 @@ forAll(fluidRegions, i)
new volScalarField
(
"gh",
(gFluid[i] & fluidRegions[i].C()) - ghRef
(g & fluidRegions[i].C()) - ghRef
)
);
......@@ -151,7 +134,7 @@ forAll(fluidRegions, i)
new surfaceScalarField
(
"ghf",
(gFluid[i] & fluidRegions[i].Cf()) - ghRef
(g & fluidRegions[i].Cf()) - ghRef
)
);
......
......@@ -36,7 +36,6 @@
volScalarField& p_rgh = p_rghFluid[i];
const dimensionedVector& g = gFluid[i];
const volScalarField& gh = ghFluid[i];
const surfaceScalarField& ghf = ghfFluid[i];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment