From 410700c7a94bba431af33720467df76a7a63e930 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 12 Apr 2018 23:40:00 +0100 Subject: [PATCH] compressibleInterFoam: Generalized the handling of phase temperature BCs Resolves bug-report https://bugs.openfoam.org/view.php?id=2899 --- .../twoPhaseMixtureThermo.C | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C index 69daa03abb..01e5d59996 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,12 +51,32 @@ Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo thermo2_(nullptr) { { - volScalarField T1(IOobject::groupName("T", phase1Name()), T_); + volScalarField T1 + ( + IOobject + ( + IOobject::groupName("T", phase1Name()), + U.mesh().time().timeName(), + U.mesh() + ), + T_, + calculatedFvPatchScalarField::typeName + ); T1.write(); } { - volScalarField T2(IOobject::groupName("T", phase2Name()), T_); + volScalarField T2 + ( + IOobject + ( + IOobject::groupName("T", phase2Name()), + U.mesh().time().timeName(), + U.mesh() + ), + T_, + calculatedFvPatchScalarField::typeName + ); T2.write(); } @@ -80,9 +100,11 @@ Foam::twoPhaseMixtureThermo::~twoPhaseMixtureThermo() void Foam::twoPhaseMixtureThermo::correctThermo() { + thermo1_->T() = T_; thermo1_->he() = thermo1_->he(p_, T_); thermo1_->correct(); + thermo2_->T() = T_; thermo2_->he() = thermo2_->he(p_, T_); thermo2_->correct(); }