GIT: Resolved conflict

This commit is contained in:
Andrew Heather 2015-12-09 16:19:28 +00:00
commit 0e01c44129
2311 changed files with 44974 additions and 26547 deletions

View File

@ -37,7 +37,10 @@ src/Allwmake $targetType $*
applications/Allwmake $targetType $*
# Optionally build OpenFOAM Doxygen documentation
[ $genDoc -eq 1 ] && doc/Allwmake
if [ $genDoc -eq 1 ]
then
doc/Allwmake
fi
# ----------------------------------------------------------------- end-of-file

View File

@ -1,11 +1,9 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lfvOptions \
-lsampling

View File

@ -87,7 +87,6 @@ Description
#include "fvCFD.H"
#include "pisoControl.H"
#include "fvIOoptionList.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -132,7 +131,6 @@ int main(int argc, char *argv[])
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,6 +1,5 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude

View File

@ -54,7 +54,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "simpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,7 +1,7 @@
{
volScalarField& hea = thermo.he();
solve
fvScalarMatrix EaEqn
(
betav*fvm::ddt(rho, hea) + mvConvection->fvmDiv(phi, hea)
+ betav*fvc::ddt(rho, K) + fvc::div(phi, K)
@ -16,7 +16,16 @@
: -betav*dpdt
)
- fvm::laplacian(Db, hea)
+ betav*fvOptions(rho, hea)
);
EaEqn.relax();
fvOptions.constrain(EaEqn);
EaEqn.solve();
fvOptions.correct(hea);
thermo.correct();
}

View File

@ -2,7 +2,7 @@ if (ign.ignited())
{
volScalarField& heau = thermo.heu();
solve
fvScalarMatrix heauEqn
(
betav*fvm::ddt(rho, heau) + mvConvection->fvmDiv(phi, heau)
+ (betav*fvc::ddt(rho, K) + fvc::div(phi, K))*rho/thermo.rhou()
@ -23,5 +23,13 @@ if (ign.ignited())
// A possible solution would be to solve for ftu as well as ft.
//- fvm::div(muEff*fvc::grad(b)/(b + 0.001), heau)
//+ fvm::Sp(fvc::div(muEff*fvc::grad(b)/(b + 0.001)), heau)
==
betav*fvOptions(rho, heau)
);
fvOptions.constrain(heauEqn);
heauEqn.solve();
fvOptions.correct(heau);
}

View File

@ -16,7 +16,7 @@ EXE_INC = \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude
-I$(LIB_SRC)/triSurface/lnInclude \
EXE_LIBS = \
-lengine \
@ -29,4 +29,5 @@ EXE_LIBS = \
-lspecie \
-llaminarFlameSpeedModels \
-lfiniteVolume \
-ldynamicFvMesh
-ldynamicFvMesh \
-lfvOptions

View File

@ -81,6 +81,7 @@ Description
#include "Switch.H"
#include "bound.H"
#include "pimpleControl.H"
#include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -97,11 +98,13 @@ int main(int argc, char *argv[])
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "createTimeControls.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
turbulence->validate();
scalar StCoNum = 0.0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -87,6 +87,7 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
turbulence->validate();
scalar StCoNum = 0.0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -168,7 +168,7 @@ public:
virtual void writeFields() const
{
notImplemented("PDRDragModel::write()");
NotImplemented;
}
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,10 +45,8 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"PDRDragModel::New"
) << "Unknown PDRDragModel type "
FatalErrorInFunction
<< "Unknown PDRDragModel type "
<< modelType << nl << nl
<< "Valid PDRDragModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -7,13 +7,17 @@
+ turbulence->divDevRhoReff(U)
==
betav*rho*g
+ betav*fvOptions(rho, U)
);
fvOptions.constrain(UEqn);
volSymmTensorField invA(inv(I*UEqn.A() + drag->Dcu()));
if (pimple.momentumPredictor())
{
U = invA & (UEqn.H() - betav*fvc::grad(p));
U.correctBoundaryConditions();
fvOptions.correct(U);
K = 0.5*magSqr(U);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -44,15 +44,8 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"XiEqModel::New"
"("
" const psiuReactionThermo& thermo,"
" const compressible::RASModel& turbulence,"
" const volScalarField& Su"
")"
) << "Unknown XiEqModel type "
FatalErrorInFunction
<< "Unknown XiEqModel type "
<< modelType << nl << nl
<< "Valid XiEqModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -44,15 +44,8 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"XiGModel::New"
"("
" const psiuReactionThermo& thermo,"
" const compressible::RASModel& turbulence,"
" const volScalarField& Su"
")"
) << "Unknown XiGModel type "
FatalErrorInFunction
<< "Unknown XiGModel type "
<< modelType << nl << nl
<< "Valid XiGModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -47,10 +47,8 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"XiModel::New"
) << "Unknown XiModel type "
FatalErrorInFunction
<< "Unknown XiModel type "
<< modelType << nl << nl
<< "Valid XiModels are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -116,7 +116,7 @@ public:
//- Correct the flame-wrinking Xi
virtual void correct()
{
notImplemented("transport::correct()");
NotImplemented;
}
//- Correct the flame-wrinking Xi using the given convection scheme

