From aaf4a0bfcc2dc81ca944a07473bce5e44aa87e45 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Tue, 19 Mar 2019 20:13:40 +0000 Subject: [PATCH] multiphase VoF solvers: Ensure the nHatf surfaceField in interfaceProperties is updated following mesh change --- .../compressibleInterFoam/compressibleInterFoam.C | 4 ++-- applications/solvers/multiphase/interFoam/interFoam.C | 4 ++-- .../interPhaseChangeFoam/interPhaseChangeFoam.C | 4 ++-- .../phaseChangeTwoPhaseMixtures/Kunz/Kunz.C | 7 +++++-- .../phaseChangeTwoPhaseMixtures/Merkle/Merkle.C | 7 +++++-- .../SchnerrSauer/SchnerrSauer.C | 6 ++++-- .../phaseChangeTwoPhaseMixture.C | 9 ++++++++- .../multiphase/multiphaseInterFoam/multiphaseInterFoam.C | 4 ++-- 8 files changed, 30 insertions(+), 15 deletions(-) diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C index 979c659716..af57abf6e9 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C @@ -125,10 +125,10 @@ int main(int argc, char *argv[]) // Make the fluxes relative to the mesh motion fvc::makeRelative(phi, U); - - mixture.correct(); } + mixture.correct(); + if (checkMeshCourantNo) { #include "meshCourantNo.H" diff --git a/applications/solvers/multiphase/interFoam/interFoam.C b/applications/solvers/multiphase/interFoam/interFoam.C index 5faf9fb85c..1106300595 100644 --- a/applications/solvers/multiphase/interFoam/interFoam.C +++ b/applications/solvers/multiphase/interFoam/interFoam.C @@ -123,10 +123,10 @@ int main(int argc, char *argv[]) // Make the flux relative to the mesh motion fvc::makeRelative(phi, U); - - mixture.correct(); } + mixture.correct(); + if (checkMeshCourantNo) { #include "meshCourantNo.H" diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C index 4150454a9e..553669810f 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C @@ -115,10 +115,10 @@ int main(int argc, char *argv[]) // Make the flux relative to the mesh motion fvc::makeRelative(phi, U); - - mixture.correct(); } + mixture.correct(); + if (checkMeshCourantNo) { #include "meshCourantNo.H" diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C index 92edddee65..1f6353a0d2 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -78,6 +78,7 @@ Foam::phaseChangeTwoPhaseMixtures::Kunz::mDotAlphal() const ); } + Foam::Pair> Foam::phaseChangeTwoPhaseMixtures::Kunz::mDotP() const { @@ -95,7 +96,9 @@ Foam::phaseChangeTwoPhaseMixtures::Kunz::mDotP() const void Foam::phaseChangeTwoPhaseMixtures::Kunz::correct() -{} +{ + phaseChangeTwoPhaseMixture::correct(); +} bool Foam::phaseChangeTwoPhaseMixtures::Kunz::read() diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C index 3a825a6121..2a1b29cfd4 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,6 +75,7 @@ Foam::phaseChangeTwoPhaseMixtures::Merkle::mDotAlphal() const ); } + Foam::Pair> Foam::phaseChangeTwoPhaseMixtures::Merkle::mDotP() const { @@ -90,7 +91,9 @@ Foam::phaseChangeTwoPhaseMixtures::Merkle::mDotP() const void Foam::phaseChangeTwoPhaseMixtures::Merkle::correct() -{} +{ + phaseChangeTwoPhaseMixture::correct(); +} bool Foam::phaseChangeTwoPhaseMixtures::Merkle::read() diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C index a6f2215925..cfd24fae3d 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -144,7 +144,9 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::mDotP() const void Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::correct() -{} +{ + phaseChangeTwoPhaseMixture::correct(); +} bool Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::read() diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C index e9a2b97aef..f4c7b22fa8 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -63,6 +63,7 @@ Foam::phaseChangeTwoPhaseMixture::vDotAlphal() const ); } + Foam::Pair> Foam::phaseChangeTwoPhaseMixture::vDotP() const { @@ -73,6 +74,12 @@ Foam::phaseChangeTwoPhaseMixture::vDotP() const } +void Foam::phaseChangeTwoPhaseMixture::correct() +{ + immiscibleIncompressibleTwoPhaseMixture::correct(); +} + + bool Foam::phaseChangeTwoPhaseMixture::read() { if (immiscibleIncompressibleTwoPhaseMixture::read()) diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C index d62117b8a8..e8d66c17d6 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C @@ -108,10 +108,10 @@ int main(int argc, char *argv[]) // Make the flux relative to the mesh motion fvc::makeRelative(phi, U); - - mixture.correct(); } + mixture.correct(); + if (checkMeshCourantNo) { #include "meshCourantNo.H"