From e08e4b0b5c51b9f753c58523e8afe29587284bb6 Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 5 Apr 2013 15:27:26 +0100 Subject: [PATCH 1/2] multiphaseEulerFoam: Check consistency of surface tension and interface compression coefficients --- .../multiphaseSystem/multiphaseSystem.C | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index d1804b5b6d..acad49cd96 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -418,6 +418,47 @@ Foam::multiphaseSystem::multiphaseSystem ).ptr() ); } + + forAllConstIter(PtrDictionary, phases_, iter1) + { + const phaseModel& phase1 = iter1(); + + forAllConstIter(PtrDictionary, phases_, iter2) + { + const phaseModel& phase2 = iter2(); + + if (&phase2 != &phase1) + { + scalarCoeffSymmTable::const_iterator sigma + ( + sigmas_.find(interfacePair(phase1, phase2)) + ); + + if (sigma != sigmas_.end()) + { + scalarCoeffSymmTable::const_iterator cAlpha + ( + cAlphas_.find(interfacePair(phase1, phase2)) + ); + + if (cAlpha == cAlphas_.end()) + { + WarningIn + ( + "multiphaseSystem::multiphaseSystem" + "(const volVectorField& U," + "const surfaceScalarField& phi)" + ) << "Compression coefficient not specified for " + "phase pair (" + << phase1.name() << ' ' << phase2.name() + << ") for which a surface tension " + "coefficient is specified" + << endl; + } + } + } + } + } } From b2b3d049667c56a84d38bce5e1650dabc4195305 Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 5 Apr 2013 15:27:35 +0100 Subject: [PATCH 2/2] Update header --- .../fields/GeometricFields/GeometricField/GeometricField.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index aaf2de52eb..b3eb2a9e1f 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License