diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index f2ed8410c9..c5d0e74109 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.C @@ -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("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("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("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::New diff --git a/tutorials/multiphase/icoReactingMultiPhaseInterFoam/solidMelting2D/system/controlDict b/tutorials/multiphase/icoReactingMultiPhaseInterFoam/solidMelting2D/system/controlDict index 1507e053fc..e1ac1e5148 100644 --- a/tutorials/multiphase/icoReactingMultiPhaseInterFoam/solidMelting2D/system/controlDict +++ b/tutorials/multiphase/icoReactingMultiPhaseInterFoam/solidMelting2D/system/controlDict @@ -15,8 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -application icoReactingMultiPhaseInterFoam; +application icoReactingMultiphaseInterFoam; startFrom latestTime;