View File

@ -73,6 +73,8 @@ if (ign.ignited())
+ fvm::div(phiSt, b)
- fvm::Sp(fvc::div(phiSt), b)
- fvm::laplacian(Db, b)
==
betav*fvOptions(rho, b)
);
@ -82,8 +84,14 @@ if (ign.ignited())
// Solve for b
// ~~~~~~~~~~~
bEqn.relax();
fvOptions.constrain(bEqn);
bEqn.solve();
fvOptions.correct(b);
Info<< "min(b) = " << min(b).value() << endl;
if (composition.contains("ft"))

View File

@ -49,7 +49,7 @@ mesh.setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence
(
compressible::RASModel::New
compressible::New<compressible::RASModel>
(
rho,
U,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -172,7 +172,7 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::SuRef
}
else
{
FatalErrorIn("laminarFlameSpeedModels::SCOPE::SuRef(scalar phi)")
FatalErrorInFunction
<< "phi = " << phi
<< " cannot be handled by SCOPE function with the "
"given coefficients"
@ -210,7 +210,7 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::Ma
}
else
{
FatalErrorIn("laminarFlameSpeedModels::SCOPE::Ma(scalar phi)")
FatalErrorInFunction
<< "phi = " << phi
<< " cannot be handled by SCOPE function with the "
"given coefficients"

View File

@ -25,6 +25,8 @@ if (pimple.transonic())
betav*fvm::ddt(psi, p)
+ fvm::div(phid, p)
- fvm::laplacian(rho*invA, p)
==
betav*fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
@ -53,6 +55,8 @@ else
betav*fvm::ddt(psi, p)
+ fvc::div(phiHbyA)
- fvm::laplacian(rho*invA, p)
==
betav*fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
@ -69,6 +73,7 @@ else
U = HbyA - (invA & (betav*fvc::grad(p)));
U.correctBoundaryConditions();
fvOptions.correct(U);
K = 0.5*magSqr(U);
if (thermo.dpdt())

View File

@ -1,8 +1,4 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude\
-I$(LIB_SRC)/engine/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
@ -10,13 +6,12 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lsampling \
-lmeshTools \
-lengine \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
@ -24,4 +19,8 @@ EXE_LIBS = \
-lfluidThermophysicalModels \
-lreactionThermophysicalModels \
-lspecie \
-llaminarFlameSpeedModels
-llaminarFlameSpeedModels \
-lfiniteVolume \
-lfvOptions \
-lsampling \
-lmeshTools

View File

@ -6,8 +6,7 @@
+ MRF.DDt(rho, U)
+ turbulence->divDevRhoReff(U)
==
rho*g
+ fvOptions(rho, U)
fvOptions(rho, U)
);
UEqn.relax();

View File

@ -61,7 +61,7 @@ Description
#include "Switch.H"
#include "pimpleControl.H"
#include "CorrectPhi.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -59,7 +59,7 @@ Description
#include "ignition.H"
#include "Switch.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -73,7 +73,6 @@ int main(int argc, char *argv[])
pimpleControl pimple(mesh);
#include "readCombustionProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
@ -82,6 +81,8 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -1,26 +1,14 @@
EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/laminarFlameSpeed/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude\
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lreactionThermophysicalModels \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lchemistryModel \
-lODE \
-lthermophysicalFunctions \
-lspecie \
-lfiniteVolume \
-lmeshTools

View File

@ -39,7 +39,6 @@ Description
#include "fvCFD.H"
#include "psiReactionThermo.H"
#include "turbulentFluidThermoModel.H"
#include "psiChemistryModel.H"
#include "chemistrySolver.H"
#include "OFstream.H"

View File

@ -1,8 +1,2 @@
if (runTime.controlDict().lookupOrDefault("suppressSolverInfo", false))
{
lduMatrix::debug = 0;
}
Switch adjustTimeStep(runTime.controlDict().lookup("adjustTimeStep"));
scalar maxDeltaT(readScalar(runTime.controlDict().lookup("maxDeltaT")));

View File

@ -1,6 +1,6 @@
if (mesh.nCells() != 1)
{
FatalErrorIn(args.executable())
FatalErrorInFunction
<< "Solver only applicable to single cell cases"
<< exit(FatalError);
}
@ -86,20 +86,6 @@
#include "createPhi.H"
Info << "Creating turbulence model.\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::turbulenceModel::New
(
rho,
U,
phi,
thermo
)
);
OFstream post(args.path()/"chemFoam.out");
post<< "# Time" << token::TAB << "Temperature [K]" << token::TAB
<< "Pressure [Pa]" << endl;

