From 2fe74a5bd256417c57ba0ff7d3de10f2f9e4ef81 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Mon, 11 Oct 2021 14:21:56 +0100 Subject: [PATCH] twoPhaseMixture: Updated support for re-reading of phaseProperties --- .../incompressibleTwoPhaseInteractingMixture.C | 2 +- .../incompressibleTwoPhaseMixture.C | 2 +- .../twoPhaseMixture/twoPhaseMixture.C | 16 +++++++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C b/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C index d237a94387..cf370b761f 100644 --- a/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C +++ b/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C @@ -82,7 +82,7 @@ incompressibleTwoPhaseInteractingMixture bool Foam::incompressibleTwoPhaseInteractingMixture::read() { - if (regIOobject::read()) + if (twoPhaseMixture::read()) { if (muModel_->read() || nucModel_->read()) { diff --git a/src/twoPhaseModels/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C b/src/twoPhaseModels/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C index 878c727068..7f72e3f9ed 100644 --- a/src/twoPhaseModels/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C +++ b/src/twoPhaseModels/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C @@ -139,7 +139,7 @@ Foam::incompressibleTwoPhaseMixture::nuf() const bool Foam::incompressibleTwoPhaseMixture::read() { - if (regIOobject::read()) + if (twoPhaseMixture::read()) { nuModel1_->lookup("rho") >> rho1_; nuModel2_->lookup("rho") >> rho2_; diff --git a/src/twoPhaseModels/twoPhaseMixture/twoPhaseMixture/twoPhaseMixture.C b/src/twoPhaseModels/twoPhaseMixture/twoPhaseMixture/twoPhaseMixture.C index 2a9f52f0d8..dfed23d250 100644 --- a/src/twoPhaseModels/twoPhaseMixture/twoPhaseMixture/twoPhaseMixture.C +++ b/src/twoPhaseModels/twoPhaseMixture/twoPhaseMixture/twoPhaseMixture.C @@ -47,7 +47,7 @@ Foam::IOdictionary Foam::twoPhaseMixture::readPhasePropertiesDict obr, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, - false + true ); if (phasePropertiesIO.headerOk()) @@ -63,7 +63,7 @@ Foam::IOdictionary Foam::twoPhaseMixture::readPhasePropertiesDict obr, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, - false + true ); if (thermophysicalPropertiesIO.headerOk()) @@ -81,7 +81,7 @@ Foam::IOdictionary Foam::twoPhaseMixture::readPhasePropertiesDict obr, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, - false + true ); if (transportPropertiesIO.headerOk()) @@ -106,7 +106,7 @@ Foam::IOdictionary Foam::twoPhaseMixture::readPhasePropertiesDict obr, IOobject::NO_READ, IOobject::NO_WRITE, - false + true ) ); @@ -196,8 +196,14 @@ Foam::twoPhaseMixture::twoPhaseMixture(const fvMesh& mesh) ), 1.0 - alpha1_ ) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +bool Foam::twoPhaseMixture::read() { - checkIn(); + return regIOobject::read(); }