diff --git a/applications/solvers/multiphase/cavitatingFoam/Make/options b/applications/solvers/multiphase/cavitatingFoam/Make/options index 0f2981ab4c..2689ed5ab6 100644 --- a/applications/solvers/multiphase/cavitatingFoam/Make/options +++ b/applications/solvers/multiphase/cavitatingFoam/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options index fa204ce58f..a195aa6774 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I.. \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C index 45bc766761..cf608d0a6a 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ Description #include "fvCFD.H" #include "dynamicFvMesh.H" #include "barotropicCompressibilityModel.H" -#include "twoPhaseMixture.H" +#include "incompressibleTwoPhaseMixture.H" #include "turbulenceModel.H" #include "pimpleControl.H" diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C b/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C index 256a58d953..73e9577029 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,7 +34,7 @@ Description #include "fvCFD.H" #include "barotropicCompressibilityModel.H" -#include "twoPhaseMixture.H" +#include "incompressibleTwoPhaseMixture.H" #include "turbulenceModel.H" #include "pimpleControl.H" diff --git a/applications/solvers/multiphase/cavitatingFoam/createFields.H b/applications/solvers/multiphase/cavitatingFoam/createFields.H index c724140650..8958dc3c5e 100644 --- a/applications/solvers/multiphase/cavitatingFoam/createFields.H +++ b/applications/solvers/multiphase/cavitatingFoam/createFields.H @@ -44,7 +44,7 @@ Info<< "Reading transportProperties\n" << endl; - twoPhaseMixture twoPhaseProperties(U, phiv, "gamma"); + incompressibleTwoPhaseMixture twoPhaseProperties(U, phiv, "gamma"); volScalarField& gamma(twoPhaseProperties.alpha1()); gamma.oldTime(); diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwclean b/applications/solvers/multiphase/compressibleInterFoam/Allwclean index 682ca993f6..aa0f3c01c6 100755 --- a/applications/solvers/multiphase/compressibleInterFoam/Allwclean +++ b/applications/solvers/multiphase/compressibleInterFoam/Allwclean @@ -2,7 +2,7 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wclean libso twoPhaseThermo +wclean libso twoPhaseMixtureThermo wclean wclean compressibleInterDyMFoam diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwmake b/applications/solvers/multiphase/compressibleInterFoam/Allwmake index 9ff44117f2..a93da26cdd 100755 --- a/applications/solvers/multiphase/compressibleInterFoam/Allwmake +++ b/applications/solvers/multiphase/compressibleInterFoam/Allwmake @@ -2,7 +2,7 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wmake libso twoPhaseThermo +wmake libso twoPhaseMixtureThermo wmake wmake compressibleInterDyMFoam diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/Make/options index a6a130754a..147bf40e5b 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/Make/options @@ -1,20 +1,18 @@ EXE_INC = \ - -ItwoPhaseThermo \ + -ItwoPhaseMixtureThermo \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -ltwoPhaseThermo \ + -ltwoPhaseMixtureThermo \ -lfluidThermophysicalModels \ -lspecie \ + -ltwoPhaseProperties \ -linterfaceProperties \ - -ltwoPhaseInterfaceProperties \ - -lincompressibleTransportModels \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ + -lcompressibleTurbulenceModel \ + -lcompressibleRASModels \ + -lcompressibleLESModels \ -lfiniteVolume diff --git a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H index d5183d5c4e..92a2bd64d8 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H @@ -3,12 +3,16 @@ ( fvm::ddt(rho, T) + fvm::div(rhoPhi, T) - - fvm::laplacian(thermo.alphaEff(rho*turbulence->nut()), T) + - fvm::laplacian(twoPhaseProperties.alphaEff(turbulence->mut()), T) + ( p*fvc::div(phi) + fvc::ddt(rho, K) + fvc::div(rhoPhi, K) - )*(alpha1/thermo.thermo1().Cv() + alpha2/thermo.thermo2().Cv()) + ) + *( + alpha1/twoPhaseProperties.thermo1().Cv() + + alpha2/twoPhaseProperties.thermo2().Cv() + ) ); - thermo.correct(); + twoPhaseProperties.correct(); } diff --git a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H index 1c216a8bf7..8fc397e802 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H @@ -2,7 +2,7 @@ ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - + turbulence->divDevRhoReff(rho, U) + + turbulence->divDevRhoReff(U) ); UEqn.relax(); diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options index 48c21dfee5..3ee1e97f92 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options @@ -1,29 +1,25 @@ EXE_INC = \ -I.. \ - -I../twoPhaseThermo \ + -I../twoPhaseMixtureThermo \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I../phaseEquationsOfState/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -ltwoPhaseThermo \ + -ltwoPhaseMixtureThermo \ -lfluidThermophysicalModels \ -lspecie \ + -ltwoPhaseProperties \ -linterfaceProperties \ - -ltwoPhaseInterfaceProperties \ - -lincompressibleTransportModels \ - -lphaseEquationsOfState \ - -lincompressibleTurbulenceModel \ - -lincompressibleRASModels \ - -lincompressibleLESModels \ - -lfiniteVolume \ + -lcompressibleTurbulenceModel \ + -lcompressibleRASModels \ + -lcompressibleLESModels \ -ldynamicMesh \ -lmeshTools \ - -ldynamicFvMesh + -ldynamicFvMesh \ + -lfiniteVolume diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C index 3cb787d144..27d3b87cd1 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C @@ -43,7 +43,7 @@ Description #include "subCycle.H" #include "interfaceProperties.H" #include "twoPhaseMixture.H" -#include "twoPhaseThermo.H" +#include "twoPhaseMixtureThermo.H" #include "turbulenceModel.H" #include "pimpleControl.H" diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C index 85cab52cdb..3148382ad2 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C @@ -41,7 +41,7 @@ Description #include "rhoThermo.H" #include "interfaceProperties.H" #include "twoPhaseMixture.H" -#include "twoPhaseThermo.H" +#include "twoPhaseMixtureThermo.H" #include "turbulenceModel.H" #include "pimpleControl.H" diff --git a/applications/solvers/multiphase/compressibleInterFoam/createFields.H b/applications/solvers/multiphase/compressibleInterFoam/createFields.H index 4b7b4a07bc..102d4d57a9 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleInterFoam/createFields.H @@ -28,36 +28,33 @@ #include "createPhi.H" - Info<< "Reading transportProperties\n" << endl; - twoPhaseMixture twoPhaseProperties(U, phi); + Info<< "Constructing twoPhaseMixtureThermo\n" << endl; + twoPhaseMixtureThermo twoPhaseProperties(mesh); volScalarField& alpha1(twoPhaseProperties.alpha1()); volScalarField& alpha2(twoPhaseProperties.alpha2()); Info<< "Reading thermophysical properties\n" << endl; - twoPhaseThermo thermo(twoPhaseProperties); + volScalarField& p = twoPhaseProperties.p(); + volScalarField& T = twoPhaseProperties.T(); + const volScalarField& rho1 = twoPhaseProperties.thermo1().rho(); + const volScalarField& psi1 = twoPhaseProperties.thermo1().psi(); + const volScalarField& rho2 = twoPhaseProperties.thermo2().rho(); + const volScalarField& psi2 = twoPhaseProperties.thermo2().psi(); - volScalarField& rho = thermo.rho(); - volScalarField& p = thermo.p(); - volScalarField& T = thermo.T(); - const volScalarField& rho1 = thermo.thermo1().rho(); - const volScalarField& psi1 = thermo.thermo1().psi(); - const volScalarField& rho2 = thermo.thermo2().rho(); - const volScalarField& psi2 = thermo.thermo2().psi(); - - // volScalarField rho - // ( - // IOobject - // ( - // "rho", - // runTime.timeName(), - // mesh, - // IOobject::READ_IF_PRESENT, - // IOobject::AUTO_WRITE - // ), - // alpha1*rho1 + alpha2*rho2 - // ); + volScalarField rho + ( + IOobject + ( + "rho", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + alpha1*rho1 + alpha2*rho2 + ); dimensionedScalar pMin(twoPhaseProperties.lookup("pMin")); @@ -90,10 +87,10 @@ // Construct interface from alpha1 distribution interfaceProperties interface(alpha1, U, twoPhaseProperties); - // Construct incompressible turbulence model - autoPtr turbulence + // Construct compressible turbulence model + autoPtr turbulence ( - incompressible::turbulenceModel::New(U, phi, twoPhaseProperties) + compressible::turbulenceModel::New(rho, U, rhoPhi, twoPhaseProperties) ); Info<< "Creating field dpdt\n" << endl; diff --git a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H index dba9058f30..71745c0168 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H @@ -47,7 +47,7 @@ // Thermodynamic density needs to be updated by psi*d(p) after the // pressure solution - done in 2 parts. Part 1: - //thermo.rho() -= psi*p_rgh; + //twoPhaseProperties.rho() -= psi*p_rgh; while (pimple.correctNonOrthogonal()) { @@ -70,7 +70,7 @@ if (pimple.finalNonOrthogonalIter()) { // Second part of thermodynamic density update - //thermo.rho() += psi*p_rgh; + //twoPhaseProperties.rho() += psi*p_rgh; dgdt = ( @@ -88,14 +88,14 @@ p = max(p_rgh + (alpha1*rho1 + alpha2*rho2)*gh, pMin); - // thermo.correct(); + // twoPhaseProperties.correct(); Info<< "max(U) " << max(mag(U)).value() << endl; Info<< "min(p_rgh) " << min(p_rgh).value() << endl; K = 0.5*magSqr(U); - if (thermo.dpdt()) + if (twoPhaseProperties.dpdt()) { dpdt = fvc::ddt(p); } diff --git a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/Make/files b/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/Make/files deleted file mode 100644 index e6e260c74a..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/Make/files +++ /dev/null @@ -1,8 +0,0 @@ -phaseEquationOfState/phaseEquationOfState.C -phaseEquationOfState/newPhaseEquationOfState.C -constant/constant.C -linear/linear.C -perfectFluid/perfectFluid.C -adiabaticPerfectFluid/adiabaticPerfectFluid.C - -LIB = $(FOAM_LIBBIN)/libphaseEquationsOfState diff --git a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/Make/options b/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/Make/options deleted file mode 100644 index 0ec1139209..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/Make/options +++ /dev/null @@ -1,6 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude - -LIB_LIBS = \ - -lincompressibleTransportModels diff --git a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.C b/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.C deleted file mode 100644 index 82a195dca9..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.C +++ /dev/null @@ -1,124 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "adiabaticPerfectFluid.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ -namespace phaseEquationsOfState -{ - defineTypeNameAndDebug(adiabaticPerfectFluid, 0); - - addToRunTimeSelectionTable - ( - phaseEquationOfState, - adiabaticPerfectFluid, - dictionary - ); -} -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::phaseEquationsOfState::adiabaticPerfectFluid::adiabaticPerfectFluid -( - const dictionary& dict -) -: - phaseEquationOfState(dict), - p0_("p0", dimPressure, dict.lookup("p0")), - rho0_("rho0", dimDensity, dict.lookup("rho0")), - gamma_("gamma", dimless, dict.lookup("gamma")), - B_("B", dimPressure, dict.lookup("B")) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::phaseEquationsOfState::adiabaticPerfectFluid::~adiabaticPerfectFluid() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -Foam::tmp -Foam::phaseEquationsOfState::adiabaticPerfectFluid::rho -( - const volScalarField& p, - const volScalarField& T -) const -{ - return tmp - ( - new volScalarField - ( - IOobject - ( - "rho", - p.time().timeName(), - p.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - rho0_*pow((p + B_)/(p0_ + B_), 1.0/gamma_) - ) - ); -} - - -Foam::tmp -Foam::phaseEquationsOfState::adiabaticPerfectFluid::psi -( - const volScalarField& p, - const volScalarField& T -) const -{ - return tmp - ( - new volScalarField - ( - IOobject - ( - "psi", - p.time().timeName(), - p.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - (rho0_/(gamma_*(p0_ + B_))) - *pow((p + B_)/(p0_ + B_), 1.0/gamma_ - 1.0) - ) - ); -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/constant/constant.C b/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/constant/constant.C deleted file mode 100644 index 54b6705dd9..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/constant/constant.C +++ /dev/null @@ -1,120 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "constant.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ -namespace phaseEquationsOfState -{ - defineTypeNameAndDebug(constant, 0); - - addToRunTimeSelectionTable - ( - phaseEquationOfState, - constant, - dictionary - ); -} -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::phaseEquationsOfState::constant::constant -( - const dictionary& dict -) -: - phaseEquationOfState(dict), - rho_("rho", dimDensity, dict.lookup("rho")) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::phaseEquationsOfState::constant::~constant() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -Foam::tmp Foam::phaseEquationsOfState::constant::rho -( - const volScalarField& p, - const volScalarField& T -) const -{ - return tmp - ( - new volScalarField - ( - IOobject - ( - "rho", - p.time().timeName(), - p.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - p.mesh(), - rho_ - ) - ); -} - - -Foam::tmp Foam::phaseEquationsOfState::constant::psi -( - const volScalarField& p, - const volScalarField& T -) const -{ - return tmp - ( - new volScalarField - ( - IOobject - ( - "psi", - p.time().timeName(), - p.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - p.mesh(), - dimensionedScalar("psi", dimDensity/dimPressure, 0) - ) - ); -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/constant/constant.H b/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/constant/constant.H deleted file mode 100644 index 5cfe44c26e..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/constant/constant.H +++ /dev/null @@ -1,106 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::phaseEquationsOfState::constant - -Description - Constant phase density model. - -SourceFiles - constant.C - -\*---------------------------------------------------------------------------*/ - -#ifndef constant_H -#define constant_H - -#include "phaseEquationOfState.H" -#include "dimensionedTypes.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace phaseEquationsOfState -{ - -/*---------------------------------------------------------------------------*\ - Class constant Declaration -\*---------------------------------------------------------------------------*/ - -class constant -: - public phaseEquationOfState -{ - // Private data - - //- The constant density of the phase - dimensionedScalar rho_; - - -public: - - //- Runtime type information - TypeName("constant"); - - - // Constructors - - //- Construct from components - constant - ( - const dictionary& dict - ); - - - //- Destructor - virtual ~constant(); - - - // Member Functions - - tmp rho - ( - const volScalarField& p, - const volScalarField& T - ) const; - - tmp psi - ( - const volScalarField& p, - const volScalarField& T - ) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace phaseEquationsOfState -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/linear/linear.C b/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/linear/linear.C deleted file mode 100644 index 3680735a1b..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/linear/linear.C +++ /dev/null @@ -1,120 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "linear.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ -namespace phaseEquationsOfState -{ - defineTypeNameAndDebug(linear, 0); - - addToRunTimeSelectionTable - ( - phaseEquationOfState, - linear, - dictionary - ); -} -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::phaseEquationsOfState::linear::linear -( - const dictionary& dict -) -: - phaseEquationOfState(dict), - rho0_("rho0", dimDensity, dict.lookup("rho0")), - psi_("psi", dimDensity/dimPressure, dict.lookup("psi")) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::phaseEquationsOfState::linear::~linear() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -Foam::tmp Foam::phaseEquationsOfState::linear::rho -( - const volScalarField& p, - const volScalarField& T -) const -{ - return tmp - ( - new volScalarField - ( - IOobject - ( - "rho", - p.time().timeName(), - p.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - rho0_ + psi_*p - ) - ); -} - - -Foam::tmp Foam::phaseEquationsOfState::linear::psi -( - const volScalarField& p, - const volScalarField& T -) const -{ - return tmp - ( - new volScalarField - ( - IOobject - ( - "psi", - p.time().timeName(), - p.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - p.mesh(), - psi_ - ) - ); -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/linear/linear.H b/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/linear/linear.H deleted file mode 100644 index d357bb3ec0..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/linear/linear.H +++ /dev/null @@ -1,109 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::phaseEquationsOfState::linear - -Description - Linear phase density model. - -SourceFiles - linear.C - -\*---------------------------------------------------------------------------*/ - -#ifndef linear_H -#define linear_H - -#include "phaseEquationOfState.H" -#include "dimensionedTypes.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace phaseEquationsOfState -{ - -/*---------------------------------------------------------------------------*\ - Class linear Declaration -\*---------------------------------------------------------------------------*/ - -class linear -: - public phaseEquationOfState -{ - // Private data - - //- The reference density of the phase - dimensionedScalar rho0_; - - //- The constant compressibility of the phase - dimensionedScalar psi_; - - -public: - - //- Runtime type information - TypeName("linear"); - - - // Constructors - - //- Construct from components - linear - ( - const dictionary& dict - ); - - - //- Destructor - virtual ~linear(); - - - // Member Functions - - tmp rho - ( - const volScalarField& p, - const volScalarField& T - ) const; - - tmp psi - ( - const volScalarField& p, - const volScalarField& T - ) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace phaseEquationsOfState -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/perfectFluid/perfectFluid.C b/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/perfectFluid/perfectFluid.C deleted file mode 100644 index 6a148d8d68..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/perfectFluid/perfectFluid.C +++ /dev/null @@ -1,119 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "perfectFluid.H" -#include "volFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ -namespace phaseEquationsOfState -{ - defineTypeNameAndDebug(perfectFluid, 0); - - addToRunTimeSelectionTable - ( - phaseEquationOfState, - perfectFluid, - dictionary - ); -} -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::phaseEquationsOfState::perfectFluid::perfectFluid -( - const dictionary& dict -) -: - phaseEquationOfState(dict), - rho0_("rho0", dimDensity, dict.lookup("rho0")), - R_("R", dimensionSet(0, 2, -2, -1, 0), dict.lookup("R")) -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::phaseEquationsOfState::perfectFluid::~perfectFluid() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -Foam::tmp Foam::phaseEquationsOfState::perfectFluid::rho -( - const volScalarField& p, - const volScalarField& T -) const -{ - return tmp - ( - new volScalarField - ( - IOobject - ( - "rho", - p.time().timeName(), - p.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - rho0_ + psi(p, T)*p - ) - ); -} - - -Foam::tmp Foam::phaseEquationsOfState::perfectFluid::psi -( - const volScalarField& p, - const volScalarField& T -) const -{ - return tmp - ( - new volScalarField - ( - IOobject - ( - "psi", - p.time().timeName(), - p.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - 1.0/(R_*T) - ) - ); -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/perfectFluid/perfectFluid.H b/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/perfectFluid/perfectFluid.H deleted file mode 100644 index b854f1d84f..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/perfectFluid/perfectFluid.H +++ /dev/null @@ -1,109 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::phaseEquationsOfState::perfectFluid - -Description - PerfectFluid phase density model. - -SourceFiles - perfectFluid.C - -\*---------------------------------------------------------------------------*/ - -#ifndef perfectFluid_H -#define perfectFluid_H - -#include "phaseEquationOfState.H" -#include "dimensionedTypes.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace phaseEquationsOfState -{ - -/*---------------------------------------------------------------------------*\ - Class perfectFluid Declaration -\*---------------------------------------------------------------------------*/ - -class perfectFluid -: - public phaseEquationOfState -{ - // Private data - - //- The reference density of the phase - dimensionedScalar rho0_; - - //- The fluid constant of the phase - dimensionedScalar R_; - - -public: - - //- Runtime type information - TypeName("perfectFluid"); - - - // Constructors - - //- Construct from components - perfectFluid - ( - const dictionary& dict - ); - - - //- Destructor - virtual ~perfectFluid(); - - - // Member Functions - - tmp rho - ( - const volScalarField& p, - const volScalarField& T - ) const; - - tmp psi - ( - const volScalarField& p, - const volScalarField& T - ) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace phaseEquationsOfState -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/phaseEquationOfState/newPhaseEquationOfState.C b/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/phaseEquationOfState/newPhaseEquationOfState.C deleted file mode 100644 index 3d9a842a9f..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/phaseEquationOfState/newPhaseEquationOfState.C +++ /dev/null @@ -1,60 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "phaseEquationOfState.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr Foam::phaseEquationOfState::New -( - const dictionary& dict -) -{ - word phaseEquationOfStateType - ( - dict.subDict("equationOfState").lookup("type") - ); - - Info<< "Selecting phaseEquationOfState " - << phaseEquationOfStateType << endl; - - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(phaseEquationOfStateType); - - if (cstrIter == dictionaryConstructorTablePtr_->end()) - { - FatalErrorIn("phaseEquationOfState::New") - << "Unknown phaseEquationOfStateType type " - << phaseEquationOfStateType << endl << endl - << "Valid phaseEquationOfState types are : " << endl - << dictionaryConstructorTablePtr_->sortedToc() - << exit(FatalError); - } - - return cstrIter()(dict.subDict("equationOfState")); -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/phaseEquationOfState/phaseEquationOfState.H b/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/phaseEquationOfState/phaseEquationOfState.H deleted file mode 100644 index 45a5079d0d..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/phaseEquationOfState/phaseEquationOfState.H +++ /dev/null @@ -1,127 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Class - Foam::phaseEquationOfState - -Description - A2stract base-class for dispersed-phase particle diameter models. - -SourceFiles - phaseEquationOfState.C - newDiameterModel.C - -\*---------------------------------------------------------------------------*/ - -#ifndef phaseEquationOfState_H -#define phaseEquationOfState_H - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "dictionary.H" -#include "volFieldsFwd.H" -#include "runTimeSelectionTables.H" - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class phaseEquationOfState Declaration -\*---------------------------------------------------------------------------*/ - -class phaseEquationOfState -{ -protected: - - // Protected data - - const dictionary& dict_; - - -public: - - //- Runtime type information - TypeName("phaseEquationOfState"); - - - // Declare runtime construction - - declareRunTimeSelectionTable - ( - autoPtr, - phaseEquationOfState, - dictionary, - ( - const dictionary& dict - ), - (dict) - ); - - - // Constructors - - phaseEquationOfState - ( - const dictionary& dict - ); - - - //- Destructor - virtual ~phaseEquationOfState(); - - - // Selectors - - static autoPtr New - ( - const dictionary& dict - ); - - - // Member Functions - - //- Return the phase density - virtual tmp rho - ( - const volScalarField& p, - const volScalarField& T - ) const = 0; - - //- Return the phase compressibility - virtual tmp psi - ( - const volScalarField& p, - const volScalarField& T - ) const = 0; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/files b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/files new file mode 100644 index 0000000000..1cd0a09577 --- /dev/null +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/files @@ -0,0 +1,3 @@ +twoPhaseMixtureThermo.C + +LIB = $(FOAM_LIBBIN)/libtwoPhaseMixtureThermo diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/Make/options b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/options similarity index 58% rename from applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/Make/options rename to applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/options index 3f7f51cce5..e2c67263b8 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/options @@ -1,11 +1,10 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ - -lincompressibleTransportModels \ + -ltwoPhaseProperties \ -lfiniteVolume diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C new file mode 100644 index 0000000000..d81f5ccb1f --- /dev/null +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C @@ -0,0 +1,335 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "twoPhaseMixtureThermo.H" +#include "gradientEnergyFvPatchScalarField.H" +#include "mixedEnergyFvPatchScalarField.H" + + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(twoPhaseMixtureThermo, 0); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo +( + const fvMesh& mesh +) +: + psiThermo(mesh, word::null), + twoPhaseMixture(mesh, *this), + thermo1_(NULL), + thermo2_(NULL) +{ + { + volScalarField T1("T" + phase1Name(), T_); + T1.write(); + } + + { + volScalarField T2("T" + phase2Name(), T_); + T2.write(); + } + + thermo1_ = rhoThermo::New(mesh, phase1Name()); + thermo2_ = rhoThermo::New(mesh, phase2Name()); + + thermo1_->validate(phase1Name(), "e"); + thermo2_->validate(phase2Name(), "e"); + + correct(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::twoPhaseMixtureThermo::~twoPhaseMixtureThermo() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +void Foam::twoPhaseMixtureThermo::correct() +{ + thermo1_->he() = thermo1_->he(p_, T_); + thermo1_->correct(); + + thermo2_->he() = thermo2_->he(p_, T_); + thermo2_->correct(); + + psi_ = alpha1()*thermo1_->psi() + alpha2()*thermo2_->psi(); + mu_ = alpha1()*thermo1_->mu() + alpha2()*thermo2_->mu(); + alpha_ = alpha1()*thermo1_->alpha() + alpha2()*thermo2_->alpha(); +} + + +bool Foam::twoPhaseMixtureThermo::incompressible() const +{ + return thermo1_->incompressible() && thermo2_->incompressible(); +} + + +bool Foam::twoPhaseMixtureThermo::isochoric() const +{ + return thermo1_->isochoric() && thermo2_->isochoric(); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::he +( + const volScalarField& p, + const volScalarField& T +) const +{ + return alpha1()*thermo1_->he(p, T) + alpha2()*thermo2_->he(p, T); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::he +( + const scalarField& p, + const scalarField& T, + const labelList& cells +) const +{ + return + scalarField(alpha1(), cells)*thermo1_->he(p, T, cells) + + scalarField(alpha2(), cells)*thermo2_->he(p, T, cells); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::he +( + const scalarField& p, + const scalarField& T, + const label patchi +) const +{ + return + alpha1().boundaryField()[patchi]*thermo1_->he(p, T, patchi) + + alpha2().boundaryField()[patchi]*thermo2_->he(p, T, patchi); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::hc() const +{ + return alpha1()*thermo1_->hc() + alpha2()*thermo2_->hc(); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::THE +( + const scalarField& h, + const scalarField& p, + const scalarField& T0, + const labelList& cells +) const +{ + notImplemented("twoPhaseMixtureThermo::THE(...)"); + return T0; +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::THE +( + const scalarField& h, + const scalarField& p, + const scalarField& T0, + const label patchi +) const +{ + notImplemented("twoPhaseMixtureThermo::THE(...)"); + return T0; +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::Cp() const +{ + return alpha1()*thermo1_->Cp() + alpha2()*thermo2_->Cp(); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::Cp +( + const scalarField& p, + const scalarField& T, + const label patchi +) const +{ + return + alpha1().boundaryField()[patchi]*thermo1_->Cp(p, T, patchi) + + alpha2().boundaryField()[patchi]*thermo2_->Cp(p, T, patchi); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::Cv() const +{ + return alpha1()*thermo1_->Cv() + alpha2()*thermo2_->Cv(); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::Cv +( + const scalarField& p, + const scalarField& T, + const label patchi +) const +{ + return + alpha1().boundaryField()[patchi]*thermo1_->Cv(p, T, patchi) + + alpha2().boundaryField()[patchi]*thermo2_->Cv(p, T, patchi); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::gamma() const +{ + return alpha1()*thermo1_->gamma() + alpha2()*thermo2_->gamma(); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::gamma +( + const scalarField& p, + const scalarField& T, + const label patchi +) const +{ + return + alpha1().boundaryField()[patchi]*thermo1_->gamma(p, T, patchi) + + alpha2().boundaryField()[patchi]*thermo2_->gamma(p, T, patchi); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::Cpv() const +{ + return alpha1()*thermo1_->Cpv() + alpha2()*thermo2_->Cpv(); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::Cpv +( + const scalarField& p, + const scalarField& T, + const label patchi +) const +{ + return + alpha1().boundaryField()[patchi]*thermo1_->Cpv(p, T, patchi) + + alpha2().boundaryField()[patchi]*thermo2_->Cpv(p, T, patchi); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::CpByCpv() const +{ + return + alpha1()*thermo1_->CpByCpv() + + alpha2()*thermo2_->CpByCpv(); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::CpByCpv +( + const scalarField& p, + const scalarField& T, + const label patchi +) const +{ + return + alpha1().boundaryField()[patchi]*thermo1_->CpByCpv(p, T, patchi) + + alpha2().boundaryField()[patchi]*thermo2_->CpByCpv(p, T, patchi); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::kappa() const +{ + return alpha1()*thermo1_->kappa() + alpha2()*thermo2_->kappa(); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::kappa +( + const label patchi +) const +{ + return + alpha1().boundaryField()[patchi]*thermo1_->kappa(patchi) + + alpha2().boundaryField()[patchi]*thermo2_->kappa(patchi); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::kappaEff +( + const volScalarField& alphat +) const +{ + return + alpha1()*thermo1_->kappaEff(alphat) + + alpha2()*thermo2_->kappaEff(alphat); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::kappaEff +( + const scalarField& alphat, + const label patchi +) const +{ + return + alpha1().boundaryField()[patchi]*thermo1_->kappaEff(alphat, patchi) + + alpha2().boundaryField()[patchi]*thermo2_->kappaEff(alphat, patchi) + ; +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::alphaEff +( + const volScalarField& alphat +) const +{ + return + alpha1()*thermo1_->alphaEff(alphat) + + alpha2()*thermo2_->alphaEff(alphat); +} + + +Foam::tmp Foam::twoPhaseMixtureThermo::alphaEff +( + const scalarField& alphat, + const label patchi +) const +{ + return + alpha1().boundaryField()[patchi]*thermo1_->alphaEff(alphat, patchi) + + alpha2().boundaryField()[patchi]*thermo2_->alphaEff(alphat, patchi) + ; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/twoPhaseThermo.H b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H similarity index 92% rename from applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/twoPhaseThermo.H rename to applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H index d3582801b7..b2e636a4c4 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/twoPhaseThermo.H +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H @@ -22,21 +22,22 @@ License along with OpenFOAM. If not, see . Class - Foam::twoPhaseThermo + Foam::twoPhaseMixtureThermo Description SourceFiles - twoPhaseThermoI.H - twoPhaseThermo.C - twoPhaseThermoIO.C + twoPhaseMixtureThermoI.H + twoPhaseMixtureThermo.C + twoPhaseMixtureThermoIO.C \*---------------------------------------------------------------------------*/ -#ifndef twoPhaseThermo_H -#define twoPhaseThermo_H +#ifndef twoPhaseMixtureThermo_H +#define twoPhaseMixtureThermo_H #include "rhoThermo.H" +#include "psiThermo.H" #include "twoPhaseMixture.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,17 +46,16 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class twoPhaseThermo Declaration + Class twoPhaseMixtureThermo Declaration \*---------------------------------------------------------------------------*/ -class twoPhaseThermo +class twoPhaseMixtureThermo : - public rhoThermo + public psiThermo, + public twoPhaseMixture { // Private data - const twoPhaseMixture& tpm_; - //- Thermo-package of phase 1 autoPtr thermo1_; @@ -66,20 +66,20 @@ class twoPhaseThermo public: //- Runtime type information - TypeName("twoPhaseThermo"); + TypeName("twoPhaseMixtureThermo"); // Constructors - //- Construct from mesh and phase fractions - twoPhaseThermo + //- Construct from mesh + twoPhaseMixtureThermo ( - const twoPhaseMixture& twoPhaseProperties + const fvMesh& mesh ); //- Destructor - virtual ~twoPhaseThermo(); + virtual ~twoPhaseMixtureThermo(); // Member Functions @@ -112,14 +112,14 @@ public: // Non-const access allowed for transport equations virtual volScalarField& he() { - notImplemented("twoPhaseThermo::he()"); + notImplemented("twoPhaseMixtureThermo::he()"); return thermo1_->he(); } //- Enthalpy/Internal energy [J/kg] virtual const volScalarField& he() const { - notImplemented("twoPhaseThermo::he() const"); + notImplemented("twoPhaseMixtureThermo::he() const"); return thermo1_->he(); } diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/Make/files b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/Make/files deleted file mode 100644 index 64771e2f6e..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -twoPhaseThermo.C - -LIB = $(FOAM_LIBBIN)/libtwoPhaseThermo diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/twoPhaseThermo.C b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/twoPhaseThermo.C deleted file mode 100644 index c9455875e5..0000000000 --- a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseThermo/twoPhaseThermo.C +++ /dev/null @@ -1,323 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "twoPhaseThermo.H" -#include "gradientEnergyFvPatchScalarField.H" -#include "mixedEnergyFvPatchScalarField.H" - - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(twoPhaseThermo, 0); -} - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::twoPhaseThermo::twoPhaseThermo -( - const twoPhaseMixture& twoPhaseProperties -) -: - rhoThermo(twoPhaseProperties.alpha1().mesh(), word::null), - tpm_(twoPhaseProperties), - thermo1_(rhoThermo::New(tpm_.alpha1().mesh(), tpm_.phase1Name())), - thermo2_(rhoThermo::New(tpm_.alpha1().mesh(), tpm_.phase2Name())) -{ - thermo1_->validate(tpm_.phase1Name(), "e"); - thermo2_->validate(tpm_.phase2Name(), "e"); - - rho_ = tpm_.alpha1()*thermo1_->rho() + tpm_.alpha2()*thermo2_->rho(); - - correct(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::twoPhaseThermo::~twoPhaseThermo() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -void Foam::twoPhaseThermo::correct() -{ - thermo1_->he() = thermo1_->he(p_, T_); - thermo1_->correct(); - - thermo2_->he() = thermo2_->he(p_, T_); - thermo2_->correct(); - - psi_ = tpm_.alpha1()*thermo1_->psi() + tpm_.alpha2()*thermo2_->psi(); - mu_ = tpm_.alpha1()*thermo1_->mu() + tpm_.alpha2()*thermo2_->mu(); - alpha_ = tpm_.alpha1()*thermo1_->alpha() + tpm_.alpha2()*thermo2_->alpha(); -} - - -bool Foam::twoPhaseThermo::incompressible() const -{ - return thermo1_->incompressible() && thermo2_->incompressible(); -} - - -bool Foam::twoPhaseThermo::isochoric() const -{ - return thermo1_->isochoric() && thermo2_->isochoric(); -} - - -Foam::tmp Foam::twoPhaseThermo::he -( - const volScalarField& p, - const volScalarField& T -) const -{ - return tpm_.alpha1()*thermo1_->he(p, T) + tpm_.alpha2()*thermo2_->he(p, T); -} - - -Foam::tmp Foam::twoPhaseThermo::he -( - const scalarField& p, - const scalarField& T, - const labelList& cells -) const -{ - return - scalarField(tpm_.alpha1(), cells)*thermo1_->he(p, T, cells) - + scalarField(tpm_.alpha2(), cells)*thermo2_->he(p, T, cells); -} - - -Foam::tmp Foam::twoPhaseThermo::he -( - const scalarField& p, - const scalarField& T, - const label patchi -) const -{ - return - tpm_.alpha1().boundaryField()[patchi]*thermo1_->he(p, T, patchi) - + tpm_.alpha2().boundaryField()[patchi]*thermo2_->he(p, T, patchi); -} - - -Foam::tmp Foam::twoPhaseThermo::hc() const -{ - return tpm_.alpha1()*thermo1_->hc() + tpm_.alpha2()*thermo2_->hc(); -} - - -Foam::tmp Foam::twoPhaseThermo::THE -( - const scalarField& h, - const scalarField& p, - const scalarField& T0, - const labelList& cells -) const -{ - notImplemented("twoPhaseThermo::THE(...)"); - return T0; -} - - -Foam::tmp Foam::twoPhaseThermo::THE -( - const scalarField& h, - const scalarField& p, - const scalarField& T0, - const label patchi -) const -{ - notImplemented("twoPhaseThermo::THE(...)"); - return T0; -} - - -Foam::tmp Foam::twoPhaseThermo::Cp() const -{ - return tpm_.alpha1()*thermo1_->Cp() + tpm_.alpha2()*thermo2_->Cp(); -} - - -Foam::tmp Foam::twoPhaseThermo::Cp -( - const scalarField& p, - const scalarField& T, - const label patchi -) const -{ - return - tpm_.alpha1().boundaryField()[patchi]*thermo1_->Cp(p, T, patchi) - + tpm_.alpha2().boundaryField()[patchi]*thermo2_->Cp(p, T, patchi); -} - - -Foam::tmp Foam::twoPhaseThermo::Cv() const -{ - return tpm_.alpha1()*thermo1_->Cv() + tpm_.alpha2()*thermo2_->Cv(); -} - - -Foam::tmp Foam::twoPhaseThermo::Cv -( - const scalarField& p, - const scalarField& T, - const label patchi -) const -{ - return - tpm_.alpha1().boundaryField()[patchi]*thermo1_->Cv(p, T, patchi) - + tpm_.alpha2().boundaryField()[patchi]*thermo2_->Cv(p, T, patchi); -} - - -Foam::tmp Foam::twoPhaseThermo::gamma() const -{ - return tpm_.alpha1()*thermo1_->gamma() + tpm_.alpha2()*thermo2_->gamma(); -} - - -Foam::tmp Foam::twoPhaseThermo::gamma -( - const scalarField& p, - const scalarField& T, - const label patchi -) const -{ - return - tpm_.alpha1().boundaryField()[patchi]*thermo1_->gamma(p, T, patchi) - + tpm_.alpha2().boundaryField()[patchi]*thermo2_->gamma(p, T, patchi); -} - - -Foam::tmp Foam::twoPhaseThermo::Cpv() const -{ - return tpm_.alpha1()*thermo1_->Cpv() + tpm_.alpha2()*thermo2_->Cpv(); -} - - -Foam::tmp Foam::twoPhaseThermo::Cpv -( - const scalarField& p, - const scalarField& T, - const label patchi -) const -{ - return - tpm_.alpha1().boundaryField()[patchi]*thermo1_->Cpv(p, T, patchi) - + tpm_.alpha2().boundaryField()[patchi]*thermo2_->Cpv(p, T, patchi); -} - - -Foam::tmp Foam::twoPhaseThermo::CpByCpv() const -{ - return - tpm_.alpha1()*thermo1_->CpByCpv() - + tpm_.alpha2()*thermo2_->CpByCpv(); -} - - -Foam::tmp Foam::twoPhaseThermo::CpByCpv -( - const scalarField& p, - const scalarField& T, - const label patchi -) const -{ - return - tpm_.alpha1().boundaryField()[patchi]*thermo1_->CpByCpv(p, T, patchi) - + tpm_.alpha2().boundaryField()[patchi]*thermo2_->CpByCpv(p, T, patchi); -} - - -Foam::tmp Foam::twoPhaseThermo::kappa() const -{ - return tpm_.alpha1()*thermo1_->kappa() + tpm_.alpha2()*thermo2_->kappa(); -} - - -Foam::tmp Foam::twoPhaseThermo::kappa -( - const label patchi -) const -{ - return - tpm_.alpha1().boundaryField()[patchi]*thermo1_->kappa(patchi) - + tpm_.alpha2().boundaryField()[patchi]*thermo2_->kappa(patchi); -} - - -Foam::tmp Foam::twoPhaseThermo::kappaEff -( - const volScalarField& alphat -) const -{ - return - tpm_.alpha1()*thermo1_->kappaEff(alphat) - + tpm_.alpha2()*thermo2_->kappaEff(alphat); -} - - -Foam::tmp Foam::twoPhaseThermo::kappaEff -( - const scalarField& alphat, - const label patchi -) const -{ - return - tpm_.alpha1().boundaryField()[patchi]*thermo1_->kappaEff(alphat, patchi) - + tpm_.alpha2().boundaryField()[patchi]*thermo2_->kappaEff(alphat, patchi) - ; -} - - -Foam::tmp Foam::twoPhaseThermo::alphaEff -( - const volScalarField& alphat -) const -{ - return - tpm_.alpha1()*thermo1_->alphaEff(alphat) - + tpm_.alpha2()*thermo2_->alphaEff(alphat); -} - - -Foam::tmp Foam::twoPhaseThermo::alphaEff -( - const scalarField& alphat, - const label patchi -) const -{ - return - tpm_.alpha1().boundaryField()[patchi]*thermo1_->alphaEff(alphat, patchi) - + tpm_.alpha2().boundaryField()[patchi]*thermo2_->alphaEff(alphat, patchi) - ; -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C b/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C index 7580c3f9ac..3d1b93f429 100644 --- a/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C +++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C @@ -41,7 +41,7 @@ Description #include "MULES.H" #include "subCycle.H" #include "interfaceProperties.H" -#include "twoPhaseMixture.H" +#include "incompressibleTwoPhaseMixture.H" #include "turbulenceModel.H" #include "fvcSmooth.H" #include "pimpleControl.H" diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options b/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options index b5c7b88e4f..6c173b8fd1 100644 --- a/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ -I.. \ + -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ @@ -11,7 +12,7 @@ EXE_INC = \ EXE_LIBS = \ -linterfaceProperties \ - -ltwoPhaseInterfaceProperties \ + -ltwoPhaseProperties \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/MRFInterFoam.C b/applications/solvers/multiphase/interFoam/MRFInterFoam/MRFInterFoam.C index 99cc1dd8bd..b819068ddd 100644 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/MRFInterFoam.C +++ b/applications/solvers/multiphase/interFoam/MRFInterFoam/MRFInterFoam.C @@ -40,7 +40,7 @@ Description #include "MULES.H" #include "subCycle.H" #include "interfaceProperties.H" -#include "twoPhaseMixture.H" +#include "incompressibleTwoPhaseMixture.H" #include "turbulenceModel.H" #include "IOMRFZoneList.H" #include "pimpleControl.H" diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options b/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options index b5c7b88e4f..6c173b8fd1 100644 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ -I.. \ + -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ @@ -11,7 +12,7 @@ EXE_INC = \ EXE_LIBS = \ -linterfaceProperties \ - -ltwoPhaseInterfaceProperties \ + -ltwoPhaseProperties \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ diff --git a/applications/solvers/multiphase/interFoam/Make/options b/applications/solvers/multiphase/interFoam/Make/options index b87380d8a1..4ea908240d 100644 --- a/applications/solvers/multiphase/interFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ @@ -10,7 +11,7 @@ EXE_INC = \ EXE_LIBS = \ -linterfaceProperties \ - -ltwoPhaseInterfaceProperties \ + -ltwoPhaseProperties \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ diff --git a/applications/solvers/multiphase/interFoam/createFields.H b/applications/solvers/multiphase/interFoam/createFields.H index c607c68548..f0d1809848 100644 --- a/applications/solvers/multiphase/interFoam/createFields.H +++ b/applications/solvers/multiphase/interFoam/createFields.H @@ -30,7 +30,7 @@ Info<< "Reading transportProperties\n" << endl; - twoPhaseMixture twoPhaseProperties(U, phi); + incompressibleTwoPhaseMixture twoPhaseProperties(U, phi); volScalarField& alpha1(twoPhaseProperties.alpha1()); volScalarField& alpha2(twoPhaseProperties.alpha2()); diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options index 4fa14dd6d2..c8d0b93e4d 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ -I.. \ + -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ @@ -13,7 +14,7 @@ EXE_INC = \ EXE_LIBS = \ -linterfaceProperties \ - -ltwoPhaseInterfaceProperties \ + -ltwoPhaseProperties \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C index 1a9d210e23..fa16f17141 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C @@ -37,7 +37,7 @@ Description #include "MULES.H" #include "subCycle.H" #include "interfaceProperties.H" -#include "twoPhaseMixture.H" +#include "incompressibleTwoPhaseMixture.H" #include "turbulenceModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/multiphase/interFoam/interFoam.C b/applications/solvers/multiphase/interFoam/interFoam.C index 53cc2719b9..51f082b616 100644 --- a/applications/solvers/multiphase/interFoam/interFoam.C +++ b/applications/solvers/multiphase/interFoam/interFoam.C @@ -41,7 +41,7 @@ Description #include "MULES.H" #include "subCycle.H" #include "interfaceProperties.H" -#include "twoPhaseMixture.H" +#include "incompressibleTwoPhaseMixture.H" #include "turbulenceModel.H" #include "pimpleControl.H" #include "fvIOoptionList.H" diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options index 6c54b4454b..7630bc9b51 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options @@ -1,9 +1,10 @@ EXE_INC = \ -I.. \ + -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ -IincompressibleThreePhaseMixture \ -IthreePhaseInterfaceProperties \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle \ + -I$(LIB_SRC)/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/transportModels \ @@ -12,7 +13,7 @@ EXE_INC = \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ - -ltwoPhaseInterfaceProperties \ + -ltwoPhaseProperties \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options b/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options index b5c7b88e4f..6c173b8fd1 100644 --- a/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ -I.. \ + -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ @@ -11,7 +12,7 @@ EXE_INC = \ EXE_LIBS = \ -linterfaceProperties \ - -ltwoPhaseInterfaceProperties \ + -ltwoPhaseProperties \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C b/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C index ea1a15b032..39c81c7a8d 100644 --- a/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C +++ b/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C @@ -42,7 +42,7 @@ Description #include "MULES.H" #include "subCycle.H" #include "interfaceProperties.H" -#include "twoPhaseMixture.H" +#include "incompressibleTwoPhaseMixture.H" #include "turbulenceModel.H" #include "IOporosityModelList.H" #include "pimpleControl.H" diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options index 5416a161a8..2d2a968f16 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options +++ b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ @@ -8,7 +9,7 @@ EXE_INC = \ EXE_LIBS = \ -linterfaceProperties \ - -ltwoPhaseInterfaceProperties \ + -ltwoPhaseProperties \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C index f1e8feec00..08728c8f92 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "phaseChangeTwoPhaseMixture.H" -#include "twoPhaseMixture.H" +#include "incompressibleTwoPhaseMixture.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C index 3a7c4c7a53..c08eba9390 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 | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,7 +43,7 @@ Foam::phaseChangeTwoPhaseMixture::phaseChangeTwoPhaseMixture const word& alpha1Name ) : - twoPhaseMixture(U, phi, alpha1Name), + incompressibleTwoPhaseMixture(U, phi, alpha1Name), phaseChangeTwoPhaseMixtureCoeffs_(subDict(type + "Coeffs")), pSat_(lookup("pSat")) {} @@ -76,7 +76,7 @@ Foam::phaseChangeTwoPhaseMixture::vDotP() const bool Foam::phaseChangeTwoPhaseMixture::read() { - if (twoPhaseMixture::read()) + if (incompressibleTwoPhaseMixture::read()) { phaseChangeTwoPhaseMixtureCoeffs_ = subDict(type() + "Coeffs"); lookup("pSat") >> pSat_; diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H index fdfe30d5e7..fc81d080d3 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,7 +35,7 @@ SourceFiles #ifndef phaseChangeTwoPhaseMixture_H #define phaseChangeTwoPhaseMixture_H -#include "twoPhaseMixture.H" +#include "incompressibleTwoPhaseMixture.H" #include "typeInfo.H" #include "runTimeSelectionTables.H" #include "volFields.H" @@ -54,7 +54,7 @@ namespace Foam class phaseChangeTwoPhaseMixture : - public twoPhaseMixture + public incompressibleTwoPhaseMixture { protected: diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options b/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options index 6e20519ec9..9a33b331cc 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ -I../interFoam \ + -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ @@ -7,7 +8,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -ltwoPhaseInterfaceProperties \ + -ltwoPhaseProperties \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H b/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H index e98f06e74e..18b686f4f8 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H @@ -29,7 +29,7 @@ #include "createPhi.H" Info<< "Reading transportProperties\n" << endl; - twoPhaseMixture twoPhaseProperties(U, phi); + incompressibleTwoPhaseMixture twoPhaseProperties(U, phi); volScalarField& alpha1(twoPhaseProperties.alpha1()); volScalarField& alpha2(twoPhaseProperties.alpha2()); diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C index 6113aba01f..8c51a402ee 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.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 @@ -34,7 +34,7 @@ Description #include "fvCFD.H" #include "MULES.H" #include "subCycle.H" -#include "twoPhaseMixture.H" +#include "incompressibleTwoPhaseMixture.H" #include "turbulenceModel.H" #include "pimpleControl.H" diff --git a/applications/utilities/miscellaneous/foamDebugSwitches/Make/options b/applications/utilities/miscellaneous/foamDebugSwitches/Make/options index 6fa4104188..43f0c24cb5 100644 --- a/applications/utilities/miscellaneous/foamDebugSwitches/Make/options +++ b/applications/utilities/miscellaneous/foamDebugSwitches/Make/options @@ -63,5 +63,5 @@ EXE_LIBS = \ -lthermophysicalFunctions \ -ltopoChangerFvMesh \ -ltriSurface \ - -ltwoPhaseInterfaceProperties \ + -ltwoPhaseProperties \ -lutilityFunctionObjects diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C index 8a44c5411b..df6fe4da41 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.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 @@ -1150,13 +1150,13 @@ void Foam::ensightMesh::write labelList pointToGlobal; labelList uniqueMeshPointLabels; autoPtr globalPointsPtr = - mesh_.globalData().mergePoints - ( - p.meshPoints(), - p.meshPointMap(), - pointToGlobal, - uniqueMeshPointLabels - ); + mesh_.globalData().mergePoints + ( + p.meshPoints(), + p.meshPointMap(), + pointToGlobal, + uniqueMeshPointLabels + ); pointField uniquePoints(mesh_.points(), uniqueMeshPointLabels); // Renumber the patch faces @@ -1225,13 +1225,13 @@ void Foam::ensightMesh::write labelList pointToGlobal; labelList uniqueMeshPointLabels; autoPtr globalPointsPtr = - mesh_.globalData().mergePoints - ( - fz().meshPoints(), - fz().meshPointMap(), - pointToGlobal, - uniqueMeshPointLabels - ); + mesh_.globalData().mergePoints + ( + fz().meshPoints(), + fz().meshPointMap(), + pointToGlobal, + uniqueMeshPointLabels + ); pointField uniquePoints(mesh_.points(), uniqueMeshPointLabels); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C index 5da9b8a19d..15e315b8de 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C @@ -30,6 +30,7 @@ License #include "IFstream.H" #include "OFstream.H" #include "globalIndex.H" +#include "ListListOps.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -52,6 +53,62 @@ Foam::fileName Foam::externalCoupledMixedFvPatchField::baseDir() const } +template +void Foam::externalCoupledMixedFvPatchField::writeGeometry() const +{ + int tag = Pstream::msgType() + 1; + + const label procI = Pstream::myProcNo(); + const polyPatch& p = this->patch().patch(); + const polyMesh& mesh = p.boundaryMesh().mesh(); + + labelList pointToGlobal; + labelList uniquePointIDs; + (void)mesh.globalData().mergePoints + ( + p.meshPoints(), + p.meshPointMap(), + pointToGlobal, + uniquePointIDs + ); + + List allPoints(Pstream::nProcs()); + allPoints[procI] = pointField(mesh.points(), uniquePointIDs); + Pstream::gatherList(allPoints, tag); + + List allFaces(Pstream::nProcs()); + faceList& patchFaces = allFaces[procI]; + patchFaces = p.localFaces(); + forAll(patchFaces, faceI) + { + inplaceRenumber(pointToGlobal, patchFaces[faceI]); + } + + Pstream::gatherList(allFaces, tag); + + if (Pstream::master()) + { + OFstream osPoints(baseDir()/"patchPoints"); + if (log_) + { + Info<< "writing patch points to: " << osPoints.name() << endl; + } + + osPoints<< + ListListOps::combine(allPoints, accessOp()); + + OFstream osFaces(baseDir()/"patchFaces"); + if (log_) + { + Info<< "writing patch faces to: " << osFaces.name() << endl; + } + + osFaces<< + ListListOps::combine(allFaces, accessOp()); + } +} + + template Foam::fileName Foam::externalCoupledMixedFvPatchField::lockFile() const { @@ -346,6 +403,8 @@ Foam::externalCoupledMixedFvPatchField::externalCoupledMixedFvPatchField this->refValue() = *this; this->refGrad() = pTraits::zero; this->valueFraction() = 1.0; + + writeGeometry(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H index 50376e097d..a51ef9af7b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H @@ -137,6 +137,9 @@ protected: //- Return the file path to the base communications folder fileName baseDir() const; + //- Write the geometry to the comms dir + void writeGeometry() const; + //- Return the file path to the lock file fileName lockFile() const; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C index 819f39ecfb..680d3f89f0 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -135,6 +135,7 @@ void Foam::mappedFixedInternalValueFvPatchField::updateCoeffs() break; } case mappedPatchBase::NEARESTPATCHFACE: + case mappedPatchBase::NEARESTPATCHFACEAMI: { const label samplePatchI = mpp.samplePolyPatch().index(); const fvPatchField& nbrPatchField = diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H index 1ce855b3ae..0b76330355 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H @@ -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 @@ -42,6 +42,7 @@ Description SourceFiles AMIInterpolation.C AMIInterpolationName.C + AMIInterpolationParallelOps.C \*---------------------------------------------------------------------------*/ diff --git a/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.C b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.C new file mode 100644 index 0000000000..5d35425ccc --- /dev/null +++ b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.C @@ -0,0 +1,102 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "adiabaticPerfectFluid.H" +#include "IOstreams.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::adiabaticPerfectFluid::adiabaticPerfectFluid(Istream& is) +: + Specie(is), + p0_(readScalar(is)), + rho0_(readScalar(is)), + gamma_(readScalar(is)), + B_(readScalar(is)) +{ + is.check + ( + "adiabaticPerfectFluid::adiabaticPerfectFluid(Istream& is)" + ); +} + + +template +Foam::adiabaticPerfectFluid::adiabaticPerfectFluid +( + const dictionary& dict +) +: + Specie(dict), + p0_(readScalar(dict.subDict("equationOfState").lookup("p0"))), + rho0_(readScalar(dict.subDict("equationOfState").lookup("rho0"))), + gamma_(readScalar(dict.subDict("equationOfState").lookup("gamma"))), + B_(readScalar(dict.subDict("equationOfState").lookup("B"))) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::adiabaticPerfectFluid::write(Ostream& os) const +{ + Specie::write(os); + + dictionary dict("equationOfState"); + dict.add("p0", p0_); + dict.add("rho0", rho0_); + dict.add("gamma", gamma_); + dict.add("B", B_); + + os << indent << dict.dictName() << dict; +} + + +// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * // + +template +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const adiabaticPerfectFluid& pf +) +{ + os << static_cast(pf) + << token::SPACE << pf.R_ + << token::SPACE << pf.rho0_ + << token::SPACE << pf.gamma_ + << token::SPACE << pf.B_; + + os.check + ( + "Ostream& operator<<(Ostream&, const adiabaticPerfectFluid&)" + ); + + return os; +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.H b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.H new file mode 100644 index 0000000000..6ebd728fa8 --- /dev/null +++ b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.H @@ -0,0 +1,247 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::adiabaticPerfectFluid + +Description + AdiabaticPerfect gas equation of state. + +SourceFiles + adiabaticPerfectFluidI.H + adiabaticPerfectFluid.C + +\*---------------------------------------------------------------------------*/ + +#ifndef adiabaticPerfectFluid_H +#define adiabaticPerfectFluid_H + +#include "autoPtr.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of friend functions and operators + +template class adiabaticPerfectFluid; + +template +inline adiabaticPerfectFluid operator+ +( + const adiabaticPerfectFluid&, + const adiabaticPerfectFluid& +); + +template +inline adiabaticPerfectFluid operator- +( + const adiabaticPerfectFluid&, + const adiabaticPerfectFluid& +); + +template +inline adiabaticPerfectFluid operator* +( + const scalar, + const adiabaticPerfectFluid& +); + +template +inline adiabaticPerfectFluid operator== +( + const adiabaticPerfectFluid&, + const adiabaticPerfectFluid& +); + +template +Ostream& operator<< +( + Ostream&, + const adiabaticPerfectFluid& +); + + +/*---------------------------------------------------------------------------*\ + Class adiabaticPerfectFluid Declaration +\*---------------------------------------------------------------------------*/ + +template +class adiabaticPerfectFluid +: + public Specie +{ + // Private data + + //- Reference pressure + scalar p0_; + + //- Reference density + scalar rho0_; + + //- The isentropic exponent + scalar gamma_; + + //- Pressure offset for a stiffened gas + scalar B_; + + +public: + + // Constructors + + //- Construct from components + inline adiabaticPerfectFluid + ( + const Specie& sp, + const scalar p0, + const scalar rho0, + const scalar gamma, + const scalar B + ); + + //- Construct from Istream + adiabaticPerfectFluid(Istream&); + + //- Construct from dictionary + adiabaticPerfectFluid(const dictionary& dict); + + //- Construct as named copy + inline adiabaticPerfectFluid + ( + const word& name, + const adiabaticPerfectFluid& + ); + + //- Construct and return a clone + inline autoPtr clone() const; + + // Selector from Istream + inline static autoPtr New(Istream& is); + + // Selector from dictionary + inline static autoPtr New + ( + const dictionary& dict + ); + + + // Member functions + + //- Return the instantiated type name + static word typeName() + { + return "adiabaticPerfectFluid<" + word(Specie::typeName_()) + '>'; + } + + + // Fundamental properties + + //- Is the equation of state is incompressible i.e. rho != f(p) + static const bool incompressible = false; + + //- Is the equation of state is isochoric i.e. rho = const + static const bool isochoric = false; + + //- Return density [kg/m^3] + inline scalar rho(scalar p, scalar T) const; + + //- Return compressibility rho/p [s^2/m^2] + inline scalar psi(scalar p, scalar T) const; + + //- Return compression factor [] + inline scalar Z(scalar p, scalar T) const; + + //- Return (cp - cv) [J/(kmol K] + inline scalar cpMcv(scalar p, scalar T) const; + + + // IO + + //- Write to Ostream + void write(Ostream& os) const; + + + // Member operators + + inline void operator+=(const adiabaticPerfectFluid&); + inline void operator-=(const adiabaticPerfectFluid&); + + inline void operator*=(const scalar); + + + // Friend operators + + friend adiabaticPerfectFluid operator+ + ( + const adiabaticPerfectFluid&, + const adiabaticPerfectFluid& + ); + + friend adiabaticPerfectFluid operator- + ( + const adiabaticPerfectFluid&, + const adiabaticPerfectFluid& + ); + + friend adiabaticPerfectFluid operator* + ( + const scalar s, + const adiabaticPerfectFluid& + ); + + friend adiabaticPerfectFluid operator== + ( + const adiabaticPerfectFluid&, + const adiabaticPerfectFluid& + ); + + + // Ostream Operator + + friend Ostream& operator<< + ( + Ostream&, + const adiabaticPerfectFluid& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "adiabaticPerfectFluidI.H" + +#ifdef NoRepository +# include "adiabaticPerfectFluid.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluidI.H b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluidI.H new file mode 100644 index 0000000000..4521e71946 --- /dev/null +++ b/src/thermophysicalModels/specie/equationOfState/adiabaticPerfectFluid/adiabaticPerfectFluidI.H @@ -0,0 +1,271 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "adiabaticPerfectFluid.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template +inline Foam::adiabaticPerfectFluid::adiabaticPerfectFluid +( + const Specie& sp, + const scalar p0, + const scalar rho0, + const scalar gamma, + const scalar B +) +: + Specie(sp), + p0_(p0), + rho0_(rho0), + gamma_(gamma), + B_(B) +{} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +inline Foam::adiabaticPerfectFluid::adiabaticPerfectFluid +( + const word& name, + const adiabaticPerfectFluid& pf +) +: + Specie(name, pf), + p0_(pf.p0_), + rho0_(pf.rho0_), + gamma_(pf.gamma_), + B_(pf.B_) +{} + + +template +inline Foam::autoPtr > +Foam::adiabaticPerfectFluid::clone() const +{ + return autoPtr > + ( + new adiabaticPerfectFluid(*this) + ); +} + + +template +inline Foam::autoPtr > +Foam::adiabaticPerfectFluid::New(Istream& is) +{ + return autoPtr > + ( + new adiabaticPerfectFluid(is) + ); +} + + +template +inline Foam::autoPtr > +Foam::adiabaticPerfectFluid::New +( + const dictionary& dict +) +{ + return autoPtr > + ( + new adiabaticPerfectFluid(dict) + ); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +inline Foam::scalar Foam::adiabaticPerfectFluid::rho +( + scalar p, + scalar +) const +{ + return rho0_*pow((p + B_)/(p0_ + B_), 1.0/gamma_); +} + + +template +inline Foam::scalar Foam::adiabaticPerfectFluid::psi +( + scalar p, + scalar +) const +{ + return + (rho0_/(gamma_*(p0_ + B_))) + *pow((p + B_)/(p0_ + B_), 1.0/gamma_ - 1.0); +} + + +template +inline Foam::scalar Foam::adiabaticPerfectFluid::Z(scalar, scalar) const +{ + return 1.0; +} + + +template +inline Foam::scalar Foam::adiabaticPerfectFluid::cpMcv +( + scalar, + scalar +) const +{ + return 0; +} + + +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +template +inline void Foam::adiabaticPerfectFluid::operator+= +( + const adiabaticPerfectFluid& pf +) +{ + scalar molr1 = this->nMoles(); + + Specie::operator+=(pf); + + molr1 /= this->nMoles(); + scalar molr2 = pf.nMoles()/this->nMoles(); + + p0_ = molr1*p0_ + molr2*pf.p0_; + rho0_ = molr1*rho0_ + molr2*pf.rho0_; + gamma_ = molr1*gamma_ + molr2*pf.gamma_; + B_ = molr1*B_ + molr2*pf.B_; +} + + +template +inline void Foam::adiabaticPerfectFluid::operator-= +( + const adiabaticPerfectFluid& pf +) +{ + scalar molr1 = this->nMoles(); + + Specie::operator-=(pf); + + molr1 /= this->nMoles(); + scalar molr2 = pf.nMoles()/this->nMoles(); + + p0_ = molr1*p0_ - molr2*pf.p0_; + rho0_ = molr1*rho0_ - molr2*pf.rho0_; + gamma_ = molr1*gamma_ - molr2*pf.gamma_; + B_ = molr1*B_ - molr2*pf.B_; +} + + +template +inline void Foam::adiabaticPerfectFluid::operator*=(const scalar s) +{ + Specie::operator*=(s); +} + + +// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // + +template +inline Foam::adiabaticPerfectFluid Foam::operator+ +( + const adiabaticPerfectFluid& pf1, + const adiabaticPerfectFluid& pf2 +) +{ + scalar nMoles = pf1.nMoles() + pf2.nMoles(); + scalar molr1 = pf1.nMoles()/nMoles; + scalar molr2 = pf2.nMoles()/nMoles; + + return rhoConst + ( + static_cast(pf1) + + static_cast(pf2), + molr1*pf1.p0_ + molr2*pf2.p0_, + molr1*pf1.rho0_ + molr2*pf2.rho0_, + molr1*pf1.gamma_ + molr2*pf2.gamma_, + molr1*pf1.B_ + molr2*pf2.B_ + ); +} + + +template +inline Foam::adiabaticPerfectFluid Foam::operator- +( + const adiabaticPerfectFluid& pf1, + const adiabaticPerfectFluid& pf2 +) +{ + scalar nMoles = pf1.nMoles() + pf2.nMoles(); + scalar molr1 = pf1.nMoles()/nMoles; + scalar molr2 = pf2.nMoles()/nMoles; + + return rhoConst + ( + static_cast(pf1) + - static_cast(pf2), + molr1*pf1.p0_ - molr2*pf2.p0_, + molr1*pf1.rho0_ - molr2*pf2.rho0_, + molr1*pf1.gamma_ - molr2*pf2.gamma_, + molr1*pf1.B_ - molr2*pf2.B_ + ); +} + + +template +inline Foam::adiabaticPerfectFluid Foam::operator* +( + const scalar s, + const adiabaticPerfectFluid& pf +) +{ + return adiabaticPerfectFluid + ( + s*static_cast(pf), + pf.p0_, + pf.rho0_, + pf.gamma_, + pf.B_ + ); +} + + +template +inline Foam::adiabaticPerfectFluid Foam::operator== +( + const adiabaticPerfectFluid& pf1, + const adiabaticPerfectFluid& pf2 +) +{ + return pf2 - pf1; +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/equationOfState/linear/linear.C b/src/thermophysicalModels/specie/equationOfState/linear/linear.C new file mode 100644 index 0000000000..562bdecf2b --- /dev/null +++ b/src/thermophysicalModels/specie/equationOfState/linear/linear.C @@ -0,0 +1,80 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "linear.H" +#include "IOstreams.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::linear::linear(Istream& is) +: + Specie(is), + psi_(readScalar(is)), + rho0_(readScalar(is)) +{ + is.check("linear::linear(Istream& is)"); +} + + +template +Foam::linear::linear(const dictionary& dict) +: + Specie(dict), + psi_(readScalar(dict.subDict("equationOfState").lookup("psi"))), + rho0_(readScalar(dict.subDict("equationOfState").lookup("rho0"))) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::linear::write(Ostream& os) const +{ + Specie::write(os); + + dictionary dict("equationOfState"); + dict.add("psi", psi_); + dict.add("rho0", rho0_); + + os << indent << dict.dictName() << dict; +} + + +// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * // + +template +Foam::Ostream& Foam::operator<<(Ostream& os, const linear& pf) +{ + os << static_cast(pf) + << token::SPACE << pf.psi_ + << token::SPACE << pf.rho0_; + + os.check("Ostream& operator<<(Ostream&, const linear&)"); + return os; +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/equationOfState/linear/linear.H b/src/thermophysicalModels/specie/equationOfState/linear/linear.H new file mode 100644 index 0000000000..8876ce3f28 --- /dev/null +++ b/src/thermophysicalModels/specie/equationOfState/linear/linear.H @@ -0,0 +1,232 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::linear + +Description + Perfect gas equation of state. + +SourceFiles + linearI.H + linear.C + +\*---------------------------------------------------------------------------*/ + +#ifndef linear_H +#define linear_H + +#include "autoPtr.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of friend functions and operators + +template class linear; + +template +inline linear operator+ +( + const linear&, + const linear& +); + +template +inline linear operator- +( + const linear&, + const linear& +); + +template +inline linear operator* +( + const scalar, + const linear& +); + +template +inline linear operator== +( + const linear&, + const linear& +); + +template +Ostream& operator<< +( + Ostream&, + const linear& +); + + +/*---------------------------------------------------------------------------*\ + Class linear Declaration +\*---------------------------------------------------------------------------*/ + +template +class linear +: + public Specie +{ + // Private data + + //- Compressibility + scalar psi_; + + //- The reference density + scalar rho0_; + + +public: + + // Constructors + + //- Construct from components + inline linear + ( + const Specie& sp, + const scalar psi, + const scalar rho0 + ); + + //- Construct from Istream + linear(Istream&); + + //- Construct from dictionary + linear(const dictionary& dict); + + //- Construct as named copy + inline linear(const word& name, const linear&); + + //- Construct and return a clone + inline autoPtr clone() const; + + // Selector from Istream + inline static autoPtr New(Istream& is); + + // Selector from dictionary + inline static autoPtr New(const dictionary& dict); + + + // Member functions + + //- Return the instantiated type name + static word typeName() + { + return "linear<" + word(Specie::typeName_()) + '>'; + } + + + // Fundamental properties + + //- Is the equation of state is incompressible i.e. rho != f(p) + static const bool incompressible = false; + + //- Is the equation of state is isochoric i.e. rho = const + static const bool isochoric = false; + + //- Return density [kg/m^3] + inline scalar rho(scalar p, scalar T) const; + + //- Return compressibility rho/p [s^2/m^2] + inline scalar psi(scalar p, scalar T) const; + + //- Return compression factor [] + inline scalar Z(scalar p, scalar T) const; + + //- Return (cp - cv) [J/(kmol K] + inline scalar cpMcv(scalar p, scalar T) const; + + + // IO + + //- Write to Ostream + void write(Ostream& os) const; + + + // Member operators + + inline void operator+=(const linear&); + inline void operator-=(const linear&); + + inline void operator*=(const scalar); + + + // Friend operators + + friend linear operator+ + ( + const linear&, + const linear& + ); + + friend linear operator- + ( + const linear&, + const linear& + ); + + friend linear operator* + ( + const scalar s, + const linear& + ); + + friend linear operator== + ( + const linear&, + const linear& + ); + + + // Ostream Operator + + friend Ostream& operator<< + ( + Ostream&, + const linear& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "linearI.H" + +#ifdef NoRepository +# include "linear.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/equationOfState/linear/linearI.H b/src/thermophysicalModels/specie/equationOfState/linear/linearI.H new file mode 100644 index 0000000000..ea05aa6333 --- /dev/null +++ b/src/thermophysicalModels/specie/equationOfState/linear/linearI.H @@ -0,0 +1,232 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "linear.H" + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +template +inline Foam::linear::linear +( + const Specie& sp, + const scalar psi, + const scalar rho0 +) +: + Specie(sp), + psi_(psi), + rho0_(rho0) +{} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +inline Foam::linear::linear +( + const word& name, + const linear& pf +) +: + Specie(name, pf), + psi_(pf.psi_), + rho0_(pf.rho0_) +{} + + +template +inline Foam::autoPtr > +Foam::linear::clone() const +{ + return autoPtr >(new linear(*this)); +} + + +template +inline Foam::autoPtr > +Foam::linear::New(Istream& is) +{ + return autoPtr >(new linear(is)); +} + + +template +inline Foam::autoPtr > +Foam::linear::New +( + const dictionary& dict +) +{ + return autoPtr >(new linear(dict)); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +inline Foam::scalar Foam::linear::rho(scalar p, scalar T) const +{ + return rho0_ + psi_*p; +} + + +template +inline Foam::scalar Foam::linear::psi(scalar, scalar T) const +{ + return psi_; +} + + +template +inline Foam::scalar Foam::linear::Z(scalar, scalar) const +{ + return 1.0; +} + + +template +inline Foam::scalar Foam::linear::cpMcv(scalar, scalar) const +{ + return 0; +} + + +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +template +inline void Foam::linear::operator+= +( + const linear& pf +) +{ + scalar molr1 = this->nMoles(); + + Specie::operator+=(pf); + + molr1 /= this->nMoles(); + scalar molr2 = pf.nMoles()/this->nMoles(); + + psi_ = molr1*psi_ + molr2*pf.psi_; + rho0_ = molr1*rho0_ + molr2*pf.rho0_; +} + + +template +inline void Foam::linear::operator-= +( + const linear& pf +) +{ + scalar molr1 = this->nMoles(); + + Specie::operator-=(pf); + + molr1 /= this->nMoles(); + scalar molr2 = pf.nMoles()/this->nMoles(); + + psi_ = molr1*psi_ - molr2*pf.psi_; + rho0_ = molr1*rho0_ - molr2*pf.rho0_; +} + + +template +inline void Foam::linear::operator*=(const scalar s) +{ + Specie::operator*=(s); +} + + +// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // + +template +inline Foam::linear Foam::operator+ +( + const linear& pf1, + const linear& pf2 +) +{ + scalar nMoles = pf1.nMoles() + pf2.nMoles(); + scalar molr1 = pf1.nMoles()/nMoles; + scalar molr2 = pf2.nMoles()/nMoles; + + return rhoConst + ( + static_cast(pf1) + + static_cast(pf2), + molr1*pf1.psi_ + molr2*pf2.psi_, + molr1*pf1.rho0_ + molr2*pf2.rho0_ + ); +} + + +template +inline Foam::linear Foam::operator- +( + const linear& pf1, + const linear& pf2 +) +{ + scalar nMoles = pf1.nMoles() + pf2.nMoles(); + scalar molr1 = pf1.nMoles()/nMoles; + scalar molr2 = pf2.nMoles()/nMoles; + + return rhoConst + ( + static_cast(pf1) + - static_cast(pf2), + molr1*pf1.psi_ - molr2*pf2.psi_, + molr1*pf1.rho0_ - molr2*pf2.rho0_ + ); +} + + +template +inline Foam::linear Foam::operator* +( + const scalar s, + const linear& pf +) +{ + return linear + ( + s*static_cast(pf), + pf.psi_, + pf.rho0_ + ); +} + + +template +inline Foam::linear Foam::operator== +( + const linear& pf1, + const linear& pf2 +) +{ + return pf2 - pf1; +} + + +// ************************************************************************* // diff --git a/src/transportModels/Allwmake b/src/transportModels/Allwmake index 21078c07fd..60db98b2d8 100755 --- a/src/transportModels/Allwmake +++ b/src/transportModels/Allwmake @@ -3,9 +3,8 @@ cd ${0%/*} || exit 1 # run from this directory makeType=${1:-libso} set -x -wmake $makeType incompressible wmake $makeType interfaceProperties -wmake $makeType twoPhaseInterfaceProperties -# wmake $makeType compressible +wmake $makeType twoPhaseProperties +wmake $makeType incompressible # ----------------------------------------------------------------- end-of-file diff --git a/src/transportModels/incompressible/Make/files b/src/transportModels/incompressible/Make/files index 898a3c648c..76baf5df24 100644 --- a/src/transportModels/incompressible/Make/files +++ b/src/transportModels/incompressible/Make/files @@ -9,6 +9,6 @@ viscosityModels/HerschelBulkley/HerschelBulkley.C transportModel/transportModel.C singlePhaseTransportModel/singlePhaseTransportModel.C -incompressibleTwoPhaseMixture/twoPhaseMixture.C +incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C LIB = $(FOAM_LIBBIN)/libincompressibleTransportModels diff --git a/src/transportModels/incompressible/Make/options b/src/transportModels/incompressible/Make/options index a412632ebb..2ae73705d2 100644 --- a/src/transportModels/incompressible/Make/options +++ b/src/transportModels/incompressible/Make/options @@ -1,6 +1,8 @@ EXE_INC = \ -I.. \ + -I../twoPhaseProperties/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ + -ltwoPhaseProperties \ -lfiniteVolume diff --git a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.C b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C similarity index 80% rename from src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.C rename to src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C index 7ff4e9d2ce..98046c9b76 100644 --- a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.C +++ b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "twoPhaseMixture.H" +#include "incompressibleTwoPhaseMixture.H" #include "addToRunTimeSelectionTable.H" #include "surfaceFields.H" #include "fvc.H" @@ -32,7 +32,7 @@ License // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // //- Calculate and return the laminar viscosity -void Foam::twoPhaseMixture::calcNu() +void Foam::incompressibleTwoPhaseMixture::calcNu() { nuModel1_->correct(); nuModel2_->correct(); @@ -50,7 +50,7 @@ void Foam::twoPhaseMixture::calcNu() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::twoPhaseMixture::twoPhaseMixture +Foam::incompressibleTwoPhaseMixture::incompressibleTwoPhaseMixture ( const volVectorField& U, const surfaceScalarField& phi, @@ -59,16 +59,14 @@ Foam::twoPhaseMixture::twoPhaseMixture ) : transportModel(U, phi), - - phase1Name_(found("phases") ? wordList(lookup("phases"))[0] : "phase1"), - phase2Name_(found("phases") ? wordList(lookup("phases"))[1] : "phase2"), + twoPhaseMixture(U.mesh(), *this, alpha1Name, alpha2Name), nuModel1_ ( viscosityModel::New ( "nu1", - subDict(phase1Name_), + subDict(phase1Name_ == "1" ? "phase1": phase1Name_), U, phi ) @@ -78,7 +76,7 @@ Foam::twoPhaseMixture::twoPhaseMixture viscosityModel::New ( "nu2", - subDict(phase2Name_), + subDict(phase2Name_ == "2" ? "phase2": phase2Name_), U, phi ) @@ -90,30 +88,6 @@ Foam::twoPhaseMixture::twoPhaseMixture U_(U), phi_(phi), - alpha1_ - ( - IOobject - ( - found("phases") ? word("alpha" + phase1Name_) : alpha1Name, - U_.time().timeName(), - U_.db(), - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - U_.mesh() - ), - - alpha2_ - ( - IOobject - ( - found("phases") ? word("alpha" + phase2Name_) : alpha2Name, - U_.time().timeName(), - U_.db() - ), - 1.0 - alpha1_ - ), - nu_ ( IOobject @@ -133,7 +107,8 @@ Foam::twoPhaseMixture::twoPhaseMixture // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -Foam::tmp Foam::twoPhaseMixture::mu() const +Foam::tmp +Foam::incompressibleTwoPhaseMixture::mu() const { const volScalarField limitedAlpha1 ( @@ -152,7 +127,8 @@ Foam::tmp Foam::twoPhaseMixture::mu() const } -Foam::tmp Foam::twoPhaseMixture::muf() const +Foam::tmp +Foam::incompressibleTwoPhaseMixture::muf() const { const surfaceScalarField alpha1f ( @@ -171,7 +147,8 @@ Foam::tmp Foam::twoPhaseMixture::muf() const } -Foam::tmp Foam::twoPhaseMixture::nuf() const +Foam::tmp +Foam::incompressibleTwoPhaseMixture::nuf() const { const surfaceScalarField alpha1f ( @@ -192,7 +169,7 @@ Foam::tmp Foam::twoPhaseMixture::nuf() const } -bool Foam::twoPhaseMixture::read() +bool Foam::incompressibleTwoPhaseMixture::read() { if (transportModel::read()) { diff --git a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.H b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.H similarity index 77% rename from src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.H rename to src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.H index 7dca526d67..8dad648320 100644 --- a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.H +++ b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.H @@ -22,23 +22,23 @@ License along with OpenFOAM. If not, see . Class - Foam::twoPhaseMixture + Foam::incompressibleTwoPhaseMixture Description A two-phase incompressible transportModel SourceFiles - twoPhaseMixture.C + incompressibleTwoPhaseMixture.C \*---------------------------------------------------------------------------*/ -#ifndef twoPhaseMixture_H -#define twoPhaseMixture_H +#ifndef incompressibleTwoPhaseMixture_H +#define incompressibleTwoPhaseMixture_H #include "incompressible/transportModel/transportModel.H" #include "incompressible/viscosityModels/viscosityModel/viscosityModel.H" -#include "dimensionedScalar.H" -#include "volFields.H" +#include "twoPhaseMixture.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -46,20 +46,18 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class twoPhaseMixture Declaration + Class incompressibleTwoPhaseMixture Declaration \*---------------------------------------------------------------------------*/ -class twoPhaseMixture +class incompressibleTwoPhaseMixture : - public transportModel + public transportModel, + public twoPhaseMixture { protected: // Protected data - word phase1Name_; - word phase2Name_; - autoPtr nuModel1_; autoPtr nuModel2_; @@ -69,9 +67,6 @@ protected: const volVectorField& U_; const surfaceScalarField& phi_; - volScalarField alpha1_; - volScalarField alpha2_; - volScalarField nu_; @@ -86,7 +81,7 @@ public: // Constructors //- Construct from components - twoPhaseMixture + incompressibleTwoPhaseMixture ( const volVectorField& U, const surfaceScalarField& phi, @@ -96,46 +91,12 @@ public: //- Destructor - ~twoPhaseMixture() + virtual ~incompressibleTwoPhaseMixture() {} // Member Functions - const word phase1Name() const - { - return phase1Name_; - } - - const word phase2Name() const - { - return phase2Name_; - } - - //- Return the phase-fraction of phase 1 - const volScalarField& alpha1() const - { - return alpha1_; - } - - //- Return the phase-fraction of phase 1 - volScalarField& alpha1() - { - return alpha1_; - } - - //- Return the phase-fraction of phase 2 - const volScalarField& alpha2() const - { - return alpha2_; - } - - //- Return the phase-fraction of phase 2 - volScalarField& alpha2() - { - return alpha2_; - } - //- Return const-access to phase1 viscosityModel const viscosityModel& nuModel1() const { diff --git a/src/transportModels/interfaceProperties/Make/options b/src/transportModels/interfaceProperties/Make/options index d8c038aad0..4636e26540 100644 --- a/src/transportModels/interfaceProperties/Make/options +++ b/src/transportModels/interfaceProperties/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I$(LIB_SRC)/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle \ + -I$(LIB_SRC)/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = -lfiniteVolume diff --git a/src/transportModels/twoPhaseInterfaceProperties/Make/files b/src/transportModels/twoPhaseProperties/Make/files similarity index 83% rename from src/transportModels/twoPhaseInterfaceProperties/Make/files rename to src/transportModels/twoPhaseProperties/Make/files index 647a00e2ba..e7f6e04872 100644 --- a/src/transportModels/twoPhaseInterfaceProperties/Make/files +++ b/src/transportModels/twoPhaseProperties/Make/files @@ -1,7 +1,9 @@ +twoPhaseMixture/twoPhaseMixture.C + alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C -LIB = $(FOAM_LIBBIN)/libtwoPhaseInterfaceProperties +LIB = $(FOAM_LIBBIN)/libtwoPhaseProperties diff --git a/src/transportModels/twoPhaseInterfaceProperties/Make/options b/src/transportModels/twoPhaseProperties/Make/options similarity index 100% rename from src/transportModels/twoPhaseInterfaceProperties/Make/options rename to src/transportModels/twoPhaseProperties/Make/options diff --git a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C similarity index 98% rename from src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C rename to src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C index 73c962d77f..f183641e46 100644 --- a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C +++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H b/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H similarity index 98% rename from src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H rename to src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H index 6d1f65fe73..95f51483fc 100644 --- a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H +++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.H @@ -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 diff --git a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C b/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C similarity index 98% rename from src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C rename to src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C index 9c84ba823a..ea35d3999c 100644 --- a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C +++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H b/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H similarity index 98% rename from src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H rename to src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H index 70fcd6ed8c..02eaf6b352 100644 --- a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H +++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C b/src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C similarity index 98% rename from src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C rename to src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C index ee0d3b9aaf..b4a9db0062 100644 --- a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C +++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.H b/src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.H similarity index 98% rename from src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.H rename to src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.H index b3768be38b..488a7ed93a 100644 --- a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.H +++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C b/src/transportModels/twoPhaseProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C similarity index 98% rename from src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C rename to src/transportModels/twoPhaseProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C index 265f235e44..d014b1c6fc 100644 --- a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C +++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.H b/src/transportModels/twoPhaseProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.H similarity index 98% rename from src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.H rename to src/transportModels/twoPhaseProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.H index d52f4c821e..de96a69eea 100644 --- a/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.H +++ b/src/transportModels/twoPhaseProperties/alphaContactAngle/timeVaryingAlphaContactAngle/timeVaryingAlphaContactAngleFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/transportModels/twoPhaseInterfaceProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C b/src/transportModels/twoPhaseProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C similarity index 98% rename from src/transportModels/twoPhaseInterfaceProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C rename to src/transportModels/twoPhaseProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C index 61bd4d09c1..e6e6ea2c10 100644 --- a/src/transportModels/twoPhaseInterfaceProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C +++ b/src/transportModels/twoPhaseProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/transportModels/twoPhaseInterfaceProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.H b/src/transportModels/twoPhaseProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.H similarity index 98% rename from src/transportModels/twoPhaseInterfaceProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.H rename to src/transportModels/twoPhaseProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.H index 6186c62192..2b9c00c0c1 100644 --- a/src/transportModels/twoPhaseInterfaceProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.H +++ b/src/transportModels/twoPhaseProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/phaseEquationOfState/phaseEquationOfState.C b/src/transportModels/twoPhaseProperties/twoPhaseMixture/twoPhaseMixture.C similarity index 56% rename from applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/phaseEquationOfState/phaseEquationOfState.C rename to src/transportModels/twoPhaseProperties/twoPhaseMixture/twoPhaseMixture.C index 41ed49322b..7b95752f37 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/phaseEquationOfState/phaseEquationOfState.C +++ b/src/transportModels/twoPhaseProperties/twoPhaseMixture/twoPhaseMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,31 +23,55 @@ License \*---------------------------------------------------------------------------*/ -#include "phaseEquationOfState.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(phaseEquationOfState, 0); - defineRunTimeSelectionTable(phaseEquationOfState, dictionary); -} +#include "twoPhaseMixture.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::phaseEquationOfState::phaseEquationOfState +Foam::twoPhaseMixture::twoPhaseMixture ( - const dictionary& dict + const fvMesh& mesh, + const dictionary& dict, + const word& alpha1Name, + const word& alpha2Name ) : - dict_(dict) -{} + phase1Name_ + ( + dict.found("phases") + ? wordList(dict.lookup("phases"))[0] + : "1" + ), + phase2Name_ + ( + dict.found("phases") + ? wordList(dict.lookup("phases"))[1] + : "2" + ), + alpha1_ + ( + IOobject + ( + dict.found("phases") ? word("alpha" + phase1Name_) : alpha1Name, + mesh.time().timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ), -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::phaseEquationOfState::~phaseEquationOfState() + alpha2_ + ( + IOobject + ( + dict.found("phases") ? word("alpha" + phase2Name_) : alpha2Name, + mesh.time().timeName(), + mesh + ), + 1.0 - alpha1_ + ) {} diff --git a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.H b/src/transportModels/twoPhaseProperties/twoPhaseMixture/twoPhaseMixture.H similarity index 56% rename from applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.H rename to src/transportModels/twoPhaseProperties/twoPhaseMixture/twoPhaseMixture.H index 49f5218e49..668c4f2cfd 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/phaseEquationsOfState/adiabaticPerfectFluid/adiabaticPerfectFluid.H +++ b/src/transportModels/twoPhaseProperties/twoPhaseMixture/twoPhaseMixture.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,90 +22,102 @@ License along with OpenFOAM. If not, see . Class - Foam::phaseEquationsOfState::adiabaticPerfectFluid + Foam::twoPhaseMixture Description - AdiabaticPerfectFluid phase density model. + A two-phase mixture model SourceFiles - adiabaticPerfectFluid.C + twoPhaseMixture.C \*---------------------------------------------------------------------------*/ -#ifndef adiabaticPerfectFluid_H -#define adiabaticPerfectFluid_H +#ifndef twoPhaseMixture_H +#define twoPhaseMixture_H -#include "phaseEquationOfState.H" -#include "dimensionedTypes.H" +#include "volFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace phaseEquationsOfState -{ /*---------------------------------------------------------------------------*\ - Class adiabaticPerfectFluid Declaration + Class twoPhaseMixture Declaration \*---------------------------------------------------------------------------*/ -class adiabaticPerfectFluid -: - public phaseEquationOfState +class twoPhaseMixture { - // Private data +protected: - //- Reference pressure - dimensionedScalar p0_; + // Protected data - //- Reference density - dimensionedScalar rho0_; + word phase1Name_; + word phase2Name_; - //- The isentropic exponent - dimensionedScalar gamma_; - - //- Pressure offset for a stiffened gas - dimensionedScalar B_; + volScalarField alpha1_; + volScalarField alpha2_; public: - //- Runtime type information - TypeName("adiabaticPerfectFluid"); - - // Constructors //- Construct from components - adiabaticPerfectFluid + twoPhaseMixture ( - const dictionary& dict + const fvMesh& mesh, + const dictionary& dict, + const word& alpha1Name = "alpha1", + const word& alpha2Name = "alpha2" ); //- Destructor - virtual ~adiabaticPerfectFluid(); + ~twoPhaseMixture() + {} // Member Functions - tmp rho - ( - const volScalarField& p, - const volScalarField& T - ) const; + const word phase1Name() const + { + return phase1Name_; + } - tmp psi - ( - const volScalarField& p, - const volScalarField& T - ) const; + const word phase2Name() const + { + return phase2Name_; + } + + //- Return the phase-fraction of phase 1 + const volScalarField& alpha1() const + { + return alpha1_; + } + + //- Return the phase-fraction of phase 1 + volScalarField& alpha1() + { + return alpha1_; + } + + //- Return the phase-fraction of phase 2 + const volScalarField& alpha2() const + { + return alpha2_; + } + + //- Return the phase-fraction of phase 2 + volScalarField& alpha2() + { + return alpha2_; + } }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace phaseEquationsOfState } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H index 8bfa031882..6780860b87 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H @@ -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 @@ -233,8 +233,7 @@ public: //- Return the effective turbulent temperature diffusivity for a patch virtual tmp kappaEff(const label patchI) const { - return - thermo().kappaEff(alphat()().boundaryField()[patchI], patchI); + return thermo().kappaEff(alphat(patchI), patchI); } //- Return the effective turbulent thermal diffusivity @@ -246,8 +245,7 @@ public: //- Return the effective turbulent thermal diffusivity for a patch virtual tmp alphaEff(const label patchI) const { - return - thermo().alphaEff(alphat()().boundaryField()[patchI], patchI); + return thermo().alphaEff(alphat(patchI), patchI); } //- Solve the turbulence equations and correct the turbulence viscosity diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H index 87d283b29a..ab7c3ef21b 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H @@ -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 @@ -212,6 +212,12 @@ public: //- Return the turbulence thermal diffusivity virtual tmp alphat() const = 0; + //- Return the turbulence thermal diffusivity for a patch + virtual tmp alphat(const label patchI) const + { + return alphat()().boundaryField()[patchI]; + } + //- Return the effective turbulence temperature diffusivity virtual tmp kappaEff() const = 0; diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/chemkin/therm.dat b/tutorials/lagrangian/sprayFoam/aachenBomb/chemkin/therm.dat new file mode 100644 index 0000000000..b0fcfd816f --- /dev/null +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/chemkin/therm.dat @@ -0,0 +1,23 @@ +THERMO ALL + 200.000 1000.000 6000.000 +C7H16 P10/85C 7.H 16. 0. 0.G 200.000 6000.000 1000. 1 + 2.04565203E+01 3.48575357E-02-1.09226846E-05 1.67201776E-09-9.81024850E-14 2 +-3.25556365E+04-8.04405017E+01 1.11532994E+01-9.49419773E-03 1.95572075E-04 3 +-2.49753662E-07 9.84877715E-11-2.67688904E+04-1.59096837E+01-2.25846141E+04 4 +O2 ATcT06O 2. 0. 0. 0.G 200.000 6000.000 1000. 1 + 3.45852381E+00 1.04045351E-03-2.79664041E-07 3.11439672E-11-8.55656058E-16 2 + 1.0dev 63E+04 4.15264119E+00 3.78535371E+00-3.21928540E-03 1.12323443E-05 3 +-1.17254068E-08 4.17659585E-12 1.02922572E+04 3.27320239E+00 1.13558105E+04 4 +N2 G 8/02N 2. 0. 0. 0.G 200.000 6000.000 1000. 1 + 2.95257637E+00 1.39690040E-03-4.92631603E-07 7.86010195E-11-4.60755204E-15 2 +-9.23948688E+02 5.87188762E+00 3.53100528E+00-1.23660988E-04-5.02999433E-07 3 + 2.43530612E-09-1.40881235E-12-1.04697628E+03 2.96747038E+00 0.00000000E+00 4 +CO2 L 7/88C 1O 2 0 0G 200.000 6000.000 1000. 1 + 0.46365111E+01 0.27414569E-02-0.99589759E-06 0.16038666E-09-0.91619857E-14 2 +-0.49024904E+05-0.19348955E+01 0.23568130E+01 0.89841299E-02-0.71220632E-05 3 + 0.24573008E-08-0.14288548E-12-0.48371971E+05 0.99009035E+01-0.47328105E+05 4 +H2O L 5/89H 2O 1 0 0G 200.000 6000.000 1000. 1 + 0.26770389E+01 0.29731816E-02-0.77376889E-06 0.94433514E-10-0.42689991E-14 2 +-0.29885894E+05 0.68825500E+01 0.41986352E+01-0.20364017E-02 0.65203416E-05 3 +-0.54879269E-08 0.17719680E-11-0.30293726E+05-0.84900901E+00-0.29084817E+05 4 +END diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/0/T.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/T.org similarity index 97% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/0/T.org rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/T.org index e5ac2eeb27..ce47bfaefc 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/0/T.org +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/T.org @@ -10,7 +10,7 @@ FoamFile version 2.0; format ascii; class volScalarField; - object alpha1; + object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/0/U b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/U similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/0/U rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/U diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/0/alphawater.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/alphawater.org similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/0/alphawater.org rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/alphawater.org diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/p.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/p.org new file mode 100644 index 0000000000..1e603613af --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/p.org @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + walls + { + type calculated; + value uniform 1e5; + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/0/p_rgh.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/p_rgh.org similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/0/p_rgh.org rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/0/p_rgh.org diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/Allclean b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allclean similarity index 67% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/Allclean rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allclean index d6e8dce5df..8821d7e1cc 100755 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/Allclean +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allclean @@ -3,4 +3,4 @@ cd ${0%/*} || exit 1 # run from this directory foamCleanTutorials cases rm -rf processor* -rm -rf 0/p_rgh.gz 0/alphawater.gz 0/T.gz +rm -rf 0/p_rgh.gz 0/p.gz 0/alphawater.gz 0/T*.gz diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/Allrun b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allrun similarity index 96% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/Allrun rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allrun index 76547516b7..ac803d715f 100755 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/Allrun +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/Allrun @@ -10,6 +10,7 @@ application=`getApplication` runApplication blockMesh cp 0/alphawater.org 0/alphawater cp 0/p_rgh.org 0/p_rgh +cp 0/p.org 0/p cp 0/T.org 0/T runApplication setFields runApplication $application diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/LESProperties b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/LESProperties similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/LESProperties rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/LESProperties diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/g b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/g similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/g rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/g diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/polyMesh/blockMeshDict b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/polyMesh/blockMeshDict rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/polyMesh/blockMeshDict diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/polyMesh/boundary b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/polyMesh/boundary similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/polyMesh/boundary rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/polyMesh/boundary diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/thermophysicalProperties b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/thermophysicalProperties similarity index 88% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/thermophysicalProperties rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/thermophysicalProperties index 3c26cf1692..9c14314414 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/thermophysicalProperties +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/thermophysicalProperties @@ -15,5 +15,10 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +phases (water air); + +pMin pMin [ 1 -1 -2 0 0 0 0 ] 10000; + +sigma sigma [ 1 0 -2 0 0 0 0 ] 0.07; // ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/thermophysicalPropertiesair b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/thermophysicalPropertiesair new file mode 100644 index 0000000000..e61009c10b --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/thermophysicalPropertiesair @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 28.9; + } + thermodynamics + { + Cp 1007; + Hf 0; + } + transport + { + mu 1.84e-05; + Pr 0.7; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/thermophysicalPropertieswater b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/thermophysicalPropertieswater new file mode 100644 index 0000000000..1ffcbddad7 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/thermophysicalPropertieswater @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectFluid; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 18.0; + } + equationOfState + { + R 3000; + rho0 1027; + } + thermodynamics + { + Cp 4195; + Hf 0; + } + transport + { + mu 3.645e-4; + Pr 2.289; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/turbulenceProperties b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/turbulenceProperties similarity index 97% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/turbulenceProperties rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/turbulenceProperties index a925d3cc2b..c2c3b28a1b 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/turbulenceProperties +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/constant/turbulenceProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LESModel; +simulationType laminar; // ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/controlDict b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/controlDict similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/controlDict rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/controlDict diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSchemes b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSchemes similarity index 96% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSchemes rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSchemes index 0c204f053f..469090b5e0 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSchemes +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSchemes @@ -35,7 +35,7 @@ divSchemes div(rho*phi,T) Gauss upwind; div(rho*phi,K) Gauss upwind; div(phi,k) Gauss vanLeer; - div((muEff*dev(T(grad(U))))) Gauss linear; + div((muEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSolution b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSolution similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSolution rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/fvSolution diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/setFieldsDict b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/setFieldsDict similarity index 95% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/setFieldsDict rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/setFieldsDict index 88198a4d24..f312b4e972 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/setFieldsDict +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D/system/setFieldsDict @@ -19,6 +19,7 @@ defaultFieldValues ( volScalarFieldValue alphawater 1 volScalarFieldValue p_rgh 1e5 + volScalarFieldValue p 1e5 volScalarFieldValue T 300 ); @@ -32,6 +33,7 @@ regions ( volScalarFieldValue alphawater 0 volScalarFieldValue p_rgh 1e6 + volScalarFieldValue p 1e6 volScalarFieldValue T 578 ); } diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/T.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/T.org similarity index 92% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/T.org rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/T.org index b40cb08478..ce47bfaefc 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/T.org +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/T.org @@ -10,7 +10,7 @@ FoamFile version 2.0; format ascii; class volScalarField; - object alpha1; + object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -24,6 +24,11 @@ boundaryField { type zeroGradient; } + + defaultFaces + { + type empty; + } } // ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/U b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/U similarity index 94% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/U rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/U index d37b2aea30..f267a870fc 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/U +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/U @@ -25,6 +25,10 @@ boundaryField type fixedValue; value uniform (0 0 0); } + frontAndBack + { + type empty; + } } // ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/alphawater.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/alphawater.org similarity index 94% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/alphawater.org rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/alphawater.org index 62be61f403..d90b720092 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/alphawater.org +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/alphawater.org @@ -24,6 +24,11 @@ boundaryField { type zeroGradient; } + + defaultFaces + { + type empty; + } } // ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/p.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/p.org new file mode 100644 index 0000000000..1e603613af --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/p.org @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + walls + { + type calculated; + value uniform 1e5; + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/p_rgh.org b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/p_rgh.org similarity index 94% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/p_rgh.org rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/p_rgh.org index 0394387374..396d380dad 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/p_rgh.org +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/0/p_rgh.org @@ -25,6 +25,11 @@ boundaryField type fixedFluxPressure; value uniform 1e5; } + + defaultFaces + { + type empty; + } } // ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/Allclean b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allclean similarity index 74% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/Allclean rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allclean index 539c772166..3ec07f62c5 100755 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/Allclean +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allclean @@ -3,6 +3,6 @@ cd ${0%/*} || exit 1 # run from this directory foamCleanTutorials cases rm -rf processor* -rm -rf 0/p_rgh 0/p_rgh.gz 0/alphawater 0/alphawater.gz 0/T.gz +rm -rf 0/p_rgh.gz 0/p.gz 0/alphawater.gz 0/T.gz # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/Allrun b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allrun similarity index 96% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/Allrun rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allrun index 0941ac4aa1..11b84a3251 100755 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/Allrun +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/Allrun @@ -10,6 +10,7 @@ application=`getApplication` runApplication blockMesh cp 0/alphawater.org 0/alphawater cp 0/p_rgh.org 0/p_rgh +cp 0/p.org 0/p cp 0/T.org 0/T runApplication setFields runApplication decomposePar diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/constant/LESProperties b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/LESProperties similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/constant/LESProperties rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/LESProperties diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/constant/g b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/g similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/constant/g rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/g diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/constant/polyMesh/blockMeshDict b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/constant/polyMesh/blockMeshDict rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/polyMesh/blockMeshDict diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/constant/polyMesh/boundary b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/polyMesh/boundary similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/constant/polyMesh/boundary rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/polyMesh/boundary diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/transportProperties b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/thermophysicalProperties similarity index 80% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/transportProperties rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/thermophysicalProperties index 78f85f47a2..9c14314414 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/constant/transportProperties +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/thermophysicalProperties @@ -11,29 +11,14 @@ FoamFile format ascii; class dictionary; location "constant"; - object transportProperties; + object thermophysicalProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // phases (water air); -water -{ - transportModel Newtonian; - nu 1e-06; - rho 1000; -} - -air -{ - transportModel Newtonian; - nu 1.589e-05; - rho 1; -} - pMin pMin [ 1 -1 -2 0 0 0 0 ] 10000; sigma sigma [ 1 0 -2 0 0 0 0 ] 0.07; - // ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/thermophysicalPropertiesair b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/thermophysicalPropertiesair new file mode 100644 index 0000000000..e61009c10b --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/thermophysicalPropertiesair @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 28.9; + } + thermodynamics + { + Cp 1007; + Hf 0; + } + transport + { + mu 1.84e-05; + Pr 0.7; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/thermophysicalPropertieswater b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/thermophysicalPropertieswater new file mode 100644 index 0000000000..1ffcbddad7 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/thermophysicalPropertieswater @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectFluid; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 18.0; + } + equationOfState + { + R 3000; + rho0 1027; + } + thermodynamics + { + Cp 4195; + Hf 0; + } + transport + { + mu 3.645e-4; + Pr 2.289; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/constant/transportProperties b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/transportProperties similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/constant/transportProperties rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/transportProperties diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/constant/turbulenceProperties b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/turbulenceProperties similarity index 97% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/constant/turbulenceProperties rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/turbulenceProperties index a925d3cc2b..c2c3b28a1b 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/constant/turbulenceProperties +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/constant/turbulenceProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType LESModel; +simulationType laminar; // ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/controlDict b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/controlDict similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/controlDict rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/controlDict diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/decomposeParDict b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/decomposeParDict similarity index 100% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/decomposeParDict rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/decomposeParDict diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSchemes b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSchemes similarity index 94% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSchemes rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSchemes index 903d94d30c..469090b5e0 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSchemes +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSchemes @@ -33,8 +33,9 @@ divSchemes div(phid1,p_rgh) Gauss upwind; div(phid2,p_rgh) Gauss upwind; div(rho*phi,T) Gauss upwind; + div(rho*phi,K) Gauss upwind; div(phi,k) Gauss vanLeer; - div((muEff*dev(T(grad(U))))) Gauss linear; + div((muEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSolution b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSolution similarity index 99% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSolution rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSolution index 4618974546..9066c1c700 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSolution +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/fvSolution @@ -39,7 +39,7 @@ solvers maxIter 100; } - "(rho|rhoFinal)" + ".*(rho|rhoFinal)" { solver diagonal; } diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/setFieldsDict b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/setFieldsDict similarity index 95% rename from tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/setFieldsDict rename to tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/setFieldsDict index ec31deae03..dc90a362c0 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/setFieldsDict +++ b/tutorials/multiphase/compressibleInterFoam/laminar/depthCharge3D/system/setFieldsDict @@ -19,6 +19,7 @@ defaultFieldValues ( volScalarFieldValue alphawater 1 volScalarFieldValue p_rgh 1e5 + volScalarFieldValue p 1e5 volScalarFieldValue T 300 ); @@ -32,6 +33,7 @@ regions ( volScalarFieldValue alphawater 0 volScalarFieldValue p_rgh 1e6 + volScalarFieldValue p 1e6 volScalarFieldValue T 578 ); } diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/constant/thermophysicalPropertieswater b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/constant/thermophysicalPropertieswater index 672b24a98b..43cb59fafa 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/constant/thermophysicalPropertieswater +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/constant/thermophysicalPropertieswater @@ -31,11 +31,12 @@ mixture specie { nMoles 1; - molWeight 28.9; + molWeight 18; } equationOfState { rho0 1027; + R 3000; } thermodynamics { diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/constant/thermophysicalProperties2 b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/constant/thermophysicalProperties2 index 672b24a98b..43cb59fafa 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/constant/thermophysicalProperties2 +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/constant/thermophysicalProperties2 @@ -31,11 +31,12 @@ mixture specie { nMoles 1; - molWeight 28.9; + molWeight 18; } equationOfState { rho0 1027; + R 3000; } thermodynamics {