View File

@ -12,7 +12,6 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude
EXE_LIBS = \
-lengine \

View File

@ -38,7 +38,7 @@ Description
#include "psiThermo.H"
#include "turbulentFluidThermoModel.H"
#include "OFstream.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -62,6 +62,8 @@ int main(int argc, char *argv[])
#include "setInitialDeltaT.H"
#include "startSummary.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -1,7 +1,6 @@
EXE_INC = \
-I$(FOAM_SOLVERS)/combustion/XiFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/engine/lnInclude \

View File

@ -62,7 +62,7 @@ Description
#include "OFstream.H"
#include "mathematicalConstants.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -86,6 +86,8 @@ int main(int argc, char *argv[])
#include "setInitialDeltaT.H"
#include "startSummary.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -1,6 +1,5 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
-I${LIB_SRC}/sampling/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \

View File

@ -43,7 +43,7 @@ Description
#include "solidChemistryModel.H"
#include "psiCombustionModel.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "fixedFluxPressureFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -70,6 +70,8 @@ int main(int argc, char *argv[])
#include "setInitialDeltaT.H"
#include "readPyrolysisTimeControls.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -17,8 +17,7 @@
)
- fvm::laplacian(turbulence->alphaEff(), he)
==
rho*(U&g)
+ reaction->Sh()
reaction->Sh()
+ fvOptions(rho, he)
);

View File

@ -1,6 +1,5 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \

View File

@ -1,23 +1,24 @@
MRF.correctBoundaryVelocity(U);
// Solve the Momentum equation
fvVectorMatrix UEqn
(
fvm::ddt(rho, U) + fvm::div(phi, U)
+ MRF.DDt(rho, U)
+ turbulence->divDevRhoReff(U)
==
rho*g
+ fvOptions(rho, U)
);
MRF.correctBoundaryVelocity(U);
UEqn.relax();
tmp<fvVectorMatrix> UEqn
(
fvm::ddt(rho, U) + fvm::div(phi, U)
+ MRF.DDt(rho, U)
+ turbulence->divDevRhoReff(U)
==
fvOptions(rho, U)
);
fvOptions.constrain(UEqn);
UEqn().relax();
if (pimple.momentumPredictor())
{
solve(UEqn == -fvc::grad(p));
fvOptions.constrain(UEqn());
fvOptions.correct(U);
K = 0.5*magSqr(U);
}
if (pimple.momentumPredictor())
{
solve(UEqn() == -fvc::grad(p));
fvOptions.correct(U);
K = 0.5*magSqr(U);
}

View File

@ -45,6 +45,28 @@ const volScalarField& T = thermo.T();
#include "compressibleCreatePhi.H"
dimensionedScalar rhoMax
(
dimensionedScalar::lookupOrDefault
(
"rhoMax",
pimple.dict(),
dimDensity,
GREAT
)
);
dimensionedScalar rhoMin
(
dimensionedScalar::lookupOrDefault
(
"rhoMin",
pimple.dict(),
dimDensity,
0
)
);
mesh.setFluxRequired(p.name());
Info << "Creating turbulence model.\n" << nl;

View File

@ -1,10 +1,18 @@
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));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
HbyA = rAU*UEqn().H();
if (pimple.nCorrPISO() <= 1)
{
UEqn.clear();
}
if (pimple.transonic())
{
@ -26,7 +34,7 @@ if (pimple.transonic())
(
fvm::ddt(psi, p)
+ fvm::div(phid, p)
- fvm::laplacian(rho*rAU, p)
- fvm::laplacian(rhorAUf, p)
==
fvOptions(psi, p, rho.name())
);
@ -58,7 +66,7 @@ else
(
fvm::ddt(psi, p)
+ fvc::div(phiHbyA)
- fvm::laplacian(rho*rAU, p)
- fvm::laplacian(rhorAUf, p)
==
fvOptions(psi, p, rho.name())
);
@ -75,6 +83,17 @@ else
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"
// Explicitly relax pressure for momentum corrector
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.correctBoundaryConditions();
fvOptions.correct(U);

View File

@ -0,0 +1,125 @@
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
volScalarField rAU(1.0/UEqn().A());
volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1()));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
if (pimple.nCorrPISO() <= 1)
{
UEqn.clear();
}
if (pimple.transonic())
{
surfaceScalarField phid
(
"phid",
fvc::interpolate(psi)
*(
(fvc::interpolate(HbyA) & mesh.Sf())
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
/fvc::interpolate(rho)
)
);
MRF.makeRelative(fvc::interpolate(psi), phid);
surfaceScalarField phic
(
"phic",
fvc::interpolate(rho*(rAtU - rAU))*fvc::snGrad(p)*mesh.magSf()
);
HbyA -= (rAU - rAtU)*fvc::grad(p);
volScalarField rhorAtU("rhorAtU", rho*rAtU);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvm::div(phid, p)
+ fvc::div(phic)
- fvm::laplacian(rhorAtU, p)
==
fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
phi == phic + pEqn.flux();
}
}
}
else
{
surfaceScalarField phiHbyA
(
"phiHbyA",
(
(fvc::interpolate(rho*HbyA) & mesh.Sf())
+ 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();
HbyA -= (rAU - rAtU)*fvc::grad(p);
volScalarField rhorAtU("rhorAtU", rho*rAtU);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvc::div(phiHbyA)
- fvm::laplacian(rhorAtU, p)
==
fvOptions(psi, p, rho.name())
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
phi = phiHbyA + pEqn.flux();
}
}
}
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"
// Explicitly relax pressure for momentum corrector
p.relax();
U = HbyA - rAtU*fvc::grad(p);
U.correctBoundaryConditions();
fvOptions.correct(U);
K = 0.5*magSqr(U);
if (thermo.dpdt())
{
dpdt = fvc::ddt(p);
}
// Recalculate density from the relaxed pressure
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
if (!pimple.transonic())
{
rho.relax();
}
Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl;

