From 1dc9e7c4f414eb9ab9001e6a98b2a82d76298a28 Mon Sep 17 00:00:00 2001 From: sergio Date: Wed, 20 Feb 2019 16:45:12 -0800 Subject: [PATCH] BUG: Fixing entry consistency in PhaseMixtureEThermo.C and reading dpdt in one basicThermo constructor --- .../twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C | 4 ++-- src/thermophysicalModels/basic/basicThermo/basicThermo.C | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C index 6e9751ca11..4d846ec43a 100644 --- a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C +++ b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -570,7 +570,7 @@ bool Foam::twoPhaseMixtureEThermo::read() { if (basicThermo::read() && thermoIncompressibleTwoPhaseMixture::read()) { - basicThermo::readEntry("pDivU", pDivU_); + basicThermo::readIfPresent("pDivU", pDivU_); basicThermo::readEntry("TSat", TSat_); return true; } diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index bbd4780020..530863943f 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.C @@ -242,7 +242,9 @@ Foam::basicThermo::basicThermo ), mesh, dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), Zero) - ) + ), + + dpdt_(lookupOrDefault("dpdt", true)) {}