Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Showing
with 98 additions and 67 deletions
...@@ -2,7 +2,7 @@ ...@@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -116,7 +116,7 @@ public: ...@@ -116,7 +116,7 @@ public:
//- Correct the flame-wrinking Xi //- Correct the flame-wrinking Xi
virtual void correct() virtual void correct()
{ {
notImplemented("transport::correct()"); NotImplemented;
} }
//- Correct the flame-wrinking Xi using the given convection scheme //- Correct the flame-wrinking Xi using the given convection scheme
......
...@@ -73,6 +73,8 @@ if (ign.ignited()) ...@@ -73,6 +73,8 @@ if (ign.ignited())
+ fvm::div(phiSt, b) + fvm::div(phiSt, b)
- fvm::Sp(fvc::div(phiSt), b) - fvm::Sp(fvc::div(phiSt), b)
- fvm::laplacian(Db, b) - fvm::laplacian(Db, b)
==
betav*fvOptions(rho, b)
); );
...@@ -82,8 +84,14 @@ if (ign.ignited()) ...@@ -82,8 +84,14 @@ if (ign.ignited())
// Solve for b // Solve for b
// ~~~~~~~~~~~ // ~~~~~~~~~~~
bEqn.relax();
fvOptions.constrain(bEqn);
bEqn.solve(); bEqn.solve();
fvOptions.correct(b);
Info<< "min(b) = " << min(b).value() << endl; Info<< "min(b) = " << min(b).value() << endl;
if (composition.contains("ft")) if (composition.contains("ft"))
......
...@@ -49,7 +49,7 @@ mesh.setFluxRequired(p.name()); ...@@ -49,7 +49,7 @@ mesh.setFluxRequired(p.name());
Info<< "Creating turbulence model\n" << endl; Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence autoPtr<compressible::RASModel> turbulence
( (
compressible::RASModel::New compressible::New<compressible::RASModel>
( (
rho, rho,
U, U,
......
...@@ -2,7 +2,7 @@ ...@@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -172,7 +172,7 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::SuRef ...@@ -172,7 +172,7 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::SuRef
} }
else else
{ {
FatalErrorIn("laminarFlameSpeedModels::SCOPE::SuRef(scalar phi)") FatalErrorInFunction
<< "phi = " << phi << "phi = " << phi
<< " cannot be handled by SCOPE function with the " << " cannot be handled by SCOPE function with the "
"given coefficients" "given coefficients"
...@@ -210,7 +210,7 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::Ma ...@@ -210,7 +210,7 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::Ma
} }
else else
{ {
FatalErrorIn("laminarFlameSpeedModels::SCOPE::Ma(scalar phi)") FatalErrorInFunction
<< "phi = " << phi << "phi = " << phi
<< " cannot be handled by SCOPE function with the " << " cannot be handled by SCOPE function with the "
"given coefficients" "given coefficients"
......
...@@ -25,6 +25,8 @@ if (pimple.transonic()) ...@@ -25,6 +25,8 @@ if (pimple.transonic())
betav*fvm::ddt(psi, p) betav*fvm::ddt(psi, p)
+ fvm::div(phid, p) + fvm::div(phid, p)
- fvm::laplacian(rho*invA, p) - fvm::laplacian(rho*invA, p)
==
betav*fvOptions(psi, p, rho.name())
); );
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
...@@ -53,6 +55,8 @@ else ...@@ -53,6 +55,8 @@ else
betav*fvm::ddt(psi, p) betav*fvm::ddt(psi, p)
+ fvc::div(phiHbyA) + fvc::div(phiHbyA)
- fvm::laplacian(rho*invA, p) - fvm::laplacian(rho*invA, p)
==
betav*fvOptions(psi, p, rho.name())
); );
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
...@@ -69,6 +73,7 @@ else ...@@ -69,6 +73,7 @@ else
U = HbyA - (invA & (betav*fvc::grad(p))); U = HbyA - (invA & (betav*fvc::grad(p)));
U.correctBoundaryConditions(); U.correctBoundaryConditions();
fvOptions.correct(U);
K = 0.5*magSqr(U); K = 0.5*magSqr(U);
if (thermo.dpdt()) if (thermo.dpdt())
......
EXE_INC = \ 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)/engine/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \
...@@ -10,13 +6,12 @@ EXE_INC = \ ...@@ -10,13 +6,12 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/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 = \ EXE_LIBS = \
-lfiniteVolume \
-lfvOptions \
-lsampling \
-lmeshTools \
-lengine \ -lengine \
-lturbulenceModels \ -lturbulenceModels \
-lcompressibleTurbulenceModels \ -lcompressibleTurbulenceModels \
...@@ -24,4 +19,8 @@ EXE_LIBS = \ ...@@ -24,4 +19,8 @@ EXE_LIBS = \
-lfluidThermophysicalModels \ -lfluidThermophysicalModels \
-lreactionThermophysicalModels \ -lreactionThermophysicalModels \
-lspecie \ -lspecie \
-llaminarFlameSpeedModels -llaminarFlameSpeedModels \
-lfiniteVolume \
-lfvOptions \
-lsampling \
-lmeshTools
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
+ MRF.DDt(rho, U) + MRF.DDt(rho, U)
+ turbulence->divDevRhoReff(U) + turbulence->divDevRhoReff(U)
== ==
rho*g fvOptions(rho, U)
+ fvOptions(rho, U)
); );
UEqn.relax(); UEqn.relax();
......
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
XiFoam XiFoam
Group
grpCombustionSolvers grpMovingMeshSolvers
Description Description
Solver for compressible premixed/partially-premixed combustion with Solver for compressible premixed/partially-premixed combustion with
turbulence modelling. turbulence modelling.
...@@ -58,7 +61,7 @@ Description ...@@ -58,7 +61,7 @@ Description
#include "Switch.H" #include "Switch.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "CorrectPhi.H" #include "CorrectPhi.H"
#include "fvIOoptionList.H" #include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
XiFoam XiFoam
Group
grpCombustionSolvers
Description Description
Solver for compressible premixed/partially-premixed combustion with Solver for compressible premixed/partially-premixed combustion with
turbulence modelling. turbulence modelling.
...@@ -56,7 +59,7 @@ Description ...@@ -56,7 +59,7 @@ Description
#include "ignition.H" #include "ignition.H"
#include "Switch.H" #include "Switch.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "fvIOoptionList.H" #include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...@@ -70,7 +73,6 @@ int main(int argc, char *argv[]) ...@@ -70,7 +73,6 @@ int main(int argc, char *argv[])
pimpleControl pimple(mesh); pimpleControl pimple(mesh);
#include "readCombustionProperties.H" #include "readCombustionProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H" #include "createFields.H"
#include "createMRF.H" #include "createMRF.H"
#include "createFvOptions.H" #include "createFvOptions.H"
...@@ -79,6 +81,8 @@ int main(int argc, char *argv[]) ...@@ -79,6 +81,8 @@ int main(int argc, char *argv[])
#include "compressibleCourantNo.H" #include "compressibleCourantNo.H"
#include "setInitialDeltaT.H" #include "setInitialDeltaT.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
......
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/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)/ODE/lnInclude\
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude -I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lreactionThermophysicalModels \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lchemistryModel \ -lchemistryModel \
-lODE \
-lthermophysicalFunctions \
-lspecie \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools -lmeshTools
...@@ -24,10 +24,14 @@ License ...@@ -24,10 +24,14 @@ License
Application Application
chemFoam chemFoam
Group
grpCombustionSolvers
Description Description
Solver for chemistry problems Solver for chemistry problems designed for use on single cell cases to
- designed for use on single cell cases to provide comparison against provide comparison against other chemistry solvers
other chemistry solvers
Note:
- single cell mesh created on-the-fly - single cell mesh created on-the-fly
- fields created on the fly from the initial conditions - fields created on the fly from the initial conditions
...@@ -35,7 +39,6 @@ Description ...@@ -35,7 +39,6 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "psiReactionThermo.H" #include "psiReactionThermo.H"
#include "turbulentFluidThermoModel.H"
#include "psiChemistryModel.H" #include "psiChemistryModel.H"
#include "chemistrySolver.H" #include "chemistrySolver.H"
#include "OFstream.H" #include "OFstream.H"
......
if (runTime.controlDict().lookupOrDefault("suppressSolverInfo", false))
{
lduMatrix::debug = 0;
}
Switch adjustTimeStep(runTime.controlDict().lookup("adjustTimeStep")); Switch adjustTimeStep(runTime.controlDict().lookup("adjustTimeStep"));
scalar maxDeltaT(readScalar(runTime.controlDict().lookup("maxDeltaT"))); scalar maxDeltaT(readScalar(runTime.controlDict().lookup("maxDeltaT")));
if (mesh.nCells() != 1) if (mesh.nCells() != 1)
{ {
FatalErrorIn(args.executable()) FatalErrorInFunction
<< "Solver only applicable to single cell cases" << "Solver only applicable to single cell cases"
<< exit(FatalError); << exit(FatalError);
} }
...@@ -86,20 +86,6 @@ ...@@ -86,20 +86,6 @@
#include "createPhi.H" #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"); OFstream post(args.path()/"chemFoam.out");
post<< "# Time" << token::TAB << "Temperature [K]" << token::TAB post<< "# Time" << token::TAB << "Temperature [K]" << token::TAB
<< "Pressure [Pa]" << endl; << "Pressure [Pa]" << endl;
...@@ -12,7 +12,6 @@ EXE_INC = \ ...@@ -12,7 +12,6 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lengine \ -lengine \
......
...@@ -22,7 +22,10 @@ License ...@@ -22,7 +22,10 @@ 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
engineFoam coldEngineFoam
Group
grpCombustionSolvers grpMovingMeshSolvers
Description Description
Solver for cold-flow in internal combustion engines. Solver for cold-flow in internal combustion engines.
...@@ -35,7 +38,7 @@ Description ...@@ -35,7 +38,7 @@ Description
#include "psiThermo.H" #include "psiThermo.H"
#include "turbulentFluidThermoModel.H" #include "turbulentFluidThermoModel.H"
#include "OFstream.H" #include "OFstream.H"
#include "fvIOoptionList.H" #include "fvOptions.H"
#include "pimpleControl.H" #include "pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...@@ -59,6 +62,8 @@ int main(int argc, char *argv[]) ...@@ -59,6 +62,8 @@ int main(int argc, char *argv[])
#include "setInitialDeltaT.H" #include "setInitialDeltaT.H"
#include "startSummary.H" #include "startSummary.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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/>.
\defgroup grpCombustionSolvers Combustion solvers
@{
\ingroup grpSolvers
This group contains combustion solvers.
@}
\*---------------------------------------------------------------------------*/
EXE_INC = \ EXE_INC = \
-I$(FOAM_SOLVERS)/combustion/XiFoam \ -I$(FOAM_SOLVERS)/combustion/XiFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/engine/lnInclude \ -I$(LIB_SRC)/engine/lnInclude \
......
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
engineFoam engineFoam
Group
grpCombustionSolvers
Description Description
Solver for internal combustion engines. Solver for internal combustion engines.
...@@ -59,7 +62,7 @@ Description ...@@ -59,7 +62,7 @@ Description
#include "OFstream.H" #include "OFstream.H"
#include "mathematicalConstants.H" #include "mathematicalConstants.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "fvIOoptionList.H" #include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...@@ -83,6 +86,8 @@ int main(int argc, char *argv[]) ...@@ -83,6 +86,8 @@ int main(int argc, char *argv[])
#include "setInitialDeltaT.H" #include "setInitialDeltaT.H"
#include "startSummary.H" #include "startSummary.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
......
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \ -I${LIB_SRC}/meshTools/lnInclude \
-I${LIB_SRC}/sampling/lnInclude \ -I${LIB_SRC}/sampling/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
......
...@@ -24,8 +24,11 @@ License ...@@ -24,8 +24,11 @@ License
Application Application
fireFoam fireFoam
Group
grpCombustionSolvers
Description Description
Transient PIMPLE solver for Fires and turbulent diffusion flames with Transient PIMPLE solver for fires and turbulent diffusion flames with
reacting Lagrangian parcels, surface film and pyrolysis modelling. reacting Lagrangian parcels, surface film and pyrolysis modelling.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
...@@ -40,7 +43,7 @@ Description ...@@ -40,7 +43,7 @@ Description
#include "solidChemistryModel.H" #include "solidChemistryModel.H"
#include "psiCombustionModel.H" #include "psiCombustionModel.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "fvIOoptionList.H" #include "fvOptions.H"
#include "fixedFluxPressureFvPatchScalarField.H" #include "fixedFluxPressureFvPatchScalarField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...@@ -67,6 +70,8 @@ int main(int argc, char *argv[]) ...@@ -67,6 +70,8 @@ int main(int argc, char *argv[])
#include "setInitialDeltaT.H" #include "setInitialDeltaT.H"
#include "readPyrolysisTimeControls.H" #include "readPyrolysisTimeControls.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
......