View File

@ -37,7 +37,7 @@ Description
#include "psiCombustionModel.H"
#include "multivariateScheme.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
@ -54,11 +54,12 @@ int main(int argc, char *argv[])
#include "createTimeControls.H"
#include "createRDeltaT.H"
#include "initContinuityErrs.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
turbulence->validate();
if (!LTS)
{
#include "compressibleCourantNo.H"
@ -98,7 +99,14 @@ int main(int argc, char *argv[])
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
if (pimple.consistent())
{
#include "pcEqn.H"
}
else
{
#include "pEqn.H"
}
}
if (pimple.turbCorr())

View File

@ -1,7 +1,6 @@
EXE_INC = \
-I$(FOAM_SOLVERS)/combustion/reactingFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \

View File

@ -38,7 +38,7 @@ Description
#include "turbulentFluidThermoModel.H"
#include "multivariateScheme.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "fixedFluxPressureFvPatchScalarField.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
@ -60,6 +60,8 @@ int main(int argc, char *argv[])
#include "createMRF.H"
#include "createFvOptions.H"
turbulence->validate();
if (!LTS)
{
#include "compressibleCourantNo.H"

View File

@ -1,7 +1,6 @@
EXE_INC = \
-I$(FOAM_SOLVERS)/combustion/reactingFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \

View File

@ -5,11 +5,11 @@
// pressure solution - done in 2 parts. Part 1:
thermo.rho() -= psi*p;
volScalarField rAU(1.0/UEqn.A());
volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
HbyA = rAU*UEqn().H();
if (pimple.transonic())
{

View File

@ -38,7 +38,7 @@ Description
#include "turbulentFluidThermoModel.H"
#include "multivariateScheme.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
@ -55,11 +55,12 @@ int main(int argc, char *argv[])
#include "createTimeControls.H"
#include "createRDeltaT.H"
#include "initContinuityErrs.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
turbulence->validate();
if (!LTS)
{
#include "compressibleCourantNo.H"

View File

@ -116,6 +116,9 @@ License
);
}
// Update tho boundary values of the reciprocal time-step
rDeltaT.correctBoundaryConditions();
Info<< " Overall = "
<< gMin(1/rDeltaT.internalField())
<< ", " << gMax(1/rDeltaT.internalField()) << endl;

View File

@ -94,15 +94,8 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
|| mag(accommodationCoeff_) > 2.0
)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"smoluchowskiJumpTFvPatchScalarField::"
"smoluchowskiJumpTFvPatchScalarField"
"("
" const fvPatch&,"
" const DimensionedField<scalar, volMesh>&,"
" const dictionary&"
")",
dict
) << "unphysical accommodationCoeff specified"
<< "(0 < accommodationCoeff <= 1)" << endl

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -96,14 +96,8 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
|| mag(accommodationCoeff_) > 2.0
)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"maxwellSlipUFvPatchScalarField::maxwellSlipUFvPatchScalarField"
"("
"const fvPatch&, "
"const DimensionedField<vector, volMesh>&, "
"const dictionary&"
")",
dict
) << "unphysical accommodationCoeff_ specified"
<< "(0 < accommodationCoeff_ <= 1)" << endl

View File

@ -11,6 +11,7 @@ EXE_INC = \
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \

View File

