mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
MRG: Integrated Foundation code to commit 7d6845d
This commit is contained in:
@ -13,10 +13,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/solidChemistryModel/lnInclude \
|
||||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
@ -38,9 +35,6 @@ EXE_LIBS = \
|
|||||||
-lspecie \
|
-lspecie \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
-lsolidProperties \
|
|
||||||
-lsolidMixtureProperties \
|
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lSLGThermo \
|
-lSLGThermo \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
autoPtr<rhoThermo> pThermo
|
autoPtr<rhoThermo> pThermo
|
||||||
|
autoPtr<fluidThermo> pThermo
|
||||||
(
|
(
|
||||||
rhoThermo::New(mesh)
|
fluidThermo::New(mesh)
|
||||||
);
|
);
|
||||||
rhoThermo& thermo = pThermo();
|
fluidThermo& thermo = pThermo();
|
||||||
thermo.validate(args.executable(), "h", "e");
|
thermo.validate(args.executable(), "h", "e");
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
@ -37,6 +38,7 @@ volVectorField U
|
|||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
|
pressureControl pressureControl(p, rho, simple.dict());
|
||||||
|
|
||||||
label pRefCell = 0;
|
label pRefCell = 0;
|
||||||
scalar pRefValue = 0.0;
|
scalar pRefValue = 0.0;
|
||||||
|
|||||||
@ -10,20 +10,23 @@
|
|||||||
|
|
||||||
if (simple.transonic())
|
if (simple.transonic())
|
||||||
{
|
{
|
||||||
|
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(rho*HbyA));
|
||||||
|
surfaceScalarField rhof(fvc::interpolate(rho));
|
||||||
|
MRF.makeRelative(rhof, phiHbyA);
|
||||||
|
|
||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(psi)
|
(fvc::interpolate(psi)/rhof)*phiHbyA
|
||||||
*fvc::flux(HbyA)
|
|
||||||
);
|
);
|
||||||
|
phiHbyA -= fvc::interpolate(p)*phid;
|
||||||
MRF.makeRelative(fvc::interpolate(psi), phid);
|
|
||||||
|
|
||||||
while (simple.correctNonOrthogonal())
|
while (simple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
fvm::div(phid, p)
|
fvc::div(phiHbyA)
|
||||||
|
+ fvm::div(phid, p)
|
||||||
- fvm::laplacian(rhorAUf, p)
|
- fvm::laplacian(rhorAUf, p)
|
||||||
==
|
==
|
||||||
fvOptions(psi, p, rho.name())
|
fvOptions(psi, p, rho.name())
|
||||||
@ -32,13 +35,17 @@
|
|||||||
// Relax the pressure equation to ensure diagonal-dominance
|
// Relax the pressure equation to ensure diagonal-dominance
|
||||||
pEqn.relax();
|
pEqn.relax();
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
pEqn.setReference
|
||||||
|
(
|
||||||
|
pressureControl.refCell(),
|
||||||
|
pressureControl.refValue()
|
||||||
|
);
|
||||||
|
|
||||||
pEqn.solve();
|
pEqn.solve();
|
||||||
|
|
||||||
if (simple.finalNonOrthogonalIter())
|
if (simple.finalNonOrthogonalIter())
|
||||||
{
|
{
|
||||||
phi == pEqn.flux();
|
phi = phiHbyA + pEqn.flux();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -62,7 +69,11 @@
|
|||||||
fvOptions(psi, p, rho.name())
|
fvOptions(psi, p, rho.name())
|
||||||
);
|
);
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
pEqn.setReference
|
||||||
|
(
|
||||||
|
pressureControl.refCell(),
|
||||||
|
pressureControl.refValue()
|
||||||
|
);
|
||||||
|
|
||||||
pEqn.solve();
|
pEqn.solve();
|
||||||
|
|
||||||
@ -83,6 +94,8 @@
|
|||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
fvOptions.correct(U);
|
fvOptions.correct(U);
|
||||||
|
|
||||||
|
pressureControl.limit(p);
|
||||||
|
|
||||||
// For closed-volume cases adjust the pressure and density levels
|
// For closed-volume cases adjust the pressure and density levels
|
||||||
// to obey overall mass continuity
|
// to obey overall mass continuity
|
||||||
if (closedVolume)
|
if (closedVolume)
|
||||||
@ -91,9 +104,9 @@
|
|||||||
/fvc::domainIntegrate(psi);
|
/fvc::domainIntegrate(psi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p.correctBoundaryConditions();
|
||||||
|
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
rho = max(rho, rhoMin);
|
|
||||||
rho = min(rho, rhoMax);
|
|
||||||
|
|
||||||
thermo.rho() = max(thermo.rho(), rhoMin);
|
thermo.rho() = max(thermo.rho(), rhoMin);
|
||||||
thermo.rho() = min(thermo.rho(), rhoMax);
|
thermo.rho() = min(thermo.rho(), rhoMax);
|
||||||
@ -102,8 +115,4 @@
|
|||||||
{
|
{
|
||||||
rho.relax();
|
rho.relax();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "rho max/min : "
|
|
||||||
<< max(rho).value() << " "
|
|
||||||
<< min(rho).value() << endl;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,20 +7,19 @@ bool closedVolume = false;
|
|||||||
|
|
||||||
if (simple.transonic())
|
if (simple.transonic())
|
||||||
{
|
{
|
||||||
|
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(rho*HbyA));
|
||||||
|
surfaceScalarField rhof(fvc::interpolate(rho));
|
||||||
|
MRF.makeRelative(rhof, phiHbyA);
|
||||||
|
|
||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(psi)
|
(fvc::interpolate(psi)/rhof)*phiHbyA
|
||||||
*fvc::flux(HbyA)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
MRF.makeRelative(fvc::interpolate(psi), phid);
|
phiHbyA +=
|
||||||
|
|
||||||
surfaceScalarField phic
|
|
||||||
(
|
|
||||||
"phic",
|
|
||||||
fvc::interpolate(rho*(rAtU - rAU))*fvc::snGrad(p)*mesh.magSf()
|
fvc::interpolate(rho*(rAtU - rAU))*fvc::snGrad(p)*mesh.magSf()
|
||||||
);
|
- fvc::interpolate(p)*phid;
|
||||||
|
|
||||||
HbyA -= (rAU - rAtU)*fvc::grad(p);
|
HbyA -= (rAU - rAtU)*fvc::grad(p);
|
||||||
|
|
||||||
@ -31,7 +30,7 @@ if (simple.transonic())
|
|||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
fvm::div(phid, p)
|
fvm::div(phid, p)
|
||||||
+ fvc::div(phic)
|
+ fvc::div(phiHbyA)
|
||||||
- fvm::laplacian(rhorAtU, p)
|
- fvm::laplacian(rhorAtU, p)
|
||||||
==
|
==
|
||||||
fvOptions(psi, p, rho.name())
|
fvOptions(psi, p, rho.name())
|
||||||
@ -40,13 +39,17 @@ if (simple.transonic())
|
|||||||
// Relax the pressure equation to maintain diagonal dominance
|
// Relax the pressure equation to maintain diagonal dominance
|
||||||
pEqn.relax();
|
pEqn.relax();
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
pEqn.setReference
|
||||||
|
(
|
||||||
|
pressureControl.refCell(),
|
||||||
|
pressureControl.refValue()
|
||||||
|
);
|
||||||
|
|
||||||
pEqn.solve();
|
pEqn.solve();
|
||||||
|
|
||||||
if (simple.finalNonOrthogonalIter())
|
if (simple.finalNonOrthogonalIter())
|
||||||
{
|
{
|
||||||
phi == phic + pEqn.flux();
|
phi = phiHbyA + pEqn.flux();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -75,7 +78,11 @@ else
|
|||||||
fvOptions(psi, p, rho.name())
|
fvOptions(psi, p, rho.name())
|
||||||
);
|
);
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
pEqn.setReference
|
||||||
|
(
|
||||||
|
pressureControl.refCell(),
|
||||||
|
pressureControl.refValue()
|
||||||
|
);
|
||||||
|
|
||||||
pEqn.solve();
|
pEqn.solve();
|
||||||
|
|
||||||
@ -97,6 +104,8 @@ U = HbyA - rAtU*fvc::grad(p);
|
|||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
fvOptions.correct(U);
|
fvOptions.correct(U);
|
||||||
|
|
||||||
|
pressureControl.limit(p);
|
||||||
|
|
||||||
// For closed-volume cases adjust the pressure and density levels
|
// For closed-volume cases adjust the pressure and density levels
|
||||||
// to obey overall mass continuity
|
// to obey overall mass continuity
|
||||||
if (closedVolume)
|
if (closedVolume)
|
||||||
@ -105,10 +114,10 @@ if (closedVolume)
|
|||||||
/fvc::domainIntegrate(psi);
|
/fvc::domainIntegrate(psi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p.correctBoundaryConditions();
|
||||||
|
|
||||||
// Recalculate density from the relaxed pressure
|
// Recalculate density from the relaxed pressure
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
rho = max(rho, rhoMin);
|
|
||||||
rho = min(rho, rhoMax);
|
|
||||||
thermo.rho() = max(thermo.rho(), rhoMin);
|
thermo.rho() = max(thermo.rho(), rhoMin);
|
||||||
thermo.rho() = min(thermo.rho(), rhoMax);
|
thermo.rho() = min(thermo.rho(), rhoMax);
|
||||||
|
|
||||||
@ -116,5 +125,3 @@ if (!simple.transonic())
|
|||||||
{
|
{
|
||||||
rho.relax();
|
rho.relax();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;
|
|
||||||
|
|||||||
@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
volScalarField& he = thermo.he();
|
|
||||||
|
|
||||||
fvScalarMatrix EEqn
|
|
||||||
(
|
|
||||||
fvm::div(phi, he)
|
|
||||||
+ (
|
|
||||||
he.name() == "e"
|
|
||||||
? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho))
|
|
||||||
: fvc::div(phi, volScalarField("K", 0.5*magSqr(U)))
|
|
||||||
)
|
|
||||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
|
||||||
==
|
|
||||||
fvOptions(rho, he)
|
|
||||||
);
|
|
||||||
|
|
||||||
EEqn.relax();
|
|
||||||
|
|
||||||
fvOptions.constrain(EEqn);
|
|
||||||
|
|
||||||
EEqn.solve();
|
|
||||||
|
|
||||||
fvOptions.correct(he);
|
|
||||||
|
|
||||||
thermo.correct();
|
|
||||||
}
|
|
||||||
@ -1,10 +1,10 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<rhoThermo> pThermo
|
autoPtr<fluidThermo> pThermo
|
||||||
(
|
(
|
||||||
rhoThermo::New(mesh)
|
fluidThermo::New(mesh)
|
||||||
);
|
);
|
||||||
rhoThermo& thermo = pThermo();
|
fluidThermo& thermo = pThermo();
|
||||||
thermo.validate(args.executable(), "h", "e");
|
thermo.validate(args.executable(), "h", "e");
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
@ -38,35 +38,10 @@ volVectorField U
|
|||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
|
pressureControl pressureControl(p, rho, simple.dict());
|
||||||
label pRefCell = 0;
|
|
||||||
scalar pRefValue = 0.0;
|
|
||||||
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
|
||||||
|
|
||||||
mesh.setFluxRequired(p.name());
|
mesh.setFluxRequired(p.name());
|
||||||
|
|
||||||
dimensionedScalar rhoMax
|
|
||||||
(
|
|
||||||
dimensionedScalar::lookupOrDefault
|
|
||||||
(
|
|
||||||
"rhoMax",
|
|
||||||
simple.dict(),
|
|
||||||
dimDensity,
|
|
||||||
GREAT
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar rhoMin
|
|
||||||
(
|
|
||||||
dimensionedScalar::lookupOrDefault
|
|
||||||
(
|
|
||||||
"rhoMin",
|
|
||||||
simple.dict(),
|
|
||||||
dimDensity,
|
|
||||||
0
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Creating turbulence model\n" << endl;
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
autoPtr<compressible::turbulenceModel> turbulence
|
autoPtr<compressible::turbulenceModel> turbulence
|
||||||
(
|
(
|
||||||
|
|||||||
@ -48,7 +48,11 @@
|
|||||||
|
|
||||||
fvScalarMatrix& pEqn = tpEqn.ref();
|
fvScalarMatrix& pEqn = tpEqn.ref();
|
||||||
|
|
||||||
pEqn.setReference(pRefCell, pRefValue);
|
pEqn.setReference
|
||||||
|
(
|
||||||
|
pressureControl.refCell(),
|
||||||
|
pressureControl.refValue()
|
||||||
|
);
|
||||||
|
|
||||||
pEqn.solve();
|
pEqn.solve();
|
||||||
|
|
||||||
@ -75,6 +79,8 @@
|
|||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
fvOptions.correct(U);
|
fvOptions.correct(U);
|
||||||
|
|
||||||
|
pressureControl.limit(p);
|
||||||
|
|
||||||
// For closed-volume cases adjust the pressure and density levels
|
// For closed-volume cases adjust the pressure and density levels
|
||||||
// to obey overall mass continuity
|
// to obey overall mass continuity
|
||||||
if (closedVolume)
|
if (closedVolume)
|
||||||
@ -84,14 +90,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
rho = max(rho, rhoMin);
|
|
||||||
rho = min(rho, rhoMax);
|
|
||||||
|
|
||||||
thermo.rho() = max(thermo.rho(), rhoMin);
|
thermo.rho() = max(thermo.rho(), rhoMin);
|
||||||
thermo.rho() = min(thermo.rho(), rhoMax);
|
thermo.rho() = min(thermo.rho(), rhoMax);
|
||||||
|
|
||||||
rho.relax();
|
rho.relax();
|
||||||
Info<< "rho max/min : "
|
|
||||||
<< max(rho).value() << " "
|
|
||||||
<< min(rho).value() << endl;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -34,11 +34,12 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "rhoThermo.H"
|
#include "fluidThermo.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
|
#include "simpleControl.H"
|
||||||
|
#include "pressureControl.H"
|
||||||
#include "fvOptions.H"
|
#include "fvOptions.H"
|
||||||
#include "IOporosityModelList.H"
|
#include "IOporosityModelList.H"
|
||||||
#include "simpleControl.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -33,9 +33,10 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "rhoThermo.H"
|
#include "fluidThermo.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "simpleControl.H"
|
#include "simpleControl.H"
|
||||||
|
#include "pressureControl.H"
|
||||||
#include "fvOptions.H"
|
#include "fvOptions.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -25,7 +25,6 @@ EXE_LIBS = \
|
|||||||
-llagrangian \
|
-llagrangian \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
-llagrangianTurbulence \
|
-llagrangianTurbulence \
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-lradiationModels \
|
-lradiationModels \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
|
|||||||
@ -21,7 +21,6 @@ EXE_LIBS = \
|
|||||||
-llagrangian \
|
-llagrangian \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
-llagrangianTurbulence \
|
-llagrangianTurbulence \
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-lradiationModels \
|
-lradiationModels \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
|
|||||||
@ -10,10 +10,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
@ -38,11 +35,7 @@ EXE_LIBS = \
|
|||||||
-lspecie \
|
-lspecie \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
-lliquidProperties \
|
-lthermophysicalProperties \
|
||||||
-lliquidMixtureProperties \
|
|
||||||
-lsolidProperties \
|
|
||||||
-lsolidMixtureProperties \
|
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lSLGThermo \
|
-lSLGThermo \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
|
|||||||
@ -19,7 +19,6 @@ EXE_LIBS = \
|
|||||||
-llagrangian \
|
-llagrangian \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
-llagrangianTurbulence \
|
-llagrangianTurbulence \
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
|
|||||||
@ -23,7 +23,6 @@ EXE_LIBS = \
|
|||||||
-llagrangian \
|
-llagrangian \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
-llagrangianTurbulence \
|
-llagrangianTurbulence \
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
|
|||||||
@ -9,10 +9,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
@ -36,9 +33,6 @@ EXE_LIBS = \
|
|||||||
-lspecie \
|
-lspecie \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
-lsolidProperties \
|
|
||||||
-lsolidMixtureProperties \
|
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lSLGThermo \
|
-lSLGThermo \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
|
|||||||
@ -11,10 +11,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
@ -39,11 +36,7 @@ EXE_LIBS = \
|
|||||||
-lspecie \
|
-lspecie \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
-lliquidProperties \
|
-lthermophysicalProperties \
|
||||||
-lliquidMixtureProperties \
|
|
||||||
-lsolidProperties \
|
|
||||||
-lsolidMixtureProperties \
|
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lSLGThermo \
|
-lSLGThermo \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
|
|||||||
@ -11,10 +11,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
@ -39,11 +36,7 @@ EXE_LIBS = \
|
|||||||
-lspecie \
|
-lspecie \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
-lliquidProperties \
|
-lthermophysicalProperties \
|
||||||
-lliquidMixtureProperties \
|
|
||||||
-lsolidProperties \
|
|
||||||
-lsolidMixtureProperties \
|
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lSLGThermo \
|
-lSLGThermo \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
|
|||||||
@ -13,10 +13,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
@ -37,11 +34,7 @@ EXE_LIBS = \
|
|||||||
-lspecie \
|
-lspecie \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
-lliquidProperties \
|
-lthermophysicalProperties \
|
||||||
-lliquidMixtureProperties \
|
|
||||||
-lsolidProperties \
|
|
||||||
-lsolidMixtureProperties \
|
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lSLGThermo \
|
-lSLGThermo \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
|
|||||||
@ -14,10 +14,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
@ -41,11 +38,7 @@ EXE_LIBS = \
|
|||||||
-lspecie \
|
-lspecie \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
-lliquidProperties \
|
-lthermophysicalProperties \
|
||||||
-lliquidMixtureProperties \
|
|
||||||
-lsolidProperties \
|
|
||||||
-lsolidMixtureProperties \
|
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lSLGThermo \
|
-lSLGThermo \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
|
|||||||
@ -15,10 +15,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
@ -44,11 +41,7 @@ EXE_LIBS = \
|
|||||||
-lspecie \
|
-lspecie \
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
-lliquidProperties \
|
-lthermophysicalProperties \
|
||||||
-lliquidMixtureProperties \
|
|
||||||
-lsolidProperties \
|
|
||||||
-lsolidMixtureProperties \
|
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lSLGThermo \
|
-lSLGThermo \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
|
|||||||
@ -17,7 +17,6 @@ EXE_LIBS = \
|
|||||||
-llagrangian \
|
-llagrangian \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
-llagrangianTurbulence \
|
-llagrangianTurbulence \
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lcompressibleTransportModels \
|
-lcompressibleTransportModels \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -79,6 +79,8 @@
|
|||||||
|
|
||||||
if (MULESCorr)
|
if (MULESCorr)
|
||||||
{
|
{
|
||||||
|
#include "alphaSuSp.H"
|
||||||
|
|
||||||
fvScalarMatrix alpha1Eqn
|
fvScalarMatrix alpha1Eqn
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
@ -92,6 +94,8 @@
|
|||||||
phiCN,
|
phiCN,
|
||||||
upwind<scalar>(mesh, phiCN)
|
upwind<scalar>(mesh, phiCN)
|
||||||
).fvmDiv(phiCN, alpha1)
|
).fvmDiv(phiCN, alpha1)
|
||||||
|
==
|
||||||
|
Su + fvm::Sp(Sp + divU, alpha1)
|
||||||
);
|
);
|
||||||
|
|
||||||
alpha1Eqn.solve();
|
alpha1Eqn.solve();
|
||||||
@ -124,9 +128,11 @@
|
|||||||
|
|
||||||
for (int aCorr=0; aCorr<nAlphaCorr; aCorr++)
|
for (int aCorr=0; aCorr<nAlphaCorr; aCorr++)
|
||||||
{
|
{
|
||||||
|
#include "alphaSuSp.H"
|
||||||
|
|
||||||
surfaceScalarField phir(phic*mixture.nHatf());
|
surfaceScalarField phir(phic*mixture.nHatf());
|
||||||
|
|
||||||
alphaPhiUn =
|
tmp<surfaceScalarField> talphaPhiUn
|
||||||
(
|
(
|
||||||
fvc::flux
|
fvc::flux
|
||||||
(
|
(
|
||||||
@ -145,16 +151,26 @@
|
|||||||
// Calculate the Crank-Nicolson off-centred alpha flux
|
// Calculate the Crank-Nicolson off-centred alpha flux
|
||||||
if (ocCoeff > 0)
|
if (ocCoeff > 0)
|
||||||
{
|
{
|
||||||
alphaPhiUn =
|
talphaPhiUn =
|
||||||
cnCoeff*alphaPhiUn + (1.0 - cnCoeff)*alphaPhi.oldTime();
|
cnCoeff*talphaPhiUn + (1.0 - cnCoeff)*alphaPhi.oldTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MULESCorr)
|
if (MULESCorr)
|
||||||
{
|
{
|
||||||
tmp<surfaceScalarField> talphaPhiCorr(alphaPhiUn - alphaPhi);
|
tmp<surfaceScalarField> talphaPhiCorr(talphaPhiUn() - alphaPhi);
|
||||||
volScalarField alpha10("alpha10", alpha1);
|
volScalarField alpha10("alpha10", alpha1);
|
||||||
|
|
||||||
MULES::correct(alpha1, alphaPhiUn, talphaPhiCorr.ref(), 1, 0);
|
MULES::correct
|
||||||
|
(
|
||||||
|
geometricOneField(),
|
||||||
|
alpha1,
|
||||||
|
talphaPhiUn(),
|
||||||
|
talphaPhiCorr.ref(),
|
||||||
|
Sp,
|
||||||
|
(-Sp*alpha1)(),
|
||||||
|
1,
|
||||||
|
0
|
||||||
|
);
|
||||||
|
|
||||||
// Under-relax the correction for all but the 1st corrector
|
// Under-relax the correction for all but the 1st corrector
|
||||||
if (aCorr == 0)
|
if (aCorr == 0)
|
||||||
@ -169,9 +185,19 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alphaPhi = alphaPhiUn;
|
alphaPhi = talphaPhiUn;
|
||||||
|
|
||||||
MULES::explicitSolve(alpha1, phiCN, alphaPhi, 1, 0);
|
MULES::explicitSolve
|
||||||
|
(
|
||||||
|
geometricOneField(),
|
||||||
|
alpha1,
|
||||||
|
phiCN,
|
||||||
|
alphaPhi,
|
||||||
|
Sp,
|
||||||
|
(Su + divU*min(alpha1(), scalar(1)))(),
|
||||||
|
1,
|
||||||
|
0
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
alpha2 = 1.0 - alpha1;
|
alpha2 = 1.0 - alpha1;
|
||||||
@ -195,7 +221,8 @@
|
|||||||
== fv::EulerDdtScheme<vector>::typeName
|
== fv::EulerDdtScheme<vector>::typeName
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
rhoPhi = alphaPhi*(rho1 - rho2) + phiCN*rho2;
|
#include "rhofs.H"
|
||||||
|
rhoPhi = alphaPhi*(rho1f - rho2f) + phiCN*rho2f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -206,7 +233,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate the end-of-time-step mass flux
|
// Calculate the end-of-time-step mass flux
|
||||||
rhoPhi = alphaPhi*(rho1 - rho2) + phi*rho2;
|
#include "rhofs.H"
|
||||||
|
rhoPhi = alphaPhi*(rho1f - rho2f) + phi*rho2f;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Phase-1 volume fraction = "
|
Info<< "Phase-1 volume fraction = "
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -1,4 +1,6 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-I. \
|
||||||
|
-I../VoF \
|
||||||
-ItwoPhaseMixtureThermo \
|
-ItwoPhaseMixtureThermo \
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
|
|||||||
@ -12,12 +12,18 @@
|
|||||||
alpha1/mixture.thermo1().Cv()
|
alpha1/mixture.thermo1().Cv()
|
||||||
+ alpha2/mixture.thermo2().Cv()
|
+ alpha2/mixture.thermo2().Cv()
|
||||||
)
|
)
|
||||||
|
==
|
||||||
|
fvOptions(rho, T)
|
||||||
);
|
);
|
||||||
|
|
||||||
TEqn.relax();
|
TEqn.relax();
|
||||||
|
|
||||||
|
fvOptions.constrain(TEqn);
|
||||||
|
|
||||||
TEqn.solve();
|
TEqn.solve();
|
||||||
|
|
||||||
mixture.correct();
|
fvOptions.correct(T);
|
||||||
|
|
||||||
Info<< "min(T) " << min(T).value() << endl;
|
mixture.correctThermo();
|
||||||
|
mixture.correct();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,16 @@
|
|||||||
fvVectorMatrix UEqn
|
fvVectorMatrix UEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(rho, U)
|
fvm::ddt(rho, U) + fvm::div(rhoPhi, U)
|
||||||
+ fvm::div(rhoPhi, U)
|
+ MRF.DDt(rho, U)
|
||||||
+ turbulence->divDevRhoReff(U)
|
+ turbulence->divDevRhoReff(U)
|
||||||
|
==
|
||||||
|
fvOptions(rho, U)
|
||||||
);
|
);
|
||||||
|
|
||||||
UEqn.relax();
|
UEqn.relax();
|
||||||
|
|
||||||
|
fvOptions.constrain(UEqn);
|
||||||
|
|
||||||
if (pimple.momentumPredictor())
|
if (pimple.momentumPredictor())
|
||||||
{
|
{
|
||||||
solve
|
solve
|
||||||
@ -16,12 +20,14 @@
|
|||||||
fvc::reconstruct
|
fvc::reconstruct
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
interface.surfaceTensionForce()
|
mixture.surfaceTensionForce()
|
||||||
- ghf*fvc::snGrad(rho)
|
- ghf*fvc::snGrad(rho)
|
||||||
- fvc::snGrad(p_rgh)
|
- fvc::snGrad(p_rgh)
|
||||||
) * mesh.magSf()
|
) * mesh.magSf()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
fvOptions.correct(U);
|
||||||
|
|
||||||
K = 0.5*magSqr(U);
|
K = 0.5*magSqr(U);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
const dictionary& alphaControls = mesh.solverDict(alpha1.name());
|
|
||||||
|
|
||||||
label nAlphaCorr(readLabel(alphaControls.lookup("nAlphaCorr")));
|
|
||||||
|
|
||||||
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
|
|
||||||
@ -1,88 +0,0 @@
|
|||||||
{
|
|
||||||
word alphaScheme("div(phi,alpha)");
|
|
||||||
word alpharScheme("div(phirb,alpha)");
|
|
||||||
|
|
||||||
surfaceScalarField phir(phic*interface.nHatf());
|
|
||||||
|
|
||||||
for (int gCorr=0; gCorr<nAlphaCorr; gCorr++)
|
|
||||||
{
|
|
||||||
volScalarField::Internal Sp
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"Sp",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedScalar("Sp", dgdt.dimensions(), 0.0)
|
|
||||||
);
|
|
||||||
|
|
||||||
volScalarField::Internal Su
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"Su",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh
|
|
||||||
),
|
|
||||||
// Divergence term is handled explicitly to be
|
|
||||||
// consistent with the explicit transport solution
|
|
||||||
divU*min(alpha1, scalar(1))
|
|
||||||
);
|
|
||||||
|
|
||||||
forAll(dgdt, celli)
|
|
||||||
{
|
|
||||||
if (dgdt[celli] > 0.0 && alpha1[celli] > 0.0)
|
|
||||||
{
|
|
||||||
Sp[celli] -= dgdt[celli]*alpha1[celli];
|
|
||||||
Su[celli] += dgdt[celli]*alpha1[celli];
|
|
||||||
}
|
|
||||||
else if (dgdt[celli] < 0.0 && alpha1[celli] < 1.0)
|
|
||||||
{
|
|
||||||
Sp[celli] += dgdt[celli]*(1.0 - alpha1[celli]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
surfaceScalarField alphaPhi1
|
|
||||||
(
|
|
||||||
fvc::flux
|
|
||||||
(
|
|
||||||
phi,
|
|
||||||
alpha1,
|
|
||||||
alphaScheme
|
|
||||||
)
|
|
||||||
+ fvc::flux
|
|
||||||
(
|
|
||||||
-fvc::flux(-phir, alpha2, alpharScheme),
|
|
||||||
alpha1,
|
|
||||||
alpharScheme
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
MULES::explicitSolve
|
|
||||||
(
|
|
||||||
geometricOneField(),
|
|
||||||
alpha1,
|
|
||||||
phi,
|
|
||||||
alphaPhi1,
|
|
||||||
Sp,
|
|
||||||
Su,
|
|
||||||
1,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
|
|
||||||
surfaceScalarField rho1f(fvc::interpolate(rho1));
|
|
||||||
surfaceScalarField rho2f(fvc::interpolate(rho2));
|
|
||||||
rhoPhi = alphaPhi1*(rho1f - rho2f) + phi*rho2f;
|
|
||||||
|
|
||||||
alpha2 = scalar(1) - alpha1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Info<< "Liquid phase volume fraction = "
|
|
||||||
<< alpha1.weightedAverage(mesh.V()).value()
|
|
||||||
<< " Min(" << alpha1.name() << ") = " << min(alpha1).value()
|
|
||||||
<< " Min(" << alpha2.name() << ") = " << min(alpha2).value()
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
{
|
|
||||||
#include "alphaControls.H"
|
|
||||||
|
|
||||||
surfaceScalarField phic(mag(phi/mesh.magSf()));
|
|
||||||
phic = min(interface.cAlpha()*phic, max(phic));
|
|
||||||
|
|
||||||
volScalarField divU(fvc::div(fvc::absolute(phi, U)));
|
|
||||||
|
|
||||||
if (nAlphaSubCycles > 1)
|
|
||||||
{
|
|
||||||
dimensionedScalar totalDeltaT = runTime.deltaT();
|
|
||||||
surfaceScalarField rhoPhiSum
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"rhoPhiSum",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedScalar("0", rhoPhi.dimensions(), 0)
|
|
||||||
);
|
|
||||||
|
|
||||||
for
|
|
||||||
(
|
|
||||||
subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
|
|
||||||
!(++alphaSubCycle).end();
|
|
||||||
)
|
|
||||||
{
|
|
||||||
#include "alphaEqns.H"
|
|
||||||
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
|
|
||||||
}
|
|
||||||
|
|
||||||
rhoPhi = rhoPhiSum;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#include "alphaEqns.H"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
volScalarField::Internal Sp
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Sp",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("Sp", dgdt.dimensions(), 0)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField::Internal Su
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Su",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("Su", dgdt.dimensions(), 0)
|
||||||
|
);
|
||||||
|
|
||||||
|
forAll(dgdt, celli)
|
||||||
|
{
|
||||||
|
if (dgdt[celli] > 0.0 && alpha1[celli] > 0.0)
|
||||||
|
{
|
||||||
|
Sp[celli] -= dgdt[celli]*alpha1[celli];
|
||||||
|
Su[celli] += dgdt[celli]*alpha1[celli];
|
||||||
|
}
|
||||||
|
else if (dgdt[celli] < 0.0 && alpha1[celli] < 1.0)
|
||||||
|
{
|
||||||
|
Sp[celli] += dgdt[celli]*(1.0 - alpha1[celli]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
volScalarField::Internal divU
|
||||||
|
(
|
||||||
|
mesh.moving()
|
||||||
|
? fvc::div(phiCN() + mesh.phi())
|
||||||
|
: fvc::div(phiCN())
|
||||||
|
);
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
#include "alphaEqnSubCycle.H"
|
||||||
|
}
|
||||||
@ -1,5 +1,7 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-I. \
|
||||||
-I.. \
|
-I.. \
|
||||||
|
-I../../VoF \
|
||||||
-I../twoPhaseMixtureThermo \
|
-I../twoPhaseMixtureThermo \
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,9 +24,6 @@ License
|
|||||||
Application
|
Application
|
||||||
compressibleInterDyMFoam
|
compressibleInterDyMFoam
|
||||||
|
|
||||||
Group
|
|
||||||
grpMultiphaseSolvers grpMovingMeshSolvers
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Solver for 2 compressible, non-isothermal immiscible fluids using a VOF
|
Solver for 2 compressible, non-isothermal immiscible fluids using a VOF
|
||||||
(volume of fluid) phase-fraction based interface capturing approach,
|
(volume of fluid) phase-fraction based interface capturing approach,
|
||||||
@ -42,14 +39,18 @@ Description
|
|||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "dynamicFvMesh.H"
|
#include "dynamicFvMesh.H"
|
||||||
#include "MULES.H"
|
#include "CMULES.H"
|
||||||
|
#include "EulerDdtScheme.H"
|
||||||
|
#include "localEulerDdtScheme.H"
|
||||||
|
#include "CrankNicolsonDdtScheme.H"
|
||||||
#include "subCycle.H"
|
#include "subCycle.H"
|
||||||
#include "interfaceProperties.H"
|
|
||||||
#include "twoPhaseMixture.H"
|
#include "twoPhaseMixture.H"
|
||||||
#include "twoPhaseMixtureThermo.H"
|
#include "twoPhaseMixtureThermo.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
|
#include "fvOptions.H"
|
||||||
#include "CorrectPhi.H"
|
#include "CorrectPhi.H"
|
||||||
|
#include "fvcSmooth.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -63,6 +64,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
|
#include "createFvOptions.H"
|
||||||
#include "createUf.H"
|
#include "createUf.H"
|
||||||
#include "createControls.H"
|
#include "createControls.H"
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
@ -87,17 +89,28 @@ int main(int argc, char *argv[])
|
|||||||
// same divergence
|
// same divergence
|
||||||
volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U)));
|
volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U)));
|
||||||
|
|
||||||
|
if (LTS)
|
||||||
|
{
|
||||||
|
#include "setRDeltaT.H"
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
|
#include "alphaCourantNo.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
}
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
|
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
// --- Pressure-velocity PIMPLE corrector loop
|
||||||
|
while (pimple.loop())
|
||||||
|
{
|
||||||
|
if (pimple.firstIter() || moveMeshOuterCorrectors)
|
||||||
|
{
|
||||||
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
|
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
|
||||||
|
|
||||||
// Do any mesh changes
|
|
||||||
mesh.update();
|
mesh.update();
|
||||||
|
|
||||||
if (mesh.changing())
|
if (mesh.changing())
|
||||||
@ -110,7 +123,7 @@ int main(int argc, char *argv[])
|
|||||||
ghf = (g & mesh.Cf()) - ghRef;
|
ghf = (g & mesh.Cf()) - ghRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((correctPhi && mesh.changing()) || mesh.topoChanging())
|
if ((mesh.changing() && correctPhi)) || mesh.topoChanging())
|
||||||
{
|
{
|
||||||
// Calculate absolute flux from the mapped surface velocity
|
// Calculate absolute flux from the mapped surface velocity
|
||||||
// Note: temporary fix until mapped Uf is assessed
|
// Note: temporary fix until mapped Uf is assessed
|
||||||
@ -123,27 +136,19 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Make the fluxes relative to the mesh motion
|
// Make the fluxes relative to the mesh motion
|
||||||
fvc::makeRelative(phi, U);
|
fvc::makeRelative(phi, U);
|
||||||
}
|
|
||||||
|
mixture.correct();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mesh.changing() && checkMeshCourantNo)
|
if (mesh.changing() && checkMeshCourantNo)
|
||||||
{
|
{
|
||||||
#include "meshCourantNo.H"
|
#include "meshCourantNo.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
turbulence->correct();
|
|
||||||
|
|
||||||
// --- Pressure-velocity PIMPLE corrector loop
|
|
||||||
while (pimple.loop())
|
|
||||||
{
|
|
||||||
#include "alphaEqnsSubCycle.H"
|
|
||||||
|
|
||||||
// correct interface on first PIMPLE corrector
|
|
||||||
if (pimple.corr() == 1)
|
|
||||||
{
|
|
||||||
interface.correct();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include "alphaControls.H"
|
||||||
|
#include "compressibleAlphaEqnSubCycle.H"
|
||||||
|
|
||||||
solve(fvm::ddt(rho) + fvc::div(rhoPhi));
|
solve(fvm::ddt(rho) + fvc::div(rhoPhi));
|
||||||
|
|
||||||
#include "UEqn.H"
|
#include "UEqn.H"
|
||||||
@ -154,13 +159,12 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
#include "pEqn.H"
|
#include "pEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pimple.turbCorr())
|
||||||
|
{
|
||||||
|
turbulence->correct();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rho = alpha1*rho1 + alpha2*rho2;
|
|
||||||
|
|
||||||
// Correct p_rgh for consistency with p and the updated densities
|
|
||||||
p_rgh = p - rho*gh;
|
|
||||||
p_rgh.correctBoundaryConditions();
|
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
|
|||||||
@ -9,3 +9,8 @@ bool checkMeshCourantNo
|
|||||||
(
|
(
|
||||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
|
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
bool moveMeshOuterCorrectors
|
||||||
|
(
|
||||||
|
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false)
|
||||||
|
);
|
||||||
|
|||||||
@ -8,11 +8,12 @@
|
|||||||
fvc::flux(HbyA)
|
fvc::flux(HbyA)
|
||||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, Uf)
|
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, Uf)
|
||||||
);
|
);
|
||||||
|
MRF.makeRelative(phiHbyA);
|
||||||
|
|
||||||
surfaceScalarField phig
|
surfaceScalarField phig
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
interface.surfaceTensionForce()
|
mixture.surfaceTensionForce()
|
||||||
- ghf*fvc::snGrad(rho)
|
- ghf*fvc::snGrad(rho)
|
||||||
)*rAUf*mesh.magSf()
|
)*rAUf*mesh.magSf()
|
||||||
);
|
);
|
||||||
@ -20,7 +21,7 @@
|
|||||||
phiHbyA += phig;
|
phiHbyA += phig;
|
||||||
|
|
||||||
// Update the pressure BCs to ensure flux consistency
|
// Update the pressure BCs to ensure flux consistency
|
||||||
constrainPressure(p_rgh, U, phiHbyA, rAUf);
|
constrainPressure(p_rgh, U, phiHbyA, rAUf, MRF);
|
||||||
|
|
||||||
// Make the fluxes relative to the mesh motion
|
// Make the fluxes relative to the mesh motion
|
||||||
fvc::makeRelative(phiHbyA, U);
|
fvc::makeRelative(phiHbyA, U);
|
||||||
@ -92,6 +93,7 @@
|
|||||||
U = HbyA
|
U = HbyA
|
||||||
+ rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf);
|
+ rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
fvOptions.correct(U);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,7 +120,4 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
K = 0.5*magSqr(U);
|
K = 0.5*magSqr(U);
|
||||||
|
|
||||||
Info<< "max(U) " << max(mag(U)).value() << endl;
|
|
||||||
Info<< "min(p_rgh) " << min(p_rgh).value() << endl;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,3 +4,6 @@ correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
|
|||||||
|
|
||||||
checkMeshCourantNo =
|
checkMeshCourantNo =
|
||||||
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
|
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);
|
||||||
|
|
||||||
|
moveMeshOuterCorrectors =
|
||||||
|
pimple.dict().lookupOrDefault<Switch>("moveMeshOuterCorrectors", false);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -39,14 +39,18 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "MULES.H"
|
#include "CMULES.H"
|
||||||
|
#include "EulerDdtScheme.H"
|
||||||
|
#include "localEulerDdtScheme.H"
|
||||||
|
#include "CrankNicolsonDdtScheme.H"
|
||||||
#include "subCycle.H"
|
#include "subCycle.H"
|
||||||
#include "rhoThermo.H"
|
#include "rhoThermo.H"
|
||||||
#include "interfaceProperties.H"
|
|
||||||
#include "twoPhaseMixture.H"
|
#include "twoPhaseMixture.H"
|
||||||
#include "twoPhaseMixtureThermo.H"
|
#include "twoPhaseMixtureThermo.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
|
#include "fvOptions.H"
|
||||||
|
#include "fvcSmooth.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -60,8 +64,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
#include "createTimeControls.H"
|
#include "createTimeControls.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
#include "CourantNo.H"
|
#include "createFvOptions.H"
|
||||||
#include "setInitialDeltaT.H"
|
|
||||||
|
|
||||||
volScalarField& p = mixture.p();
|
volScalarField& p = mixture.p();
|
||||||
volScalarField& T = mixture.T();
|
volScalarField& T = mixture.T();
|
||||||
@ -70,6 +73,13 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
turbulence->validate();
|
turbulence->validate();
|
||||||
|
|
||||||
|
if (!LTS)
|
||||||
|
{
|
||||||
|
#include "readTimeControls.H"
|
||||||
|
#include "CourantNo.H"
|
||||||
|
#include "setInitialDeltaT.H"
|
||||||
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Info<< "\nStarting time loop\n" << endl;
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
@ -77,8 +87,17 @@ int main(int argc, char *argv[])
|
|||||||
while (runTime.run())
|
while (runTime.run())
|
||||||
{
|
{
|
||||||
#include "readTimeControls.H"
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
|
if (LTS)
|
||||||
|
{
|
||||||
|
#include "setRDeltaT.H"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
|
#include "alphaCourantNo.H"
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
}
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
|
|
||||||
@ -87,13 +106,8 @@ int main(int argc, char *argv[])
|
|||||||
// --- Pressure-velocity PIMPLE corrector loop
|
// --- Pressure-velocity PIMPLE corrector loop
|
||||||
while (pimple.loop())
|
while (pimple.loop())
|
||||||
{
|
{
|
||||||
#include "alphaEqnsSubCycle.H"
|
#include "alphaControls.H"
|
||||||
|
#include "alphaEqnSubCycle.H"
|
||||||
// correct interface on first PIMPLE corrector
|
|
||||||
if (pimple.corr() == 1)
|
|
||||||
{
|
|
||||||
interface.correct();
|
|
||||||
}
|
|
||||||
|
|
||||||
solve(fvm::ddt(rho) + fvc::div(rhoPhi));
|
solve(fvm::ddt(rho) + fvc::div(rhoPhi));
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
#include "createRDeltaT.H"
|
||||||
|
|
||||||
Info<< "Reading field p_rgh\n" << endl;
|
Info<< "Reading field p_rgh\n" << endl;
|
||||||
volScalarField p_rgh
|
volScalarField p_rgh
|
||||||
(
|
(
|
||||||
@ -29,7 +31,7 @@ volVectorField U
|
|||||||
#include "createPhi.H"
|
#include "createPhi.H"
|
||||||
|
|
||||||
Info<< "Constructing twoPhaseMixtureThermo\n" << endl;
|
Info<< "Constructing twoPhaseMixtureThermo\n" << endl;
|
||||||
twoPhaseMixtureThermo mixture(mesh);
|
twoPhaseMixtureThermo mixture(U, phi);
|
||||||
|
|
||||||
volScalarField& alpha1(mixture.alpha1());
|
volScalarField& alpha1(mixture.alpha1());
|
||||||
volScalarField& alpha2(mixture.alpha2());
|
volScalarField& alpha2(mixture.alpha2());
|
||||||
@ -61,6 +63,7 @@ dimensionedScalar pMin
|
|||||||
);
|
);
|
||||||
|
|
||||||
mesh.setFluxRequired(p_rgh.name());
|
mesh.setFluxRequired(p_rgh.name());
|
||||||
|
mesh.setFluxRequired(alpha1.name());
|
||||||
|
|
||||||
|
|
||||||
#include "readGravitationalAcceleration.H"
|
#include "readGravitationalAcceleration.H"
|
||||||
@ -89,9 +92,6 @@ volScalarField dgdt
|
|||||||
pos(alpha2)*fvc::div(phi)/max(alpha2, scalar(0.0001))
|
pos(alpha2)*fvc::div(phi)/max(alpha2, scalar(0.0001))
|
||||||
);
|
);
|
||||||
|
|
||||||
// Construct interface from alpha1 distribution
|
|
||||||
interfaceProperties interface(alpha1, U, mixture);
|
|
||||||
|
|
||||||
// Construct compressible turbulence model
|
// Construct compressible turbulence model
|
||||||
autoPtr<compressible::turbulenceModel> turbulence
|
autoPtr<compressible::turbulenceModel> turbulence
|
||||||
(
|
(
|
||||||
@ -100,3 +100,22 @@ autoPtr<compressible::turbulenceModel> turbulence
|
|||||||
|
|
||||||
Info<< "Creating field kinetic energy K\n" << endl;
|
Info<< "Creating field kinetic energy K\n" << endl;
|
||||||
volScalarField K("K", 0.5*magSqr(U));
|
volScalarField K("K", 0.5*magSqr(U));
|
||||||
|
|
||||||
|
// MULES flux from previous time-step
|
||||||
|
surfaceScalarField alphaPhi
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"alphaPhi",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::READ_IF_PRESENT,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
phi*fvc::interpolate(alpha1)
|
||||||
|
);
|
||||||
|
|
||||||
|
// MULES Correction
|
||||||
|
tmp<surfaceScalarField> talphaPhiCorr0;
|
||||||
|
|
||||||
|
#include "createMRF.H"
|
||||||
|
|||||||
@ -8,11 +8,12 @@
|
|||||||
fvc::flux(HbyA)
|
fvc::flux(HbyA)
|
||||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
|
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(U, phi)
|
||||||
);
|
);
|
||||||
|
MRF.makeRelative(phiHbyA);
|
||||||
|
|
||||||
surfaceScalarField phig
|
surfaceScalarField phig
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
interface.surfaceTensionForce()
|
mixture.surfaceTensionForce()
|
||||||
- ghf*fvc::snGrad(rho)
|
- ghf*fvc::snGrad(rho)
|
||||||
)*rAUf*mesh.magSf()
|
)*rAUf*mesh.magSf()
|
||||||
);
|
);
|
||||||
@ -20,7 +21,7 @@
|
|||||||
phiHbyA += phig;
|
phiHbyA += phig;
|
||||||
|
|
||||||
// Update the pressure BCs to ensure flux consistency
|
// Update the pressure BCs to ensure flux consistency
|
||||||
constrainPressure(p_rgh, U, phiHbyA, rAUf);
|
constrainPressure(p_rgh, U, phiHbyA, rAUf, MRF);
|
||||||
|
|
||||||
tmp<fvScalarMatrix> p_rghEqnComp1;
|
tmp<fvScalarMatrix> p_rghEqnComp1;
|
||||||
tmp<fvScalarMatrix> p_rghEqnComp2;
|
tmp<fvScalarMatrix> p_rghEqnComp2;
|
||||||
@ -98,6 +99,7 @@
|
|||||||
U = HbyA
|
U = HbyA
|
||||||
+ rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf);
|
+ rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
fvOptions.correct(U);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +114,4 @@
|
|||||||
p_rgh.correctBoundaryConditions();
|
p_rgh.correctBoundaryConditions();
|
||||||
|
|
||||||
K = 0.5*magSqr(U);
|
K = 0.5*magSqr(U);
|
||||||
|
|
||||||
Info<< "max(U) " << max(mag(U)).value() << endl;
|
|
||||||
Info<< "min(p_rgh) " << min(p_rgh).value() << endl;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,2 @@
|
|||||||
|
surfaceScalarField rho1f(fvc::interpolate(rho1));
|
||||||
|
surfaceScalarField rho2f(fvc::interpolate(rho2));
|
||||||
@ -2,6 +2,7 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
|
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
|
||||||
|
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
LIB_LIBS = \
|
LIB_LIBS = \
|
||||||
@ -9,4 +10,5 @@ LIB_LIBS = \
|
|||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-ltwoPhaseMixture \
|
-ltwoPhaseMixture \
|
||||||
|
-linterfaceProperties \
|
||||||
-lfiniteVolume
|
-lfiniteVolume
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -40,11 +40,13 @@ namespace Foam
|
|||||||
|
|
||||||
Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo
|
Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo
|
||||||
(
|
(
|
||||||
const fvMesh& mesh
|
const volVectorField& U,
|
||||||
|
const surfaceScalarField& phi
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
psiThermo(mesh, word::null),
|
psiThermo(U.mesh(), word::null),
|
||||||
twoPhaseMixture(mesh, *this),
|
twoPhaseMixture(U.mesh(), *this),
|
||||||
|
interfaceProperties(alpha1(), U, *this),
|
||||||
thermo1_(nullptr),
|
thermo1_(nullptr),
|
||||||
thermo2_(nullptr)
|
thermo2_(nullptr)
|
||||||
{
|
{
|
||||||
@ -58,8 +60,8 @@ Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo
|
|||||||
T2.write();
|
T2.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
thermo1_ = rhoThermo::New(mesh, phase1Name());
|
thermo1_ = rhoThermo::New(U.mesh(), phase1Name());
|
||||||
thermo2_ = rhoThermo::New(mesh, phase2Name());
|
thermo2_ = rhoThermo::New(U.mesh(), phase2Name());
|
||||||
|
|
||||||
thermo1_->validate(phase1Name(), "e");
|
thermo1_->validate(phase1Name(), "e");
|
||||||
thermo2_->validate(phase2Name(), "e");
|
thermo2_->validate(phase2Name(), "e");
|
||||||
@ -76,17 +78,23 @@ Foam::twoPhaseMixtureThermo::~twoPhaseMixtureThermo()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::twoPhaseMixtureThermo::correct()
|
void Foam::twoPhaseMixtureThermo::correctThermo()
|
||||||
{
|
{
|
||||||
thermo1_->he() = thermo1_->he(p_, T_);
|
thermo1_->he() = thermo1_->he(p_, T_);
|
||||||
thermo1_->correct();
|
thermo1_->correct();
|
||||||
|
|
||||||
thermo2_->he() = thermo2_->he(p_, T_);
|
thermo2_->he() = thermo2_->he(p_, T_);
|
||||||
thermo2_->correct();
|
thermo2_->correct();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::twoPhaseMixtureThermo::correct()
|
||||||
|
{
|
||||||
psi_ = alpha1()*thermo1_->psi() + alpha2()*thermo2_->psi();
|
psi_ = alpha1()*thermo1_->psi() + alpha2()*thermo2_->psi();
|
||||||
mu_ = alpha1()*thermo1_->mu() + alpha2()*thermo2_->mu();
|
mu_ = alpha1()*thermo1_->mu() + alpha2()*thermo2_->mu();
|
||||||
alpha_ = alpha1()*thermo1_->alpha() + alpha2()*thermo2_->alpha();
|
alpha_ = alpha1()*thermo1_->alpha() + alpha2()*thermo2_->alpha();
|
||||||
|
|
||||||
|
interfaceProperties::correct();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -39,6 +39,7 @@ SourceFiles
|
|||||||
#include "rhoThermo.H"
|
#include "rhoThermo.H"
|
||||||
#include "psiThermo.H"
|
#include "psiThermo.H"
|
||||||
#include "twoPhaseMixture.H"
|
#include "twoPhaseMixture.H"
|
||||||
|
#include "interfaceProperties.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -52,7 +53,8 @@ namespace Foam
|
|||||||
class twoPhaseMixtureThermo
|
class twoPhaseMixtureThermo
|
||||||
:
|
:
|
||||||
public psiThermo,
|
public psiThermo,
|
||||||
public twoPhaseMixture
|
public twoPhaseMixture,
|
||||||
|
public interfaceProperties
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -71,10 +73,11 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from mesh
|
//- Construct from components
|
||||||
twoPhaseMixtureThermo
|
twoPhaseMixtureThermo
|
||||||
(
|
(
|
||||||
const fvMesh& mesh
|
const volVectorField& U,
|
||||||
|
const surfaceScalarField& phi
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -104,7 +107,10 @@ public:
|
|||||||
return thermo2_();
|
return thermo2_();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Update properties
|
//- Correct the thermodynamics of each phase
|
||||||
|
virtual void correctThermo();
|
||||||
|
|
||||||
|
//- Update mixture properties
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
|
|
||||||
//- Return true if the equation of state is incompressible
|
//- Return true if the equation of state is incompressible
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I. \
|
-I. \
|
||||||
|
-I../VoF \
|
||||||
-I../interFoam \
|
-I../interFoam \
|
||||||
-ImultiphaseMixtureThermo/lnInclude \
|
-ImultiphaseMixtureThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
|
-I../VoF \
|
||||||
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
|
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||||
|
|||||||
3
applications/solvers/multiphase/interFoam/alphaSuSp.H
Normal file
3
applications/solvers/multiphase/interFoam/alphaSuSp.H
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
zeroField Su;
|
||||||
|
zeroField Sp;
|
||||||
|
zeroField divU;
|
||||||
@ -1,6 +1,7 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I. \
|
-I. \
|
||||||
-I.. \
|
-I.. \
|
||||||
|
-I../../VoF \
|
||||||
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
|
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||||
|
|||||||
@ -47,7 +47,6 @@ Description
|
|||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
#include "fvOptions.H"
|
#include "fvOptions.H"
|
||||||
#include "CorrectPhi.H"
|
#include "CorrectPhi.H"
|
||||||
#include "localEulerDdtScheme.H"
|
|
||||||
#include "fvcSmooth.H"
|
#include "fvcSmooth.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -129,7 +128,11 @@ int main(int argc, char *argv[])
|
|||||||
<< " s" << endl;
|
<< " s" << endl;
|
||||||
|
|
||||||
// Do not apply previous time-step mesh compression flux
|
// Do not apply previous time-step mesh compression flux
|
||||||
|
// if the mesh topology changed
|
||||||
|
if (mesh.topoChanging())
|
||||||
|
{
|
||||||
talphaPhiCorr0.clear();
|
talphaPhiCorr0.clear();
|
||||||
|
}
|
||||||
|
|
||||||
gh = (g & mesh.C()) - ghRef;
|
gh = (g & mesh.C()) - ghRef;
|
||||||
ghf = (g & mesh.Cf()) - ghRef;
|
ghf = (g & mesh.Cf()) - ghRef;
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
phiHbyA += phig;
|
phiHbyA += phig;
|
||||||
|
|
||||||
// Update the pressure BCs to ensure flux consistency
|
// Update the pressure BCs to ensure flux consistency
|
||||||
constrainPressure(p_rgh, U, phiHbyA, rAUf);
|
constrainPressure(p_rgh, U, phiHbyA, rAUf, MRF);
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
while (pimple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -51,7 +51,6 @@ Description
|
|||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
#include "fvOptions.H"
|
#include "fvOptions.H"
|
||||||
#include "CorrectPhi.H"
|
#include "CorrectPhi.H"
|
||||||
#include "localEulerDdtScheme.H"
|
|
||||||
#include "fvcSmooth.H"
|
#include "fvcSmooth.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I. \
|
-I. \
|
||||||
-I.. \
|
-I.. \
|
||||||
|
-I../../VoF \
|
||||||
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
|
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
|
||||||
-IimmiscibleIncompressibleThreePhaseMixture \
|
-IimmiscibleIncompressibleThreePhaseMixture \
|
||||||
-IincompressibleThreePhaseMixture \
|
-IincompressibleThreePhaseMixture \
|
||||||
|
|||||||
@ -19,7 +19,7 @@ if (nAlphaSubCycles > 1)
|
|||||||
!(++alphaSubCycle).end();
|
!(++alphaSubCycle).end();
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#include "alphaEqns.H"
|
#include "alphaEqn.H"
|
||||||
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
|
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ if (nAlphaSubCycles > 1)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#include "alphaEqns.H"
|
#include "alphaEqn.H"
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -96,7 +96,7 @@ int main(int argc, char *argv[])
|
|||||||
while (pimple.loop())
|
while (pimple.loop())
|
||||||
{
|
{
|
||||||
#include "alphaControls.H"
|
#include "alphaControls.H"
|
||||||
#include "alphaEqnsSubCycle.H"
|
#include "alphaEqnSubCycle.H"
|
||||||
|
|
||||||
mixture.correct();
|
mixture.correct();
|
||||||
|
|
||||||
|
|||||||
2
applications/solvers/multiphase/interFoam/rhofs.H
Normal file
2
applications/solvers/multiphase/interFoam/rhofs.H
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
const dimensionedScalar& rho1f(rho1);
|
||||||
|
const dimensionedScalar& rho2f(rho2);
|
||||||
@ -1,5 +1,6 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I. \
|
-I. \
|
||||||
|
-I../VoF \
|
||||||
-I../interFoam \
|
-I../interFoam \
|
||||||
-ImultiphaseMixture/lnInclude \
|
-ImultiphaseMixture/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I.. \
|
-I.. \
|
||||||
|
-I../../VoF \
|
||||||
-I../../interFoam/interDyMFoam \
|
-I../../interFoam/interDyMFoam \
|
||||||
-I../../interFoam \
|
-I../../interFoam \
|
||||||
-I../multiphaseMixture/lnInclude \
|
-I../multiphaseMixture/lnInclude \
|
||||||
|
|||||||
@ -2,10 +2,7 @@ EXE_INC = \
|
|||||||
-I../phaseSystems/lnInclude \
|
-I../phaseSystems/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/solidMixtureProperties/lnInclude \
|
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I. \
|
-I. \
|
||||||
-I../interFoam \
|
-I../VoF \
|
||||||
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
|
-I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \
|
||||||
-I$(LIB_SRC)/transportModels \
|
-I$(LIB_SRC)/transportModels \
|
||||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||||
|
|||||||
@ -9,7 +9,6 @@ EXE_INC = \
|
|||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
-lradiationModels \
|
-lradiationModels \
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lregionModels \
|
-lregionModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
EXE_INC = \
|
EXE_INC = \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/properties/liquidProperties/lnInclude \
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalProperties/lnInclude \
|
||||||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude
|
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = -lliquidProperties -lthermophysicalFunctions
|
|
||||||
|
|||||||
@ -2,7 +2,6 @@ specie1
|
|||||||
{
|
{
|
||||||
specie
|
specie
|
||||||
{
|
{
|
||||||
nMoles 1;
|
|
||||||
molWeight 1;
|
molWeight 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,7 +23,6 @@ specie2
|
|||||||
{
|
{
|
||||||
specie
|
specie
|
||||||
{
|
{
|
||||||
nMoles 1;
|
|
||||||
molWeight 0.5;
|
molWeight 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,9 +15,10 @@ EXE_LIBS = \
|
|||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
-lcoalCombustion \
|
-lcoalCombustion \
|
||||||
-lcombustionModels \
|
-lcombustionModels \
|
||||||
-lcompressibleEulerianInterfacialModels \
|
-lcompressibleTransportModels \
|
||||||
-lcompressibleTurbulenceModels \
|
-lcompressibleTurbulenceModels \
|
||||||
-lCompressibleTwoPhaseMixtureTurbulenceModels \
|
-lconversion \
|
||||||
|
-ldecompose \
|
||||||
-ldecompositionMethods \
|
-ldecompositionMethods \
|
||||||
-ldistributed \
|
-ldistributed \
|
||||||
-ldistributionModels \
|
-ldistributionModels \
|
||||||
@ -38,25 +39,34 @@ EXE_LIBS = \
|
|||||||
-lfvMotionSolvers \
|
-lfvMotionSolvers \
|
||||||
-lfvOptions \
|
-lfvOptions \
|
||||||
-lgenericPatchFields \
|
-lgenericPatchFields \
|
||||||
|
-limmiscibleIncompressibleTwoPhaseMixture \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-lincompressibleTurbulenceModels \
|
-lincompressibleTurbulenceModels \
|
||||||
-linterfaceProperties \
|
-linterfaceProperties \
|
||||||
-llagrangianFunctionObjects \
|
-llagrangianFunctionObjects \
|
||||||
-llagrangianIntermediate \
|
-llagrangianIntermediate \
|
||||||
|
-llagrangian \
|
||||||
-llagrangianSpray \
|
-llagrangianSpray \
|
||||||
-llagrangianTurbulence \
|
-llagrangianTurbulence \
|
||||||
-llaminarFlameSpeedModels \
|
-llaminarFlameSpeedModels \
|
||||||
-lliquidPropertiesFvPatchFields \
|
-lthermophysicalProperties \
|
||||||
-lliquidProperties \
|
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
|
-lmolecularMeasurements \
|
||||||
|
-lmolecule \
|
||||||
-lODE \
|
-lODE \
|
||||||
|
-lOpenFOAM \
|
||||||
|
-lpairPatchAgglomeration \
|
||||||
-lphaseChangeTwoPhaseMixtures \
|
-lphaseChangeTwoPhaseMixtures \
|
||||||
-lphaseCompressibleTurbulenceModels \
|
|
||||||
-lphaseTemperatureChangeTwoPhaseMixtures \
|
|
||||||
-lpotential \
|
-lpotential \
|
||||||
-lpyrolysisModels \
|
-lpyrolysisModels \
|
||||||
-lradiationModels \
|
-lradiationModels \
|
||||||
|
-lrandomProcesses \
|
||||||
|
-lreactingEulerianInterfacialCompositionModels \
|
||||||
|
-lreactingEulerianInterfacialModels \
|
||||||
|
-lreactingPhaseSystem \
|
||||||
|
-lreactingTwoPhaseSystem \
|
||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
|
-lreconstruct \
|
||||||
-lregionCoupled \
|
-lregionCoupled \
|
||||||
-lregionCoupling \
|
-lregionCoupling \
|
||||||
-lregionModels \
|
-lregionModels \
|
||||||
@ -67,10 +77,10 @@ EXE_LIBS = \
|
|||||||
-lsampling \
|
-lsampling \
|
||||||
-lscotchDecomp \
|
-lscotchDecomp \
|
||||||
-lsixDoFRigidBodyMotion \
|
-lsixDoFRigidBodyMotion \
|
||||||
-lSloanRenumber \
|
-lSLGThermo \
|
||||||
-lsnappyHexMesh \
|
-lsnappyHexMesh \
|
||||||
-lsolidChemistryModel \
|
-lsolidChemistryModel \
|
||||||
-lsolidProperties \
|
-lsolidParticle \
|
||||||
-lsolidSpecie \
|
-lsolidSpecie \
|
||||||
-lsolidThermo \
|
-lsolidThermo \
|
||||||
-lsolverFunctionObjects \
|
-lsolverFunctionObjects \
|
||||||
@ -79,9 +89,11 @@ EXE_LIBS = \
|
|||||||
-lsurfaceFilmModels \
|
-lsurfaceFilmModels \
|
||||||
-lsurfMesh \
|
-lsurfMesh \
|
||||||
-lthermalBaffleModels \
|
-lthermalBaffleModels \
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-ltopoChangerFvMesh \
|
-ltopoChangerFvMesh \
|
||||||
-lturbulenceModelSchemes \
|
-ltriSurface \
|
||||||
-lturbulenceModels \
|
-lturbulenceModels \
|
||||||
|
-ltwoPhaseMixture \
|
||||||
|
-ltwoPhaseMixtureThermo \
|
||||||
-ltwoPhaseProperties \
|
-ltwoPhaseProperties \
|
||||||
|
-ltwoPhaseReactingTurbulenceModels \
|
||||||
-lutilityFunctionObjects
|
-lutilityFunctionObjects
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -100,28 +100,59 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
scalar stoicO2 = n + m/4.0;
|
scalar stoicO2 = n + m/4.0;
|
||||||
scalar stoicN2 = (0.79/0.21)*(n + m/4.0);
|
scalar stoicN2 = (0.79/0.21)*stoicO2;
|
||||||
scalar stoicCO2 = n;
|
scalar stoicCO2 = n;
|
||||||
scalar stoicH2O = m/2.0;
|
scalar stoicH2O = m/2.0;
|
||||||
|
|
||||||
thermo fuel
|
thermo FUEL
|
||||||
(
|
(
|
||||||
"fuel",
|
"fuel",
|
||||||
thermo(thermoData.subDict(fuelName))
|
thermo(thermoData.subDict(fuelName))
|
||||||
);
|
);
|
||||||
|
Info<< "fuel " << FUEL << ';' << endl;
|
||||||
|
FUEL *= FUEL.W();
|
||||||
|
|
||||||
|
thermo O2
|
||||||
|
(
|
||||||
|
"O2",
|
||||||
|
thermo(thermoData.subDict("O2"))
|
||||||
|
);
|
||||||
|
O2 *= O2.W();
|
||||||
|
|
||||||
|
thermo N2
|
||||||
|
(
|
||||||
|
"N2",
|
||||||
|
thermo(thermoData.subDict("N2"))
|
||||||
|
);
|
||||||
|
N2 *= N2.W();
|
||||||
|
|
||||||
|
thermo CO2
|
||||||
|
(
|
||||||
|
"CO2",
|
||||||
|
thermo(thermoData.subDict("CO2"))
|
||||||
|
);
|
||||||
|
CO2 *= CO2.W();
|
||||||
|
|
||||||
|
thermo H2O
|
||||||
|
(
|
||||||
|
"H2O",
|
||||||
|
thermo(thermoData.subDict("H2O"))
|
||||||
|
);
|
||||||
|
H2O *= H2O.W();
|
||||||
|
|
||||||
thermo oxidant
|
thermo oxidant
|
||||||
(
|
(
|
||||||
"oxidant",
|
"oxidant",
|
||||||
stoicO2*thermo(thermoData.subDict("O2"))
|
stoicO2*O2
|
||||||
+ stoicN2*thermo(thermoData.subDict("N2"))
|
+ stoicN2*N2
|
||||||
);
|
);
|
||||||
|
Info<< "oxidant " << (1/oxidant.Y())*oxidant << ';' << endl;
|
||||||
|
|
||||||
dimensionedScalar stoichiometricAirFuelMassRatio
|
dimensionedScalar stoichiometricAirFuelMassRatio
|
||||||
(
|
(
|
||||||
"stoichiometricAirFuelMassRatio",
|
"stoichiometricAirFuelMassRatio",
|
||||||
dimless,
|
dimless,
|
||||||
(oxidant.W()*oxidant.nMoles())/fuel.W()
|
oxidant.Y()/FUEL.W()
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "stoichiometricAirFuelMassRatio "
|
Info<< "stoichiometricAirFuelMassRatio "
|
||||||
@ -141,49 +172,34 @@ int main(int argc, char *argv[])
|
|||||||
scalar ores = max(1.0/equiv - 1.0, 0.0);
|
scalar ores = max(1.0/equiv - 1.0, 0.0);
|
||||||
scalar fburnt = 1.0 - fres;
|
scalar fburnt = 1.0 - fres;
|
||||||
|
|
||||||
thermo fuel
|
|
||||||
(
|
|
||||||
"fuel",
|
|
||||||
thermo(thermoData.subDict(fuelName))
|
|
||||||
);
|
|
||||||
Info<< "fuel " << fuel << ';' << endl;
|
|
||||||
|
|
||||||
thermo oxidant
|
|
||||||
(
|
|
||||||
"oxidant",
|
|
||||||
o2*thermo(thermoData.subDict("O2"))
|
|
||||||
+ n2*thermo(thermoData.subDict("N2"))
|
|
||||||
);
|
|
||||||
Info<< "oxidant " << (1/oxidant.nMoles())*oxidant << ';' << endl;
|
|
||||||
|
|
||||||
thermo reactants
|
thermo reactants
|
||||||
(
|
(
|
||||||
"reactants",
|
"reactants",
|
||||||
fuel + oxidant
|
FUEL + (1.0/equiv)*oxidant
|
||||||
);
|
);
|
||||||
Info<< "reactants " << (1/reactants.nMoles())*reactants << ';' << endl;
|
Info<< "reactants " << (1/reactants.Y())*reactants << ';' << endl;
|
||||||
|
|
||||||
thermo burntProducts
|
thermo burntProducts
|
||||||
(
|
(
|
||||||
"burntProducts",
|
"burntProducts",
|
||||||
+ (n2 - (0.79/0.21)*ores*stoicO2)*thermo(thermoData.subDict("N2"))
|
+ (n2 - (0.79/0.21)*ores*stoicO2)*N2
|
||||||
+ fburnt*stoicCO2*thermo(thermoData.subDict("CO2"))
|
+ fburnt*stoicCO2*CO2
|
||||||
+ fburnt*stoicH2O*thermo(thermoData.subDict("H2O"))
|
+ fburnt*stoicH2O*H2O
|
||||||
);
|
);
|
||||||
Info<< "burntProducts "
|
Info<< "burntProducts "
|
||||||
<< (1/burntProducts.nMoles())*burntProducts << ';' << endl;
|
<< (1/burntProducts.Y())*burntProducts << ';' << endl;
|
||||||
|
|
||||||
thermo products
|
thermo products
|
||||||
(
|
(
|
||||||
"products",
|
"products",
|
||||||
fres*fuel
|
fres*FUEL
|
||||||
+ n2*thermo(thermoData.subDict("N2"))
|
+ n2*N2
|
||||||
+ fburnt*stoicCO2*thermo(thermoData.subDict("CO2"))
|
+ fburnt*stoicCO2*CO2
|
||||||
+ fburnt*stoicH2O*thermo(thermoData.subDict("H2O"))
|
+ fburnt*stoicH2O*H2O
|
||||||
+ ores*stoicO2*thermo(thermoData.subDict("O2"))
|
+ ores*stoicO2*O2
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "products " << (1/products.nMoles())*products << ';' << endl;
|
Info<< "products " << (1/products.Y())*products << ';' << endl;
|
||||||
|
|
||||||
scalar Tad = products.THa(reactants.Ha(P, T0), P, 1000.0);
|
scalar Tad = products.THa(reactants.Ha(P, T0), P, 1000.0);
|
||||||
Info<< "Tad = " << Tad << nl << endl;
|
Info<< "Tad = " << Tad << nl << endl;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -45,6 +45,9 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
// Increase the precision of the output for JANAF coefficients
|
||||||
|
Ostream::defaultPrecision(10);
|
||||||
|
|
||||||
argList::validArgs.append("CHEMKINFile");
|
argList::validArgs.append("CHEMKINFile");
|
||||||
argList::validArgs.append("CHEMKINThermodynamicsFile");
|
argList::validArgs.append("CHEMKINThermodynamicsFile");
|
||||||
argList::validArgs.append("CHEMKINTransport");
|
argList::validArgs.append("CHEMKINTransport");
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -76,52 +76,44 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
scalar P = 1e5;
|
const scalar P = 1e5;
|
||||||
scalar T = 3000.0;
|
const scalar T = 3000.0;
|
||||||
|
|
||||||
|
// Oxidant (mole-based)
|
||||||
|
thermo O2(thermoData.subDict("O2")); O2 *= O2.W();
|
||||||
|
thermo N2(thermoData.subDict("N2")); N2 *= N2.W();
|
||||||
|
|
||||||
|
// Intermediates (mole-based)
|
||||||
|
thermo H2(thermoData.subDict("H2")); H2 *= H2.W();
|
||||||
|
thermo OH(thermoData.subDict("OH")); OH *= OH.W();
|
||||||
|
thermo H(thermoData.subDict("H")); H *= H.W();
|
||||||
|
thermo O(thermoData.subDict("O")); O *= O.W();
|
||||||
|
|
||||||
|
// Products (mole-based)
|
||||||
|
thermo CO2(thermoData.subDict("CO2")); CO2 *= CO2.W();
|
||||||
|
thermo H2O(thermoData.subDict("H2O")); H2O *= H2O.W();
|
||||||
|
thermo CO(thermoData.subDict("CO")); CO *= CO.W();
|
||||||
|
|
||||||
SLPtrList<thermo> EQreactions;
|
SLPtrList<thermo> EQreactions;
|
||||||
|
|
||||||
EQreactions.append
|
EQreactions.append
|
||||||
(
|
(
|
||||||
new thermo
|
new thermo(CO2 == CO + 0.5*O2)
|
||||||
(
|
|
||||||
thermo(thermoData.subDict("CO2"))
|
|
||||||
==
|
|
||||||
thermo(thermoData.subDict("CO"))
|
|
||||||
+ 0.5*thermo(thermoData.subDict("O2"))
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
EQreactions.append
|
EQreactions.append
|
||||||
(
|
(
|
||||||
new thermo
|
new thermo(O2 == 2*O)
|
||||||
(
|
|
||||||
thermo(thermoData.subDict("O2"))
|
|
||||||
==
|
|
||||||
2.0*thermo(thermoData.subDict("O"))
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
EQreactions.append
|
EQreactions.append
|
||||||
(
|
(
|
||||||
new thermo
|
new thermo(H2O == H2 + 0.5*O2)
|
||||||
(
|
|
||||||
thermo(thermoData.subDict("H2O"))
|
|
||||||
==
|
|
||||||
thermo(thermoData.subDict("H2"))
|
|
||||||
+ 0.5*thermo(thermoData.subDict("O2"))
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
EQreactions.append
|
EQreactions.append
|
||||||
(
|
(
|
||||||
new thermo
|
new thermo(H2O == H + OH)
|
||||||
(
|
|
||||||
thermo(thermoData.subDict("H2O"))
|
|
||||||
==
|
|
||||||
thermo(thermoData.subDict("H"))
|
|
||||||
+ thermo(thermoData.subDict("OH"))
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -103,18 +103,20 @@ int main(int argc, char *argv[])
|
|||||||
Info<< nl << "Reading thermodynamic data for relevant species"
|
Info<< nl << "Reading thermodynamic data for relevant species"
|
||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
|
|
||||||
// Reactants
|
// Reactants (mole-based)
|
||||||
thermo FUEL(thermoData.subDict(fuelName));
|
thermo FUEL(thermoData.subDict(fuelName)); FUEL *= FUEL.W();
|
||||||
thermo O2(thermoData.subDict("O2"));
|
|
||||||
thermo N2(thermoData.subDict("N2"));
|
|
||||||
|
|
||||||
// Products
|
// Oxidant (mole-based)
|
||||||
thermo CO2(thermoData.subDict("CO2"));
|
thermo O2(thermoData.subDict("O2")); O2 *= O2.W();
|
||||||
thermo H2O(thermoData.subDict("H2O"));
|
thermo N2(thermoData.subDict("N2")); N2 *= N2.W();
|
||||||
|
|
||||||
// Product fragments
|
// Intermediates (mole-based)
|
||||||
thermo CO(thermoData.subDict("CO"));
|
thermo H2(thermoData.subDict("H2")); H2 *= H2.W();
|
||||||
thermo H2(thermoData.subDict("H2"));
|
|
||||||
|
// Products (mole-based)
|
||||||
|
thermo CO2(thermoData.subDict("CO2")); CO2 *= CO2.W();
|
||||||
|
thermo H2O(thermoData.subDict("H2O")); H2O *= H2O.W();
|
||||||
|
thermo CO(thermoData.subDict("CO")); CO *= CO.W();
|
||||||
|
|
||||||
|
|
||||||
// Product dissociation reactions
|
// Product dissociation reactions
|
||||||
@ -148,7 +150,7 @@ int main(int argc, char *argv[])
|
|||||||
(
|
(
|
||||||
"stoichiometricAirFuelMassRatio",
|
"stoichiometricAirFuelMassRatio",
|
||||||
dimless,
|
dimless,
|
||||||
(oxidant.W()*oxidant.nMoles())/FUEL.W()
|
oxidant.Y()/FUEL.W()
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "stoichiometricAirFuelMassRatio "
|
Info<< "stoichiometricAirFuelMassRatio "
|
||||||
@ -212,7 +214,6 @@ int main(int argc, char *argv[])
|
|||||||
// Iteration loop for adiabatic flame temperature
|
// Iteration loop for adiabatic flame temperature
|
||||||
for (int j=0; j<20; j++)
|
for (int j=0; j<20; j++)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (j > 0)
|
if (j > 0)
|
||||||
{
|
{
|
||||||
co = co2*
|
co = co2*
|
||||||
|
|||||||
@ -30,7 +30,6 @@ mixture // air at room temperature (293 K)
|
|||||||
{
|
{
|
||||||
specie
|
specie
|
||||||
{
|
{
|
||||||
nMoles 1;
|
|
||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
}
|
}
|
||||||
thermodynamics
|
thermodynamics
|
||||||
|
|||||||
@ -46,7 +46,7 @@ divSchemes
|
|||||||
div(phi,K) $turbulence;
|
div(phi,K) $turbulence;
|
||||||
div(phi,Ekp) $turbulence;
|
div(phi,Ekp) $turbulence;
|
||||||
|
|
||||||
div(phid,p) bounded Gauss upwind;
|
div(phid,p) Gauss upwind;
|
||||||
div((phi|interpolate(rho)),p) bounded Gauss upwind;
|
div((phi|interpolate(rho)),p) bounded Gauss upwind;
|
||||||
|
|
||||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||||
|
|||||||
@ -43,8 +43,8 @@ SIMPLE
|
|||||||
}
|
}
|
||||||
|
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
rhoMin rhoMin [ 1 -3 0 0 0 ] 0.1;
|
pMinFactor 0.1;
|
||||||
rhoMax rhoMax [ 1 -3 0 0 0 ] 1.5;
|
pMaxFactor 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
relaxationFactors
|
relaxationFactors
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -187,6 +187,8 @@ void Foam::Time::setControls()
|
|||||||
int oldPrecision = precision_;
|
int oldPrecision = precision_;
|
||||||
int requiredPrecision = -1;
|
int requiredPrecision = -1;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
word oldTime(timeName());
|
||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
precision_ = maxPrecision_;
|
precision_ = maxPrecision_;
|
||||||
@ -197,6 +199,14 @@ void Foam::Time::setControls()
|
|||||||
// Update the time formatting
|
// Update the time formatting
|
||||||
setTime(startTime_, 0);
|
setTime(startTime_, 0);
|
||||||
|
|
||||||
|
// Check that the time name has changed otherwise exit loop
|
||||||
|
word newTime(timeName());
|
||||||
|
if (newTime == oldTime)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
oldTime = newTime;
|
||||||
|
|
||||||
// Check the existence of the time directory with the new format
|
// Check the existence of the time directory with the new format
|
||||||
found = exists(timePath(), false);
|
found = exists(timePath(), false);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -348,6 +348,20 @@ void Foam::Time::readDict()
|
|||||||
(
|
(
|
||||||
controlDict_.lookup("writeCompression")
|
controlDict_.lookup("writeCompression")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if
|
||||||
|
(
|
||||||
|
writeFormat_ == IOstream::BINARY
|
||||||
|
&& writeCompression_ == IOstream::COMPRESSED
|
||||||
|
)
|
||||||
|
{
|
||||||
|
IOWarningInFunction(controlDict_)
|
||||||
|
<< "Selecting compressed binary is inefficient and ineffective"
|
||||||
|
", resetting to uncompressed binary"
|
||||||
|
<< endl;
|
||||||
|
|
||||||
|
writeCompression_ = IOstream::UNCOMPRESSED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
controlDict_.readIfPresent("graphFormat", graphFormat_);
|
controlDict_.readIfPresent("graphFormat", graphFormat_);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -66,6 +66,10 @@ public:
|
|||||||
inline scalar operator[](const label) const;
|
inline scalar operator[](const label) const;
|
||||||
|
|
||||||
inline zeroField field() const;
|
inline zeroField field() const;
|
||||||
|
|
||||||
|
inline zeroField operator()() const;
|
||||||
|
|
||||||
|
inline zeroField operator-() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -39,4 +39,80 @@ inline Foam::zeroField Foam::zeroField::field() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::zeroField Foam::zeroField::operator()() const
|
||||||
|
{
|
||||||
|
return zeroField();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::zeroField Foam::zeroField::operator-() const
|
||||||
|
{
|
||||||
|
return zeroField();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
inline const zeroField operator+(const zeroField&, const zeroField&)
|
||||||
|
{
|
||||||
|
return zeroField();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline const Type& operator+(const Type& t, const zeroField&)
|
||||||
|
{
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline const Type& operator+(const zeroField&, const Type& t)
|
||||||
|
{
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline const zeroField operator-(const zeroField&, const zeroField&)
|
||||||
|
{
|
||||||
|
return zeroField();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline const Type& operator-(const Type& t, const zeroField&)
|
||||||
|
{
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline Type operator-(const zeroField&, const Type& t)
|
||||||
|
{
|
||||||
|
return -t;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline zeroField operator*(const Type& t, const zeroField&)
|
||||||
|
{
|
||||||
|
return zeroField();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline zeroField operator*(const zeroField&, const Type& t)
|
||||||
|
{
|
||||||
|
return zeroField();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
inline zeroField operator/(const zeroField&, const Type& t)
|
||||||
|
{
|
||||||
|
return zeroField();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -1176,11 +1176,18 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::operator=
|
|||||||
|
|
||||||
this->dimensions() = gf.dimensions();
|
this->dimensions() = gf.dimensions();
|
||||||
|
|
||||||
|
if (tgf.isTmp())
|
||||||
|
{
|
||||||
// Transfer the storage from the tmp
|
// Transfer the storage from the tmp
|
||||||
primitiveFieldRef().transfer
|
primitiveFieldRef().transfer
|
||||||
(
|
(
|
||||||
const_cast<Field<Type>&>(gf.primitiveField())
|
const_cast<Field<Type>&>(gf.primitiveField())
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
primitiveFieldRef() = gf.primitiveField();
|
||||||
|
}
|
||||||
|
|
||||||
boundaryFieldRef() = gf.boundaryField();
|
boundaryFieldRef() = gf.boundaryField();
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -72,6 +72,8 @@ public:
|
|||||||
|
|
||||||
inline zeroField field() const;
|
inline zeroField field() const;
|
||||||
|
|
||||||
|
inline zeroField operator()() const;
|
||||||
|
|
||||||
inline zeroField oldTime() const;
|
inline zeroField oldTime() const;
|
||||||
|
|
||||||
inline zeroFieldField boundaryField() const;
|
inline zeroFieldField boundaryField() const;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -42,6 +42,11 @@ inline Foam::zeroField Foam::geometricZeroField::field() const
|
|||||||
return zeroField();
|
return zeroField();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline Foam::zeroField Foam::geometricZeroField::operator()() const
|
||||||
|
{
|
||||||
|
return zeroField();
|
||||||
|
}
|
||||||
|
|
||||||
inline Foam::zeroField Foam::geometricZeroField::oldTime() const
|
inline Foam::zeroField Foam::geometricZeroField::oldTime() const
|
||||||
{
|
{
|
||||||
return zeroField();
|
return zeroField();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -122,6 +122,9 @@ public:
|
|||||||
//- Dictionary of controls
|
//- Dictionary of controls
|
||||||
dictionary controlDict_;
|
dictionary controlDict_;
|
||||||
|
|
||||||
|
//- Default maximum number of iterations in the solver
|
||||||
|
static const label defaultMaxIter_ = 1000;
|
||||||
|
|
||||||
//- Maximum number of iterations in the solver
|
//- Maximum number of iterations in the solver
|
||||||
label maxIter_;
|
label maxIter_;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -131,7 +131,7 @@ Foam::LduMatrix<Type, DType, LUType>::solver::solver
|
|||||||
|
|
||||||
controlDict_(solverDict),
|
controlDict_(solverDict),
|
||||||
|
|
||||||
maxIter_(1000),
|
maxIter_(defaultMaxIter_),
|
||||||
minIter_(0),
|
minIter_(0),
|
||||||
tolerance_(1e-6*pTraits<Type>::one),
|
tolerance_(1e-6*pTraits<Type>::one),
|
||||||
relTol_(Zero)
|
relTol_(Zero)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -35,6 +35,9 @@ namespace Foam
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Foam::label Foam::lduMatrix::solver::defaultMaxIter_ = 1000;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::lduMatrix::lduMatrix(const lduMesh& mesh)
|
Foam::lduMatrix::lduMatrix(const lduMesh& mesh)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -107,6 +107,9 @@ public:
|
|||||||
//- Dictionary of controls
|
//- Dictionary of controls
|
||||||
dictionary controlDict_;
|
dictionary controlDict_;
|
||||||
|
|
||||||
|
//- Default maximum number of iterations in the solver
|
||||||
|
static const label defaultMaxIter_;
|
||||||
|
|
||||||
//- Maximum number of iterations in the solver
|
//- Maximum number of iterations in the solver
|
||||||
label maxIter_;
|
label maxIter_;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -158,7 +158,7 @@ Foam::lduMatrix::solver::solver
|
|||||||
|
|
||||||
void Foam::lduMatrix::solver::readControls()
|
void Foam::lduMatrix::solver::readControls()
|
||||||
{
|
{
|
||||||
maxIter_ = controlDict_.lookupOrDefault<label>("maxIter", 1000);
|
maxIter_ = controlDict_.lookupOrDefault<label>("maxIter", defaultMaxIter_);
|
||||||
minIter_ = controlDict_.lookupOrDefault<label>("minIter", 0);
|
minIter_ = controlDict_.lookupOrDefault<label>("minIter", 0);
|
||||||
tolerance_ = controlDict_.lookupOrDefault<scalar>("tolerance", 1e-6);
|
tolerance_ = controlDict_.lookupOrDefault<scalar>("tolerance", 1e-6);
|
||||||
relTol_ = controlDict_.lookupOrDefault<scalar>("relTol", 0);
|
relTol_ = controlDict_.lookupOrDefault<scalar>("relTol", 0);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -208,6 +208,16 @@ Foam::solverPerformance Foam::PBiCG::solve
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Recommend PBiCGStab if PBiCG fails to converge
|
||||||
|
if (solverPerf.nIterations() > max(defaultMaxIter_, maxIter_))
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "PBiCG has failed to converge within the maximum number"
|
||||||
|
" of iterations " << max(defaultMaxIter_, maxIter_) << nl
|
||||||
|
<< " Please try the more robust PBiCGStab solver."
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
return solverPerf;
|
return solverPerf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,8 +25,6 @@ License
|
|||||||
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
inline void Foam::word::stripInvalid()
|
inline void Foam::word::stripInvalid()
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -115,6 +115,19 @@ public:
|
|||||||
return this->transport_.mu(patchi);
|
return this->transport_.mu(patchi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Return the laminar viscosity
|
||||||
|
virtual tmp<volScalarField> nu() const
|
||||||
|
{
|
||||||
|
return this->transport_.mu()/this->rho_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return the laminar viscosity on patchi
|
||||||
|
virtual tmp<scalarField> nu(const label patchi) const
|
||||||
|
{
|
||||||
|
return
|
||||||
|
this->transport_.mu(patchi)/this->rho_.boundaryField()[patchi];
|
||||||
|
}
|
||||||
|
|
||||||
//- Return the turbulence dynamic viscosity
|
//- Return the turbulence dynamic viscosity
|
||||||
virtual tmp<volScalarField> mut() const
|
virtual tmp<volScalarField> mut() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -54,7 +54,6 @@ Usage
|
|||||||
// Solid thermo
|
// Solid thermo
|
||||||
specie
|
specie
|
||||||
{
|
{
|
||||||
nMoles 1;
|
|
||||||
molWeight 20;
|
molWeight 20;
|
||||||
}
|
}
|
||||||
transport
|
transport
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -130,7 +130,11 @@ kOmegaSSTSato<BasicTurbulenceModel>::gasTurbulence() const
|
|||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
template<class BasicTurbulenceModel>
|
||||||
void kOmegaSSTSato<BasicTurbulenceModel>::correctNut()
|
void kOmegaSSTSato<BasicTurbulenceModel>::correctNut
|
||||||
|
(
|
||||||
|
const volScalarField& S2,
|
||||||
|
const volScalarField& F2
|
||||||
|
)
|
||||||
{
|
{
|
||||||
const PhaseCompressibleTurbulenceModel<transportModel>& gasTurbulence =
|
const PhaseCompressibleTurbulenceModel<transportModel>& gasTurbulence =
|
||||||
this->gasTurbulence();
|
this->gasTurbulence();
|
||||||
@ -141,12 +145,7 @@ void kOmegaSSTSato<BasicTurbulenceModel>::correctNut()
|
|||||||
);
|
);
|
||||||
|
|
||||||
this->nut_ =
|
this->nut_ =
|
||||||
this->a1_*this->k_
|
this->a1_*this->k_/max(this->a1_*this->omega_, this->b1_*F2*sqrt(S2))
|
||||||
/max
|
|
||||||
(
|
|
||||||
this->a1_*this->omega_,
|
|
||||||
this->F23()*sqrt(2.0)*mag(symm(fvc::grad(this->U_)))
|
|
||||||
)
|
|
||||||
+ sqr(1 - exp(-yPlus/16.0))
|
+ sqr(1 - exp(-yPlus/16.0))
|
||||||
*Cmub_*gasTurbulence.transport().d()*gasTurbulence.alpha()
|
*Cmub_*gasTurbulence.transport().d()*gasTurbulence.alpha()
|
||||||
*(mag(this->U_ - gasTurbulence.U()));
|
*(mag(this->U_ - gasTurbulence.U()));
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -68,8 +68,8 @@ Description
|
|||||||
to specify the near-wall omega as appropriate.
|
to specify the near-wall omega as appropriate.
|
||||||
|
|
||||||
The blending functions (15) and (16) are not currently used because of the
|
The blending functions (15) and (16) are not currently used because of the
|
||||||
uncertainty in their origin, range of applicability and that is y+ becomes
|
uncertainty in their origin, range of applicability and that as y+ becomes
|
||||||
sufficiently small blending u_tau in this manner clearly becomes nonsense.
|
sufficiently small blending u_tau in this manner is clearly nonsense.
|
||||||
|
|
||||||
The default model coefficients correspond to the following:
|
The default model coefficients correspond to the following:
|
||||||
\verbatim
|
\verbatim
|
||||||
@ -156,7 +156,12 @@ protected:
|
|||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
virtual void correctNut();
|
virtual void correctNut
|
||||||
|
(
|
||||||
|
const volScalarField& S2,
|
||||||
|
const volScalarField& F2
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -158,13 +158,13 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//- Return the laminar viscosity
|
//- Return the laminar viscosity
|
||||||
tmp<volScalarField> nu() const
|
virtual tmp<volScalarField> nu() const
|
||||||
{
|
{
|
||||||
return transport_.nu();
|
return transport_.nu();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the laminar viscosity on patchi
|
//- Return the laminar viscosity on patchi
|
||||||
tmp<scalarField> nu(const label patchi) const
|
virtual tmp<scalarField> nu(const label patchi) const
|
||||||
{
|
{
|
||||||
return transport_.nu(patchi);
|
return transport_.nu(patchi);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -147,7 +147,7 @@ namespace Foam
|
|||||||
|
|
||||||
os << nl;
|
os << nl;
|
||||||
}
|
}
|
||||||
} // end namespace
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -183,17 +183,24 @@ void Foam::csvSetWriter<Type>::writeCoordHeader
|
|||||||
Ostream& os
|
Ostream& os
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
|
const word axisName(points.axis());
|
||||||
|
|
||||||
if (points.hasVectorAxis())
|
if (points.hasVectorAxis())
|
||||||
{
|
{
|
||||||
forAll(points, i)
|
for
|
||||||
|
(
|
||||||
|
word::const_iterator iter = axisName.begin();
|
||||||
|
iter != axisName.end();
|
||||||
|
++iter
|
||||||
|
)
|
||||||
{
|
{
|
||||||
os << points.axis()[i];
|
os << *iter;
|
||||||
writeSeparator(os);
|
writeSeparator(os);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
os << points.axis();
|
os << axisName;
|
||||||
writeSeparator(os);
|
writeSeparator(os);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -405,6 +405,7 @@ $(general)/constrainHbyA/constrainHbyA.C
|
|||||||
$(general)/adjustPhi/adjustPhi.C
|
$(general)/adjustPhi/adjustPhi.C
|
||||||
$(general)/bound/bound.C
|
$(general)/bound/bound.C
|
||||||
$(general)/CorrectPhi/correctUphiBCs.C
|
$(general)/CorrectPhi/correctUphiBCs.C
|
||||||
|
$(general)/pressureControl/pressureControl.C
|
||||||
|
|
||||||
solutionControl = $(general)/solutionControl
|
solutionControl = $(general)/solutionControl
|
||||||
$(solutionControl)/solutionControl/solutionControl.C
|
$(solutionControl)/solutionControl/solutionControl.C
|
||||||
@ -420,6 +421,7 @@ $(porosity)/porosityModel/IOporosityModelList.C
|
|||||||
$(porosity)/DarcyForchheimer/DarcyForchheimer.C
|
$(porosity)/DarcyForchheimer/DarcyForchheimer.C
|
||||||
$(porosity)/fixedCoeff/fixedCoeff.C
|
$(porosity)/fixedCoeff/fixedCoeff.C
|
||||||
$(porosity)/powerLaw/powerLaw.C
|
$(porosity)/powerLaw/powerLaw.C
|
||||||
|
$(porosity)/solidification/solidification.C
|
||||||
|
|
||||||
MRF = $(general)/MRF
|
MRF = $(general)/MRF
|
||||||
$(MRF)/MRFZone.C
|
$(MRF)/MRFZone.C
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -27,7 +27,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::setRefCell
|
bool Foam::setRefCell
|
||||||
(
|
(
|
||||||
const volScalarField& field,
|
const volScalarField& field,
|
||||||
const volScalarField& fieldRef,
|
const volScalarField& fieldRef,
|
||||||
@ -109,11 +109,17 @@ void Foam::setRefCell
|
|||||||
}
|
}
|
||||||
|
|
||||||
refValue = readScalar(dict.lookup(refValueName));
|
refValue = readScalar(dict.lookup(refValueName));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::setRefCell
|
bool Foam::setRefCell
|
||||||
(
|
(
|
||||||
const volScalarField& field,
|
const volScalarField& field,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
@ -122,7 +128,7 @@ void Foam::setRefCell
|
|||||||
const bool forceReference
|
const bool forceReference
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
setRefCell(field, field, dict, refCelli, refValue, forceReference);
|
return setRefCell(field, field, dict, refCelli, refValue, forceReference);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,8 +46,8 @@ namespace Foam
|
|||||||
|
|
||||||
//- If the field fieldRef needs referencing find the reference cell nearest
|
//- If the field fieldRef needs referencing find the reference cell nearest
|
||||||
// (in index) to the given cell looked-up for field, but which is not on a
|
// (in index) to the given cell looked-up for field, but which is not on a
|
||||||
// cyclic, symmetry or processor patch.
|
// cyclic, symmetry or processor patch and return true, otherwise return false.
|
||||||
void setRefCell
|
bool setRefCell
|
||||||
(
|
(
|
||||||
const volScalarField& field,
|
const volScalarField& field,
|
||||||
const volScalarField& fieldRef,
|
const volScalarField& fieldRef,
|
||||||
@ -59,8 +59,8 @@ void setRefCell
|
|||||||
|
|
||||||
//- If the field needs referencing find the reference cell nearest
|
//- If the field needs referencing find the reference cell nearest
|
||||||
// (in index) to the given cell looked-up for field, but which is not on a
|
// (in index) to the given cell looked-up for field, but which is not on a
|
||||||
// cyclic, symmetry or processor patch.
|
// cyclic, symmetry or processor patch and return true, otherwise return false.
|
||||||
void setRefCell
|
bool setRefCell
|
||||||
(
|
(
|
||||||
const volScalarField& field,
|
const volScalarField& field,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::DarcyForchheimer
|
Foam::porosityModels::DarcyForchheimer
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Darcy-Forchheimer law porosity model, given by:
|
Darcy-Forchheimer law porosity model, given by:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::fixedCoeff
|
Foam::porosityModels::fixedCoeff
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Fixed coefficient form of porosity model
|
Fixed coefficient form of porosity model
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -94,14 +94,16 @@ void Foam::porosityModels::powerLaw::correct
|
|||||||
fvVectorMatrix& UEqn
|
fvVectorMatrix& UEqn
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const vectorField& U = UEqn.psi();
|
const volVectorField& U = UEqn.psi();
|
||||||
const scalarField& V = mesh_.V();
|
const scalarField& V = mesh_.V();
|
||||||
scalarField& Udiag = UEqn.diag();
|
scalarField& Udiag = UEqn.diag();
|
||||||
|
|
||||||
if (UEqn.dimensions() == dimForce)
|
if (UEqn.dimensions() == dimForce)
|
||||||
{
|
{
|
||||||
const volScalarField& rho =
|
const volScalarField& rho = mesh_.lookupObject<volScalarField>
|
||||||
mesh_.lookupObject<volScalarField>(rhoName_);
|
(
|
||||||
|
IOobject::groupName(rhoName_, U.group())
|
||||||
|
);
|
||||||
|
|
||||||
apply(Udiag, V, rho, U);
|
apply(Udiag, V, rho, U);
|
||||||
}
|
}
|
||||||
@ -133,12 +135,14 @@ void Foam::porosityModels::powerLaw::correct
|
|||||||
volTensorField& AU
|
volTensorField& AU
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const vectorField& U = UEqn.psi();
|
const volVectorField& U = UEqn.psi();
|
||||||
|
|
||||||
if (UEqn.dimensions() == dimForce)
|
if (UEqn.dimensions() == dimForce)
|
||||||
{
|
{
|
||||||
const volScalarField& rho =
|
const volScalarField& rho = mesh_.lookupObject<volScalarField>
|
||||||
mesh_.lookupObject<volScalarField>(rhoName_);
|
(
|
||||||
|
IOobject::groupName(rhoName_, U.group())
|
||||||
|
);
|
||||||
|
|
||||||
apply(AU, rho, U);
|
apply(AU, rho, U);
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user