mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop
This commit is contained in:
@ -4,4 +4,5 @@ EXE_INC = \
|
|||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
|
-lfvOptions \
|
||||||
-lmeshTools
|
-lmeshTools
|
||||||
|
|||||||
@ -1,37 +1,39 @@
|
|||||||
Info<< "Reading field T\n" << endl;
|
Info<< "Reading field T\n" << endl;
|
||||||
|
|
||||||
volScalarField T
|
volScalarField T
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
(
|
(
|
||||||
IOobject
|
"T",
|
||||||
(
|
runTime.timeName(),
|
||||||
"T",
|
mesh,
|
||||||
runTime.timeName(),
|
IOobject::MUST_READ,
|
||||||
mesh,
|
IOobject::AUTO_WRITE
|
||||||
IOobject::MUST_READ,
|
),
|
||||||
IOobject::AUTO_WRITE
|
mesh
|
||||||
),
|
);
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading transportProperties\n" << endl;
|
Info<< "Reading transportProperties\n" << endl;
|
||||||
|
|
||||||
IOdictionary transportProperties
|
IOdictionary transportProperties
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
(
|
(
|
||||||
IOobject
|
"transportProperties",
|
||||||
(
|
runTime.constant(),
|
||||||
"transportProperties",
|
mesh,
|
||||||
runTime.constant(),
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
mesh,
|
IOobject::NO_WRITE
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
)
|
||||||
IOobject::NO_WRITE
|
);
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading diffusivity DT\n" << endl;
|
Info<< "Reading diffusivity DT\n" << endl;
|
||||||
|
|
||||||
dimensionedScalar DT
|
dimensionedScalar DT
|
||||||
(
|
(
|
||||||
transportProperties.lookup("DT")
|
"DT",
|
||||||
);
|
dimArea/dimTime,
|
||||||
|
transportProperties
|
||||||
|
);
|
||||||
|
|||||||
@ -1,55 +1,57 @@
|
|||||||
Info<< "Reading field T\n" << endl;
|
Info<< "Reading field T\n" << endl;
|
||||||
|
|
||||||
volScalarField T
|
volScalarField T
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
(
|
(
|
||||||
IOobject
|
"T",
|
||||||
(
|
runTime.timeName(),
|
||||||
"T",
|
mesh,
|
||||||
runTime.timeName(),
|
IOobject::MUST_READ,
|
||||||
mesh,
|
IOobject::AUTO_WRITE
|
||||||
IOobject::MUST_READ,
|
),
|
||||||
IOobject::AUTO_WRITE
|
mesh
|
||||||
),
|
);
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
|
|
||||||
volVectorField U
|
volVectorField U
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
(
|
(
|
||||||
IOobject
|
"U",
|
||||||
(
|
runTime.timeName(),
|
||||||
"U",
|
mesh,
|
||||||
runTime.timeName(),
|
IOobject::MUST_READ,
|
||||||
mesh,
|
IOobject::AUTO_WRITE
|
||||||
IOobject::MUST_READ,
|
),
|
||||||
IOobject::AUTO_WRITE
|
mesh
|
||||||
),
|
);
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading transportProperties\n" << endl;
|
Info<< "Reading transportProperties\n" << endl;
|
||||||
|
|
||||||
IOdictionary transportProperties
|
IOdictionary transportProperties
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
(
|
(
|
||||||
IOobject
|
"transportProperties",
|
||||||
(
|
runTime.constant(),
|
||||||
"transportProperties",
|
mesh,
|
||||||
runTime.constant(),
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
mesh,
|
IOobject::NO_WRITE
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
)
|
||||||
IOobject::NO_WRITE
|
);
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading diffusivity DT\n" << endl;
|
Info<< "Reading diffusivity DT\n" << endl;
|
||||||
|
|
||||||
dimensionedScalar DT
|
dimensionedScalar DT
|
||||||
(
|
(
|
||||||
transportProperties.lookup("DT")
|
"DT",
|
||||||
);
|
dimArea/dimTime,
|
||||||
|
transportProperties
|
||||||
|
);
|
||||||
|
|
||||||
#include "createPhi.H"
|
#include "createPhi.H"
|
||||||
|
|||||||
@ -15,8 +15,8 @@ EXE_INC = \
|
|||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||||
-I$(LIB_SRC)/triSurface/lnInclude \
|
-I$(LIB_SRC)/meshTools/lnInclude
|
||||||
|
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lengine \
|
-lengine \
|
||||||
|
|||||||
@ -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
|
||||||
@ -79,7 +79,7 @@ Foam::PDRDragModel::~PDRDragModel()
|
|||||||
|
|
||||||
bool Foam::PDRDragModel::read(const dictionary& PDRProperties)
|
bool Foam::PDRDragModel::read(const dictionary& PDRProperties)
|
||||||
{
|
{
|
||||||
PDRDragModelCoeffs_ = PDRProperties.subDict(type() + "Coeffs");
|
PDRDragModelCoeffs_ = PDRProperties.optionalSubDict(type() + "Coeffs");
|
||||||
|
|
||||||
PDRDragModelCoeffs_.lookup("drag") >> on_;
|
PDRDragModelCoeffs_.lookup("drag") >> on_;
|
||||||
|
|
||||||
|
|||||||
@ -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
|
||||||
@ -67,7 +67,7 @@ Foam::XiEqModel::~XiEqModel()
|
|||||||
|
|
||||||
bool Foam::XiEqModel::read(const dictionary& XiEqProperties)
|
bool Foam::XiEqModel::read(const dictionary& XiEqProperties)
|
||||||
{
|
{
|
||||||
XiEqModelCoeffs_ = XiEqProperties.subDict(type() + "Coeffs");
|
XiEqModelCoeffs_ = XiEqProperties.optionalSubDict(type() + "Coeffs");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
@ -67,7 +67,7 @@ Foam::XiGModel::~XiGModel()
|
|||||||
|
|
||||||
bool Foam::XiGModel::read(const dictionary& XiGProperties)
|
bool Foam::XiGModel::read(const dictionary& XiGProperties)
|
||||||
{
|
{
|
||||||
XiGModelCoeffs_ = XiGProperties.subDict(type() + "Coeffs");
|
XiGModelCoeffs_ = XiGProperties.optionalSubDict(type() + "Coeffs");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
@ -85,7 +85,7 @@ Foam::XiModel::~XiModel()
|
|||||||
|
|
||||||
bool Foam::XiModel::read(const dictionary& XiProperties)
|
bool Foam::XiModel::read(const dictionary& XiProperties)
|
||||||
{
|
{
|
||||||
XiModelCoeffs_ = XiProperties.subDict(type() + "Coeffs");
|
XiModelCoeffs_ = XiProperties.optionalSubDict(type() + "Coeffs");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
@ -80,7 +80,7 @@ Foam::laminarFlameSpeedModels::SCOPE::SCOPE
|
|||||||
dict.lookup("fuelFile")
|
dict.lookup("fuelFile")
|
||||||
)
|
)
|
||||||
)()
|
)()
|
||||||
).subDict(typeName + "Coeffs")
|
).optionalSubDict(typeName + "Coeffs")
|
||||||
),
|
),
|
||||||
LFL_(readScalar(coeffsDict_.lookup("lowerFlamabilityLimit"))),
|
LFL_(readScalar(coeffsDict_.lookup("lowerFlamabilityLimit"))),
|
||||||
UFL_(readScalar(coeffsDict_.lookup("upperFlamabilityLimit"))),
|
UFL_(readScalar(coeffsDict_.lookup("upperFlamabilityLimit"))),
|
||||||
|
|||||||
@ -54,4 +54,3 @@ Info<< "Creating base fields for time " << runTime.timeName() << endl;
|
|||||||
|
|
||||||
T.write();
|
T.write();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
Info<< "Sh = " << Sh
|
Info<< "Qdot = " << Qdot
|
||||||
<< ", T = " << thermo.T()[0]
|
<< ", T = " << thermo.T()[0]
|
||||||
<< ", p = " << thermo.p()[0]
|
<< ", p = " << thermo.p()[0]
|
||||||
<< ", " << Y[0].name() << " = " << Y[0][0]
|
<< ", " << Y[0].name() << " = " << Y[0][0]
|
||||||
@ -8,4 +8,3 @@
|
|||||||
|
|
||||||
post<< runTime.value() << token::TAB << thermo.T()[0] << token::TAB
|
post<< runTime.value() << token::TAB << thermo.T()[0] << token::TAB
|
||||||
<< thermo.p()[0] << endl;
|
<< thermo.p()[0] << endl;
|
||||||
|
|
||||||
|
|||||||
@ -3,4 +3,3 @@ if (adjustTimeStep)
|
|||||||
runTime.setDeltaT(min(dtChem, maxDeltaT));
|
runTime.setDeltaT(min(dtChem, maxDeltaT));
|
||||||
Info<< "deltaT = " << runTime.deltaT().value() << endl;
|
Info<< "deltaT = " << runTime.deltaT().value() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
dtChem = chemistry.solve(runTime.deltaT().value());
|
dtChem = chemistry.solve(runTime.deltaT().value());
|
||||||
scalar Sh = chemistry.Sh()()[0]/rho[0];
|
scalar Qdot = chemistry.Qdot()()[0]/rho[0];
|
||||||
integratedHeat += Sh*runTime.deltaT().value();
|
integratedHeat += Qdot*runTime.deltaT().value();
|
||||||
|
|||||||
@ -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 \
|
||||||
|
|||||||
@ -10,7 +10,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||||||
);
|
);
|
||||||
{
|
{
|
||||||
combustion->correct();
|
combustion->correct();
|
||||||
dQ = combustion->dQ();
|
Qdot = combustion->Qdot();
|
||||||
volScalarField Yt(0.0*Y[0]);
|
volScalarField Yt(0.0*Y[0]);
|
||||||
|
|
||||||
forAll(Y, i)
|
forAll(Y, i)
|
||||||
@ -67,8 +67,8 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||||||
)
|
)
|
||||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||||
==
|
==
|
||||||
combustion->Sh()
|
Qdot
|
||||||
+ radiation->Sh(thermo)
|
+ radiation->Sh(thermo, he)
|
||||||
+ parcels.Sh(he)
|
+ parcels.Sh(he)
|
||||||
+ surfaceFilm.Sh()
|
+ surfaceFilm.Sh()
|
||||||
+ fvOptions(rho, he)
|
+ fvOptions(rho, he)
|
||||||
|
|||||||
@ -131,18 +131,18 @@ Switch solvePyrolysisRegion
|
|||||||
additionalControlsDict.lookupOrDefault<bool>("solvePyrolysisRegion", true)
|
additionalControlsDict.lookupOrDefault<bool>("solvePyrolysisRegion", true)
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField dQ
|
volScalarField Qdot
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"dQ",
|
"Qdot",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
)
|
)
|
||||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||||
==
|
==
|
||||||
reaction->Sh()
|
Qdot
|
||||||
+ fvOptions(rho, he)
|
+ fvOptions(rho, he)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||||||
|
|
||||||
{
|
{
|
||||||
reaction->correct();
|
reaction->correct();
|
||||||
dQ = reaction->dQ();
|
Qdot = reaction->Qdot();
|
||||||
volScalarField Yt(0.0*Y[0]);
|
volScalarField Yt(0.0*Y[0]);
|
||||||
|
|
||||||
forAll(Y, i)
|
forAll(Y, i)
|
||||||
|
|||||||
@ -117,18 +117,18 @@ forAll(Y, i)
|
|||||||
}
|
}
|
||||||
fields.add(thermo.he());
|
fields.add(thermo.he());
|
||||||
|
|
||||||
volScalarField dQ
|
volScalarField Qdot
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"dQ",
|
"Qdot",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "createMRF.H"
|
#include "createMRF.H"
|
||||||
|
|||||||
@ -117,18 +117,18 @@ forAll(Y, i)
|
|||||||
}
|
}
|
||||||
fields.add(thermo.he());
|
fields.add(thermo.he());
|
||||||
|
|
||||||
volScalarField dQ
|
volScalarField Qdot
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"dQ",
|
"Qdot",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "createMRF.H"
|
#include "createMRF.H"
|
||||||
|
|||||||
@ -96,18 +96,18 @@ forAll(Y, i)
|
|||||||
}
|
}
|
||||||
fields.add(thermo.he());
|
fields.add(thermo.he());
|
||||||
|
|
||||||
volScalarField dQ
|
volScalarField Qdot
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"dQ",
|
"Qdot",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "createMRF.H"
|
#include "createMRF.H"
|
||||||
|
|||||||
@ -43,13 +43,16 @@ License
|
|||||||
// Damping coefficient (1-0)
|
// Damping coefficient (1-0)
|
||||||
scalar rDeltaTDampingCoeff
|
scalar rDeltaTDampingCoeff
|
||||||
(
|
(
|
||||||
pimpleDict.lookupOrDefault<scalar>("rDeltaTDampingCoeff", 1)
|
pimpleDict.lookupOrDefault<scalar>("rDeltaTDampingCoeff", 1.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Maximum change in cell temperature per iteration
|
// Maximum change in cell temperature per iteration
|
||||||
// (relative to previous value)
|
// (relative to previous value)
|
||||||
scalar alphaTemp(pimpleDict.lookupOrDefault("alphaTemp", 0.05));
|
scalar alphaTemp(pimpleDict.lookupOrDefault("alphaTemp", 0.05));
|
||||||
|
|
||||||
|
// Maximum change in cell concentration per iteration
|
||||||
|
// (relative to reference value)
|
||||||
|
scalar alphaY(pimpleDict.lookupOrDefault("alphaY", 1.0));
|
||||||
|
|
||||||
Info<< "Time scales min/max:" << endl;
|
Info<< "Time scales min/max:" << endl;
|
||||||
|
|
||||||
@ -68,34 +71,89 @@ License
|
|||||||
rDeltaT.max(1/maxDeltaT);
|
rDeltaT.max(1/maxDeltaT);
|
||||||
|
|
||||||
Info<< " Flow = "
|
Info<< " Flow = "
|
||||||
<< gMin(1/rDeltaT.primitiveField()) << ", "
|
<< 1/gMax(rDeltaT.primitiveField()) << ", "
|
||||||
<< gMax(1/rDeltaT.primitiveField()) << endl;
|
<< 1/gMin(rDeltaT.primitiveField()) << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reaction source time scale
|
// Heat release rate time scale
|
||||||
if (alphaTemp < 1.0)
|
if (alphaTemp < 1)
|
||||||
{
|
{
|
||||||
volScalarField::Internal rDeltaTT
|
volScalarField::Internal rDeltaTT
|
||||||
(
|
(
|
||||||
mag(reaction->Sh())/(alphaTemp*rho*thermo.Cp()*T)
|
mag(Qdot)/(alphaTemp*rho*thermo.Cp()*T)
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< " Temperature = "
|
Info<< " Temperature = "
|
||||||
<< gMin(1/(rDeltaTT.field() + VSMALL)) << ", "
|
<< 1/(gMax(rDeltaTT.field()) + VSMALL) << ", "
|
||||||
<< gMax(1/(rDeltaTT.field() + VSMALL)) << endl;
|
<< 1/(gMin(rDeltaTT.field()) + VSMALL) << endl;
|
||||||
|
|
||||||
rDeltaT.ref() = max
|
rDeltaT.ref() = max(rDeltaT(), rDeltaTT);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reaction rate time scale
|
||||||
|
if (alphaY < 1)
|
||||||
|
{
|
||||||
|
dictionary Yref(pimpleDict.subDict("Yref"));
|
||||||
|
|
||||||
|
volScalarField::Internal rDeltaTY
|
||||||
(
|
(
|
||||||
rDeltaT(),
|
IOobject
|
||||||
rDeltaTT
|
(
|
||||||
|
"rDeltaTY",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedScalar("rDeltaTY", rDeltaT.dimensions(), 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
bool foundY = false;
|
||||||
|
|
||||||
|
forAll(Y, i)
|
||||||
|
{
|
||||||
|
if (i != inertIndex && composition.active(i))
|
||||||
|
{
|
||||||
|
volScalarField& Yi = Y[i];
|
||||||
|
|
||||||
|
if (Yref.found(Yi.name()))
|
||||||
|
{
|
||||||
|
foundY = true;
|
||||||
|
scalar Yrefi = readScalar(Yref.lookup(Yi.name()));
|
||||||
|
|
||||||
|
rDeltaTY.field() = max
|
||||||
|
(
|
||||||
|
mag
|
||||||
|
(
|
||||||
|
reaction->R(Yi)().source()
|
||||||
|
/((Yrefi*alphaY)*(rho*mesh.V()))
|
||||||
|
),
|
||||||
|
rDeltaTY
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (foundY)
|
||||||
|
{
|
||||||
|
Info<< " Composition = "
|
||||||
|
<< 1/(gMax(rDeltaTY.field()) + VSMALL) << ", "
|
||||||
|
<< 1/(gMin(rDeltaTY.field()) + VSMALL) << endl;
|
||||||
|
|
||||||
|
rDeltaT.ref() = max(rDeltaT(), rDeltaTY);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IOWarningIn(args.executable().c_str(), Yref)
|
||||||
|
<< "Cannot find any active species in Yref " << Yref
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update tho boundary values of the reciprocal time-step
|
// Update tho boundary values of the reciprocal time-step
|
||||||
rDeltaT.correctBoundaryConditions();
|
rDeltaT.correctBoundaryConditions();
|
||||||
|
|
||||||
// Spatially smooth the time scale field
|
// Spatially smooth the time scale field
|
||||||
if (rDeltaTSmoothingCoeff < 1.0)
|
if (rDeltaTSmoothingCoeff < 1)
|
||||||
{
|
{
|
||||||
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
|
fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff);
|
||||||
}
|
}
|
||||||
@ -105,7 +163,7 @@ License
|
|||||||
// - only increase at a fraction of old time scale
|
// - only increase at a fraction of old time scale
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
rDeltaTDampingCoeff < 1.0
|
rDeltaTDampingCoeff < 1
|
||||||
&& runTime.timeIndex() > runTime.startTimeIndex() + 1
|
&& runTime.timeIndex() > runTime.startTimeIndex() + 1
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -120,8 +178,8 @@ License
|
|||||||
rDeltaT.correctBoundaryConditions();
|
rDeltaT.correctBoundaryConditions();
|
||||||
|
|
||||||
Info<< " Overall = "
|
Info<< " Overall = "
|
||||||
<< gMin(1/rDeltaT.primitiveField())
|
<< 1/gMax(rDeltaT.primitiveField())
|
||||||
<< ", " << gMax(1/rDeltaT.primitiveField()) << endl;
|
<< ", " << 1/gMin(rDeltaT.primitiveField()) << 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
|
||||||
@ -184,7 +184,8 @@ public:
|
|||||||
//- Evaluate the patch field
|
//- Evaluate the patch field
|
||||||
virtual void evaluate
|
virtual void evaluate
|
||||||
(
|
(
|
||||||
const Pstream::commsTypes commsType=Pstream::blocking
|
const Pstream::commsTypes commsType=
|
||||||
|
Pstream::commsTypes::blocking
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Return face-gradient transform diagonal
|
//- Return face-gradient transform diagonal
|
||||||
|
|||||||
@ -120,11 +120,14 @@ int main(int argc, char *argv[])
|
|||||||
"cSf_pos",
|
"cSf_pos",
|
||||||
interpolate(c, pos, T.name())*mesh.magSf()
|
interpolate(c, pos, T.name())*mesh.magSf()
|
||||||
);
|
);
|
||||||
|
cSf_pos.setOriented();
|
||||||
|
|
||||||
surfaceScalarField cSf_neg
|
surfaceScalarField cSf_neg
|
||||||
(
|
(
|
||||||
"cSf_neg",
|
"cSf_neg",
|
||||||
interpolate(c, neg, T.name())*mesh.magSf()
|
interpolate(c, neg, T.name())*mesh.magSf()
|
||||||
);
|
);
|
||||||
|
cSf_neg.setOriented();
|
||||||
|
|
||||||
surfaceScalarField ap
|
surfaceScalarField ap
|
||||||
(
|
(
|
||||||
@ -269,4 +272,5 @@ int main(int argc, char *argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -101,11 +101,14 @@ int main(int argc, char *argv[])
|
|||||||
"cSf_pos",
|
"cSf_pos",
|
||||||
interpolate(c, pos, T.name())*mesh.magSf()
|
interpolate(c, pos, T.name())*mesh.magSf()
|
||||||
);
|
);
|
||||||
|
cSf_pos.setOriented();
|
||||||
|
|
||||||
surfaceScalarField cSf_neg
|
surfaceScalarField cSf_neg
|
||||||
(
|
(
|
||||||
"cSf_neg",
|
"cSf_neg",
|
||||||
interpolate(c, neg, T.name())*mesh.magSf()
|
interpolate(c, neg, T.name())*mesh.magSf()
|
||||||
);
|
);
|
||||||
|
cSf_neg.setOriented();
|
||||||
|
|
||||||
surfaceScalarField ap
|
surfaceScalarField ap
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
Info<< "Reading thermophysical properties\n" << endl;
|
Info<< "Reading thermophysical properties\n" << endl;
|
||||||
|
|
||||||
autoPtr<psiThermo> pThermo
|
autoPtr<fluidThermo> pThermo
|
||||||
(
|
(
|
||||||
psiThermo::New(mesh)
|
fluidThermo::New(mesh)
|
||||||
);
|
);
|
||||||
psiThermo& thermo = pThermo();
|
fluidThermo& thermo = pThermo();
|
||||||
thermo.validate(args.executable(), "h", "e");
|
thermo.validate(args.executable(), "h", "e");
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
volScalarField& p = thermo.p();
|
||||||
@ -40,27 +40,7 @@ volVectorField U
|
|||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
#include "compressibleCreatePhi.H"
|
||||||
|
|
||||||
dimensionedScalar rhoMax
|
pressureControl pressureControl(p, rho, pimple.dict(), false);
|
||||||
(
|
|
||||||
dimensionedScalar::lookupOrDefault
|
|
||||||
(
|
|
||||||
"rhoMax",
|
|
||||||
pimple.dict(),
|
|
||||||
dimDensity,
|
|
||||||
GREAT
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar rhoMin
|
|
||||||
(
|
|
||||||
dimensionedScalar::lookupOrDefault
|
|
||||||
(
|
|
||||||
"rhoMin",
|
|
||||||
pimple.dict(),
|
|
||||||
dimDensity,
|
|
||||||
0
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Creating turbulence model\n" << endl;
|
Info<< "Creating turbulence model\n" << endl;
|
||||||
autoPtr<compressible::turbulenceModel> turbulence
|
autoPtr<compressible::turbulenceModel> turbulence
|
||||||
|
|||||||
@ -1,8 +1,3 @@
|
|||||||
rho = thermo.rho();
|
|
||||||
rho = max(rho, rhoMin);
|
|
||||||
rho = min(rho, rhoMax);
|
|
||||||
rho.relax();
|
|
||||||
|
|
||||||
volScalarField rAU(1.0/UEqn.A());
|
volScalarField rAU(1.0/UEqn.A());
|
||||||
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||||
@ -12,55 +7,52 @@ if (pimple.nCorrPISO() <= 1)
|
|||||||
tUEqn.clear();
|
tUEqn.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
surfaceScalarField phiHbyA
|
||||||
|
(
|
||||||
|
"phiHbyA",
|
||||||
|
fvc::flux(rho*HbyA)
|
||||||
|
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
|
||||||
|
);
|
||||||
|
|
||||||
|
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||||
|
|
||||||
|
// Update the pressure BCs to ensure flux consistency
|
||||||
|
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
|
||||||
|
|
||||||
if (pimple.transonic())
|
if (pimple.transonic())
|
||||||
{
|
{
|
||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(psi)
|
(fvc::interpolate(psi)/fvc::interpolate(rho))*phiHbyA
|
||||||
*(
|
|
||||||
fvc::flux(HbyA)
|
|
||||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
phiHbyA -= fvc::interpolate(p)*phid;
|
||||||
MRF.makeRelative(fvc::interpolate(psi), phid);
|
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
while (pimple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(psi, p)
|
fvm::ddt(psi, p)
|
||||||
|
+ fvc::div(phiHbyA)
|
||||||
+ fvm::div(phid, p)
|
+ fvm::div(phid, p)
|
||||||
- fvm::laplacian(rhorAUf, p)
|
- fvm::laplacian(rhorAUf, p)
|
||||||
==
|
==
|
||||||
fvOptions(psi, p, rho.name())
|
fvOptions(psi, p, rho.name())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Relax the pressure equation to ensure diagonal-dominance
|
||||||
|
pEqn.relax();
|
||||||
|
|
||||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||||
|
|
||||||
if (pimple.finalNonOrthogonalIter())
|
if (pimple.finalNonOrthogonalIter())
|
||||||
{
|
{
|
||||||
phi == pEqn.flux();
|
phi = phiHbyA + pEqn.flux();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
surfaceScalarField phiHbyA
|
|
||||||
(
|
|
||||||
"phiHbyA",
|
|
||||||
(
|
|
||||||
fvc::flux(rho*HbyA)
|
|
||||||
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
|
||||||
|
|
||||||
// Update the pressure BCs to ensure flux consistency
|
|
||||||
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
|
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
while (pimple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
@ -87,19 +79,20 @@ else
|
|||||||
// Explicitly relax pressure for momentum corrector
|
// Explicitly relax pressure for momentum corrector
|
||||||
p.relax();
|
p.relax();
|
||||||
|
|
||||||
// Recalculate density from the relaxed pressure
|
|
||||||
rho = thermo.rho();
|
|
||||||
rho = max(rho, rhoMin);
|
|
||||||
rho = min(rho, rhoMax);
|
|
||||||
rho.relax();
|
|
||||||
Info<< "rho max/min : " << max(rho).value()
|
|
||||||
<< " " << min(rho).value() << endl;
|
|
||||||
|
|
||||||
U = HbyA - rAU*fvc::grad(p);
|
U = HbyA - rAU*fvc::grad(p);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
fvOptions.correct(U);
|
fvOptions.correct(U);
|
||||||
K = 0.5*magSqr(U);
|
K = 0.5*magSqr(U);
|
||||||
|
|
||||||
|
pressureControl.limit(p);
|
||||||
|
p.correctBoundaryConditions();
|
||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
if (!pimple.transonic())
|
||||||
|
{
|
||||||
|
rho.relax();
|
||||||
|
}
|
||||||
|
|
||||||
if (thermo.dpdt())
|
if (thermo.dpdt())
|
||||||
{
|
{
|
||||||
dpdt = fvc::ddt(p);
|
dpdt = fvc::ddt(p);
|
||||||
|
|||||||
@ -1,8 +1,3 @@
|
|||||||
rho = thermo.rho();
|
|
||||||
rho = max(rho, rhoMin);
|
|
||||||
rho = min(rho, rhoMax);
|
|
||||||
rho.relax();
|
|
||||||
|
|
||||||
volScalarField rAU(1.0/UEqn.A());
|
volScalarField rAU(1.0/UEqn.A());
|
||||||
volScalarField rAtU(1.0/(1.0/rAU - UEqn.H1()));
|
volScalarField rAtU(1.0/(1.0/rAU - UEqn.H1()));
|
||||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||||
@ -12,72 +7,64 @@ if (pimple.nCorrPISO() <= 1)
|
|||||||
tUEqn.clear();
|
tUEqn.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
surfaceScalarField phiHbyA
|
||||||
|
(
|
||||||
|
"phiHbyA",
|
||||||
|
(
|
||||||
|
fvc::flux(rho*HbyA)
|
||||||
|
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||||
|
|
||||||
|
volScalarField rhorAtU("rhorAtU", rho*rAtU);
|
||||||
|
|
||||||
|
// Update the pressure BCs to ensure flux consistency
|
||||||
|
constrainPressure(p, rho, U, phiHbyA, rhorAtU, MRF);
|
||||||
|
|
||||||
if (pimple.transonic())
|
if (pimple.transonic())
|
||||||
{
|
{
|
||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(psi)
|
(fvc::interpolate(psi)/fvc::interpolate(rho))*phiHbyA
|
||||||
*(
|
|
||||||
fvc::flux(HbyA)
|
|
||||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
|
|
||||||
/fvc::interpolate(rho)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
volScalarField rhorAtU("rhorAtU", rho*rAtU);
|
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
while (pimple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(psi, p)
|
fvm::ddt(psi, p)
|
||||||
|
+ fvc::div(phiHbyA)
|
||||||
+ fvm::div(phid, p)
|
+ fvm::div(phid, p)
|
||||||
+ fvc::div(phic)
|
|
||||||
- fvm::laplacian(rhorAtU, p)
|
- fvm::laplacian(rhorAtU, p)
|
||||||
==
|
==
|
||||||
fvOptions(psi, p, rho.name())
|
fvOptions(psi, p, rho.name())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Relax the pressure equation to ensure diagonal-dominance
|
||||||
|
pEqn.relax();
|
||||||
|
|
||||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||||
|
|
||||||
if (pimple.finalNonOrthogonalIter())
|
if (pimple.finalNonOrthogonalIter())
|
||||||
{
|
{
|
||||||
phi == phic + pEqn.flux();
|
phi = phiHbyA + pEqn.flux();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
surfaceScalarField phiHbyA
|
|
||||||
(
|
|
||||||
"phiHbyA",
|
|
||||||
(
|
|
||||||
fvc::flux(rho*HbyA)
|
|
||||||
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
|
||||||
|
|
||||||
phiHbyA += fvc::interpolate(rho*(rAtU - rAU))*fvc::snGrad(p)*mesh.magSf();
|
phiHbyA += fvc::interpolate(rho*(rAtU - rAU))*fvc::snGrad(p)*mesh.magSf();
|
||||||
HbyA -= (rAU - rAtU)*fvc::grad(p);
|
HbyA -= (rAU - rAtU)*fvc::grad(p);
|
||||||
|
|
||||||
volScalarField rhorAtU("rhorAtU", rho*rAtU);
|
|
||||||
|
|
||||||
// Update the pressure BCs to ensure flux consistency
|
|
||||||
constrainPressure(p, rho, U, phiHbyA, rhorAtU, MRF);
|
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
while (pimple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
@ -109,19 +96,16 @@ U.correctBoundaryConditions();
|
|||||||
fvOptions.correct(U);
|
fvOptions.correct(U);
|
||||||
K = 0.5*magSqr(U);
|
K = 0.5*magSqr(U);
|
||||||
|
|
||||||
if (thermo.dpdt())
|
pressureControl.limit(p);
|
||||||
{
|
p.correctBoundaryConditions();
|
||||||
dpdt = fvc::ddt(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Recalculate density from the relaxed pressure
|
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
rho = max(rho, rhoMin);
|
|
||||||
rho = min(rho, rhoMax);
|
|
||||||
|
|
||||||
if (!pimple.transonic())
|
if (!pimple.transonic())
|
||||||
{
|
{
|
||||||
rho.relax();
|
rho.relax();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;
|
if (thermo.dpdt())
|
||||||
|
{
|
||||||
|
dpdt = fvc::ddt(p);
|
||||||
|
}
|
||||||
|
|||||||
@ -1,8 +1,3 @@
|
|||||||
rho = thermo.rho();
|
|
||||||
rho = max(rho, rhoMin);
|
|
||||||
rho = min(rho, rhoMax);
|
|
||||||
rho.relax();
|
|
||||||
|
|
||||||
volScalarField rAU(1.0/UEqn.A());
|
volScalarField rAU(1.0/UEqn.A());
|
||||||
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||||
@ -12,55 +7,53 @@ if (pimple.nCorrPISO() <= 1)
|
|||||||
tUEqn.clear();
|
tUEqn.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
surfaceScalarField phiHbyA
|
||||||
|
(
|
||||||
|
"phiHbyA",
|
||||||
|
fvc::flux(rho*HbyA)
|
||||||
|
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)
|
||||||
|
);
|
||||||
|
|
||||||
|
fvc::makeRelative(phiHbyA, rho, U);
|
||||||
|
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||||
|
|
||||||
|
// Update the pressure BCs to ensure flux consistency
|
||||||
|
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
|
||||||
|
|
||||||
if (pimple.transonic())
|
if (pimple.transonic())
|
||||||
{
|
{
|
||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(psi)
|
(fvc::interpolate(psi)/fvc::interpolate(rho))*phiHbyA
|
||||||
*(
|
|
||||||
fvc::flux(HbyA)
|
|
||||||
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
phiHbyA -= fvc::interpolate(p)*phid;
|
||||||
fvc::makeRelative(phid, psi, U);
|
|
||||||
MRF.makeRelative(fvc::interpolate(psi), phid);
|
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
while (pimple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
fvm::ddt(psi, p)
|
fvm::ddt(psi, p)
|
||||||
|
+ fvc::div(phiHbyA)
|
||||||
+ fvm::div(phid, p)
|
+ fvm::div(phid, p)
|
||||||
- fvm::laplacian(rhorAUf, p)
|
- fvm::laplacian(rhorAUf, p)
|
||||||
==
|
==
|
||||||
fvOptions(psi, p, rho.name())
|
fvOptions(psi, p, rho.name())
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Relax the pressure equation to ensure diagonal-dominance
|
||||||
|
pEqn.relax();
|
||||||
|
|
||||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||||
|
|
||||||
if (pimple.finalNonOrthogonalIter())
|
if (pimple.finalNonOrthogonalIter())
|
||||||
{
|
{
|
||||||
phi == pEqn.flux();
|
phi = phiHbyA + pEqn.flux();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
surfaceScalarField phiHbyA
|
|
||||||
(
|
|
||||||
"phiHbyA",
|
|
||||||
fvc::flux(rho*HbyA)
|
|
||||||
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)
|
|
||||||
);
|
|
||||||
|
|
||||||
fvc::makeRelative(phiHbyA, rho, U);
|
|
||||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
|
||||||
|
|
||||||
// Update the pressure BCs to ensure flux consistency
|
|
||||||
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
|
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
while (pimple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
// Pressure corrector
|
// Pressure corrector
|
||||||
@ -88,19 +81,20 @@ else
|
|||||||
// Explicitly relax pressure for momentum corrector
|
// Explicitly relax pressure for momentum corrector
|
||||||
p.relax();
|
p.relax();
|
||||||
|
|
||||||
// Recalculate density from the relaxed pressure
|
|
||||||
rho = thermo.rho();
|
|
||||||
rho = max(rho, rhoMin);
|
|
||||||
rho = min(rho, rhoMax);
|
|
||||||
rho.relax();
|
|
||||||
Info<< "rho max/min : " << max(rho).value()
|
|
||||||
<< " " << min(rho).value() << endl;
|
|
||||||
|
|
||||||
U = HbyA - rAU*fvc::grad(p);
|
U = HbyA - rAU*fvc::grad(p);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
fvOptions.correct(U);
|
fvOptions.correct(U);
|
||||||
K = 0.5*magSqr(U);
|
K = 0.5*magSqr(U);
|
||||||
|
|
||||||
|
pressureControl.limit(p);
|
||||||
|
p.correctBoundaryConditions();
|
||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
if (!pimple.transonic())
|
||||||
|
{
|
||||||
|
rho.relax();
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
rhoUf = fvc::interpolate(rho*U);
|
rhoUf = fvc::interpolate(rho*U);
|
||||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||||
|
|||||||
@ -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
|
||||||
@ -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/>.
|
||||||
|
|
||||||
Application
|
Application
|
||||||
rhoPimpleFoam
|
rhoPimpleDyMFoam
|
||||||
|
|
||||||
Group
|
Group
|
||||||
grpCompressibleSolvers grpMovingMeshSolvers
|
grpCompressibleSolvers grpMovingMeshSolvers
|
||||||
@ -38,10 +38,11 @@ Description
|
|||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "dynamicFvMesh.H"
|
#include "dynamicFvMesh.H"
|
||||||
#include "psiThermo.H"
|
#include "fluidThermo.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "bound.H"
|
#include "bound.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
|
#include "pressureControl.H"
|
||||||
#include "CorrectPhi.H"
|
#include "CorrectPhi.H"
|
||||||
#include "fvOptions.H"
|
#include "fvOptions.H"
|
||||||
#include "localEulerDdtScheme.H"
|
#include "localEulerDdtScheme.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
|
||||||
@ -37,10 +37,11 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "psiThermo.H"
|
#include "fluidThermo.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "bound.H"
|
#include "bound.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
|
#include "pressureControl.H"
|
||||||
#include "fvOptions.H"
|
#include "fvOptions.H"
|
||||||
#include "localEulerDdtScheme.H"
|
#include "localEulerDdtScheme.H"
|
||||||
#include "fvcSmooth.H"
|
#include "fvcSmooth.H"
|
||||||
|
|||||||
@ -1,11 +1,14 @@
|
|||||||
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& p = thermo.p();
|
||||||
|
|
||||||
volScalarField rho
|
volScalarField rho
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -19,8 +22,6 @@ volScalarField rho
|
|||||||
thermo.rho()
|
thermo.rho()
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
volVectorField U
|
volVectorField U
|
||||||
(
|
(
|
||||||
@ -37,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
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
{
|
{
|
||||||
//const volScalarField& psi = thermo.psi();
|
|
||||||
|
|
||||||
volScalarField rAU(1.0/UEqn.A());
|
volScalarField rAU(1.0/UEqn.A());
|
||||||
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||||
@ -8,22 +6,27 @@
|
|||||||
|
|
||||||
bool closedVolume = false;
|
bool closedVolume = false;
|
||||||
|
|
||||||
|
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(rho*HbyA));
|
||||||
|
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||||
|
|
||||||
|
// Update the pressure BCs to ensure flux consistency
|
||||||
|
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
|
||||||
|
|
||||||
if (simple.transonic())
|
if (simple.transonic())
|
||||||
{
|
{
|
||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(psi)
|
(fvc::interpolate(psi)/fvc::interpolate(rho))*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,26 +35,24 @@
|
|||||||
// 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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(rho*HbyA));
|
|
||||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
|
||||||
|
|
||||||
closedVolume = adjustPhi(phiHbyA, U, p);
|
closedVolume = adjustPhi(phiHbyA, U, p);
|
||||||
|
|
||||||
// Update the pressure BCs to ensure flux consistency
|
|
||||||
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
|
|
||||||
|
|
||||||
while (simple.correctNonOrthogonal())
|
while (simple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
@ -62,7 +63,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 +88,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,19 +98,12 @@
|
|||||||
/fvc::domainIntegrate(psi);
|
/fvc::domainIntegrate(psi);
|
||||||
}
|
}
|
||||||
|
|
||||||
rho = thermo.rho();
|
p.correctBoundaryConditions();
|
||||||
rho = max(rho, rhoMin);
|
|
||||||
rho = min(rho, rhoMax);
|
|
||||||
|
|
||||||
thermo.rho() = max(thermo.rho(), rhoMin);
|
rho = thermo.rho();
|
||||||
thermo.rho() = min(thermo.rho(), rhoMax);
|
|
||||||
|
|
||||||
if (!simple.transonic())
|
if (!simple.transonic())
|
||||||
{
|
{
|
||||||
rho.relax();
|
rho.relax();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "rho max/min : "
|
|
||||||
<< max(rho).value() << " "
|
|
||||||
<< min(rho).value() << endl;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,33 +5,34 @@ tUEqn.clear();
|
|||||||
|
|
||||||
bool closedVolume = false;
|
bool closedVolume = false;
|
||||||
|
|
||||||
|
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(rho*HbyA));
|
||||||
|
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||||
|
|
||||||
|
volScalarField rhorAtU("rhorAtU", rho*rAtU);
|
||||||
|
|
||||||
|
// Update the pressure BCs to ensure flux consistency
|
||||||
|
constrainPressure(p, rho, U, phiHbyA, rhorAtU, MRF);
|
||||||
|
|
||||||
if (simple.transonic())
|
if (simple.transonic())
|
||||||
{
|
{
|
||||||
surfaceScalarField phid
|
surfaceScalarField phid
|
||||||
(
|
(
|
||||||
"phid",
|
"phid",
|
||||||
fvc::interpolate(psi)
|
(fvc::interpolate(psi)/fvc::interpolate(rho))*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);
|
||||||
|
|
||||||
volScalarField rhorAtU("rhorAtU", rho*rAtU);
|
|
||||||
|
|
||||||
while (simple.correctNonOrthogonal())
|
while (simple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
(
|
(
|
||||||
fvm::div(phid, p)
|
fvc::div(phiHbyA)
|
||||||
+ fvc::div(phic)
|
+ fvm::div(phid, p)
|
||||||
- fvm::laplacian(rhorAtU, p)
|
- fvm::laplacian(rhorAtU, p)
|
||||||
==
|
==
|
||||||
fvOptions(psi, p, rho.name())
|
fvOptions(psi, p, rho.name())
|
||||||
@ -40,31 +41,27 @@ 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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(rho*HbyA));
|
|
||||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
|
||||||
|
|
||||||
closedVolume = adjustPhi(phiHbyA, U, p);
|
closedVolume = adjustPhi(phiHbyA, U, p);
|
||||||
|
|
||||||
phiHbyA += fvc::interpolate(rho*(rAtU - rAU))*fvc::snGrad(p)*mesh.magSf();
|
phiHbyA += fvc::interpolate(rho*(rAtU - rAU))*fvc::snGrad(p)*mesh.magSf();
|
||||||
HbyA -= (rAU - rAtU)*fvc::grad(p);
|
HbyA -= (rAU - rAtU)*fvc::grad(p);
|
||||||
|
|
||||||
volScalarField rhorAtU("rhorAtU", rho*rAtU);
|
|
||||||
|
|
||||||
// Update the pressure BCs to ensure flux consistency
|
|
||||||
constrainPressure(p, rho, U, phiHbyA, rhorAtU, MRF);
|
|
||||||
|
|
||||||
while (simple.correctNonOrthogonal())
|
while (simple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
fvScalarMatrix pEqn
|
fvScalarMatrix pEqn
|
||||||
@ -75,7 +72,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 +98,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,16 +108,12 @@ 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() = min(thermo.rho(), rhoMax);
|
|
||||||
|
|
||||||
if (!simple.transonic())
|
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,84 +0,0 @@
|
|||||||
Info<< "Reading thermophysical properties\n" << endl;
|
|
||||||
|
|
||||||
autoPtr<rhoThermo> pThermo
|
|
||||||
(
|
|
||||||
rhoThermo::New(mesh)
|
|
||||||
);
|
|
||||||
rhoThermo& thermo = pThermo();
|
|
||||||
thermo.validate(args.executable(), "h", "e");
|
|
||||||
|
|
||||||
volScalarField rho
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"rho",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::READ_IF_PRESENT,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
thermo.rho()
|
|
||||||
);
|
|
||||||
|
|
||||||
volScalarField& p = thermo.p();
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
|
||||||
volVectorField U
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"U",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
#include "compressibleCreatePhi.H"
|
|
||||||
|
|
||||||
|
|
||||||
label pRefCell = 0;
|
|
||||||
scalar pRefValue = 0.0;
|
|
||||||
setRefCell(p, simple.dict(), pRefCell, pRefValue);
|
|
||||||
|
|
||||||
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;
|
|
||||||
autoPtr<compressible::turbulenceModel> turbulence
|
|
||||||
(
|
|
||||||
compressible::turbulenceModel::New
|
|
||||||
(
|
|
||||||
rho,
|
|
||||||
U,
|
|
||||||
phi,
|
|
||||||
thermo
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
|
|
||||||
|
|
||||||
#include "createMRF.H"
|
|
||||||
@ -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,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
rho = thermo.rho();
|
rho = thermo.rho();
|
||||||
rho = max(rho, rhoMin);
|
|
||||||
rho = min(rho, rhoMax);
|
|
||||||
|
|
||||||
thermo.rho() = max(thermo.rho(), rhoMin);
|
|
||||||
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"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -1,37 +1,37 @@
|
|||||||
Info<< "Reading thermodynamicProperties\n" << endl;
|
Info<< "Reading thermodynamicProperties\n" << endl;
|
||||||
|
|
||||||
IOdictionary thermodynamicProperties
|
IOdictionary thermodynamicProperties
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
(
|
(
|
||||||
IOobject
|
"thermodynamicProperties",
|
||||||
(
|
runTime.constant(),
|
||||||
"thermodynamicProperties",
|
mesh,
|
||||||
runTime.constant(),
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
mesh,
|
IOobject::NO_WRITE
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
)
|
||||||
IOobject::NO_WRITE
|
);
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
dimensionedScalar rho0
|
dimensionedScalar rho0
|
||||||
(
|
(
|
||||||
"rho0",
|
"rho0",
|
||||||
dimDensity,
|
dimDensity,
|
||||||
thermodynamicProperties
|
thermodynamicProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar p0
|
dimensionedScalar p0
|
||||||
(
|
(
|
||||||
"p0",
|
"p0",
|
||||||
dimPressure,
|
dimPressure,
|
||||||
thermodynamicProperties
|
thermodynamicProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
dimensionedScalar psi
|
dimensionedScalar psi
|
||||||
(
|
(
|
||||||
"psi",
|
"psi",
|
||||||
dimCompressibility,
|
dimCompressibility,
|
||||||
thermodynamicProperties
|
thermodynamicProperties
|
||||||
);
|
);
|
||||||
|
|
||||||
// Density offset, i.e. the constant part of the density
|
// Density offset, i.e. the constant part of the density
|
||||||
dimensionedScalar rhoO("rhoO", rho0 - psi*p0);
|
dimensionedScalar rhoO("rhoO", rho0 - psi*p0);
|
||||||
|
|||||||
@ -138,9 +138,7 @@ public:
|
|||||||
>> m.orientation_;
|
>> m.orientation_;
|
||||||
is.readEnd("magnet");
|
is.readEnd("magnet");
|
||||||
|
|
||||||
// Check state of Istream
|
is.check(FUNCTION_NAME);
|
||||||
is.check("operator>>(Istream&, magnet&)");
|
|
||||||
|
|
||||||
return is;
|
return is;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
const dictionary& Bpiso = mesh.solutionDict().subDict("BPISO");
|
const dictionary& Bpiso = mesh.solutionDict().subDict("BPISO");
|
||||||
|
|
||||||
const int nBcorr = Bpiso.lookupOrDefault<int>("nCorrectors", 1);
|
const int nBcorr = Bpiso.lookupOrDefault<int>("nCorrectors", 1);
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||||
==
|
==
|
||||||
rho*(U&g)
|
rho*(U&g)
|
||||||
+ radiation->Sh(thermo)
|
+ radiation->Sh(thermo, he)
|
||||||
+ fvOptions(rho, he)
|
+ fvOptions(rho, he)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||||
==
|
==
|
||||||
rho*(U&g)
|
rho*(U&g)
|
||||||
+ radiation->Sh(thermo)
|
+ radiation->Sh(thermo, he)
|
||||||
+ fvOptions(rho, he)
|
+ fvOptions(rho, he)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
- fvm::laplacian(turb.alphaEff(), he)
|
- fvm::laplacian(turb.alphaEff(), he)
|
||||||
==
|
==
|
||||||
rho*(U&g)
|
rho*(U&g)
|
||||||
+ rad.Sh(thermo)
|
+ rad.Sh(thermo, he)
|
||||||
+ fvOptions(rho, he)
|
+ fvOptions(rho, he)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -2,4 +2,3 @@
|
|||||||
|
|
||||||
const int nNonOrthCorr =
|
const int nNonOrthCorr =
|
||||||
simple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
|
simple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
- fvm::laplacian(turb.alphaEff(), he)
|
- fvm::laplacian(turb.alphaEff(), he)
|
||||||
==
|
==
|
||||||
rho*(U&g)
|
rho*(U&g)
|
||||||
+ rad.Sh(thermo)
|
+ rad.Sh(thermo, he)
|
||||||
+ fvOptions(rho, he)
|
+ fvOptions(rho, he)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -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,7 +24,9 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "solidRegionDiffNo.H"
|
#include "solidRegionDiffNo.H"
|
||||||
#include "fvc.H"
|
#include "surfaceInterpolate.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::scalar Foam::solidRegionDiffNo
|
Foam::scalar Foam::solidRegionDiffNo
|
||||||
(
|
(
|
||||||
@ -34,21 +36,16 @@ Foam::scalar Foam::solidRegionDiffNo
|
|||||||
const volScalarField& kappa
|
const volScalarField& kappa
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar DiNum = 0.0;
|
|
||||||
scalar meanDiNum = 0.0;
|
|
||||||
|
|
||||||
//- Take care: can have fluid domains with 0 cells so do not test for
|
|
||||||
// zero internal faces.
|
|
||||||
surfaceScalarField kapparhoCpbyDelta
|
surfaceScalarField kapparhoCpbyDelta
|
||||||
(
|
(
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()
|
sqr(mesh.surfaceInterpolation::deltaCoeffs())
|
||||||
* fvc::interpolate(kappa)
|
*fvc::interpolate(kappa)
|
||||||
/ fvc::interpolate(Cprho)
|
/fvc::interpolate(Cprho)
|
||||||
);
|
);
|
||||||
|
|
||||||
DiNum = max(kapparhoCpbyDelta).value()*runTime.deltaT().value();
|
const scalar DiNum = max(kapparhoCpbyDelta).value()*runTime.deltaTValue();
|
||||||
|
const scalar meanDiNum =
|
||||||
meanDiNum = (average(kapparhoCpbyDelta)).value()*runTime.deltaT().value();
|
average(kapparhoCpbyDelta).value()*runTime.deltaTValue();
|
||||||
|
|
||||||
Info<< "Region: " << mesh.name() << " Diffusion Number mean: " << meanDiNum
|
Info<< "Region: " << mesh.name() << " Diffusion Number mean: " << meanDiNum
|
||||||
<< " max: " << DiNum << endl;
|
<< " max: " << DiNum << endl;
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
)
|
)
|
||||||
- fvm::laplacian(alphaEff, he)
|
- fvm::laplacian(alphaEff, he)
|
||||||
==
|
==
|
||||||
radiation->Sh(thermo)
|
radiation->Sh(thermo, he)
|
||||||
+ fvOptions(rho, he)
|
+ fvOptions(rho, he)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -93,8 +93,6 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
laminarTransport.lookup("lambda") >> lambda;
|
|
||||||
|
|
||||||
//alpha +=
|
//alpha +=
|
||||||
// mesh.relaxationFactor("alpha")
|
// mesh.relaxationFactor("alpha")
|
||||||
// *(lambda*max(Ua & U, zeroSensitivity) - alpha);
|
// *(lambda*max(Ua & U, zeroSensitivity) - alpha);
|
||||||
|
|||||||
@ -89,8 +89,19 @@ autoPtr<incompressible::turbulenceModel> turbulence
|
|||||||
dimensionedScalar zeroSensitivity("0", dimVelocity*dimVelocity, 0.0);
|
dimensionedScalar zeroSensitivity("0", dimVelocity*dimVelocity, 0.0);
|
||||||
dimensionedScalar zeroAlpha("0", dimless/dimTime, 0.0);
|
dimensionedScalar zeroAlpha("0", dimless/dimTime, 0.0);
|
||||||
|
|
||||||
dimensionedScalar lambda(laminarTransport.lookup("lambda"));
|
dimensionedScalar lambda
|
||||||
dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax"));
|
(
|
||||||
|
"lambda",
|
||||||
|
dimTime/sqr(dimLength),
|
||||||
|
laminarTransport
|
||||||
|
);
|
||||||
|
|
||||||
|
dimensionedScalar alphaMax
|
||||||
|
(
|
||||||
|
"alphaMax",
|
||||||
|
dimless/dimTime,
|
||||||
|
laminarTransport
|
||||||
|
);
|
||||||
|
|
||||||
const labelList& inletCells = mesh.boundary()["inlet"].faceCells();
|
const labelList& inletCells = mesh.boundary()["inlet"].faceCells();
|
||||||
//const labelList& outletCells = mesh.boundary()["outlet"].faceCells();
|
//const labelList& outletCells = mesh.boundary()["outlet"].faceCells();
|
||||||
|
|||||||
@ -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
|
||||||
@ -70,7 +70,6 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
#include "readControls.H"
|
#include "readControls.H"
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
|
|
||||||
#include "setDeltaT.H"
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
runTime++;
|
runTime++;
|
||||||
|
|||||||
@ -2,7 +2,10 @@
|
|||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
|
||||||
wclean libso DPMTurbulenceModels
|
wclean libso DPMTurbulenceModels
|
||||||
|
|
||||||
wclean
|
wclean
|
||||||
wclean MPPICFoam
|
wclean MPPICFoam
|
||||||
|
wclean DPMDyMFoam
|
||||||
|
wclean DPMDyMFoam/MPPICDyMFoam
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
|
||||||
# Parse arguments for library compilation
|
# Parse arguments for library compilation
|
||||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||||
@ -8,5 +8,7 @@ wmake $targetType DPMTurbulenceModels
|
|||||||
|
|
||||||
wmake $targetType
|
wmake $targetType
|
||||||
wmake $targetType MPPICFoam
|
wmake $targetType MPPICFoam
|
||||||
|
wmake $targetType DPMDyMFoam
|
||||||
|
wmake $targetType DPMDyMFoam/MPPICDyMFoam
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
163
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/DPMDyMFoam.C
Normal file
163
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/DPMDyMFoam.C
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Application
|
||||||
|
DPMDyMFoam
|
||||||
|
|
||||||
|
Description
|
||||||
|
Transient solver for the coupled transport of a single kinematic particle
|
||||||
|
cloud including the effect of the volume fraction of particles on the
|
||||||
|
continuous phase, with optional mesh motion and mesh topology changes.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "fvCFD.H"
|
||||||
|
#include "dynamicFvMesh.H"
|
||||||
|
#include "singlePhaseTransportModel.H"
|
||||||
|
#include "PhaseIncompressibleTurbulenceModel.H"
|
||||||
|
#include "pimpleControl.H"
|
||||||
|
#include "CorrectPhi.H"
|
||||||
|
|
||||||
|
#ifdef MPPIC
|
||||||
|
#include "basicKinematicMPPICCloud.H"
|
||||||
|
#define basicKinematicTypeCloud basicKinematicMPPICCloud
|
||||||
|
#else
|
||||||
|
#include "basicKinematicCollidingCloud.H"
|
||||||
|
#define basicKinematicTypeCloud basicKinematicCollidingCloud
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
argList::addOption
|
||||||
|
(
|
||||||
|
"cloudName",
|
||||||
|
"name",
|
||||||
|
"specify alternative cloud name. default is 'kinematicCloud'"
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "postProcess.H"
|
||||||
|
|
||||||
|
#include "setRootCase.H"
|
||||||
|
#include "createTime.H"
|
||||||
|
#include "createDynamicFvMesh.H"
|
||||||
|
#include "createControls.H"
|
||||||
|
#include "createFields.H"
|
||||||
|
#include "createUcf.H"
|
||||||
|
#include "initContinuityErrs.H"
|
||||||
|
|
||||||
|
Info<< "\nStarting time loop\n" << endl;
|
||||||
|
|
||||||
|
while (runTime.run())
|
||||||
|
{
|
||||||
|
#include "readControls.H"
|
||||||
|
#include "CourantNo.H"
|
||||||
|
#include "setDeltaT.H"
|
||||||
|
|
||||||
|
runTime++;
|
||||||
|
|
||||||
|
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||||
|
|
||||||
|
mesh.update();
|
||||||
|
|
||||||
|
// Calculate absolute flux from the mapped surface velocity
|
||||||
|
phic = mesh.Sf() & Ucf;
|
||||||
|
|
||||||
|
if (mesh.changing() && correctPhi)
|
||||||
|
{
|
||||||
|
#include "correctPhic.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make the flux relative to the mesh motion
|
||||||
|
fvc::makeRelative(phic, Uc);
|
||||||
|
|
||||||
|
if (mesh.changing() && checkMeshCourantNo)
|
||||||
|
{
|
||||||
|
#include "meshCourantNo.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
continuousPhaseTransport.correct();
|
||||||
|
muc = rhoc*continuousPhaseTransport.nu();
|
||||||
|
|
||||||
|
Info<< "Evolving " << kinematicCloud.name() << endl;
|
||||||
|
kinematicCloud.evolve();
|
||||||
|
|
||||||
|
// Update continuous phase volume fraction field
|
||||||
|
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
|
||||||
|
alphac.correctBoundaryConditions();
|
||||||
|
alphacf = fvc::interpolate(alphac);
|
||||||
|
alphaPhic = alphacf*phic;
|
||||||
|
|
||||||
|
fvVectorMatrix cloudSU(kinematicCloud.SU(Uc));
|
||||||
|
volVectorField cloudVolSUSu
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"cloudVolSUSu",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh
|
||||||
|
),
|
||||||
|
mesh,
|
||||||
|
dimensionedVector
|
||||||
|
(
|
||||||
|
"0",
|
||||||
|
cloudSU.dimensions()/dimVolume,
|
||||||
|
Zero
|
||||||
|
),
|
||||||
|
zeroGradientFvPatchVectorField::typeName
|
||||||
|
);
|
||||||
|
|
||||||
|
cloudVolSUSu.primitiveFieldRef() = -cloudSU.source()/mesh.V();
|
||||||
|
cloudVolSUSu.correctBoundaryConditions();
|
||||||
|
cloudSU.source() = Zero;
|
||||||
|
|
||||||
|
// --- Pressure-velocity PIMPLE corrector loop
|
||||||
|
while (pimple.loop())
|
||||||
|
{
|
||||||
|
#include "UcEqn.H"
|
||||||
|
|
||||||
|
// --- PISO loop
|
||||||
|
while (pimple.correct())
|
||||||
|
{
|
||||||
|
#include "pEqn.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pimple.turbCorr())
|
||||||
|
{
|
||||||
|
continuousPhaseTurbulence->correct();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
runTime.write();
|
||||||
|
|
||||||
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||||
|
<< nl << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Application
|
||||||
|
MPPICDyMFoam
|
||||||
|
|
||||||
|
Description
|
||||||
|
Transient solver for the coupled transport of a single kinematic particle
|
||||||
|
cloud including the effect of the volume fraction of particles on the
|
||||||
|
continuous phase. Multi-Phase Particle In Cell (MPPIC) modeling is used to
|
||||||
|
represent collisions without resolving particle-particle interactions,
|
||||||
|
with optional mesh motion and mesh topology changes.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#define MPPIC
|
||||||
|
|
||||||
|
#include "DPMDyMFoam.C"
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
MPPICDyMFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/MPPICDyMFoam
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
EXE_INC = \
|
||||||
|
-I.. \
|
||||||
|
-I../.. \
|
||||||
|
-I../DPMTurbulenceModels/lnInclude \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
|
-I$(LIB_SRC)/transportModels \
|
||||||
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
|
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||||
|
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||||
|
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||||
|
|
||||||
|
EXE_LIBS = \
|
||||||
|
-lfiniteVolume \
|
||||||
|
-lfvOptions \
|
||||||
|
-lmeshTools \
|
||||||
|
-llagrangian \
|
||||||
|
-llagrangianIntermediate \
|
||||||
|
-llagrangianTurbulence \
|
||||||
|
-lspecie \
|
||||||
|
-lradiationModels \
|
||||||
|
-lincompressibleTransportModels \
|
||||||
|
-lturbulenceModels \
|
||||||
|
-lincompressibleTurbulenceModels \
|
||||||
|
-lDPMTurbulenceModels \
|
||||||
|
-lregionModels \
|
||||||
|
-lsurfaceFilmModels \
|
||||||
|
-lsampling \
|
||||||
|
-ldynamicFvMesh \
|
||||||
|
-ltopoChangerFvMesh \
|
||||||
|
-ldynamicMesh
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
DPMDyMFoam.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_APPBIN)/DPMDyMFoam
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
EXE_INC = \
|
||||||
|
-I.. \
|
||||||
|
-I../DPMTurbulenceModels/lnInclude \
|
||||||
|
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||||
|
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||||
|
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||||
|
-I$(LIB_SRC)/transportModels \
|
||||||
|
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||||
|
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||||
|
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||||
|
-I$(LIB_SRC)/TurbulenceModels/phaseIncompressible/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||||
|
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||||
|
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||||
|
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||||
|
-I$(LIB_SRC)/dynamicMesh/lnInclude
|
||||||
|
|
||||||
|
EXE_LIBS = \
|
||||||
|
-llagrangian \
|
||||||
|
-llagrangianIntermediate \
|
||||||
|
-llagrangianTurbulence \
|
||||||
|
-lspecie \
|
||||||
|
-lradiationModels \
|
||||||
|
-lincompressibleTransportModels \
|
||||||
|
-lturbulenceModels \
|
||||||
|
-lincompressibleTurbulenceModels \
|
||||||
|
-lDPMTurbulenceModels \
|
||||||
|
-lregionModels \
|
||||||
|
-lsurfaceFilmModels \
|
||||||
|
-lsampling \
|
||||||
|
-lfiniteVolume \
|
||||||
|
-lfvOptions \
|
||||||
|
-lmeshTools \
|
||||||
|
-ldynamicFvMesh \
|
||||||
|
-ltopoChangerFvMesh \
|
||||||
|
-ldynamicMesh
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
CorrectPhi
|
||||||
|
(
|
||||||
|
Uc,
|
||||||
|
phic,
|
||||||
|
p,
|
||||||
|
dimensionedScalar("rAUf", dimTime, 1),
|
||||||
|
geometricZeroField(),
|
||||||
|
pimple
|
||||||
|
);
|
||||||
|
|
||||||
|
#include "continuityErrs.H"
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
#include "createControl.H"
|
||||||
|
#include "createTimeControls.H"
|
||||||
|
|
||||||
|
bool correctPhi
|
||||||
|
(
|
||||||
|
pimple.dict().lookupOrDefault("correctPhi", false)
|
||||||
|
);
|
||||||
|
|
||||||
|
bool checkMeshCourantNo
|
||||||
|
(
|
||||||
|
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
|
||||||
|
);
|
||||||
@ -2,8 +2,8 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / 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 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -21,34 +21,29 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
Global
|
||||||
|
createUcf
|
||||||
|
|
||||||
#include "IMULES.H"
|
Description
|
||||||
#include "profiling.H"
|
Creates and initialises the velocity velocity field Ucf.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::MULES::implicitSolve
|
Info<< "Reading/calculating continuous phase face velocity Ucf\n" << endl;
|
||||||
|
|
||||||
|
surfaceVectorField Ucf
|
||||||
(
|
(
|
||||||
volScalarField& psi,
|
IOobject
|
||||||
const surfaceScalarField& phi,
|
|
||||||
surfaceScalarField& phiPsi,
|
|
||||||
const scalar psiMax,
|
|
||||||
const scalar psiMin
|
|
||||||
)
|
|
||||||
{
|
|
||||||
addProfiling(solve, "MULES::implicitSolve");
|
|
||||||
|
|
||||||
implicitSolve
|
|
||||||
(
|
(
|
||||||
geometricOneField(),
|
"Ucf",
|
||||||
psi,
|
runTime.timeName(),
|
||||||
phi,
|
mesh,
|
||||||
phiPsi,
|
IOobject::READ_IF_PRESENT,
|
||||||
zeroField(), zeroField(),
|
IOobject::AUTO_WRITE
|
||||||
psiMax, psiMin
|
),
|
||||||
);
|
fvc::interpolate(Uc)
|
||||||
}
|
);
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
62
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/pEqn.H
Normal file
62
applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/pEqn.H
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
volVectorField HbyA(constrainHbyA(rAUc*UcEqn.H(), Uc, p));
|
||||||
|
|
||||||
|
surfaceScalarField phiHbyA
|
||||||
|
(
|
||||||
|
"phiHbyA",
|
||||||
|
(
|
||||||
|
fvc::flux(HbyA)
|
||||||
|
+ alphacf*rAUcf*fvc::ddtCorr(Uc, Ucf)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (p.needReference())
|
||||||
|
{
|
||||||
|
fvc::makeRelative(phiHbyA, Uc);
|
||||||
|
adjustPhi(phiHbyA, Uc, p);
|
||||||
|
fvc::makeAbsolute(phiHbyA, Uc);
|
||||||
|
}
|
||||||
|
|
||||||
|
phiHbyA += phicForces;
|
||||||
|
|
||||||
|
// Update the pressure BCs to ensure flux consistency
|
||||||
|
constrainPressure(p, Uc, phiHbyA, rAUcf);
|
||||||
|
|
||||||
|
// Non-orthogonal pressure corrector loop
|
||||||
|
while (pimple.correctNonOrthogonal())
|
||||||
|
{
|
||||||
|
fvScalarMatrix pEqn
|
||||||
|
(
|
||||||
|
fvm::laplacian(alphacf*rAUcf, p)
|
||||||
|
==
|
||||||
|
fvc::ddt(alphac) + fvc::div(alphacf*phiHbyA)
|
||||||
|
);
|
||||||
|
|
||||||
|
pEqn.setReference(pRefCell, pRefValue);
|
||||||
|
|
||||||
|
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||||
|
|
||||||
|
if (pimple.finalNonOrthogonalIter())
|
||||||
|
{
|
||||||
|
phic = phiHbyA - pEqn.flux()/alphacf;
|
||||||
|
|
||||||
|
p.relax();
|
||||||
|
|
||||||
|
Uc = HbyA
|
||||||
|
+ rAUc
|
||||||
|
*fvc::reconstruct((phicForces - pEqn.flux()/alphacf)/rAUcf);
|
||||||
|
Uc.correctBoundaryConditions();
|
||||||
|
|
||||||
|
{
|
||||||
|
Ucf = fvc::interpolate(Uc);
|
||||||
|
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||||
|
Ucf += n*(phic/mesh.magSf() - (n & Ucf));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make the fluxes relative to the mesh motion
|
||||||
|
fvc::makeRelative(phic, Uc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "continuityErrs.H"
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
#include "readTimeControls.H"
|
||||||
|
|
||||||
|
correctPhi = pimple.dict().lookupOrDefault("correctPhi", false);
|
||||||
|
|
||||||
|
checkMeshCourantNo = pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
|
||||||
@ -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 \
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
volVectorField HbyA("HbyA", Uc);
|
volVectorField HbyA(constrainHbyA(rAUc*UcEqn.H(), Uc, p));
|
||||||
HbyA = rAUc*UcEqn.H();
|
|
||||||
|
|
||||||
surfaceScalarField phiHbyA
|
surfaceScalarField phiHbyA
|
||||||
(
|
(
|
||||||
@ -8,10 +7,16 @@
|
|||||||
(
|
(
|
||||||
fvc::flux(HbyA)
|
fvc::flux(HbyA)
|
||||||
+ alphacf*rAUcf*fvc::ddtCorr(Uc, phic)
|
+ alphacf*rAUcf*fvc::ddtCorr(Uc, phic)
|
||||||
+ phicForces
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (p.needReference())
|
||||||
|
{
|
||||||
|
adjustPhi(phiHbyA, Uc, p);
|
||||||
|
}
|
||||||
|
|
||||||
|
phiHbyA += phicForces;
|
||||||
|
|
||||||
// Update the pressure BCs to ensure flux consistency
|
// Update the pressure BCs to ensure flux consistency
|
||||||
constrainPressure(p, Uc, phiHbyA, rAUcf);
|
constrainPressure(p, Uc, phiHbyA, rAUcf);
|
||||||
|
|
||||||
|
|||||||
@ -18,10 +18,10 @@
|
|||||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||||
==
|
==
|
||||||
rho*(U&g)
|
rho*(U&g)
|
||||||
+ combustion->Sh()
|
+ Qdot
|
||||||
+ coalParcels.Sh(he)
|
+ coalParcels.Sh(he)
|
||||||
+ limestoneParcels.Sh(he)
|
+ limestoneParcels.Sh(he)
|
||||||
+ radiation->Sh(thermo)
|
+ radiation->Sh(thermo, he)
|
||||||
+ fvOptions(rho, he)
|
+ fvOptions(rho, he)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -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 \
|
||||||
|
|||||||
@ -12,7 +12,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||||||
|
|
||||||
{
|
{
|
||||||
combustion->correct();
|
combustion->correct();
|
||||||
dQ = combustion->dQ();
|
Qdot = combustion->Qdot();
|
||||||
volScalarField Yt(0.0*Y[0]);
|
volScalarField Yt(0.0*Y[0]);
|
||||||
|
|
||||||
forAll(Y, i)
|
forAll(Y, i)
|
||||||
|
|||||||
@ -131,18 +131,18 @@ volScalarField dpdt
|
|||||||
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));
|
||||||
|
|
||||||
volScalarField dQ
|
volScalarField Qdot
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"dQ",
|
"Qdot",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "createMRF.H"
|
#include "createMRF.H"
|
||||||
|
|||||||
@ -80,7 +80,7 @@ License
|
|||||||
(
|
(
|
||||||
(coalParcels.hsTrans() + limestoneParcels.hsTrans())
|
(coalParcels.hsTrans() + limestoneParcels.hsTrans())
|
||||||
/(mesh.V()*runTime.deltaT())
|
/(mesh.V()*runTime.deltaT())
|
||||||
+ combustion->Sh()()
|
+ Qdot
|
||||||
)
|
)
|
||||||
/(
|
/(
|
||||||
alphaTemp
|
alphaTemp
|
||||||
|
|||||||
@ -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 \
|
||||||
|
|||||||
@ -20,8 +20,8 @@
|
|||||||
rho*(U&g)
|
rho*(U&g)
|
||||||
+ parcels.Sh(he)
|
+ parcels.Sh(he)
|
||||||
+ surfaceFilm.Sh()
|
+ surfaceFilm.Sh()
|
||||||
+ radiation->Sh(thermo)
|
+ radiation->Sh(thermo, he)
|
||||||
+ combustion->Sh()
|
+ Qdot
|
||||||
+ fvOptions(rho, he)
|
+ fvOptions(rho, he)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -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 \
|
||||||
|
|||||||
@ -12,7 +12,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||||||
|
|
||||||
{
|
{
|
||||||
combustion->correct();
|
combustion->correct();
|
||||||
dQ = combustion->dQ();
|
Qdot = combustion->Qdot();
|
||||||
volScalarField Yt(0.0*Y[0]);
|
volScalarField Yt(0.0*Y[0]);
|
||||||
|
|
||||||
forAll(Y, i)
|
forAll(Y, i)
|
||||||
|
|||||||
@ -134,18 +134,18 @@ Switch solvePrimaryRegion
|
|||||||
additionalControlsDict.lookup("solvePrimaryRegion")
|
additionalControlsDict.lookup("solvePrimaryRegion")
|
||||||
);
|
);
|
||||||
|
|
||||||
volScalarField dQ
|
volScalarField Qdot
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"dQ",
|
"Qdot",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "createMRF.H"
|
#include "createMRF.H"
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
==
|
==
|
||||||
rho*(U&g)
|
rho*(U&g)
|
||||||
+ parcels.Sh(he)
|
+ parcels.Sh(he)
|
||||||
+ radiation->Sh(thermo)
|
+ radiation->Sh(thermo, he)
|
||||||
+ combustion->Sh()
|
+ Qdot
|
||||||
+ fvOptions(rho, he)
|
+ fvOptions(rho, he)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -35,6 +35,6 @@
|
|||||||
thermo.correct();
|
thermo.correct();
|
||||||
radiation->correct();
|
radiation->correct();
|
||||||
|
|
||||||
Info<< "T gas min/max = " << min(T).value() << ", "
|
Info<< "T gas min/max " << min(T).value() << ", "
|
||||||
<< max(T).value() << endl;
|
<< max(T).value() << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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,7 +11,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||||||
|
|
||||||
{
|
{
|
||||||
combustion->correct();
|
combustion->correct();
|
||||||
dQ = combustion->dQ();
|
Qdot = combustion->Qdot();
|
||||||
volScalarField Yt(0.0*Y[0]);
|
volScalarField Yt(0.0*Y[0]);
|
||||||
|
|
||||||
forAll(Y, i)
|
forAll(Y, i)
|
||||||
|
|||||||
@ -121,18 +121,18 @@ forAll(Y, i)
|
|||||||
}
|
}
|
||||||
fields.add(thermo.he());
|
fields.add(thermo.he());
|
||||||
|
|
||||||
volScalarField dQ
|
volScalarField Qdot
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"dQ",
|
"Qdot",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "createMRF.H"
|
#include "createMRF.H"
|
||||||
|
|||||||
@ -79,7 +79,7 @@ License
|
|||||||
mag
|
mag
|
||||||
(
|
(
|
||||||
parcels.hsTrans()/(mesh.V()*runTime.deltaT())
|
parcels.hsTrans()/(mesh.V()*runTime.deltaT())
|
||||||
+ combustion->Sh()()
|
+ Qdot
|
||||||
)
|
)
|
||||||
/(
|
/(
|
||||||
alphaTemp
|
alphaTemp
|
||||||
|
|||||||
@ -13,8 +13,8 @@
|
|||||||
==
|
==
|
||||||
rho*(U&g)
|
rho*(U&g)
|
||||||
+ parcels.Sh(he)
|
+ parcels.Sh(he)
|
||||||
+ radiation->Sh(thermo)
|
+ radiation->Sh(thermo, he)
|
||||||
+ combustion->Sh()
|
+ Qdot
|
||||||
+ fvOptions(rho, he)
|
+ fvOptions(rho, he)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -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,7 +11,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||||||
|
|
||||||
{
|
{
|
||||||
combustion->correct();
|
combustion->correct();
|
||||||
dQ = combustion->dQ();
|
Qdot = combustion->Qdot();
|
||||||
volScalarField Yt(0.0*Y[0]);
|
volScalarField Yt(0.0*Y[0]);
|
||||||
|
|
||||||
forAll(Y, i)
|
forAll(Y, i)
|
||||||
|
|||||||
@ -103,18 +103,18 @@ forAll(Y, i)
|
|||||||
}
|
}
|
||||||
fields.add(thermo.he());
|
fields.add(thermo.he());
|
||||||
|
|
||||||
volScalarField dQ
|
volScalarField Qdot
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"dQ",
|
"Qdot",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "createMRF.H"
|
#include "createMRF.H"
|
||||||
|
|||||||
@ -38,7 +38,6 @@ Description
|
|||||||
#include "basicReactingMultiphaseCloud.H"
|
#include "basicReactingMultiphaseCloud.H"
|
||||||
#include "rhoCombustionModel.H"
|
#include "rhoCombustionModel.H"
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
#include "IOporosityModelList.H"
|
|
||||||
#include "fvOptions.H"
|
#include "fvOptions.H"
|
||||||
#include "SLGThermo.H"
|
#include "SLGThermo.H"
|
||||||
#include "simpleControl.H"
|
#include "simpleControl.H"
|
||||||
|
|||||||
@ -12,9 +12,9 @@
|
|||||||
- fvm::laplacian(turbulence->alphaEff(), he)
|
- fvm::laplacian(turbulence->alphaEff(), he)
|
||||||
==
|
==
|
||||||
rho*(U&g)
|
rho*(U&g)
|
||||||
|
+ Qdot
|
||||||
+ parcels.Sh(he)
|
+ parcels.Sh(he)
|
||||||
+ radiation->Sh(thermo)
|
+ radiation->Sh(thermo, he)
|
||||||
+ combustion->Sh()
|
|
||||||
+ fvOptions(rho, he)
|
+ fvOptions(rho, he)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -25,6 +25,7 @@
|
|||||||
EEqn.solve();
|
EEqn.solve();
|
||||||
|
|
||||||
fvOptions.correct(he);
|
fvOptions.correct(he);
|
||||||
|
|
||||||
thermo.correct();
|
thermo.correct();
|
||||||
radiation->correct();
|
radiation->correct();
|
||||||
|
|
||||||
|
|||||||
@ -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 \
|
||||||
@ -37,11 +34,6 @@ EXE_LIBS = \
|
|||||||
-llagrangianTurbulence \
|
-llagrangianTurbulence \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-lfluidThermophysicalModels \
|
-lfluidThermophysicalModels \
|
||||||
-lliquidProperties \
|
|
||||||
-lliquidMixtureProperties \
|
|
||||||
-lsolidProperties \
|
|
||||||
-lsolidMixtureProperties \
|
|
||||||
-lthermophysicalFunctions \
|
|
||||||
-lreactionThermophysicalModels \
|
-lreactionThermophysicalModels \
|
||||||
-lSLGThermo \
|
-lSLGThermo \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
|
|||||||
@ -11,7 +11,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
|
|||||||
|
|
||||||
{
|
{
|
||||||
combustion->correct();
|
combustion->correct();
|
||||||
dQ = combustion->dQ();
|
Qdot = combustion->Qdot();
|
||||||
volScalarField Yt(0.0*Y[0]);
|
volScalarField Yt(0.0*Y[0]);
|
||||||
|
|
||||||
forAll(Y, i)
|
forAll(Y, i)
|
||||||
|
|||||||
@ -103,18 +103,18 @@ forAll(Y, i)
|
|||||||
}
|
}
|
||||||
fields.add(thermo.he());
|
fields.add(thermo.he());
|
||||||
|
|
||||||
volScalarField dQ
|
volScalarField Qdot
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"dQ",
|
"Qdot",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
dimensionedScalar("Qdot", dimEnergy/dimTime, 0.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "createMRF.H"
|
#include "createMRF.H"
|
||||||
|
|||||||
@ -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 \
|
||||||
|
|||||||
@ -117,18 +117,18 @@ forAll(Y, i)
|
|||||||
}
|
}
|
||||||
fields.add(thermo.he());
|
fields.add(thermo.he());
|
||||||
|
|
||||||
volScalarField dQ
|
volScalarField Qdot
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"dQ",
|
"Qdot",
|
||||||
runTime.timeName(),
|
runTime.timeName(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
mesh,
|
mesh,
|
||||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
|
||||||
);
|
);
|
||||||
|
|
||||||
#include "createMRF.H"
|
#include "createMRF.H"
|
||||||
|
|||||||
@ -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 \
|
||||||
|
|||||||
@ -138,7 +138,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (runTime.write())
|
if (runTime.write())
|
||||||
{
|
{
|
||||||
combustion->dQ()().write();
|
combustion->Qdot()().write();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
|||||||
@ -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 \
|
||||||
|
|||||||
@ -113,7 +113,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (runTime.write())
|
if (runTime.write())
|
||||||
{
|
{
|
||||||
combustion->dQ()().write();
|
combustion->Qdot()().write();
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
|||||||
@ -78,32 +78,42 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
parcels.evolve();
|
parcels.evolve();
|
||||||
|
|
||||||
#include "rhoEqn.H"
|
if (pimple.solveFlow())
|
||||||
|
|
||||||
// --- Pressure-velocity PIMPLE corrector loop
|
|
||||||
while (pimple.loop())
|
|
||||||
{
|
{
|
||||||
#include "UEqn.H"
|
#include "rhoEqn.H"
|
||||||
#include "YEqn.H"
|
|
||||||
#include "EEqn.H"
|
|
||||||
|
|
||||||
// --- Pressure corrector loop
|
// --- Pressure-velocity PIMPLE corrector loop
|
||||||
while (pimple.correct())
|
while (pimple.loop())
|
||||||
{
|
{
|
||||||
#include "pEqn.H"
|
#include "UEqn.H"
|
||||||
|
#include "YEqn.H"
|
||||||
|
#include "EEqn.H"
|
||||||
|
|
||||||
|
// --- Pressure corrector loop
|
||||||
|
while (pimple.correct())
|
||||||
|
{
|
||||||
|
#include "pEqn.H"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pimple.turbCorr())
|
||||||
|
{
|
||||||
|
turbulence->correct();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pimple.turbCorr())
|
rho = thermo.rho();
|
||||||
|
|
||||||
|
if (runTime.write())
|
||||||
{
|
{
|
||||||
turbulence->correct();
|
combustion->Qdot()().write();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
rho = thermo.rho();
|
|
||||||
|
|
||||||
if (runTime.write())
|
|
||||||
{
|
{
|
||||||
combustion->dQ()().write();
|
if (runTime.writeTime())
|
||||||
|
{
|
||||||
|
parcels.write();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user