@ -7,10 +7,8 @@ if (mesh.schemesDict().readIfPresent("fluxScheme", fluxScheme))
}
else
{
FatalErrorIn
(
"rhoCentralFoam::readFluxScheme"
) << "fluxScheme: " << fluxScheme
FatalErrorInFunction
<< "fluxScheme: " << fluxScheme
<< " is not a valid choice. "
<< "Options are: Tadmor, Kurganov"
<< abort(FatalError);

View File

@ -13,6 +13,7 @@ EXE_INC = \
EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \

View File

@ -52,6 +52,8 @@ int main(int argc, char *argv[])
#include "createFields.H"
#include "createTimeControls.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "readFluxScheme.H"

View File

@ -54,6 +54,8 @@ int main(int argc, char *argv[])
#include "createTimeControls.H"
#include "createRDeltaT.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "readFluxScheme.H"

View File

@ -7,7 +7,6 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude
EXE_LIBS = \
-lcompressibleTransportModels \

View File

@ -8,7 +8,6 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \

View File

@ -43,7 +43,7 @@ Description
#include "bound.H"
#include "pimpleControl.H"
#include "CorrectPhi.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
@ -65,6 +65,8 @@ int main(int argc, char *argv[])
#include "createRhoUf.H"
#include "createControls.H"
turbulence->validate();
if (!LTS)
{
#include "compressibleCourantNo.H"

View File

@ -41,7 +41,7 @@ Description
#include "turbulentFluidThermoModel.H"
#include "bound.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "localEulerDdtScheme.H"
#include "fvcSmooth.H"
@ -62,6 +62,8 @@ int main(int argc, char *argv[])
#include "createMRF.H"
#include "createFvOptions.H"
turbulence->validate();
if (!LTS)
{
#include "compressibleCourantNo.H"

View File

@ -7,7 +7,6 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude
EXE_LIBS = \
-lcompressibleTransportModels \

View File

@ -71,7 +71,7 @@ dimensionedScalar rhoMin
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence
(
compressible::RASModel::New
compressible::New<compressible::RASModel>
(
rho,
U,

View File

@ -8,7 +8,6 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude
EXE_LIBS = \
-lcompressibleTransportModels \

View File

@ -70,7 +70,7 @@ dimensionedScalar rhoMin
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence
(
compressible::RASModel::New
compressible::New<compressible::RASModel>
(
rho,
U,

View File

@ -37,7 +37,7 @@ Description
#include "fvCFD.H"
#include "rhoThermo.H"
#include "turbulentFluidThermoModel.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "IOporosityModelList.H"
#include "simpleControl.H"
@ -57,6 +57,8 @@ int main(int argc, char *argv[])
#include "createZones.H"
#include "initContinuityErrs.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -37,7 +37,7 @@ Description
#include "psiThermo.H"
#include "turbulentFluidThermoModel.H"
#include "simpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -54,6 +54,8 @@ int main(int argc, char *argv[])
#include "createFvOptions.H"
#include "initContinuityErrs.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -6,7 +6,6 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \

View File

@ -9,7 +9,6 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \

View File

@ -39,7 +39,7 @@ Description
#include "turbulentFluidThermoModel.H"
#include "pimpleControl.H"
#include "CorrectPhi.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -60,6 +60,8 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -37,7 +37,7 @@ Description
#include "psiThermo.H"
#include "turbulentFluidThermoModel.H"
#include "pimpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -54,6 +54,8 @@ int main(int argc, char *argv[])
#include "createFvOptions.H"
#include "initContinuityErrs.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -58,7 +58,7 @@
if (magnetZonei == -1)
{
FatalIOErrorIn(args.executable().c_str(), transportProperties)
FatalIOErrorInFunction(transportProperties)
<< "Cannot find faceZone for magnet " << magnets[i].name()
<< exit(FatalIOError);
}

View File

@ -7,7 +7,6 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \

View File

@ -52,7 +52,7 @@ Description
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "radiationModel.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "pimpleControl.H"
#include "fixedFluxPressureFvPatchScalarField.H"
@ -75,6 +75,8 @@ int main(int argc, char *argv[])
#include "CourantNo.H"
#include "setInitialDeltaT.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -49,7 +49,7 @@ volVectorField U
Info<< "Creating turbulence model\n" << endl;
autoPtr<incompressible::RASModel> turbulence
(
incompressible::RASModel::New(U, phi, laminarTransport)
incompressible::New<incompressible::RASModel>(U, phi, laminarTransport)
);
// Kinematic density for buoyancy force

View File

@ -3,15 +3,16 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude
EXE_LIBS = \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lradiationModels \
-lfiniteVolume \
-lsampling \
-lmeshTools \

View File

@ -9,7 +9,8 @@
fvm::div(phi, T)
- fvm::laplacian(alphaEff, T)
==
fvOptions(T)
radiation->ST(rhoCpRef, T)
+ fvOptions(T)
);
TEqn.relax();
@ -18,6 +19,8 @@
TEqn.solve();
radiation->correct();
fvOptions.correct(T);
rhok = 1.0 - beta*(T - TRef);

View File

@ -51,7 +51,8 @@ Description
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "fvIOoptionList.H"
#include "radiationModel.H"
#include "fvOptions.H"
#include "simpleControl.H"
#include "fixedFluxPressureFvPatchScalarField.H"
@ -66,10 +67,13 @@ int main(int argc, char *argv[])
simpleControl simple(mesh);
#include "createFields.H"
#include "createIncompressibleRadiationModel.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -49,7 +49,7 @@ volVectorField U
Info<< "Creating turbulence model\n" << endl;
autoPtr<incompressible::RASModel> turbulence
(
incompressible::RASModel::New(U, phi, laminarTransport)
incompressible::New<incompressible::RASModel>(U, phi, laminarTransport)
);
// Kinematic density for buoyancy force

View File

@ -2,7 +2,6 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \

View File

@ -40,7 +40,7 @@ Description
#include "rhoThermo.H"
#include "turbulentFluidThermoModel.H"
#include "radiationModel.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "pimpleControl.H"
#include "fixedFluxPressureFvPatchScalarField.H"
@ -54,7 +54,6 @@ int main(int argc, char *argv[])
pimpleControl pimple(mesh);
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
@ -64,6 +63,8 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -50,9 +50,11 @@ autoPtr<compressible::turbulenceModel> turbulence
)
);
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("ghf", g & mesh.Cf());
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
#include "gh.H"
Info<< "Reading field p_rgh\n" << endl;
volScalarField p_rgh

View File

@ -1,6 +1,5 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \

View File

@ -38,7 +38,7 @@ Description
#include "turbulentFluidThermoModel.H"
#include "radiationModel.H"
#include "simpleControl.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "fixedFluxPressureFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -51,13 +51,14 @@ int main(int argc, char *argv[])
simpleControl simple(mesh);
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createMRF.H"
#include "createFvOptions.H"
#include "createRadiationModel.H"
#include "initContinuityErrs.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

View File

@ -39,7 +39,7 @@ volVectorField U
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence
(
compressible::RASModel::New
compressible::New<compressible::RASModel>
(
rho,
U,
@ -49,9 +49,10 @@ autoPtr<compressible::RASModel> turbulence
);
Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("ghf", g & mesh.Cf());
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
#include "gh.H"
Info<< "Reading field p_rgh\n" << endl;
volScalarField p_rgh

View File

@ -15,7 +15,6 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude

View File

@ -47,7 +47,7 @@ Description
#include "solidRegionDiffNo.H"
#include "solidThermo.H"
#include "radiationModel.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "coordinateSystem.H"
#include "fixedFluxPressureFvPatchScalarField.H"

View File

@ -12,7 +12,6 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude

View File

@ -39,7 +39,7 @@ Description
#include "regionProperties.H"
#include "solidThermo.H"
#include "radiationModel.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "coordinateSystem.H"
#include "fixedFluxPressureFvPatchScalarField.H"

View File

@ -4,10 +4,11 @@ PtrList<volScalarField> rhoFluid(fluidRegions.size());
PtrList<volVectorField> UFluid(fluidRegions.size());
PtrList<surfaceScalarField> phiFluid(fluidRegions.size());
PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size());
PtrList<compressible::turbulenceModel> turbulence(fluidRegions.size());
PtrList<volScalarField> p_rghFluid(fluidRegions.size());
PtrList<uniformDimensionedScalarField> hRefFluid(fluidRegions.size());
PtrList<volScalarField> ghFluid(fluidRegions.size());
PtrList<surfaceScalarField> ghfFluid(fluidRegions.size());
PtrList<compressible::turbulenceModel> turbulence(fluidRegions.size());
PtrList<volScalarField> p_rghFluid(fluidRegions.size());
PtrList<radiation::radiationModel> radiation(fluidRegions.size());
List<scalar> initialMassFluid(fluidRegions.size());
@ -19,7 +20,7 @@ PtrList<dimensionedScalar> rhoMax(fluidRegions.size());
PtrList<dimensionedScalar> rhoMin(fluidRegions.size());
PtrList<IOMRFZoneList> MRFfluid(fluidRegions.size());
PtrList<fv::IOoptionList> fluidFvOptions(fluidRegions.size());
PtrList<fv::options> fluidFvOptions(fluidRegions.size());
// Populate fluid field pointer lists
forAll(fluidRegions, i)
@ -107,6 +108,54 @@ forAll(fluidRegions, i)
)
);
Info<< " Adding to hRefFluid\n" << endl;
hRefFluid.set
(
i,
new uniformDimensionedScalarField
(
IOobject
(
"hRef",
runTime.constant(),
fluidRegions[i],
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE
),
dimensionedScalar("hRef", dimLength, 0)
)
);
dimensionedScalar ghRef
(
mag(gFluid[i].value()) > SMALL
? gFluid[i]
& (cmptMag(gFluid[i].value())/mag(gFluid[i].value()))*hRefFluid[i]
: dimensionedScalar("ghRef", gFluid[i].dimensions()*dimLength, 0)
);
Info<< " Adding to ghFluid\n" << endl;
ghFluid.set
(
i,
new volScalarField
(
"gh",
(gFluid[i] & fluidRegions[i].C()) - ghRef
)
);
Info<< " Adding to ghfFluid\n" << endl;
ghfFluid.set
(
i,
new surfaceScalarField
(
"ghf",
(gFluid[i] & fluidRegions[i].Cf()) - ghRef
)
);
Info<< " Adding to turbulence\n" << endl;
turbulence.set
(
@ -120,20 +169,6 @@ forAll(fluidRegions, i)
).ptr()
);
Info<< " Adding to ghFluid\n" << endl;
ghFluid.set
(
i,
new volScalarField("gh", gFluid[i] & fluidRegions[i].C())
);
Info<< " Adding to ghfFluid\n" << endl;
ghfFluid.set
(
i,
new surfaceScalarField("ghf", gFluid[i] & fluidRegions[i].Cf())
);
p_rghFluid.set
(
i,
@ -219,6 +254,8 @@ forAll(fluidRegions, i)
fluidFvOptions.set
(
i,
new fv::IOoptionList(fluidRegions[i])
new fv::options(fluidRegions[i])
);
turbulence[i].validate();
}

View File

@ -13,7 +13,7 @@
const volScalarField& psi = thermo.psi();
IOMRFZoneList& MRF = MRFfluid[i];
fv::IOoptionList& fvOptions = fluidFvOptions[i];
fv::options& fvOptions = fluidFvOptions[i];
const dimensionedScalar initialMass
(

View File

@ -4,10 +4,11 @@ PtrList<volScalarField> rhoFluid(fluidRegions.size());
PtrList<volVectorField> UFluid(fluidRegions.size());
PtrList<surfaceScalarField> phiFluid(fluidRegions.size());
PtrList<uniformDimensionedVectorField> gFluid(fluidRegions.size());
PtrList<compressible::turbulenceModel> turbulence(fluidRegions.size());
PtrList<volScalarField> p_rghFluid(fluidRegions.size());
PtrList<uniformDimensionedScalarField> hRefFluid(fluidRegions.size());
PtrList<volScalarField> ghFluid(fluidRegions.size());
PtrList<surfaceScalarField> ghfFluid(fluidRegions.size());
PtrList<compressible::turbulenceModel> turbulence(fluidRegions.size());
PtrList<volScalarField> p_rghFluid(fluidRegions.size());
PtrList<radiation::radiationModel> radiation(fluidRegions.size());
PtrList<volScalarField> KFluid(fluidRegions.size());
PtrList<volScalarField> dpdtFluid(fluidRegions.size());
@ -16,7 +17,7 @@ List<scalar> initialMassFluid(fluidRegions.size());
List<bool> frozenFlowFluid(fluidRegions.size(), false);
PtrList<IOMRFZoneList> MRFfluid(fluidRegions.size());
PtrList<fv::IOoptionList> fluidFvOptions(fluidRegions.size());
PtrList<fv::options> fluidFvOptions(fluidRegions.size());
// Populate fluid field pointer lists
forAll(fluidRegions, i)
@ -104,6 +105,54 @@ forAll(fluidRegions, i)
)
);
Info<< " Adding to hRefFluid\n" << endl;
hRefFluid.set
(
i,
new uniformDimensionedScalarField
(
IOobject
(
"hRef",
runTime.constant(),
fluidRegions[i],
IOobject::READ_IF_PRESENT,
IOobject::NO_WRITE
),
dimensionedScalar("hRef", dimLength, 0)
)
);
dimensionedScalar ghRef
(
mag(gFluid[i].value()) > SMALL
? gFluid[i]
& (cmptMag(gFluid[i].value())/mag(gFluid[i].value()))*hRefFluid[i]
: dimensionedScalar("ghRef", gFluid[i].dimensions()*dimLength, 0)
);
Info<< " Adding to ghFluid\n" << endl;
ghFluid.set
(
i,
new volScalarField
(
"gh",
(gFluid[i] & fluidRegions[i].C()) - ghRef
)
);
Info<< " Adding to ghfFluid\n" << endl;
ghfFluid.set
(
i,
new surfaceScalarField
(
"ghf",
(gFluid[i] & fluidRegions[i].Cf()) - ghRef
)
);
Info<< " Adding to turbulence\n" << endl;
turbulence.set
(
@ -117,20 +166,6 @@ forAll(fluidRegions, i)
).ptr()
);
Info<< " Adding to ghFluid\n" << endl;
ghFluid.set
(
i,
new volScalarField("gh", gFluid[i] & fluidRegions[i].C())
);
Info<< " Adding to ghfFluid\n" << endl;
ghfFluid.set
(
i,
new surfaceScalarField("ghf", gFluid[i] & fluidRegions[i].Cf())
);
p_rghFluid.set
(
i,
@ -209,6 +244,8 @@ forAll(fluidRegions, i)
fluidFvOptions.set
(
i,
new fv::IOoptionList(fluidRegions[i])
new fv::options(fluidRegions[i])
);
turbulence[i].validate();
}

