Commit 3603cf28 authored by mattijs's avatar mattijs Committed by Andrew Heather
Browse files

BUG: basicThermo: enforcing shared T. Fixes #887.

parent 636328fc
......@@ -178,28 +178,12 @@ Foam::basicThermo::basicThermo
const fvMesh& mesh,
const word& phaseName
)
:
basicThermo
(
mesh,
phaseName,
phasePropertyName(dictName, phaseName)
)
{}
Foam::basicThermo::basicThermo
(
const fvMesh& mesh,
const word& phaseName,
const word& dictionaryName
)
:
IOdictionary
(
IOobject
(
dictionaryName,
phasePropertyName(dictName, phaseName),
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
......@@ -234,16 +218,7 @@ Foam::basicThermo::basicThermo
),
dpdt_(lookupOrDefault<Switch>("dpdt", true))
{
if (debug)
{
Pout<< "Constructed thermo : mesh:" << mesh.name()
<< " phase:" << phaseName
<< " dictionary:" << dictionaryName
<< " alphaName:" << alpha_.name()
<< " updateT:" << TOwner_ << endl;
}
}
{}
Foam::basicThermo::basicThermo
......@@ -294,6 +269,66 @@ Foam::basicThermo::basicThermo
{}
Foam::basicThermo::basicThermo
(
const fvMesh& mesh,
const word& phaseName,
const word& dictionaryName
)
:
IOdictionary
(
IOobject
(
dictionaryName,
mesh.time().constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
),
phaseName_(phaseName),
p_(lookupOrConstruct(mesh, "p", pOwner_)),
T_(lookupOrConstruct(mesh, "T", TOwner_)),
TOwner_(lookupOrDefault<Switch>("updateT", TOwner_)),
alpha_
(
IOobject
(
"thermo:alpha",
mesh.time().timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar
(
"zero",
dimensionSet(1, -1, -1, 0, 0),
Zero
)
),
dpdt_(lookupOrDefault<Switch>("dpdt", true))
{
if (debug)
{
Pout<< "Constructed shared thermo : mesh:" << mesh.name()
<< " phase:" << phaseName
<< " dictionary:" << dictionaryName
<< " T:" << T_.name()
<< " updateT:" << TOwner_
<< " alphaName:" << alpha_.name()
<< endl;
}
}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::basicThermo> Foam::basicThermo::New
......
......@@ -15,8 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoReactingMultiPhaseInterFoam;
application icoReactingMultiphaseInterFoam;
startFrom latestTime;
......
Markdown is supported
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