OpenFOAM README for version dev
+
+
+
+
+
+
OpenFOAM README for version 2.2.0
+Table of Contents
-
-
- 1 About OpenFOAM -
- 2 Copyright -
- 3 Download and installation instructions -
- 4 Release notes -
- 5 Documentation -
- 6 Support and development contracts -
- 7 Reporting Bugs in OpenFOAM +
- 1 About OpenFOAM +
- 2 Copyright +
- 3 Download and installation instructions +
- 4 Release notes +
- 5 Documentation +
- 6 Support and development contracts +
- 7 Reporting Bugs in OpenFOAM
-
1 About OpenFOAM
+1 About OpenFOAM
OpenFOAM is a free, open source computational fluid dynamcis (CFD) software @@ -114,7 +125,7 @@ lang="en" xml:lang="en">
-
2 Copyright
+2 Copyright
OpenFOAM is free software: you can redistribute it and/or modify it under the @@ -129,7 +140,7 @@ lang="en" xml:lang="en">
-
3 Download and installation instructions
+3 Download and installation instructions
-
@@ -144,17 +155,17 @@ lang="en" xml:lang="en">
-
4 Release notes
+4 Release notes
-
5 Documentation
+5 Documentation
http://www.OpenFOAM.com/docs @@ -164,7 +175,7 @@ lang="en" xml:lang="en">
-
-
+
+
diff --git a/README.org b/README.org
index c107d87870..bae6792242 100644
--- a/README.org
+++ b/README.org
@@ -1,11 +1,11 @@
# -*- mode: org; -*-
#
-#+TITLE: OpenFOAM README for version dev
+#+TITLE: OpenFOAM README for version 2.2.0
#+AUTHOR: The OpenFOAM Foundation
-#+DATE: 15th August 2011
+#+DATE: 11th January 2013
#+LINK: http://www.openfoam.org
#+OPTIONS: author:nil ^:{}
-# Copyright (c) 2011 OpenFOAM Foundation.
+# Copyright (c) 2013 OpenFOAM Foundation.
* About OpenFOAM
OpenFOAM is a free, open source computational fluid dynamcis (CFD) software
@@ -28,7 +28,7 @@
[[http://www.OpenFOAM.org/git.php]]
* Release notes
- [[http://www.OpenFOAM.com/version2.0.0]]
+ [[http://www.OpenFOAM.org/version2.2.0]]
* Documentation
[[http://www.OpenFOAM.com/docs]]
diff --git a/applications/solvers/basic/potentialFoam/Make/options b/applications/solvers/basic/potentialFoam/Make/options
index 725122ea1d..159afb0f46 100644
--- a/applications/solvers/basic/potentialFoam/Make/options
+++ b/applications/solvers/basic/potentialFoam/Make/options
@@ -1,4 +1,11 @@
EXE_INC = \
- -I$(LIB_SRC)/finiteVolume/lnInclude
+ -I$(LIB_SRC)/finiteVolume/lnInclude \
+ -I$(LIB_SRC)/meshTools/lnInclude \
+ -I$(LIB_SRC)/fvOptions/lnInclude \
+ -I$(LIB_SRC)/sampling/lnInclude
-EXE_LIBS = -lfiniteVolume
+EXE_LIBS = \
+ -lfiniteVolume \
+ -lmeshTools \
+ -lfvOptions \
+ -lsampling
diff --git a/applications/solvers/basic/potentialFoam/potentialFoam.C b/applications/solvers/basic/potentialFoam/potentialFoam.C
index e968fa5c16..33931f051e 100644
--- a/applications/solvers/basic/potentialFoam/potentialFoam.C
+++ b/applications/solvers/basic/potentialFoam/potentialFoam.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
@@ -31,7 +31,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
-
+#include "fvIOoptionList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -49,17 +49,20 @@ int main(int argc, char *argv[])
#include "createMesh.H"
#include "readControls.H"
#include "createFields.H"
+ #include "createFvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< nl << "Calculating potential flow" << endl;
// Since solver contains no time loop it would never execute
- // function objects so do it ourselves.
+ // function objects so do it ourselves
runTime.functionObjects().start();
adjustPhi(phi, U, p);
+ fvOptions.relativeFlux(phi);
+
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
@@ -87,6 +90,8 @@ int main(int argc, char *argv[])
}
}
+ fvOptions.absoluteFlux(phi);
+
Info<< "continuity error = "
<< mag(fvc::div(phi))().weightedAverage(mesh.V()).value()
<< endl;
diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C
index fb61460fac..12cfba078b 100644
--- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C
+++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.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
@@ -116,7 +116,7 @@ void PDRkEpsilon::correct()
}
tmp tgradU = fvc::grad(U_);
- volScalarField G(type() + ".G", mut_*(tgradU() && dev(twoSymm(tgradU()))));
+ volScalarField G(GName(), mut_*(tgradU() && dev(twoSymm(tgradU()))));
tgradU.clear();
// Update espsilon and G at the wall
diff --git a/applications/solvers/combustion/chemFoam/readInitialConditions.H b/applications/solvers/combustion/chemFoam/readInitialConditions.H
index d929b14128..b25fd944c5 100644
--- a/applications/solvers/combustion/chemFoam/readInitialConditions.H
+++ b/applications/solvers/combustion/chemFoam/readInitialConditions.H
@@ -15,15 +15,15 @@
}
label nSpecie = Y.size();
- PtrList specieData(Y.size());
+ PtrList specieData(Y.size());
forAll(specieData, i)
{
specieData.set
(
i,
- new gasThermoPhysics
+ new gasHThermoPhysics
(
- dynamic_cast&>
+ dynamic_cast&>
(thermo).speciesData()[i]
)
);
diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H
index 3fb6dfe45e..7a5c717cff 100644
--- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H
+++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/pEqn.H
@@ -27,7 +27,7 @@
fvScalarMatrix pDDtEqn
(
fvc::ddt(rho) + fvc::div(phiHbyA)
- + correction(fvm::ddt(psi, p) + fvm::div(phid, p))
+ + correction(psi*fvm::ddt(p) + fvm::div(phid, p))
);
while (pimple.correctNonOrthogonal())
diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C
index 2b04637b04..71662dec34 100644
--- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C
+++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.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
@@ -185,12 +185,10 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
dimensionedScalar Pr
(
- dimensionedScalar::lookupOrDefault
- (
- "Pr",
- thermophysicalProperties,
- 1.0
- )
+ "Pr",
+ dimless,
+ thermophysicalProperties.subDict("mixture").subDict("transport")
+ .lookup("Pr")
);
Field C2
diff --git a/applications/solvers/compressible/rhoCentralFoam/readThermophysicalProperties.H b/applications/solvers/compressible/rhoCentralFoam/readThermophysicalProperties.H
deleted file mode 100644
index e0b16f0f39..0000000000
--- a/applications/solvers/compressible/rhoCentralFoam/readThermophysicalProperties.H
+++ /dev/null
@@ -1,23 +0,0 @@
-Info<< "Reading thermophysicalProperties\n" << endl;
-
-// Pr defined as a separate constant to enable calculation of k, currently
-// inaccessible through thermo
-IOdictionary thermophysicalProperties
-(
- IOobject
- (
- "thermophysicalProperties",
- runTime.constant(),
- mesh,
- IOobject::MUST_READ_IF_MODIFIED,
- IOobject::NO_WRITE
- )
-);
-
-dimensionedScalar Pr
-(
- "Pr",
- dimless,
- thermophysicalProperties.subDict("mixture").subDict("transport")
- .lookup("Pr")
-);
diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C
index 0d69256d21..a428253421 100644
--- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C
+++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.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
@@ -46,7 +46,6 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
- #include "readThermophysicalProperties.H"
#include "readTimeControls.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -166,7 +165,6 @@ int main(int argc, char *argv[])
mesh.movePoints(motionPtr->newPoints());
phi = aphiv_pos*rho_pos + aphiv_neg*rho_neg;
- Info<< phi.boundaryField()[0] << endl;
surfaceVectorField phiUp
(
@@ -236,13 +234,10 @@ int main(int argc, char *argv[])
if (!inviscid)
{
- volScalarField k("k", thermo.Cp()*muEff/Pr);
solve
(
fvm::ddt(rho, e) - fvc::ddt(rho, e)
- fvm::laplacian(turbulence->alphaEff(), e)
- + fvc::laplacian(turbulence->alpha(), e)
- - fvc::laplacian(k, T)
);
thermo.correct();
rhoE = rho*(e + 0.5*magSqr(U));
diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C
index 84a122d0dd..c0b4b73afa 100644
--- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C
+++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.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
@@ -45,7 +45,6 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
- #include "readThermophysicalProperties.H"
#include "readTimeControls.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H
index 8a83efdd86..7d843b62e0 100644
--- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H
+++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H
@@ -5,11 +5,10 @@ rho.relax();
volScalarField rAU(1.0/UEqn().A());
volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1()));
-
volVectorField HbyA("HbyA", U);
-HbyA = rAU*(UEqn() == fvOptions(rho, U))().H();
+HbyA = rAU*UEqn().H();
-if (pimple.nCorrPIMPLE() <= 1)
+if (pimple.nCorrPISO() <= 1)
{
UEqn.clear();
}
@@ -26,6 +25,8 @@ if (pimple.transonic())
)
);
+ fvOptions.relativeFlux(fvc::interpolate(psi), phid);
+
surfaceScalarField phic
(
"phic",
@@ -48,12 +49,9 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name())
);
- // Relax the pressure equation to maintain diagonal dominance
- pEqn.relax();
-
fvOptions.constrain(pEqn);
- pEqn.solve();
+ pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
@@ -73,6 +71,8 @@ else
)
);
+ fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA);
+
phiHbyA += fvc::interpolate(rho*(rAtU - rAU))*fvc::snGrad(p)*mesh.magSf();
HbyA -= (rAU - rAtU)*fvc::grad(p);
@@ -91,7 +91,7 @@ else
fvOptions.constrain(pEqn);
- pEqn.solve();
+ pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
diff --git a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H
index 61917fcefd..0f5bbdb162 100644
--- a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H
+++ b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H
@@ -1,9 +1,4 @@
{
- rho = thermo.rho();
- rho = max(rho, rhoMin);
- rho = min(rho, rhoMax);
- rho.relax();
-
volScalarField rAU(1.0/UEqn().A());
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H
index 9398c3e8d0..b4c7207138 100644
--- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H
+++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/UEqn.H
@@ -4,12 +4,12 @@
(
fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
+ ==
+ fvOptions(rho, U)
);
UEqn().relax();
- mrfZones.addCoriolis(rho, UEqn());
-
// Include the porous media resistance and solve the momentum equation
// either implicit in the tensorial resistance or transport using by
// including the spherical part of the resistance in the momentum diagonal
@@ -30,7 +30,7 @@
for (int UCorr=0; UCorrnut()/Prt;
- kappat.correctBoundaryConditions();
+ alphat = turbulence->nut()/Prt;
+ alphat.correctBoundaryConditions();
- volScalarField kappaEff("kappaEff", turbulence->nu()/Pr + kappat);
+ volScalarField alphaEff("alphaEff", turbulence->nu()/Pr + alphat);
fvScalarMatrix TEqn
(
fvm::ddt(T)
+ fvm::div(phi, T)
- - fvm::laplacian(kappaEff, T)
+ - fvm::laplacian(alphaEff, T)
+ ==
+ radiation->ST(rhoCpRef, T)
);
TEqn.relax();
TEqn.solve();
+ radiation->correct();
+
rhok = 1.0 - beta*(T - TRef);
}
diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C
index 126e10b337..65dda0653e 100644
--- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C
+++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C
@@ -49,6 +49,7 @@ Description
#include "singlePhaseTransportModel.H"
#include "RASModel.H"
#include "pimpleControl.H"
+#include "radiationModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -59,6 +60,7 @@ int main(int argc, char *argv[])
#include "createMesh.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
+ #include "createIncompressibleRadiationModel.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"
#include "CourantNo.H"
diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H
index 342af079d8..3609fe66fa 100644
--- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H
+++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H
@@ -65,12 +65,12 @@
);
// kinematic turbulent thermal thermal conductivity m2/s
- Info<< "Reading field kappat\n" << endl;
- volScalarField kappat
+ Info<< "Reading field alphat\n" << endl;
+ volScalarField alphat
(
IOobject
(
- "kappat",
+ "alphat",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
@@ -116,4 +116,3 @@
pRefValue - getRefCellValue(p, pRefCell)
);
}
-
diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H
index 76adf004cb..a0c5d24b2b 100644
--- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H
+++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H
@@ -1,13 +1,13 @@
{
- kappat = turbulence->nut()/Prt;
- kappat.correctBoundaryConditions();
+ alphat = turbulence->nut()/Prt;
+ alphat.correctBoundaryConditions();
- volScalarField kappaEff("kappaEff", turbulence->nu()/Pr + kappat);
+ volScalarField alphaEff("alphaEff", turbulence->nu()/Pr + alphat);
fvScalarMatrix TEqn
(
fvm::div(phi, T)
- - fvm::laplacian(kappaEff, T)
+ - fvm::laplacian(alphaEff, T)
);
TEqn.relax();
diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H
index 477a322833..6d7fd8d823 100644
--- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H
+++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H
@@ -65,12 +65,12 @@
);
// kinematic turbulent thermal thermal conductivity m2/s
- Info<< "Reading field kappat\n" << endl;
- volScalarField kappat
+ Info<< "Reading field alphat\n" << endl;
+ volScalarField alphat
(
IOobject
(
- "kappat",
+ "alphat",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H
index ee2a95f208..b6cf96b5b0 100644
--- a/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H
+++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H
@@ -17,7 +17,8 @@
)
- fvm::laplacian(turbulence->alphaEff(), he)
==
- fvOptions(rho, he)
+ radiation->Sh(thermo)
+ + fvOptions(rho, he)
);
EEqn.relax();
@@ -29,4 +30,5 @@
fvOptions.correct(he);
thermo.correct();
+ radiation->correct();
}
diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C
index 3d2c18e668..67df5b61e0 100644
--- a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C
+++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C
@@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see .
Application
- buoyantSimpleRadiationFoam
+ buoyantSimpleFoam
Description
Steady-state solver for buoyant, turbulent flow of compressible fluids,
@@ -31,7 +31,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
-#include "psiThermo.H"
+#include "rhoThermo.H"
#include "RASModel.H"
#include "radiationModel.H"
#include "simpleControl.H"
diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H
index bb7a65cb1d..7cee2dc4ed 100644
--- a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H
+++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H
@@ -1,10 +1,7 @@
Info<< "Reading thermophysical properties\n" << endl;
- autoPtr pThermo
- (
- psiThermo::New(mesh)
- );
- psiThermo& thermo = pThermo();
+ autoPtr pThermo(rhoThermo::New(mesh));
+ rhoThermo& thermo = pThermo();
thermo.validate(args.executable(), "h", "e");
volScalarField rho
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options
index 06126f0bf8..94dd40ce6b 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options
@@ -11,9 +11,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
- -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
- -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude
@@ -25,6 +23,7 @@ EXE_LIBS = \
-lspecie \
-lcompressibleTurbulenceModel \
-lcompressibleRASModels \
+ -lcompressibleLESModels \
-lmeshTools \
-lfiniteVolume \
-lradiationModels \
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C
index 48b28a07e4..5297be327f 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C
@@ -40,13 +40,14 @@ Description
#include "rhoThermo.H"
#include "turbulenceModel.H"
#include "fixedGradientFvPatchFields.H"
+#include "zeroGradientFvPatchFields.H"
#include "regionProperties.H"
#include "compressibleCourantNo.H"
#include "solidRegionDiffNo.H"
#include "solidThermo.H"
#include "radiationModel.H"
#include "fvIOoptionList.H"
-
+#include "coordinateSystem.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C
index d076652a1d..a3615c4309 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/chtMultiRegionSimpleFoam.C
@@ -37,6 +37,7 @@ Description
#include "solidThermo.H"
#include "radiationModel.H"
#include "fvIOoptionList.H"
+#include "coordinateSystem.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/solveSolid.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/solveSolid.H
index 7573002af5..93f7146730 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/solveSolid.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/solveSolid.H
@@ -3,7 +3,9 @@
{
fvScalarMatrix hEqn
(
- - fvm::laplacian(betav*alpha, h, "laplacian(alpha,h)")
+ thermo.isotropic()
+ ? -fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")
+ : -fvm::laplacian(betav*tAnialpha(), h, "laplacian(alpha,h)")
+ fvOptions(rho, h)
);
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H
index df3915980b..703ed6e4c2 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H
@@ -1,4 +1,5 @@
// Initialise solid field pointer lists
+ PtrList coordinates(solidRegions.size());
PtrList thermos(solidRegions.size());
PtrList radiations(solidRegions.size());
PtrList solidHeatSources(solidRegions.size());
@@ -23,6 +24,16 @@
new fv::IOoptionList(solidRegions[i])
);
+ if (!thermos[i].isotropic())
+ {
+ Info<< " Adding coordinateSystems\n" << endl;
+ coordinates.set
+ (
+ i,
+ coordinateSystem::New(solidRegions[i], thermos[i])
+ );
+ }
+
IOobject betavSolidIO
(
"betavSolid",
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H
index ad8894a631..37eea84e92 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/setRegionSolidFields.H
@@ -8,10 +8,36 @@
tmp tcp = thermo.Cp();
const volScalarField& cp = tcp();
- tmp talpha = thermo.alpha();
- const volScalarField& alpha = talpha();
- tmp tkappa = thermo.kappa();
- const volScalarField& kappa = tkappa();
+ tmp tAnialpha;
+
+ if (!thermo.isotropic())
+ {
+ tmp tkappaByCp = thermo.Kappa()/cp;
+
+ const coordinateSystem& coodSys = coordinates[i];
+ tAnialpha =
+ tmp
+ (
+ new volSymmTensorField
+ (
+ IOobject
+ (
+ "Anialpha",
+ runTime.timeName(),
+ mesh,
+ IOobject::NO_READ,
+ IOobject::NO_WRITE
+ ),
+ mesh,
+ tkappaByCp().dimensions(),
+ zeroGradientFvPatchVectorField::typeName
+ )
+ );
+
+ volSymmTensorField& Anialpha = tAnialpha();
+ Anialpha.internalField() = coodSys.R().transformVector(tkappaByCp());
+ Anialpha.correctBoundaryConditions();
+ }
volScalarField& h = thermo.he();
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffNo.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffNo.C
index 437ea78327..0753cd3163 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffNo.C
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffNo.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
@@ -56,38 +56,4 @@ Foam::scalar Foam::solidRegionDiffNo
return DiNum;
}
-
-Foam::scalar Foam::solidRegionDiffNo
-(
- const fvMesh& mesh,
- const Time& runTime,
- const volScalarField& Cprho,
- const volSymmTensorField& kappadirectional
-)
-{
- scalar DiNum = 0.0;
- scalar meanDiNum = 0.0;
-
- volScalarField kappa(mag(kappadirectional));
-
- //- Take care: can have fluid domains with 0 cells so do not test for
- // zero internal faces.
- surfaceScalarField kapparhoCpbyDelta
- (
- mesh.surfaceInterpolation::deltaCoeffs()
- * fvc::interpolate(kappa)
- / fvc::interpolate(Cprho)
- );
-
- DiNum = gMax(kapparhoCpbyDelta.internalField())*runTime.deltaT().value();
-
- meanDiNum = (average(kapparhoCpbyDelta)).value()*runTime.deltaT().value();
-
- Info<< "Region: " << mesh.name() << " Diffusion Number mean: " << meanDiNum
- << " max: " << DiNum << endl;
-
- return DiNum;
-}
-
-
// ************************************************************************* //
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffNo.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffNo.H
index cb4dd30b6a..797bb765a0 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffNo.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffNo.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
@@ -41,15 +41,6 @@ namespace Foam
const volScalarField& Cprho,
const volScalarField& kappa
);
-
- scalar solidRegionDiffNo
- (
- const fvMesh& mesh,
- const Time& runTime,
- const volScalarField& Cprho,
- const volSymmTensorField& kappa
- );
-
}
#endif
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H
index 878780baf1..a7a65b17bd 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H
@@ -1,18 +1,29 @@
- scalar DiNum = -GREAT;
+scalar DiNum = -GREAT;
- forAll(solidRegions, i)
+forAll(solidRegions, i)
+{
+ #include "setRegionSolidFields.H"
+
+ tmp magKappa;
+ if (thermo.isotropic())
{
- #include "setRegionSolidFields.H"
-
- DiNum = max
- (
- solidRegionDiffNo
- (
- solidRegions[i],
- runTime,
- rho*cp,
- kappa
- ),
- DiNum
- );
+ magKappa = thermo.kappa();
}
+ else
+ {
+ magKappa = mag(thermo.Kappa());
+ }
+
+ DiNum = max
+ (
+ solidRegionDiffNo
+ (
+ solidRegions[i],
+ runTime,
+ rho*cp,
+ magKappa()
+ ),
+ DiNum
+ );
+
+}
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H
index 86f23292e3..7bf7562d9b 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H
@@ -9,7 +9,11 @@ if (finalIter)
tmp hEqn
(
fvm::ddt(betav*rho, h)
- - fvm::laplacian(betav*alpha, h, "laplacian(alpha,h)")
+ - (
+ thermo.isotropic()
+ ? fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")
+ : fvm::laplacian(betav*tAnialpha(), h, "laplacian(alpha,h)")
+ )
==
fvOptions(rho, h)
);
diff --git a/applications/solvers/heatTransfer/thermoFoam/EEqn.H b/applications/solvers/heatTransfer/thermoFoam/EEqn.H
new file mode 100644
index 0000000000..51232bf0be
--- /dev/null
+++ b/applications/solvers/heatTransfer/thermoFoam/EEqn.H
@@ -0,0 +1,34 @@
+{
+ volScalarField& he = thermo.he();
+
+ fvScalarMatrix EEqn
+ (
+ fvm::ddt(rho, he) + fvm::div(phi, he)
+ + fvc::ddt(rho, K) + fvc::div(phi, K)
+ + (
+ he.name() == "e"
+ ? fvc::div
+ (
+ fvc::absolute(phi/fvc::interpolate(rho), U),
+ p,
+ "div(phiv,p)"
+ )
+ : -dpdt
+ )
+ - fvm::laplacian(alphaEff, he)
+ ==
+ radiation->Sh(thermo)
+ + fvOptions(rho, he)
+ );
+
+ EEqn.relax();
+
+ fvOptions.constrain(EEqn);
+
+ EEqn.solve();
+
+ fvOptions.correct(he);
+
+ thermo.correct();
+ radiation->correct();
+}
diff --git a/applications/solvers/heatTransfer/thermoFoam/Make/files b/applications/solvers/heatTransfer/thermoFoam/Make/files
new file mode 100644
index 0000000000..825ed0cba8
--- /dev/null
+++ b/applications/solvers/heatTransfer/thermoFoam/Make/files
@@ -0,0 +1,3 @@
+thermoFoam.C
+
+EXE = $(FOAM_APPBIN)/thermoFoam
diff --git a/applications/solvers/heatTransfer/thermoFoam/Make/options b/applications/solvers/heatTransfer/thermoFoam/Make/options
new file mode 100644
index 0000000000..14bd0d4d24
--- /dev/null
+++ b/applications/solvers/heatTransfer/thermoFoam/Make/options
@@ -0,0 +1,24 @@
+EXE_INC = \
+ -I$(LIB_SRC)/finiteVolume/lnInclude \
+ -I$(LIB_SRC)/sampling/lnInclude \
+ -I$(LIB_SRC)/meshTools/lnInclude \
+ -I$(LIB_SRC)/fvOptions/lnInclude \
+ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
+ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
+ -I$(LIB_SRC)/turbulenceModels \
+ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \
+ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
+ -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \
+ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude
+
+EXE_LIBS = \
+ -lfiniteVolume \
+ -lsampling \
+ -lmeshTools \
+ -lfvOptions \
+ -lfluidThermophysicalModels \
+ -lradiationModels \
+ -lspecie \
+ -lcompressibleTurbulenceModel \
+ -lcompressibleRASModels \
+ -lcompressibleLESModels
diff --git a/applications/solvers/heatTransfer/thermoFoam/createFields.H b/applications/solvers/heatTransfer/thermoFoam/createFields.H
new file mode 100644
index 0000000000..ffa6c3f3b5
--- /dev/null
+++ b/applications/solvers/heatTransfer/thermoFoam/createFields.H
@@ -0,0 +1,54 @@
+ Info<< "Reading thermophysical properties\n" << endl;
+
+ autoPtr pThermo(rhoThermo::New(mesh));
+ rhoThermo& thermo = pThermo();
+ thermo.validate(args.executable(), "h", "e");
+
+ volScalarField rho
+ (
+ IOobject
+ (
+ "rho",
+ runTime.timeName(),
+ mesh,
+ IOobject::NO_READ,
+ IOobject::NO_WRITE
+ ),
+ thermo.rho()
+ );
+
+ volScalarField& p = thermo.p();
+
+ Info<< "Reading field U\n" << endl;
+ volVectorField U
+ (
+ IOobject
+ (
+ "U",
+ runTime.timeName(),
+ mesh,
+ IOobject::MUST_READ,
+ IOobject::AUTO_WRITE
+ ),
+ mesh
+ );
+
+ #include "compressibleCreatePhi.H"
+
+ #include "setAlphaEff.H"
+
+ Info<< "Creating field dpdt\n" << endl;
+ volScalarField dpdt
+ (
+ IOobject
+ (
+ "dpdt",
+ runTime.timeName(),
+ mesh
+ ),
+ mesh,
+ dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
+ );
+
+ Info<< "Creating field kinetic energy K\n" << endl;
+ volScalarField K("K", 0.5*magSqr(U));
diff --git a/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H b/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H
new file mode 100644
index 0000000000..90b475794b
--- /dev/null
+++ b/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H
@@ -0,0 +1,93 @@
+ Info<< "Creating turbulence model\n" << endl;
+ tmp talphaEff;
+
+ IOobject turbulenceHeader
+ (
+ "turbulenceProperties",
+ runTime.constant(),
+ mesh,
+ IOobject::MUST_READ
+ );
+
+ IOobject RASHeader
+ (
+ "RASProperties",
+ runTime.constant(),
+ mesh,
+ IOobject::MUST_READ
+ );
+
+ IOobject LESHeader
+ (
+ "LESProperties",
+ runTime.constant(),
+ mesh,
+ IOobject::MUST_READ
+ );
+
+ if (turbulenceHeader.headerOk())
+ {
+ autoPtr turbulence
+ (
+ compressible::turbulenceModel::New
+ (
+ rho,
+ U,
+ phi,
+ thermo
+ )
+ );
+
+ talphaEff = turbulence->alphaEff();
+ }
+ else if (RASHeader.headerOk())
+ {
+ autoPtr turbulence
+ (
+ compressible::RASModel::New
+ (
+ rho,
+ U,
+ phi,
+ thermo
+ )
+ );
+
+ talphaEff = turbulence->alphaEff();
+ }
+ else if (LESHeader.headerOk())
+ {
+ autoPtr turbulence
+ (
+ compressible::LESModel::New
+ (
+ rho,
+ U,
+ phi,
+ thermo
+ )
+ );
+
+ talphaEff = turbulence->alphaEff();
+ }
+ else
+ {
+ talphaEff = tmp
+ (
+ new volScalarField
+ (
+ IOobject
+ (
+ "alphaEff",
+ runTime.timeName(),
+ mesh,
+ IOobject::NO_READ,
+ IOobject::NO_WRITE
+ ),
+ mesh,
+ dimensionedScalar("0", dimMass/dimLength/dimTime, 0.0)
+ )
+ );
+ }
+
+ const volScalarField& alphaEff = talphaEff();
diff --git a/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C b/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C
new file mode 100644
index 0000000000..f5f88232d2
--- /dev/null
+++ b/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C
@@ -0,0 +1,107 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / 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 .
+
+Application
+ thermoFoam
+
+Description
+ Evolves the thermodynamics on a forzen flow field
+
+\*---------------------------------------------------------------------------*/
+
+#include "fvCFD.H"
+#include "rhoThermo.H"
+#include "turbulenceModel.H"
+#include "RASModel.H"
+#include "LESModel.H"
+#include "radiationModel.H"
+#include "fvIOoptionList.H"
+#include "simpleControl.H"
+#include "pimpleControl.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+int main(int argc, char *argv[])
+{
+ #include "setRootCase.H"
+
+ #include "createTime.H"
+ #include "createMesh.H"
+ #include "createFields.H"
+ #include "createFvOptions.H"
+ #include "createRadiationModel.H"
+
+ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+ Info<< "\nEvolving thermodynamics\n" << endl;
+
+ if (mesh.solutionDict().found("SIMPLE"))
+ {
+ simpleControl simple(mesh);
+
+ while (simple.loop())
+ {
+ Info<< "Time = " << runTime.timeName() << nl << endl;
+
+ while (simple.correctNonOrthogonal())
+ {
+ #include "EEqn.H"
+ }
+
+ Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
+ << " ClockTime = " << runTime.elapsedClockTime() << " s"
+ << nl << endl;
+
+ runTime.write();
+ }
+ }
+ else
+ {
+ pimpleControl pimple(mesh);
+
+ while (runTime.run())
+ {
+ runTime++;
+
+ Info<< "Time = " << runTime.timeName() << nl << endl;
+
+ while (pimple.correctNonOrthogonal())
+ {
+ #include "EEqn.H"
+ }
+
+ Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
+ << " ClockTime = " << runTime.elapsedClockTime() << " s"
+ << nl << endl;
+
+ runTime.write();
+ }
+ }
+
+ Info<< "End\n" << endl;
+
+ return 0;
+}
+
+
+// ************************************************************************* //
diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H
index 6750d98f36..5aa6cef0b1 100644
--- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H
+++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/UrelEqn.H
@@ -5,12 +5,14 @@
+ fvm::div(phi, Urel)
+ turbulence->divDevReff(Urel)
+ SRF->Su()
+ ==
+ fvOptions(Urel)
);
UrelEqn().relax();
fvOptions.constrain(UrelEqn());
- solve(UrelEqn() == -fvc::grad(p) + fvOptions(Urel));
+ solve(UrelEqn() == -fvc::grad(p));
fvOptions.correct(Urel);
diff --git a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H
index 9b5b1a89a4..8aa20cd151 100644
--- a/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H
+++ b/applications/solvers/incompressible/pimpleFoam/SRFPimpleFoam/pEqn.H
@@ -1,6 +1,6 @@
volScalarField rAUrel(1.0/UrelEqn().A());
volVectorField HbyA("HbyA", Urel);
-HbyA = rAUrel*(UrelEqn() == fvOptions(Urel))().H();
+HbyA = rAUrel*UrelEqn().H();
if (pimple.nCorrPISO() <= 1)
{
diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/UEqn.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/UEqn.H
index 7a7d604b48..eaaa3e60c9 100644
--- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/UEqn.H
+++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/UEqn.H
@@ -5,6 +5,8 @@ tmp UEqn
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ ==
+ fvOptions(U)
);
UEqn().relax();
@@ -15,7 +17,7 @@ rAU = 1.0/UEqn().A();
if (pimple.momentumPredictor())
{
- solve(UEqn() == -fvc::grad(p) + fvOptions(U));
+ solve(UEqn() == -fvc::grad(p));
fvOptions.correct(U);
}
diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/correctPhi.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/correctPhi.H
index 117790446e..9bed803d1e 100644
--- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/correctPhi.H
+++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/correctPhi.H
@@ -68,4 +68,6 @@
}
}
+phi.oldTime() = phi;
+
#include "continuityErrs.H"
diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H
index 217304168b..4c48bb2a18 100644
--- a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H
+++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H
@@ -1,5 +1,5 @@
volVectorField HbyA("HbyA", U);
-HbyA = rAU*(UEqn() == fvOptions(U))().H();
+HbyA = rAU*UEqn().H();
if (pimple.nCorrPISO() <= 1)
{
diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/UEqn.H b/applications/solvers/incompressible/potentialFreeSurfaceFoam/UEqn.H
index 4c84e256c0..69a95ab712 100644
--- a/applications/solvers/incompressible/potentialFreeSurfaceFoam/UEqn.H
+++ b/applications/solvers/incompressible/potentialFreeSurfaceFoam/UEqn.H
@@ -3,6 +3,8 @@ tmp UEqn
fvm::ddt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ ==
+ fvOptions(U)
);
@@ -12,7 +14,7 @@ fvOptions.constrain(UEqn());
if (pimple.momentumPredictor())
{
- solve(UEqn() == -fvc::grad(p_gh) + fvOptions(U));
+ solve(UEqn() == -fvc::grad(p_gh));
fvOptions.correct(U);
}
diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/pEqn.H b/applications/solvers/incompressible/potentialFreeSurfaceFoam/pEqn.H
index 780bb28022..6f6b9834e4 100644
--- a/applications/solvers/incompressible/potentialFreeSurfaceFoam/pEqn.H
+++ b/applications/solvers/incompressible/potentialFreeSurfaceFoam/pEqn.H
@@ -2,7 +2,7 @@ volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rAUf("Dp", fvc::interpolate(rAU));
volVectorField HbyA("HbyA", U);
-HbyA = rAU*(UEqn() == fvOptions(U))().H();
+HbyA = rAU*UEqn().H();
if (pimple.nCorrPISO() <= 1)
{
@@ -18,6 +18,7 @@ surfaceScalarField phiHbyA
adjustPhi(phiHbyA, U, p_gh);
+fvOptions.relativeFlux(phiHbyA);
// Non-orthogonal pressure corrector loop
while (pimple.correctNonOrthogonal())
diff --git a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C
index c4503cc101..1425a3e5f2 100644
--- a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C
+++ b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C
@@ -36,7 +36,6 @@ Description
#include "basicReactingMultiphaseCloud.H"
#include "rhoCombustionModel.H"
#include "radiationModel.H"
-#include "IOporosityModelList.H"
#include "fvIOoptionList.H"
#include "SLGThermo.H"
#include "pimpleControl.H"
diff --git a/applications/solvers/multiphase/cavitatingFoam/Make/options b/applications/solvers/multiphase/cavitatingFoam/Make/options
index 0f2981ab4c..5efeeb355d 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/twoPhaseMixture/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..34590e930b 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/twoPhaseMixture/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/cavitatingDyMFoam/pEqn.H b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H
index a4e9e0b40f..3c4cbb0d32 100644
--- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H
+++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H
@@ -4,8 +4,8 @@
p =
(
rho
- - (1.0 - gamma)*rhol0
- - ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
+ - gamma2*rhol0
+ - ((gamma*psiv + gamma2*psil) - psi)*pSat
)/psi;
}
@@ -57,8 +57,8 @@
p =
(
rho
- - (1.0 - gamma)*rhol0
- - ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
+ - gamma2*rhol0
+ - ((gamma*psiv + gamma2*psil) - psi)*pSat
)/psi;
p.correctBoundaryConditions();
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/continuityErrs.H b/applications/solvers/multiphase/cavitatingFoam/continuityErrs.H
index c5e93c7efb..ce618ee40f 100644
--- a/applications/solvers/multiphase/cavitatingFoam/continuityErrs.H
+++ b/applications/solvers/multiphase/cavitatingFoam/continuityErrs.H
@@ -1,5 +1,5 @@
{
- volScalarField thermoRho = psi*p + (1.0 - gamma)*rhol0;
+ volScalarField thermoRho = psi*p + gamma2*rhol0;
dimensionedScalar totalMass = fvc::domainIntegrate(rho);
diff --git a/applications/solvers/multiphase/cavitatingFoam/createFields.H b/applications/solvers/multiphase/cavitatingFoam/createFields.H
index dbacf1dbd3..8958dc3c5e 100644
--- a/applications/solvers/multiphase/cavitatingFoam/createFields.H
+++ b/applications/solvers/multiphase/cavitatingFoam/createFields.H
@@ -44,11 +44,13 @@
Info<< "Reading transportProperties\n" << endl;
- twoPhaseMixture twoPhaseProperties(U, phiv, "gamma");
+ incompressibleTwoPhaseMixture twoPhaseProperties(U, phiv, "gamma");
volScalarField& gamma(twoPhaseProperties.alpha1());
gamma.oldTime();
+ volScalarField& gamma2(twoPhaseProperties.alpha2());
+
Info<< "Creating compressibilityModel\n" << endl;
autoPtr psiModel =
barotropicCompressibilityModel::New
@@ -62,8 +64,8 @@
rho == max
(
psi*p
- + (1.0 - gamma)*rhol0
- + ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat,
+ + gamma2*rhol0
+ + ((gamma*psiv + gamma2*psil) - psi)*pSat,
rhoMin
);
diff --git a/applications/solvers/multiphase/cavitatingFoam/gammaPsi.H b/applications/solvers/multiphase/cavitatingFoam/gammaPsi.H
index b259ddd322..4edda7336d 100644
--- a/applications/solvers/multiphase/cavitatingFoam/gammaPsi.H
+++ b/applications/solvers/multiphase/cavitatingFoam/gammaPsi.H
@@ -1,5 +1,6 @@
{
gamma = max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));
+ gamma2 = 1.0 - gamma;
Info<< "max-min gamma: " << max(gamma).value()
<< " " << min(gamma).value() << endl;
diff --git a/applications/solvers/multiphase/cavitatingFoam/pEqn.H b/applications/solvers/multiphase/cavitatingFoam/pEqn.H
index ea35f79fa1..b2c7d953b5 100644
--- a/applications/solvers/multiphase/cavitatingFoam/pEqn.H
+++ b/applications/solvers/multiphase/cavitatingFoam/pEqn.H
@@ -4,8 +4,8 @@
p =
(
rho
- - (1.0 - gamma)*rhol0
- - ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
+ - gamma2*rhol0
+ - ((gamma*psiv + gamma2*psil) - psi)*pSat
)/psi;
}
@@ -49,8 +49,8 @@
rho == max
(
psi*p
- + (1.0 - gamma)*rhol0
- + ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat,
+ + gamma2*rhol0
+ + ((gamma*psiv + gamma2*psil) - psi)*pSat,
rhoMin
);
@@ -59,8 +59,8 @@
p =
(
rho
- - (1.0 - gamma)*rhol0
- - ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat
+ - gamma2*rhol0
+ - ((gamma*psiv + gamma2*psil) - psi)*pSat
)/psi;
p.correctBoundaryConditions();
diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwclean b/applications/solvers/multiphase/compressibleInterFoam/Allwclean
index 2f4544cb4c..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 phaseEquationsOfState
+wclean libso twoPhaseMixtureThermo
wclean
wclean compressibleInterDyMFoam
diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwmake b/applications/solvers/multiphase/compressibleInterFoam/Allwmake
index b4b7f6ffa7..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 phaseEquationsOfState
+wmake libso twoPhaseMixtureThermo
wmake
wmake compressibleInterDyMFoam
diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/files b/applications/solvers/multiphase/compressibleInterFoam/Make/files
index 0e009f09bc..de5437219c 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/Make/files
+++ b/applications/solvers/multiphase/compressibleInterFoam/Make/files
@@ -1,4 +1,3 @@
-derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C
compressibleInterFoam.C
EXE = $(FOAM_APPBIN)/compressibleInterFoam
diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/Make/options
index 48c253b213..035116d2d5 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/Make/options
+++ b/applications/solvers/multiphase/compressibleInterFoam/Make/options
@@ -1,17 +1,19 @@
EXE_INC = \
- -I$(LIB_SRC)/transportModels \
- -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
+ -ItwoPhaseMixtureThermo \
+ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
+ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
- -IphaseEquationsOfState/lnInclude \
- -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
+ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
+ -ltwoPhaseMixtureThermo \
+ -lfluidThermophysicalModels \
+ -lspecie \
+ -ltwoPhaseMixture \
+ -ltwoPhaseProperties \
-linterfaceProperties \
- -ltwoPhaseInterfaceProperties \
- -lincompressibleTransportModels \
- -lphaseEquationsOfState \
- -lincompressibleTurbulenceModel \
- -lincompressibleRASModels \
- -lincompressibleLESModels \
+ -lcompressibleTurbulenceModel \
+ -lcompressibleRASModels \
+ -lcompressibleLESModels \
-lfiniteVolume
diff --git a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H
index 2605ce345a..d97e8b2a35 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H
+++ b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H
@@ -1,20 +1,21 @@
{
- volScalarField kByCv
- (
- "kByCv",
- (alpha1*k1/Cv1 + alpha2*k2/Cv2)
- + (alpha1*rho1 + alpha2*rho2)*turbulence->nut()
- );
-
- solve
+ fvScalarMatrix TEqn
(
fvm::ddt(rho, T)
+ fvm::div(rhoPhi, T)
- - fvm::laplacian(kByCv, T)
- + p*fvc::div(phi)*(alpha1/Cv1 + alpha2/Cv2)
+ - fvm::laplacian(twoPhaseProperties.alphaEff(turbulence->mut()), T)
+ + (
+ fvc::div(fvc::absolute(phi, U), p)
+ + fvc::ddt(rho, K) + fvc::div(rhoPhi, K)
+ )
+ *(
+ alpha1/twoPhaseProperties.thermo1().Cv()
+ + alpha2/twoPhaseProperties.thermo2().Cv()
+ )
);
- // Update compressibilities
- psi1 = eos1->psi(p, T);
- psi2 = eos2->psi(p, T);
+ TEqn.relax();
+ TEqn.solve();
+
+ twoPhaseProperties.correct();
}
diff --git a/applications/solvers/multiphase/compressibleInterFoam/UEqn.H b/applications/solvers/multiphase/compressibleInterFoam/UEqn.H
index 7cc250a66a..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();
@@ -22,4 +22,6 @@
) * mesh.magSf()
)
);
+
+ K = 0.5*magSqr(U);
}
diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options
index d4d0fa9b5a..cf9a1d85ec 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options
+++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options
@@ -1,24 +1,26 @@
EXE_INC = \
-I.. \
- -I$(LIB_SRC)/transportModels \
- -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
+ -I../twoPhaseMixtureThermo \
+ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
+ -I$(LIB_SRC)/transportModels/twoPhaseMixture/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 = \
+ -ltwoPhaseMixtureThermo \
+ -lfluidThermophysicalModels \
+ -lspecie \
+ -ltwoPhaseMixture \
+ -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 acf563fc8e..27d3b87cd1 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C
+++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.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
@@ -43,7 +43,7 @@ Description
#include "subCycle.H"
#include "interfaceProperties.H"
#include "twoPhaseMixture.H"
-#include "phaseEquationOfState.H"
+#include "twoPhaseMixtureThermo.H"
#include "turbulenceModel.H"
#include "pimpleControl.H"
diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/correctPhi.H b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/correctPhi.H
index 1d7b9ca624..513ef961bd 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/correctPhi.H
+++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/correctPhi.H
@@ -56,6 +56,8 @@
phi -= pcorrEqn.flux();
}
}
-
- #include "continuityErrs.H"
}
+
+phi.oldTime() = phi;
+
+#include "continuityErrs.H"
diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C
index 54c246f203..a42d911980 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C
+++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.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
@@ -38,9 +38,10 @@ Description
#include "fvCFD.H"
#include "MULES.H"
#include "subCycle.H"
+#include "rhoThermo.H"
#include "interfaceProperties.H"
#include "twoPhaseMixture.H"
-#include "phaseEquationOfState.H"
+#include "twoPhaseMixtureThermo.H"
#include "turbulenceModel.H"
#include "pimpleControl.H"
@@ -103,8 +104,6 @@ int main(int argc, char *argv[])
}
}
- rho = alpha1*rho1 + alpha2*rho2;
-
runTime.write();
Info<< "ExecutionTime = "
diff --git a/applications/solvers/multiphase/compressibleInterFoam/createFields.H b/applications/solvers/multiphase/compressibleInterFoam/createFields.H
index 1c22600170..c7289b23f9 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/createFields.H
+++ b/applications/solvers/multiphase/compressibleInterFoam/createFields.H
@@ -28,141 +28,20 @@
#include "createPhi.H"
- Info<< "Reading field T\n" << endl;
- volScalarField T
- (
- IOobject
- (
- "T",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::AUTO_WRITE
- ),
- mesh
- );
-
- volScalarField p
- (
- IOobject
- (
- "p",
- runTime.timeName(),
- mesh,
- IOobject::READ_IF_PRESENT,
- IOobject::AUTO_WRITE
- ),
- p_rgh
- );
-
-
- 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<< "Calculating phase-fraction alpha" << twoPhaseProperties.phase2Name()
- << nl << endl;
- volScalarField alpha2
- (
- "alpha" + twoPhaseProperties.phase2Name(),
- scalar(1) - alpha1
- );
+ Info<< "Reading thermophysical properties\n" << endl;
- dimensionedScalar k1
- (
- "k",
- dimensionSet(1, 1, -3, -1, 0),
- twoPhaseProperties.subDict
- (
- twoPhaseProperties.phase1Name()
- ).lookup("k")
- );
-
- dimensionedScalar k2
- (
- "k",
- dimensionSet(1, 1, -3, -1, 0),
- twoPhaseProperties.subDict
- (
- twoPhaseProperties.phase2Name()
- ).lookup("k")
- );
-
- dimensionedScalar Cv1
- (
- "Cv",
- dimensionSet(0, 2, -2, -1, 0),
- twoPhaseProperties.subDict
- (
- twoPhaseProperties.phase1Name()
- ).lookup("Cv")
- );
-
- dimensionedScalar Cv2
- (
- "Cv",
- dimensionSet(0, 2, -2, -1, 0),
- twoPhaseProperties.subDict
- (
- twoPhaseProperties.phase2Name()
- ).lookup("Cv")
- );
-
- autoPtr eos1
- (
- phaseEquationOfState::New
- (
- twoPhaseProperties.subDict
- (
- twoPhaseProperties.phase1Name()
- )
- )
- );
-
- autoPtr eos2
- (
- phaseEquationOfState::New
- (
- twoPhaseProperties.subDict
- (
- twoPhaseProperties.phase2Name()
- )
- )
- );
-
- volScalarField psi1
- (
- IOobject
- (
- "psi1",
- runTime.timeName(),
- mesh
- ),
- eos1->psi(p, T)
- );
- psi1.oldTime();
-
- volScalarField psi2
- (
- IOobject
- (
- "psi2",
- runTime.timeName(),
- mesh
- ),
- eos2->psi(p, T)
- );
- psi2.oldTime();
-
- dimensionedScalar pMin(twoPhaseProperties.lookup("pMin"));
-
- Info<< "Calculating field g.h\n" << endl;
- volScalarField gh("gh", g & mesh.C());
- surfaceScalarField ghf("ghf", g & mesh.Cf());
-
- volScalarField rho1("rho1", eos1->rho(p, T));
- volScalarField rho2("rho2", eos2->rho(p, T));
+ volScalarField& p = twoPhaseProperties.p();
+ volScalarField& T = twoPhaseProperties.T();
+ volScalarField& rho1 = twoPhaseProperties.thermo1().rho();
+ const volScalarField& psi1 = twoPhaseProperties.thermo1().psi();
+ volScalarField& rho2 = twoPhaseProperties.thermo2().rho();
+ const volScalarField& psi2 = twoPhaseProperties.thermo2().psi();
volScalarField rho
(
@@ -178,6 +57,12 @@
);
+ dimensionedScalar pMin(twoPhaseProperties.lookup("pMin"));
+
+ Info<< "Calculating field g.h\n" << endl;
+ volScalarField gh("gh", g & mesh.C());
+ surfaceScalarField ghf("ghf", g & mesh.Cf());
+
// Mass flux
// Initialisation does not matter because rhoPhi is reset after the
// alpha1 solution before it is used in the U equation.
@@ -202,8 +87,11 @@
// 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 kinetic energy K\n" << endl;
+ volScalarField K("K", 0.5*magSqr(U));
diff --git a/applications/solvers/multiphase/compressibleInterFoam/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C b/applications/solvers/multiphase/compressibleInterFoam/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C
deleted file mode 100644
index e6782e8b3a..0000000000
--- a/applications/solvers/multiphase/compressibleInterFoam/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C
+++ /dev/null
@@ -1,184 +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 "wallHeatTransferFvPatchScalarField.H"
-#include "addToRunTimeSelectionTable.H"
-#include "fvPatchFieldMapper.H"
-#include "volFields.H"
-
-// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
-
-Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField
-(
- const fvPatch& p,
- const DimensionedField& iF
-)
-:
- mixedFvPatchScalarField(p, iF),
- Tinf_(p.size(), 0.0),
- alphaWall_(p.size(), 0.0)
-{
- refValue() = 0.0;
- refGrad() = 0.0;
- valueFraction() = 0.0;
-}
-
-
-Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField
-(
- const wallHeatTransferFvPatchScalarField& ptf,
- const fvPatch& p,
- const DimensionedField& iF,
- const fvPatchFieldMapper& mapper
-)
-:
- mixedFvPatchScalarField(ptf, p, iF, mapper),
- Tinf_(ptf.Tinf_, mapper),
- alphaWall_(ptf.alphaWall_, mapper)
-{}
-
-
-Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField
-(
- const fvPatch& p,
- const DimensionedField& iF,
- const dictionary& dict
-)
-:
- mixedFvPatchScalarField(p, iF),
- Tinf_("Tinf", dict, p.size()),
- alphaWall_("alphaWall", dict, p.size())
-{
- refValue() = Tinf_;
- refGrad() = 0.0;
- valueFraction() = 0.0;
-
- if (dict.found("value"))
- {
- fvPatchField::operator=
- (
- scalarField("value", dict, p.size())
- );
- }
- else
- {
- evaluate();
- }
-}
-
-
-Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField
-(
- const wallHeatTransferFvPatchScalarField& tppsf
-)
-:
- mixedFvPatchScalarField(tppsf),
- Tinf_(tppsf.Tinf_),
- alphaWall_(tppsf.alphaWall_)
-{}
-
-
-Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField
-(
- const wallHeatTransferFvPatchScalarField& tppsf,
- const DimensionedField& iF
-)
-:
- mixedFvPatchScalarField(tppsf, iF),
- Tinf_(tppsf.Tinf_),
- alphaWall_(tppsf.alphaWall_)
-{}
-
-
-// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
-
-void Foam::wallHeatTransferFvPatchScalarField::autoMap
-(
- const fvPatchFieldMapper& m
-)
-{
- scalarField::autoMap(m);
- Tinf_.autoMap(m);
- alphaWall_.autoMap(m);
-}
-
-
-void Foam::wallHeatTransferFvPatchScalarField::rmap
-(
- const fvPatchScalarField& ptf,
- const labelList& addr
-)
-{
- mixedFvPatchScalarField::rmap(ptf, addr);
-
- const wallHeatTransferFvPatchScalarField& tiptf =
- refCast(ptf);
-
- Tinf_.rmap(tiptf.Tinf_, addr);
- alphaWall_.rmap(tiptf.alphaWall_, addr);
-}
-
-
-void Foam::wallHeatTransferFvPatchScalarField::updateCoeffs()
-{
- if (updated())
- {
- return;
- }
-
- const fvPatchScalarField& Cpw =
- patch().lookupPatchField("Cp");
-
- const fvPatchScalarField& kByCpw =
- patch().lookupPatchField("kByCp");
-
- valueFraction() =
- 1.0/
- (
- 1.0
- + Cpw*kByCpw*patch().deltaCoeffs()/alphaWall_
- );
-
- mixedFvPatchScalarField::updateCoeffs();
-}
-
-
-void Foam::wallHeatTransferFvPatchScalarField::write(Ostream& os) const
-{
- fvPatchScalarField::write(os);
- Tinf_.writeEntry("Tinf", os);
- alphaWall_.writeEntry("alphaWall", os);
- writeEntry("value", os);
-}
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
- makePatchTypeField(fvPatchScalarField, wallHeatTransferFvPatchScalarField);
-}
-
-// ************************************************************************* //
diff --git a/applications/solvers/multiphase/compressibleInterFoam/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H b/applications/solvers/multiphase/compressibleInterFoam/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H
deleted file mode 100644
index cf5284a087..0000000000
--- a/applications/solvers/multiphase/compressibleInterFoam/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.H
+++ /dev/null
@@ -1,194 +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::wallHeatTransferFvPatchScalarField
-
-Description
- Enthalpy boundary conditions for wall heat transfer
-
-SourceFiles
- wallHeatTransferFvPatchScalarField.C
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef wallHeatTransferFvPatchScalarField_H
-#define wallHeatTransferFvPatchScalarField_H
-
-#include "mixedFvPatchFields.H"
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
-/*---------------------------------------------------------------------------*\
- Class wallHeatTransferFvPatch Declaration
-\*---------------------------------------------------------------------------*/
-
-class wallHeatTransferFvPatchScalarField
-:
- public mixedFvPatchScalarField
-{
- // Private data
-
- //- Tinf
- scalarField Tinf_;
-
- //- alphaWall
- scalarField alphaWall_;
-
-
-public:
-
- //- Runtime type information
- TypeName("wallHeatTransfer");
-
-
- // Constructors
-
- //- Construct from patch and internal field
- wallHeatTransferFvPatchScalarField
- (
- const fvPatch&,
- const DimensionedField&
- );
-
- //- Construct from patch, internal field and dictionary
- wallHeatTransferFvPatchScalarField
- (
- const fvPatch&,
- const DimensionedField&,
- const dictionary&
- );
-
- //- Construct by mapping given wallHeatTransferFvPatchScalarField
- // onto a new patch
- wallHeatTransferFvPatchScalarField
- (
- const wallHeatTransferFvPatchScalarField&,
- const fvPatch&,
- const DimensionedField&,
- const fvPatchFieldMapper&
- );
-
- //- Construct as copy
- wallHeatTransferFvPatchScalarField
- (
- const wallHeatTransferFvPatchScalarField&
- );
-
- //- Construct and return a clone
- virtual tmp clone() const
- {
- return tmp
- (
- new wallHeatTransferFvPatchScalarField(*this)
- );
- }
-
- //- Construct as copy setting internal field reference
- wallHeatTransferFvPatchScalarField
- (
- const wallHeatTransferFvPatchScalarField&,
- const DimensionedField&
- );
-
- //- Construct and return a clone setting internal field reference
- virtual tmp clone
- (
- const DimensionedField& iF
- ) const
- {
- return tmp
- (
- new wallHeatTransferFvPatchScalarField(*this, iF)
- );
- }
-
-
- // Member functions
-
- // Access
-
- //- Return Tinf
- const scalarField& Tinf() const
- {
- return Tinf_;
- }
-
- //- Return reference to Tinf to allow adjustment
- scalarField& Tinf()
- {
- return Tinf_;
- }
-
- //- Return alphaWall
- const scalarField& alphaWall() const
- {
- return alphaWall_;
- }
-
- //- Return reference to alphaWall to allow adjustment
- scalarField& alphaWall()
- {
- return alphaWall_;
- }
-
-
- // Mapping functions
-
- //- Map (and resize as needed) from self given a mapping object
- virtual void autoMap
- (
- const fvPatchFieldMapper&
- );
-
- //- Reverse map the given fvPatchField onto this fvPatchField
- virtual void rmap
- (
- const fvPatchScalarField&,
- const labelList&
- );
-
-
- // Evaluation functions
-
- //- Update the coefficients associated with the patch field
- virtual void updateCoeffs();
-
-
- //- Write
- virtual void write(Ostream&) const;
-};
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H
index 3197a72bee..73babb08f0 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H
+++ b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H
@@ -1,7 +1,4 @@
{
- rho1 = eos1->rho(p, T);
- rho2 = eos2->rho(p, T);
-
volScalarField rAU("rAU", 1.0/UEqn.A());
surfaceScalarField rAUf("Dp", fvc::interpolate(rAU));
@@ -29,28 +26,44 @@
tmp p_rghEqnComp1;
tmp p_rghEqnComp2;
- //if (transonic)
- //{
- //}
- //else
+ if (pimple.transonic())
{
surfaceScalarField phid1("phid1", fvc::interpolate(psi1)*phi);
surfaceScalarField phid2("phid2", fvc::interpolate(psi2)*phi);
+ p_rghEqnComp1 =
+ fvc::ddt(rho1) + fvc::div(phi, rho1) - fvc::Sp(fvc::div(phi), rho1)
+ + correction
+ (
+ psi1*fvm::ddt(p_rgh)
+ + fvm::div(phid1, p_rgh) - fvm::Sp(fvc::div(phid1), p_rgh)
+ );
+ deleteDemandDrivenData(p_rghEqnComp1().faceFluxCorrectionPtr());
+ p_rghEqnComp1().relax();
+
+ p_rghEqnComp2 =
+ fvc::ddt(rho2) + fvc::div(phi, rho2) - fvc::Sp(fvc::div(phi), rho2)
+ + correction
+ (
+ psi2*fvm::ddt(p_rgh)
+ + fvm::div(phid2, p_rgh) - fvm::Sp(fvc::div(phid2), p_rgh)
+ );
+ deleteDemandDrivenData(p_rghEqnComp2().faceFluxCorrectionPtr());
+ p_rghEqnComp2().relax();
+ }
+ else
+ {
p_rghEqnComp1 =
fvc::ddt(rho1) + psi1*correction(fvm::ddt(p_rgh))
- + fvc::div(phid1, p_rgh)
- - fvc::Sp(fvc::div(phid1), p_rgh);
+ + fvc::div(phi, rho1) - fvc::Sp(fvc::div(phi), rho1);
p_rghEqnComp2 =
fvc::ddt(rho2) + psi2*correction(fvm::ddt(p_rgh))
- + fvc::div(phid2, p_rgh)
- - fvc::Sp(fvc::div(phid2), p_rgh);
+ + fvc::div(phi, rho2) - fvc::Sp(fvc::div(phi), rho2);
}
- // 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;
+ // Cache p_rgh prior to solve for density update
+ volScalarField p_rgh_0(p_rgh);
while (pimple.correctNonOrthogonal())
{
@@ -72,8 +85,8 @@
if (pimple.finalNonOrthogonalIter())
{
- // Second part of thermodynamic density update
- //thermo.rho() += psi*p_rgh;
+ //p = max(p_rgh + (alpha1*rho1 + alpha2*rho2)*gh, pMin);
+ //p_rgh = p - (alpha1*rho1 + alpha2*rho2)*gh;
dgdt =
(
@@ -91,8 +104,13 @@
p = max(p_rgh + (alpha1*rho1 + alpha2*rho2)*gh, pMin);
- rho1 = eos1->rho(p, T);
- rho2 = eos2->rho(p, T);
+ // Update densities from change in p_rgh
+ rho1 += psi1*(p_rgh - p_rgh_0);
+ rho2 += psi2*(p_rgh - p_rgh_0);
+
+ rho = alpha1*rho1 + alpha2*rho2;
+
+ K = 0.5*magSqr(U);
Info<< "max(U) " << max(mag(U)).value() << endl;
Info<< "min(p_rgh) " << min(p_rgh).value() << endl;
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/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/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/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/twoPhaseMixtureThermo/Make/options b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/options
new file mode 100644
index 0000000000..8dbf02aa06
--- /dev/null
+++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/options
@@ -0,0 +1,10 @@
+EXE_INC = \
+ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
+ -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
+ -I$(LIB_SRC)/finiteVolume/lnInclude
+
+LIB_LIBS = \
+ -lfluidThermophysicalModels \
+ -lspecie \
+ -ltwoPhaseMixture \
+ -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/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H
new file mode 100644
index 0000000000..608dc91a9b
--- /dev/null
+++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.H
@@ -0,0 +1,287 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / 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::twoPhaseMixtureThermo
+
+Description
+
+SourceFiles
+ twoPhaseMixtureThermoI.H
+ twoPhaseMixtureThermo.C
+ twoPhaseMixtureThermoIO.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef twoPhaseMixtureThermo_H
+#define twoPhaseMixtureThermo_H
+
+#include "rhoThermo.H"
+#include "psiThermo.H"
+#include "twoPhaseMixture.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+ Class twoPhaseMixtureThermo Declaration
+\*---------------------------------------------------------------------------*/
+
+class twoPhaseMixtureThermo
+:
+ public psiThermo,
+ public twoPhaseMixture
+{
+ // Private data
+
+ //- Thermo-package of phase 1
+ autoPtr thermo1_;
+
+ //- Thermo-package of phase 2
+ autoPtr thermo2_;
+
+
+public:
+
+ //- Runtime type information
+ TypeName("twoPhaseMixtureThermo");
+
+
+ // Constructors
+
+ //- Construct from mesh
+ twoPhaseMixtureThermo
+ (
+ const fvMesh& mesh
+ );
+
+
+ //- Destructor
+ virtual ~twoPhaseMixtureThermo();
+
+
+ // Member Functions
+
+ const rhoThermo& thermo1() const
+ {
+ return thermo1_();
+ }
+
+ const rhoThermo& thermo2() const
+ {
+ return thermo2_();
+ }
+
+ rhoThermo& thermo1()
+ {
+ return thermo1_();
+ }
+
+ rhoThermo& thermo2()
+ {
+ return thermo2_();
+ }
+
+ //- Update properties
+ virtual void correct();
+
+ //- Return true if the equation of state is incompressible
+ // i.e. rho != f(p)
+ virtual bool incompressible() const;
+
+ //- Return true if the equation of state is isochoric
+ // i.e. rho = const
+ virtual bool isochoric() const;
+
+
+ // Access to thermodynamic state variables
+
+ //- Enthalpy/Internal energy [J/kg]
+ // Non-const access allowed for transport equations
+ virtual volScalarField& he()
+ {
+ notImplemented("twoPhaseMixtureThermo::he()");
+ return thermo1_->he();
+ }
+
+ //- Enthalpy/Internal energy [J/kg]
+ virtual const volScalarField& he() const
+ {
+ notImplemented("twoPhaseMixtureThermo::he() const");
+ return thermo1_->he();
+ }
+
+ //- Enthalpy/Internal energy
+ // for given pressure and temperature [J/kg]
+ virtual tmp he
+ (
+ const volScalarField& p,
+ const volScalarField& T
+ ) const;
+
+ //- Enthalpy/Internal energy for cell-set [J/kg]
+ virtual tmp he
+ (
+ const scalarField& p,
+ const scalarField& T,
+ const labelList& cells
+ ) const;
+
+ //- Enthalpy/Internal energy for patch [J/kg]
+ virtual tmp he
+ (
+ const scalarField& p,
+ const scalarField& T,
+ const label patchi
+ ) const;
+
+ //- Chemical enthalpy [J/kg]
+ virtual tmp hc() const;
+
+ //- Temperature from enthalpy/internal energy for cell-set
+ virtual tmp THE
+ (
+ const scalarField& h,
+ const scalarField& p,
+ const scalarField& T0, // starting temperature
+ const labelList& cells
+ ) const;
+
+ //- Temperature from enthalpy/internal energy for patch
+ virtual tmp THE
+ (
+ const scalarField& h,
+ const scalarField& p,
+ const scalarField& T0, // starting temperature
+ const label patchi
+ ) const;
+
+
+ // Fields derived from thermodynamic state variables
+
+ //- Heat capacity at constant pressure [J/kg/K]
+ virtual tmp Cp() const;
+
+ //- Heat capacity at constant pressure for patch [J/kg/K]
+ virtual tmp Cp
+ (
+ const scalarField& p,
+ const scalarField& T,
+ const label patchi
+ ) const;
+
+ //- Heat capacity at constant volume [J/kg/K]
+ virtual tmp Cv() const;
+
+ //- Heat capacity at constant volume for patch [J/kg/K]
+ virtual tmp Cv
+ (
+ const scalarField& p,
+ const scalarField& T,
+ const label patchi
+ ) const;
+
+ //- gamma = Cp/Cv []
+ virtual tmp gamma() const;
+
+ //- gamma = Cp/Cv for patch []
+ virtual tmp gamma
+ (
+ const scalarField& p,
+ const scalarField& T,
+ const label patchi
+ ) const;
+
+ //- Heat capacity at constant pressure/volume [J/kg/K]
+ virtual tmp Cpv() const;
+
+ //- Heat capacity at constant pressure/volume for patch [J/kg/K]
+ virtual tmp Cpv
+ (
+ const scalarField& p,
+ const scalarField& T,
+ const label patchi
+ ) const;
+
+ //- Heat capacity ratio []
+ virtual tmp CpByCpv() const;
+
+ //- Heat capacity ratio for patch []
+ virtual tmp CpByCpv
+ (
+ const scalarField& p,
+ const scalarField& T,
+ const label patchi
+ ) const;
+
+
+ // Fields derived from transport state variables
+
+ //- Thermal diffusivity for temperature of mixture [J/m/s/K]
+ virtual tmp kappa() const;
+
+ //- Thermal diffusivity of mixture for patch [J/m/s/K]
+ virtual tmp kappa
+ (
+ const label patchi
+ ) const;
+
+ //- Effective thermal diffusivity of mixture [J/m/s/K]
+ virtual tmp kappaEff
+ (
+ const volScalarField& alphat
+ ) const;
+
+ //- Effective thermal diffusivity of mixture for patch [J/m/s/K]
+ virtual tmp kappaEff
+ (
+ const scalarField& alphat,
+ const label patchi
+ ) const;
+
+ //- Effective thermal diffusivity of mixture [J/m/s/K]
+ virtual tmp alphaEff
+ (
+ const volScalarField& alphat
+ ) const;
+
+ //- Effective thermal diffusivity of mixture for patch [J/m/s/K]
+ virtual tmp alphaEff
+ (
+ const scalarField& alphat,
+ const label patchi
+ ) const;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H
index c894b36b41..1f12fc9a12 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H
@@ -14,28 +14,51 @@
volScalarField& he1 = thermo1.he();
volScalarField& he2 = thermo2.he();
- Info<< max(he1) << min(he1) << endl;
+ volScalarField Cpv1(thermo1.Cpv());
+ volScalarField Cpv2(thermo2.Cpv());
fvScalarMatrix he1Eqn
(
- fvm::ddt(alpha1, he1)
- + fvm::div(alphaPhi1, he1)
+ fvm::ddt(alpha1, he1) + fvm::div(alphaPhi1, he1)
+ + fvc::ddt(alpha1, K1) + fvc::div(alphaPhi1, K1)
+
+ // Compressibity correction
+ - fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), he1)
+ - (fvc::ddt(alpha1) + fvc::div(alphaPhi1))*K1
+
+ + (
+ he1.name() == thermo1.phasePropertyName("e")
+ ? fvc::div(alphaPhi1, p)
+ : -dalpha1pdt
+ )/rho1
+
- fvm::laplacian(k1, he1)
==
- heatTransferCoeff*(he1/thermo1.Cp())/rho1
- - fvm::Sp(heatTransferCoeff/thermo1.Cp()/rho1, he1)
- + alpha1*(dpdt/rho1 - (fvc::ddt(K1) + fvc::div(phi1, K1)))
+ heatTransferCoeff*(thermo2.T() - thermo1.T())/rho1
+ + heatTransferCoeff*he1/Cpv1/rho1
+ - fvm::Sp(heatTransferCoeff/Cpv1/rho1, he1)
);
fvScalarMatrix he2Eqn
(
- fvm::ddt(alpha2, he2)
- + fvm::div(alphaPhi2, he2)
+ fvm::ddt(alpha2, he2) + fvm::div(alphaPhi2, he2)
+ + fvc::ddt(alpha2, K2) + fvc::div(alphaPhi2, K2)
+
+ // Compressibity correction
+ - fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), he2)
+ - (fvc::ddt(alpha2) + fvc::div(alphaPhi2))*K2
+
+ + (
+ he2.name() == thermo2.phasePropertyName("e")
+ ? fvc::div(alphaPhi2, p)
+ : -dalpha2pdt
+ )/rho2
+
- fvm::laplacian(k2, he2)
==
- heatTransferCoeff*(he2/thermo2.Cp())/rho2
- - fvm::Sp(heatTransferCoeff/thermo2.Cp()/rho2, he2)
- + alpha2*(dpdt/rho2 - (fvc::ddt(K2) + fvc::div(phi2, K2)))
+ heatTransferCoeff*(thermo1.T() - thermo2.T())/rho2
+ + heatTransferCoeff*he2/Cpv2/rho2
+ - fvm::Sp(heatTransferCoeff/Cpv2/rho2, he2)
);
he1Eqn.relax();
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/UEqns.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/UEqns.H
index a243db6300..ae22926c4e 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/UEqns.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/UEqns.H
@@ -1,3 +1,7 @@
+mrfZones.correctBoundaryVelocity(U1);
+mrfZones.correctBoundaryVelocity(U2);
+mrfZones.correctBoundaryVelocity(U);
+
fvVectorMatrix U1Eqn(U1, U1.dimensions()*dimVol/dimTime);
fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime);
@@ -31,6 +35,9 @@ fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime);
fvm::ddt(alpha1, U1)
+ fvm::div(alphaPhi1, U1)
+ // Compressibity correction
+ - fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), U1)
+
+ Cvm*rho2*alpha1*alpha2/rho1*
(
fvm::ddt(U1)
@@ -61,6 +68,9 @@ fvVectorMatrix U2Eqn(U2, U2.dimensions()*dimVol/dimTime);
fvm::ddt(alpha2, U2)
+ fvm::div(alphaPhi2, U2)
+ // Compressibity correction
+ - fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), U2)
+
+ Cvm*rho2*alpha1*alpha2/rho2*
(
fvm::ddt(U2)
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H
index 86d9203dce..601ff0e919 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H
@@ -1,9 +1,9 @@
-surfaceScalarField alphaPhi1("alphaPhi", phi1);
-surfaceScalarField alphaPhi2("alphaPhi", phi2);
+surfaceScalarField alphaPhi1("alphaPhi" + phase1Name, phi1);
+surfaceScalarField alphaPhi2("alphaPhi" + phase2Name, phi2);
{
- word scheme("div(phi,alpha)");
- word schemer("div(phir,alpha)");
+ word alphaScheme("div(phi," + alpha1.name() + ')');
+ word alpharScheme("div(phir," + alpha1.name() + ')');
surfaceScalarField phic("phic", phi);
surfaceScalarField phir("phir", phi1 - phi2);
@@ -56,15 +56,84 @@ surfaceScalarField alphaPhi2("alphaPhi", phi2);
}
}
+ dimensionedScalar totalDeltaT = runTime.deltaT();
+ if (nAlphaSubCycles > 1)
+ {
+ alphaPhi1 = dimensionedScalar("0", alphaPhi1.dimensions(), 0);
+ }
- fvScalarMatrix alpha1Eqn
+ for
(
- fvm::ddt(alpha1)
- + fvm::div(phic, alpha1, scheme)
- + fvm::div(-fvc::flux(-phir, alpha2, schemer), alpha1, schemer)
- ==
- fvm::Sp(Sp, alpha1) + Su
- );
+ subCycle alphaSubCycle(alpha1, nAlphaSubCycles);
+ !(++alphaSubCycle).end();
+ )
+ {
+ surfaceScalarField alphaPhic1
+ (
+ fvc::flux
+ (
+ phic,
+ alpha1,
+ alphaScheme
+ )
+ + fvc::flux
+ (
+ -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
+ alpha1,
+ alpharScheme
+ )
+ );
+
+ MULES::explicitSolve
+ (
+ geometricOneField(),
+ alpha1,
+ phi,
+ alphaPhic1,
+ Sp,
+ Su,
+ (g0.value() > 0 ? alphaMax : 1),
+ 0
+ );
+
+ if (nAlphaSubCycles > 1)
+ {
+ alphaPhi1 += (runTime.deltaT()/totalDeltaT)*alphaPhic1;
+ }
+ else
+ {
+ alphaPhi1 = alphaPhic1;
+ }
+
+ /*
+ // Legacy semi-implicit and potentially unbounded form
+ fvScalarMatrix alpha1Eqn
+ (
+ fvm::ddt(alpha1)
+ + fvm::div(phic, alpha1, alphaScheme)
+ + fvm::div
+ (
+ -fvc::flux(-phir, alpha2, alpharScheme),
+ alpha1,
+ alpharScheme
+ )
+ ==
+ fvm::Sp(Sp, alpha1) + Su
+ );
+
+ alpha1Eqn.relax();
+ alpha1Eqn.solve();
+
+ if (nAlphaSubCycles > 1)
+ {
+ alphaPhi1 += (runTime.deltaT()/totalDeltaT)*alpha1Eqn.flux();
+ }
+ else
+ {
+ alphaPhi1 = alpha1Eqn.flux();
+ }
+ */
+ }
if (g0.value() > 0.0)
{
@@ -74,30 +143,25 @@ surfaceScalarField alphaPhi2("alphaPhi", phi2);
fvc::interpolate((1.0/rho1)*rAU1)
*g0*min(exp(preAlphaExp*(alpha1f - alphaMax)), expMax);
- // ppMagf =
- // fvc::interpolate((1.0/rho1)*rAU1)
- // *fvc::interpolate
- // (
- // g0*min(exp(preAlphaExp*(alpha1 - alphaMax)), expMax)
- // );
-
- alpha1Eqn -= fvm::laplacian
+ fvScalarMatrix alpha1Eqn
(
- alpha1f*ppMagf,
- alpha1,
- "laplacian(alphaPpMag,alpha1)"
+ fvm::ddt(alpha1) - fvc::ddt(alpha1)
+ - fvm::laplacian
+ (
+ alpha1f*ppMagf,
+ alpha1,
+ "laplacian(alpha1PpMag,alpha1)"
+ )
);
+
+ alpha1Eqn.relax();
+ alpha1Eqn.solve();
+
+ #include "packingLimiter.H"
+
+ alphaPhi1 += alpha1Eqn.flux();
}
- alpha1Eqn.relax();
- alpha1Eqn.solve();
-
- //***HGW temporary boundedness-fix pending the introduction of MULES
- alpha1 = max(min(alpha1, scalar(1)), scalar(0));
-
- #include "packingLimiter.H"
-
- alphaPhi1 = alpha1Eqn.flux();
alphaPhi2 = phi - alphaPhi1;
alpha2 = scalar(1) - alpha1;
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.C
index 65372612b6..50266a195e 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.C
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.C
@@ -31,6 +31,8 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
+#include "MULES.H"
+#include "subCycle.H"
#include "rhoThermo.H"
#include "nearWallDist.H"
#include "wallFvPatch.H"
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H
index 6095ad6845..cc5b3ebe21 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H
@@ -16,14 +16,14 @@
(
transportProperties.found("phases")
? wordList(transportProperties.lookup("phases"))[0]
- : "phase1"
+ : "1"
);
word phase2Name
(
transportProperties.found("phases")
? wordList(transportProperties.lookup("phases"))[1]
- : "phase2"
+ : "2"
);
autoPtr phase1 = phaseModel::New
@@ -62,10 +62,10 @@
volScalarField& p = thermo1.p();
- volScalarField rho1("rho" + phase1Name, thermo1.rho());
+ volScalarField& rho1 = thermo1.rho();
const volScalarField& psi1 = thermo1.psi();
- volScalarField rho2("rho" + phase2Name, thermo2.rho());
+ volScalarField& rho2 = thermo2.rho();
const volScalarField& psi2 = thermo2.psi();
volVectorField U
@@ -275,8 +275,8 @@
);
- Info<< "Creating field dpdt\n" << endl;
- volScalarField dpdt
+ Info<< "Creating field dalpha1pdt\n" << endl;
+ volScalarField dalpha1pdt
(
IOobject
(
@@ -285,7 +285,20 @@
mesh
),
mesh,
- dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
+ dimensionedScalar("dalpha1pdt", p.dimensions()/dimTime, 0)
+ );
+
+ Info<< "Creating field dalpha2pdt\n" << endl;
+ volScalarField dalpha2pdt
+ (
+ IOobject
+ (
+ "dpdt",
+ runTime.timeName(),
+ mesh
+ ),
+ mesh,
+ dimensionedScalar("dalpha2pdt", p.dimensions()/dimTime, 0)
);
Info<< "Creating field kinetic energy K\n" << endl;
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C
index b7e0d3ce9e..ced65bf823 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.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
@@ -73,7 +73,7 @@ Foam::kineticTheoryModels::conductivityModels::Gidaspow::kappa
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.H
index 463853a9a8..e1470d908b 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.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
@@ -77,7 +77,7 @@ public:
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const;
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C
index 9dd47fb88a..b103a1afe2 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.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
@@ -76,7 +76,7 @@ Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::kappa
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.H
index 2a767f6d34..e2ab8b8cca 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.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
@@ -82,7 +82,7 @@ public:
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const;
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C
index dcaba6f5ae..a50c6ceec4 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.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
@@ -73,7 +73,7 @@ Foam::kineticTheoryModels::conductivityModels::Syamlal::kappa
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.H
index 564d2f406e..e1dea3a781 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.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
@@ -77,7 +77,7 @@ public:
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const;
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H
index aafe0eb705..7981a2b141 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.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
@@ -109,7 +109,7 @@ public:
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const = 0;
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/Lun/LunPressure.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/Lun/LunPressure.C
index da8ea176ab..5a10765a1f 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/Lun/LunPressure.C
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/Lun/LunPressure.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
@@ -71,7 +71,7 @@ Foam::kineticTheoryModels::granularPressureModels::Lun::granularPressureCoeff
(
const volScalarField& alpha1,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const dimensionedScalar& e
) const
{
@@ -87,7 +87,7 @@ granularPressureCoeffPrime
const volScalarField& alpha1,
const volScalarField& g0,
const volScalarField& g0prime,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const dimensionedScalar& e
) const
{
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/Lun/LunPressure.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/Lun/LunPressure.H
index ddc9b36633..81e8ac0d29 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/Lun/LunPressure.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/Lun/LunPressure.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
@@ -76,7 +76,7 @@ public:
(
const volScalarField& alpha1,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const dimensionedScalar& e
) const;
@@ -85,7 +85,7 @@ public:
const volScalarField& alpha1,
const volScalarField& g0,
const volScalarField& g0prime,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const dimensionedScalar& e
) const;
};
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C
index a0d51e431a..03b0fc1d0c 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.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
@@ -74,7 +74,7 @@ granularPressureCoeff
(
const volScalarField& alpha1,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const dimensionedScalar& e
) const
{
@@ -90,7 +90,7 @@ granularPressureCoeffPrime
const volScalarField& alpha1,
const volScalarField& g0,
const volScalarField& g0prime,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const dimensionedScalar& e
) const
{
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.H
index 8555ce9411..199c995797 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.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
@@ -76,7 +76,7 @@ public:
(
const volScalarField& alpha1,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const dimensionedScalar& e
) const;
@@ -85,7 +85,7 @@ public:
const volScalarField& alpha1,
const volScalarField& g0,
const volScalarField& g0prime,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const dimensionedScalar& e
) const;
};
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H
index 76d2701af6..df3ef7e8c1 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.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
@@ -109,7 +109,7 @@ public:
(
const volScalarField& alpha1,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const dimensionedScalar& e
) const = 0;
@@ -119,7 +119,7 @@ public:
const volScalarField& alpha1,
const volScalarField& g0,
const volScalarField& g0prime,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const dimensionedScalar& e
) const = 0;
};
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C
index 18db3a70df..8139356820 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C
@@ -45,8 +45,7 @@ Foam::kineticTheoryModel::kineticTheoryModel
phi1_(phase1.phi()),
draga_(draga),
- rho1_(phase1.rho()[0]), //***HGW
- nu1_(phase1.nu()()[0]), //***HGW
+ rho1_(phase1.rho()),
kineticTheoryProperties_
(
@@ -203,9 +202,9 @@ void Foam::kineticTheoryModel::solve(const volTensorField& gradU1t)
volScalarField da_(phase1_.d());
- surfaceScalarField phi(1.5*rho1_*phi1_*fvc::interpolate(alpha1_));
+ surfaceScalarField phi(1.5*phi1_*fvc::interpolate(rho1_*alpha1_));
- volTensorField dU(gradU1t.T()); //fvc::grad(U1_);
+ volTensorField dU(gradU1t.T());
volSymmTensorField D(symm(dU));
// NB, drag = K*alpha1*alpha2,
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H
index 714f83839b..a5861ae129 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.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
@@ -64,8 +64,7 @@ class kineticTheoryModel
const dragModel& draga_;
- const dimensionedScalar& rho1_;
- const dimensionedScalar& nu1_;
+ const volScalarField& rho1_;
//- dictionary holding the modeling info
IOdictionary kineticTheoryProperties_;
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C
index 55282b6de8..e3bf99518c 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.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
@@ -67,7 +67,7 @@ Foam::kineticTheoryModels::viscosityModels::Gidaspow::mu1
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.H
index dd286e8b2d..0e3631ac0b 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.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
@@ -76,7 +76,7 @@ public:
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const;
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C
index e3c07f91d5..9f7fdd22cc 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.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
@@ -75,7 +75,7 @@ Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::mu1
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.H
index 2f1e54fd03..80b0e863ae 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.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
@@ -84,7 +84,7 @@ public:
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const;
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C
index 3bc988bb48..fa7ba802d2 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.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
@@ -67,7 +67,7 @@ Foam::kineticTheoryModels::viscosityModels::Syamlal::mu1
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.H
index d996e0e51a..f82ef8af06 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.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
@@ -77,7 +77,7 @@ public:
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const;
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/none/noneViscosity.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/none/noneViscosity.C
index f6350844d5..85f495cca5 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/none/noneViscosity.C
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/none/noneViscosity.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
@@ -58,7 +58,7 @@ Foam::tmp Foam::kineticTheoryModels::noneViscosity::mu1
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/none/noneViscosity.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/none/noneViscosity.H
index a53ffde21a..641ebe30eb 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/none/noneViscosity.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/none/noneViscosity.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
@@ -75,7 +75,7 @@ public:
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const;
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H
index 80fb9dafce..91007f0538 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.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
@@ -111,7 +111,7 @@ public:
const volScalarField& alpha1,
const volScalarField& Theta,
const volScalarField& g0,
- const dimensionedScalar& rho1,
+ const volScalarField& rho1,
const volScalarField& da,
const dimensionedScalar& e
) const = 0;
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H
index f9a7807d00..02e49b5661 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H
@@ -1,7 +1,4 @@
{
- rho1 = thermo1.rho();
- rho2 = thermo2.rho();
-
surfaceScalarField alpha1f(fvc::interpolate(alpha1));
surfaceScalarField alpha2f(scalar(1) - alpha1f);
@@ -91,10 +88,7 @@
tmp pEqnComp1;
tmp pEqnComp2;
- //if (transonic)
- //{
- //}
- //else
+ if (pimple.transonic())
{
surfaceScalarField phid1
(
@@ -107,17 +101,42 @@
fvc::interpolate(psi2)*phi2
);
+ pEqnComp1 =
+ fvc::ddt(rho1)
+ + fvc::div(phi1, rho1) - fvc::Sp(fvc::div(phi1), rho1)
+ + correction
+ (
+ psi1*fvm::ddt(p)
+ + fvm::div(phid1, p) - fvm::Sp(fvc::div(phid1), p)
+ );
+ deleteDemandDrivenData(pEqnComp1().faceFluxCorrectionPtr());
+ pEqnComp1().relax();
+
+ pEqnComp2 =
+ fvc::ddt(rho2)
+ + fvc::div(phi2, rho2) - fvc::Sp(fvc::div(phi2), rho2)
+ + correction
+ (
+ psi2*fvm::ddt(p)
+ + fvm::div(phid2, p) - fvm::Sp(fvc::div(phid2), p)
+ );
+ deleteDemandDrivenData(pEqnComp2().faceFluxCorrectionPtr());
+ pEqnComp2().relax();
+ }
+ else
+ {
pEqnComp1 =
fvc::ddt(rho1) + psi1*correction(fvm::ddt(p))
- + fvc::div(phid1, p)
- - fvc::Sp(fvc::div(phid1), p);
+ + fvc::div(phi1, rho1) - fvc::Sp(fvc::div(phi1), rho1);
pEqnComp2 =
fvc::ddt(rho2) + psi2*correction(fvm::ddt(p))
- + fvc::div(phid2, p)
- - fvc::Sp(fvc::div(phid2), p);
+ + fvc::div(phi2, rho2) - fvc::Sp(fvc::div(phi2), rho2);
}
+ // Cache p prior to solve for density update
+ volScalarField p_0(p);
+
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqnIncomp
@@ -182,16 +201,20 @@
p = max(p, pMin);
- thermo1.correct();
- thermo2.correct();
- rho1 = thermo1.rho();
- rho2 = thermo2.rho();
+ // Update densities from change in p
+ rho1 += psi1*(p - p_0);
+ rho2 += psi2*(p - p_0);
K1 = 0.5*magSqr(U1);
K2 = 0.5*magSqr(U2);
if (thermo1.dpdt())
{
- dpdt = fvc::ddt(p);
+ dalpha1pdt = fvc::ddt(alpha1, p);
+ }
+
+ if (thermo2.dpdt())
+ {
+ dalpha2pdt = fvc::ddt(alpha2, p);
}
}
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C
index 64d59b436d..112a302188 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C
@@ -26,6 +26,7 @@ License
#include "phaseModel.H"
#include "diameterModel.H"
#include "fixedValueFvPatchFields.H"
+#include "slipFvPatchFields.H"
#include "surfaceInterpolate.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@@ -51,7 +52,15 @@ Foam::phaseModel::phaseModel
dimensionedScalar("alpha", dimless, 0)
),
name_(phaseName),
- phaseDict_(transportProperties.subDict(phaseName)),
+ phaseDict_
+ (
+ transportProperties.subDict
+ (
+ phaseName == "1" || phaseName == "2"
+ ? "phase" + phaseName
+ : word(phaseName)
+ )
+ ),
thermo_(rhoThermo::New(mesh, phaseName)),
U_
(
@@ -110,7 +119,11 @@ Foam::phaseModel::phaseModel
forAll(U_.boundaryField(), i)
{
- if (isA(U_.boundaryField()[i]))
+ if
+ (
+ isA(U_.boundaryField()[i])
+ || isA(U_.boundaryField()[i])
+ )
{
phiTypes[i] = fixedValueFvPatchScalarField::typeName;
}
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/readTwoPhaseEulerFoamControls.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/readTwoPhaseEulerFoamControls.H
index 9767d7c845..cb8b4efc3b 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/readTwoPhaseEulerFoamControls.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/readTwoPhaseEulerFoamControls.H
@@ -1,3 +1,4 @@
#include "readTimeControls.H"
int nAlphaCorr(readInt(pimple.dict().lookup("nAlphaCorr")));
+ int nAlphaSubCycles(readInt(pimple.dict().lookup("nAlphaSubCycles")));
diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/kEpsilon.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/kEpsilon.H
index bc9a07b0a8..b74e1b18d7 100644
--- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/kEpsilon.H
+++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/turbulenceModel/kEpsilon.H
@@ -16,6 +16,10 @@ if (turbulence)
(
fvm::ddt(alpha2, epsilon)
+ fvm::div(alphaPhi2, epsilon)
+
+ // Compressibity correction
+ - fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), epsilon)
+
- fvm::laplacian
(
alpha1Eps*nuEff2, epsilon,
@@ -41,6 +45,10 @@ if (turbulence)
(
fvm::ddt(alpha2, k)
+ fvm::div(alphaPhi2, k)
+
+ // Compressibity correction
+ - fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), k)
+
- fvm::laplacian
(
alpha1k*nuEff2, k,
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..33560b54e6 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/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
@@ -11,7 +12,8 @@ EXE_INC = \
EXE_LIBS = \
-linterfaceProperties \
- -ltwoPhaseInterfaceProperties \
+ -ltwoPhaseMixture \
+ -ltwoPhaseProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/alphaEqn.H b/applications/solvers/multiphase/interFoam/LTSInterFoam/alphaEqn.H
index 5f5ac824b8..faae197670 100644
--- a/applications/solvers/multiphase/interFoam/LTSInterFoam/alphaEqn.H
+++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/alphaEqn.H
@@ -18,7 +18,7 @@
)
+ fvc::flux
(
- -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
+ -fvc::flux(-phir, alpha2, alpharScheme),
alpha1,
alpharScheme
)
@@ -27,6 +27,7 @@
MULES::explicitLTSSolve(alpha1, phi, phiAlpha, 1, 0);
//MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
+ alpha2 = 1.0 - alpha1;
rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2;
}
diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/alphaEqnSubCycle.H b/applications/solvers/multiphase/interFoam/LTSInterFoam/alphaEqnSubCycle.H
index 6c82f94049..57c78027a4 100644
--- a/applications/solvers/multiphase/interFoam/LTSInterFoam/alphaEqnSubCycle.H
+++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/alphaEqnSubCycle.H
@@ -23,4 +23,4 @@ else
#include "alphaEqn.H"
}
-rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;
+rho == alpha1*rho1 + alpha2*rho2;
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..db2e1736ee 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/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
@@ -10,8 +11,9 @@ EXE_INC = \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \
+ -ltwoPhaseMixture \
-linterfaceProperties \
- -ltwoPhaseInterfaceProperties \
+ -ltwoPhaseProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
diff --git a/applications/solvers/multiphase/interFoam/Make/options b/applications/solvers/multiphase/interFoam/Make/options
index b87380d8a1..b1cfcac9bd 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/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
@@ -9,8 +10,9 @@ EXE_INC = \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \
+ -ltwoPhaseMixture \
-linterfaceProperties \
- -ltwoPhaseInterfaceProperties \
+ -ltwoPhaseProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
diff --git a/applications/solvers/multiphase/interFoam/alphaEqn.H b/applications/solvers/multiphase/interFoam/alphaEqn.H
index b96dcf898d..a2720e20ee 100644
--- a/applications/solvers/multiphase/interFoam/alphaEqn.H
+++ b/applications/solvers/multiphase/interFoam/alphaEqn.H
@@ -18,7 +18,7 @@
)
+ fvc::flux
(
- -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
+ -fvc::flux(-phir, alpha2, alpharScheme),
alpha1,
alpharScheme
)
@@ -26,6 +26,7 @@
MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
+ alpha2 = 1.0 - alpha1;
rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2;
}
diff --git a/applications/solvers/multiphase/interFoam/alphaEqnSubCycle.H b/applications/solvers/multiphase/interFoam/alphaEqnSubCycle.H
index 6c82f94049..57c78027a4 100644
--- a/applications/solvers/multiphase/interFoam/alphaEqnSubCycle.H
+++ b/applications/solvers/multiphase/interFoam/alphaEqnSubCycle.H
@@ -23,4 +23,4 @@ else
#include "alphaEqn.H"
}
-rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;
+rho == alpha1*rho1 + alpha2*rho2;
diff --git a/applications/solvers/multiphase/interFoam/createFields.H b/applications/solvers/multiphase/interFoam/createFields.H
index df1edf04e1..f0d1809848 100644
--- a/applications/solvers/multiphase/interFoam/createFields.H
+++ b/applications/solvers/multiphase/interFoam/createFields.H
@@ -30,9 +30,10 @@
Info<< "Reading transportProperties\n" << endl;
- twoPhaseMixture twoPhaseProperties(U, phi);
+ incompressibleTwoPhaseMixture twoPhaseProperties(U, phi);
volScalarField& alpha1(twoPhaseProperties.alpha1());
+ volScalarField& alpha2(twoPhaseProperties.alpha2());
const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
@@ -48,7 +49,7 @@
mesh,
IOobject::READ_IF_PRESENT
),
- alpha1*rho1 + (scalar(1) - alpha1)*rho2,
+ alpha1*rho1 + alpha2*rho2,
alpha1.boundaryField().types()
);
rho.oldTime();
diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options
index 4fa14dd6d2..2a5429f7a8 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/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
@@ -12,8 +13,9 @@ EXE_INC = \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \
+ -ltwoPhaseMixture \
-linterfaceProperties \
- -ltwoPhaseInterfaceProperties \
+ -ltwoPhaseProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/correctPhi.H b/applications/solvers/multiphase/interFoam/interDyMFoam/correctPhi.H
index 0e373e1f40..c4cdbc044b 100644
--- a/applications/solvers/multiphase/interFoam/interDyMFoam/correctPhi.H
+++ b/applications/solvers/multiphase/interFoam/interDyMFoam/correctPhi.H
@@ -53,6 +53,8 @@
fvc::makeRelative(phi, U);
}
}
-
- #include "continuityErrs.H"
}
+
+phi.oldTime() = phi;
+
+#include "continuityErrs.H"
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..cc09aeb2f3 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/twoPhaseMixture/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,8 @@ EXE_INC = \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \
- -ltwoPhaseInterfaceProperties \
+ -ltwoPhaseMixture \
+ -ltwoPhaseProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options b/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options
index b5c7b88e4f..db2e1736ee 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/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
@@ -10,8 +11,9 @@ EXE_INC = \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \
+ -ltwoPhaseMixture \
-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..58b340781f 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/twoPhaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
@@ -7,8 +8,9 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
+ -ltwoPhaseMixture \
-linterfaceProperties \
- -ltwoPhaseInterfaceProperties \
+ -ltwoPhaseProperties \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H
index 7ff971ed7f..817db5012c 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H
@@ -49,8 +49,6 @@
}
}
- #include "continuityErrs.H"
-
p == p_rgh + rho*gh;
if (p_rgh.needReference())
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/multiphaseEulerFoam/UEqns.H b/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H
index e6478e4d89..7584d84f27 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H
@@ -1,3 +1,5 @@
+#include "mrfZonesCorrectBCs.H"
+
PtrList UEqns(fluid.phases().size());
autoPtr dragCoeffs(fluid.dragCoeffs());
@@ -32,9 +34,10 @@ forAllIter(PtrDictionary, fluid.phases(), iter)
"div(Rc)"
)
==
- - fvm::Sp(fluid.dragCoeff(phase, dragCoeffs())/phase.rho(), U)
+ //- fvm::Sp(fluid.dragCoeff(phase, dragCoeffs())/phase.rho(), U)
//- (alpha*phase.rho())*fluid.lift(phase)
- + (alpha/phase.rho())*fluid.Svm(phase)
+ //+
+ (alpha/phase.rho())*fluid.Svm(phase)
- fvm::Sp
(
slamDampCoeff
@@ -53,7 +56,7 @@ forAllIter(PtrDictionary, fluid.phases(), iter)
alpha*(1 + (1/phase.rho())*fluid.Cvm(phase)),
UEqns[phasei]
);
- UEqns[phasei].relax();
+ //UEqns[phasei].relax();
phasei++;
}
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/mrfZonesCorrectBCs.H b/applications/solvers/multiphase/multiphaseEulerFoam/mrfZonesCorrectBCs.H
new file mode 100644
index 0000000000..d670aa4a41
--- /dev/null
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/mrfZonesCorrectBCs.H
@@ -0,0 +1,6 @@
+ forAllIter(PtrDictionary, fluid.phases(), iter)
+ {
+ mrfZones.correctBoundaryVelocity(iter().U());
+ }
+
+ mrfZones.correctBoundaryVelocity(U);
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
index d1804b5b6d..acad49cd96 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -418,6 +418,47 @@ Foam::multiphaseSystem::multiphaseSystem
).ptr()
);
}
+
+ forAllConstIter(PtrDictionary, phases_, iter1)
+ {
+ const phaseModel& phase1 = iter1();
+
+ forAllConstIter(PtrDictionary, phases_, iter2)
+ {
+ const phaseModel& phase2 = iter2();
+
+ if (&phase2 != &phase1)
+ {
+ scalarCoeffSymmTable::const_iterator sigma
+ (
+ sigmas_.find(interfacePair(phase1, phase2))
+ );
+
+ if (sigma != sigmas_.end())
+ {
+ scalarCoeffSymmTable::const_iterator cAlpha
+ (
+ cAlphas_.find(interfacePair(phase1, phase2))
+ );
+
+ if (cAlpha == cAlphas_.end())
+ {
+ WarningIn
+ (
+ "multiphaseSystem::multiphaseSystem"
+ "(const volVectorField& U,"
+ "const surfaceScalarField& phi)"
+ ) << "Compression coefficient not specified for "
+ "phase pair ("
+ << phase1.name() << ' ' << phase2.name()
+ << ") for which a surface tension "
+ "coefficient is specified"
+ << endl;
+ }
+ }
+ }
+ }
+ }
}
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H
index 07d867b1e7..5e71a2eeeb 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H
@@ -67,8 +67,29 @@
const volScalarField& alpha = phase;
alphafs.set(phasei, fvc::interpolate(alpha).ptr());
- rAUs.set(phasei, (1.0/UEqns[phasei].A()).ptr());
- rAlphaAUfs.set(phasei, fvc::interpolate(alpha*rAUs[phasei]).ptr());
+
+ volScalarField dragCoeffi
+ (
+ IOobject
+ (
+ "dragCoeffi",
+ runTime.timeName(),
+ mesh
+ ),
+ fluid.dragCoeff(phase, dragCoeffs())/phase.rho(),
+ zeroGradientFvPatchScalarField::typeName
+ );
+ dragCoeffi.correctBoundaryConditions();
+
+ rAUs.set(phasei, (1.0/(UEqns[phasei].A() + dragCoeffi)).ptr());
+ rAlphaAUfs.set
+ (
+ phasei,
+ (
+ alphafs[phasei]
+ /fvc::interpolate(UEqns[phasei].A() + dragCoeffi)
+ ).ptr()
+ );
HbyAs[phasei] = rAUs[phasei]*UEqns[phasei].H();
@@ -115,10 +136,9 @@
}
phiHbyAs[phasei] +=
- fvc::interpolate
- (
- (1.0/phase.rho())*rAUs[phasei]*(*dcIter())
- )*phase2Ptr->phi();
+ fvc::interpolate((*dcIter())/phase.rho())
+ /fvc::interpolate(UEqns[phasei].A() + dragCoeffi)
+ *phase2Ptr->phi();
HbyAs[phasei] +=
(1.0/phase.rho())*rAUs[phasei]*(*dcIter())
@@ -240,7 +260,7 @@
+ rAlphaAUfs[phasei]*mSfGradp/phase.rho()
);
- // phase.U() = fvc::reconstruct(phase.phi());
+ //phase.U() = fvc::reconstruct(phase.phi());
phase.U().correctBoundaryConditions();
U += alpha*phase.U();
diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.C
index 543927e29b..f74ef12513 100644
--- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.C
+++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.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
@@ -26,6 +26,7 @@ License
#include "phaseModel.H"
#include "diameterModel.H"
#include "fixedValueFvPatchFields.H"
+#include "slipFvPatchFields.H"
#include "surfaceInterpolate.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@@ -152,7 +153,11 @@ Foam::phaseModel::phaseModel
forAll(U_.boundaryField(), i)
{
- if (isA(U_.boundaryField()[i]))
+ if
+ (
+ isA(U_.boundaryField()[i])
+ || isA(U_.boundaryField()[i])
+ )
{
phiTypes[i] = fixedValueFvPatchScalarField::typeName;
}
diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options b/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options
index 6e20519ec9..53ea250a16 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/twoPhaseMixture/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 \
+ -ltwoPhaseMixture \
-lincompressibleTransportModels \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaDiffusionEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaDiffusionEqn.H
index 139646e43c..6bc5953a4a 100644
--- a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaDiffusionEqn.H
+++ b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaDiffusionEqn.H
@@ -12,7 +12,8 @@
alpha1Eqn.solve();
+ alpha2 = 1.0 - alpha1;
rhoPhi += alpha1Eqn.flux()*(rho1 - rho2);
}
-rho = alpha1*rho1 + (scalar(1) - alpha1)*rho2;
+rho = alpha1*rho1 + alpha2*rho2;
diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqnSubCycle.H b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqnSubCycle.H
index 6c82f94049..57c78027a4 100644
--- a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqnSubCycle.H
+++ b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqnSubCycle.H
@@ -23,4 +23,4 @@ else
#include "alphaEqn.H"
}
-rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;
+rho == alpha1*rho1 + alpha2*rho2;
diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H b/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H
index 0d01b9a9e5..18b686f4f8 100644
--- a/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H
+++ b/applications/solvers/multiphase/twoLiquidMixingFoam/createFields.H
@@ -29,9 +29,10 @@
#include "createPhi.H"
Info<< "Reading transportProperties\n" << endl;
- twoPhaseMixture twoPhaseProperties(U, phi);
+ incompressibleTwoPhaseMixture twoPhaseProperties(U, phi);
volScalarField& alpha1(twoPhaseProperties.alpha1());
+ volScalarField& alpha2(twoPhaseProperties.alpha2());
const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
@@ -42,7 +43,7 @@
dimensionedScalar alphatab(twoPhaseProperties.lookup("alphatab"));
// Need to store rho for ddt(rho, U)
- volScalarField rho("rho", alpha1*rho1 + (scalar(1) - alpha1)*rho2);
+ volScalarField rho("rho", alpha1*rho1 + alpha2*rho2);
rho.oldTime();
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/solvers/multiphase/twoPhaseEulerFoam/alphaEqn.H b/applications/solvers/multiphase/twoPhaseEulerFoam/alphaEqn.H
index ddb923cf87..ae21059446 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/alphaEqn.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/alphaEqn.H
@@ -1,7 +1,4 @@
{
- label nAlphaCorr(readLabel(pimple.dict().lookup("nAlphaCorr")));
- label nAlphaSubCycles(readLabel(pimple.dict().lookup("nAlphaSubCycles")));
-
word alphaScheme("div(phi,alpha1)");
word alpharScheme("div(phir,alpha1)");
@@ -24,7 +21,7 @@
!(++alphaSubCycle).end();
)
{
- surfaceScalarField phiAlpha
+ surfaceScalarField alphaPhic1
(
fvc::flux
(
@@ -44,7 +41,7 @@
(
alpha1,
phi,
- phiAlpha,
+ alphaPhic1,
(g0.value() > 0 ? alphaMax : 1),
0
);
@@ -54,11 +51,6 @@
{
surfaceScalarField alpha1f(fvc::interpolate(alpha1));
- // ppMagf = rAU1f*fvc::interpolate
- // (
- // (1.0/(rho1*(alpha1 + scalar(0.0001))))
- // *g0*min(exp(preAlphaExp*(alpha1 - alphaMax)), expMax)
- // );
ppMagf =
rAU1f/(alpha1f + scalar(0.0001))
*(g0/rho1)*min(exp(preAlphaExp*(alpha1f - alphaMax)), expMax);
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C
index aebc7ba6cb..85ee12b316 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.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
@@ -25,6 +25,7 @@ License
#include "phaseModel.H"
#include "fixedValueFvPatchFields.H"
+#include "slipFvPatchFields.H"
#include "surfaceInterpolate.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@@ -114,7 +115,11 @@ Foam::phaseModel::phaseModel
forAll(U_.boundaryField(), i)
{
- if (isA(U_.boundaryField()[i]))
+ if
+ (
+ isA(U_.boundaryField()[i])
+ || isA(U_.boundaryField()[i])
+ )
{
phiTypes[i] = fixedValueFvPatchScalarField::typeName;
}
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/readTwoPhaseEulerFoamControls.H b/applications/solvers/multiphase/twoPhaseEulerFoam/readTwoPhaseEulerFoamControls.H
index 4e6847debe..1abe3ef10d 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/readTwoPhaseEulerFoamControls.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/readTwoPhaseEulerFoamControls.H
@@ -1,3 +1,5 @@
#include "readTimeControls.H"
+ int nAlphaCorr(readInt(pimple.dict().lookup("nAlphaCorr")));
+ int nAlphaSubCycles(readInt(pimple.dict().lookup("nAlphaSubCycles")));
Switch correctAlpha(pimple.dict().lookup("correctAlpha"));
diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.C b/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.C
index a0056d3c9a..57f4e68589 100644
--- a/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.C
+++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.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
@@ -181,7 +181,7 @@ void tractionDisplacementFvPatchVectorField::updateCoeffs()
gradient() =
(
- (traction_ + pressure_*n)/rho
+ (traction_ - pressure_*n)/rho
+ twoMuLambda*fvPatchField::snGrad() - (n & sigmaD)
)/twoMuLambda;
diff --git a/applications/test/BinSum/Test-BinSum.C b/applications/test/BinSum/Test-BinSum.C
index f8d9532aeb..873e7eb893 100644
--- a/applications/test/BinSum/Test-BinSum.C
+++ b/applications/test/BinSum/Test-BinSum.C
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
diff --git a/applications/test/Matrix/Test-Matrix.C b/applications/test/Matrix/Test-Matrix.C
index 600d0ad60f..bbe3e1f3ae 100644
--- a/applications/test/Matrix/Test-Matrix.C
+++ b/applications/test/Matrix/Test-Matrix.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
@@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/
-#include "SquareMatrix.H"
+#include "scalarMatrices.H"
#include "vector.H"
using namespace Foam;
@@ -49,15 +49,15 @@ int main(int argc, char *argv[])
Info<< max(hmm) << endl;
Info<< min(hmm) << endl;
- SquareMatrix hmm2(3, 1.0);
+ SquareMatrix hmm2(3, 3, 1.0);
hmm = hmm2;
Info<< hmm << endl;
- SquareMatrix hmm3(Sin);
+ //SquareMatrix hmm3(Sin);
- Info<< hmm3 << endl;
+ //Info<< hmm3 << endl;
SquareMatrix hmm4;
@@ -70,7 +70,65 @@ int main(int argc, char *argv[])
hmm4 = hmm5;
Info<< hmm5 << endl;
- Info<< "End\n" << endl;
+ {
+ scalarSymmetricSquareMatrix symmMatrix(3, 3, 0);
+
+ symmMatrix(0, 0) = 4;
+ symmMatrix(1, 0) = 12;
+ symmMatrix(1, 1) = 37;
+ symmMatrix(2, 0) = -16;
+ symmMatrix(2, 1) = -43;
+ symmMatrix(2, 2) = 98;
+
+ Info<< "Symmetric Square Matrix = " << symmMatrix << endl;
+
+ Info<< "Inverse = " << inv(symmMatrix) << endl;
+ Info<< "Determinant = " << det(symmMatrix) << endl;
+
+ scalarSymmetricSquareMatrix symmMatrix2(symmMatrix);
+ LUDecompose(symmMatrix2);
+
+ Info<< "Inverse = " << invDecomposed(symmMatrix2) << endl;
+ Info<< "Determinant = " << detDecomposed(symmMatrix2) << endl;
+
+ scalarDiagonalMatrix rhs(3, 0);
+ rhs[0] = 1;
+ rhs[1] = 2;
+ rhs[2] = 3;
+
+ LUsolve(symmMatrix, rhs);
+
+ Info<< "Decomposition = " << symmMatrix << endl;
+ Info<< "Solution = " << rhs << endl;
+ }
+
+ {
+ scalarSquareMatrix squareMatrix(3, 3, 0);
+
+ squareMatrix[0][0] = 4;
+ squareMatrix[0][1] = 12;
+ squareMatrix[0][2] = -16;
+ squareMatrix[1][0] = 12;
+ squareMatrix[1][1] = 37;
+ squareMatrix[1][2] = -43;
+ squareMatrix[2][0] = -16;
+ squareMatrix[2][1] = -43;
+ squareMatrix[2][2] = 98;
+
+ Info<< nl << "Square Matrix = " << squareMatrix << endl;
+
+ scalarDiagonalMatrix rhs(3, 0);
+ rhs[0] = 1;
+ rhs[1] = 2;
+ rhs[2] = 3;
+
+ LUsolve(squareMatrix, rhs);
+
+ Info<< "Decomposition = " << squareMatrix << endl;
+ Info<< "Solution = " << rhs << endl;
+ }
+
+ Info<< "\nEnd\n" << endl;
return 0;
}
diff --git a/applications/test/PatchTools/Make/files b/applications/test/PatchTools/Make/files
new file mode 100644
index 0000000000..d148320dc5
--- /dev/null
+++ b/applications/test/PatchTools/Make/files
@@ -0,0 +1,3 @@
+Test-PatchTools.C
+
+EXE = $(FOAM_USER_APPBIN)/Test-PatchTools
diff --git a/applications/test/PatchTools/Make/options b/applications/test/PatchTools/Make/options
new file mode 100644
index 0000000000..3d00e249a6
--- /dev/null
+++ b/applications/test/PatchTools/Make/options
@@ -0,0 +1,7 @@
+EXE_INC = \
+ -I$(LIB_SRC)/finiteVolume/lnInclude \
+ -I$(LIB_SRC)/meshTools/lnInclude \
+ -I$(LIB_SRC)/surfMesh/lnInclude
+
+EXE_LIBS = \
+ -lfiniteVolume
diff --git a/applications/test/PatchTools/Test-PatchTools.C b/applications/test/PatchTools/Test-PatchTools.C
new file mode 100644
index 0000000000..4cf3eb0a0b
--- /dev/null
+++ b/applications/test/PatchTools/Test-PatchTools.C
@@ -0,0 +1,297 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2012-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 .
+
+Application
+ testPatchTools
+
+Description
+ Test app for PatchTools functionality
+
+\*---------------------------------------------------------------------------*/
+
+#include "PatchTools.H"
+#include "argList.H"
+#include "fvMesh.H"
+#include "volFields.H"
+#include "Time.H"
+#include "OBJstream.H"
+
+using namespace Foam;
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+//template
+//Foam::tmp
+//areaPointNormals
+//(
+// const polyMesh& mesh,
+// const PatchType& p,
+// const labelList& meshFaces
+//)
+//{
+// // Assume patch is smaller than the globalData().coupledPatch() (?) so
+// // loop over patch meshPoints.
+//
+// const labelList& meshPoints = p.meshPoints();
+//
+// const globalMeshData& globalData = mesh.globalData();
+// const indirectPrimitivePatch& coupledPatch = globalData.coupledPatch();
+// const Map
6 Support and development contracts
+6 Support and development contracts
http://www.OpenFOAM.com/support @@ -174,17 +185,19 @@ lang="en" xml:lang="en">