View File

@ -23,7 +23,7 @@
radiation::radiationModel& rad = radiation[i];
IOMRFZoneList& MRF = MRFfluid[i];
fv::IOoptionList& fvOptions = fluidFvOptions[i];
fv::options& fvOptions = fluidFvOptions[i];
const dimensionedScalar initialMass
(

View File

@ -2,7 +2,7 @@
PtrList<coordinateSystem> coordinates(solidRegions.size());
PtrList<solidThermo> thermos(solidRegions.size());
PtrList<radiation::radiationModel> radiations(solidRegions.size());
PtrList<fv::IOoptionList> solidHeatSources(solidRegions.size());
PtrList<fv::options> solidHeatSources(solidRegions.size());
PtrList<volScalarField> betavSolid(solidRegions.size());
PtrList<volSymmTensorField> aniAlphas(solidRegions.size());
@ -22,7 +22,7 @@
solidHeatSources.set
(
i,
new fv::IOoptionList(solidRegions[i])
new fv::options(solidRegions[i])
);
if (!thermos[i].isotropic())

View File

@ -29,4 +29,4 @@ volScalarField& h = thermo.he();
const volScalarField& betav = betavSolid[i];
fv::IOoptionList& fvOptions = solidHeatSources[i];
fv::options& fvOptions = solidHeatSources[i];

View File

@ -2,7 +2,6 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \

View File

@ -44,7 +44,7 @@
{
autoPtr<compressible::RASModel> turbulence
(
compressible::RASModel::New
compressible::New<compressible::RASModel>
(
rho,
U,
@ -59,7 +59,7 @@
{
autoPtr<compressible::LESModel> turbulence
(
compressible::LESModel::New
compressible::New<compressible::LESModel>
(
rho,
U,

View File

@ -38,7 +38,7 @@ Description
#include "turbulentFluidThermoModel.H"
#include "LESModel.H"
#include "radiationModel.H"
#include "fvIOoptionList.H"
#include "fvOptions.H"
#include "simpleControl.H"
#include "pimpleControl.H"

View File

@ -5,11 +5,12 @@ EXE_INC = \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
-I$(LIB_SRC)/meshTools/lnInclude \
EXE_LIBS = \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools
-lmeshTools \
-lfvOptions

View File

@ -52,6 +52,7 @@ Description
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "simpleControl.H"
#include "fvOptions.H"
template<class Type>
void zeroCells
@ -79,9 +80,12 @@ int main(int argc, char *argv[])
simpleControl simple(mesh);
#include "createFields.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "initAdjointContinuityErrs.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
@ -111,12 +115,18 @@ int main(int argc, char *argv[])
fvm::div(phi, U)
+ turbulence->divDevReff(U)
+ fvm::Sp(alpha, U)
==
fvOptions(U)
);
UEqn().relax();
fvOptions.constrain(UEqn());
solve(UEqn() == -fvc::grad(p));
fvOptions.correct(U);
volScalarField rAU(1.0/UEqn().A());
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H();
@ -153,6 +163,7 @@ int main(int argc, char *argv[])
// Momentum corrector
U = HbyA - rAU*fvc::grad(p);
U.correctBoundaryConditions();
fvOptions.correct(U);
}
// Adjoint Pressure-velocity SIMPLE corrector
@ -176,12 +187,18 @@ int main(int argc, char *argv[])
- adjointTransposeConvection
+ turbulence->divDevReff(Ua)
+ fvm::Sp(alpha, Ua)
==
fvOptions(Ua)
);
UaEqn().relax();
fvOptions.constrain(UaEqn());
solve(UaEqn() == -fvc::grad(pa));
fvOptions.correct(Ua);
volScalarField rAUa(1.0/UaEqn().A());
volVectorField HbyAa("HbyAa", Ua);
HbyAa = rAUa*UaEqn().H();
@ -218,6 +235,7 @@ int main(int argc, char *argv[])
// Adjoint momentum corrector
Ua = HbyAa - rAUa*fvc::grad(pa);
Ua.correctBoundaryConditions();
fvOptions.correct(Ua);
}
laminarTransport.correct();

View File

@ -82,7 +82,7 @@ singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<incompressible::RASModel> turbulence
(
incompressible::RASModel::New(U, phi, laminarTransport)
incompressible::New<incompressible::RASModel>(U, phi, laminarTransport)
);

Some files were not shown because too many files have changed in this diff Show More