ENH: Added 'noChemistrySolver' option/class

This commit is contained in:
andy
2010-08-06 12:08:24 +01:00
parent 195dd9fa54
commit f243736c78
3 changed files with 202 additions and 0 deletions

View File

@ -29,6 +29,8 @@ License
#include "psiChemistryModel.H"
#include "rhoChemistryModel.H"
#include "noChemistrySolver.H"
#include "EulerImplicit.H"
#include "ode.H"
#include "sequential.H"
@ -38,12 +40,24 @@ License
namespace Foam
{
makeChemistrySolver(psiChemistryModel, gasThermoPhysics)
makeChemistrySolverType
(
noChemistrySolver,
psiChemistryModel,
gasThermoPhysics
)
makeChemistrySolverType(EulerImplicit, psiChemistryModel, gasThermoPhysics)
makeChemistrySolverType(ode, psiChemistryModel, gasThermoPhysics)
makeChemistrySolverType(sequential, psiChemistryModel, gasThermoPhysics)
makeChemistrySolver(psiChemistryModel, icoPoly8ThermoPhysics)
makeChemistrySolverType
(
noChemistrySolver,
psiChemistryModel,
icoPoly8ThermoPhysics
)
makeChemistrySolverType
(
EulerImplicit,
psiChemistryModel,
@ -58,12 +72,24 @@ namespace Foam
)
makeChemistrySolver(rhoChemistryModel, gasThermoPhysics)
makeChemistrySolverType
(
noChemistrySolver,
rhoChemistryModel,
gasThermoPhysics
)
makeChemistrySolverType(EulerImplicit, rhoChemistryModel, gasThermoPhysics)
makeChemistrySolverType(ode, rhoChemistryModel, gasThermoPhysics)
makeChemistrySolverType(sequential, rhoChemistryModel, gasThermoPhysics)
makeChemistrySolver(rhoChemistryModel, icoPoly8ThermoPhysics)
makeChemistrySolverType
(
noChemistrySolver,
rhoChemistryModel,
icoPoly8ThermoPhysics
)
makeChemistrySolverType
(
EulerImplicit,
rhoChemistryModel,

View File

@ -0,0 +1,66 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "noChemistrySolver.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class CompType, class ThermoType>
Foam::noChemistrySolver<CompType, ThermoType>::noChemistrySolver
(
ODEChemistryModel<CompType, ThermoType>& model,
const word& modelName
)
:
chemistrySolver<CompType, ThermoType>(model, modelName)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class CompType, class ThermoType>
Foam::noChemistrySolver<CompType, ThermoType>::~noChemistrySolver()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class CompType, class ThermoType>
Foam::scalar Foam::noChemistrySolver<CompType, ThermoType>::solve
(
scalarField&,
const scalar,
const scalar,
const scalar,
const scalar
) const
{
return GREAT;
}
// ************************************************************************* //

View File

@ -0,0 +1,110 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::noChemistry
Description
Dummy chemistry solver for 'none' option
SourceFiles
noChemistrySolver.H
noChemistrySolver.C
\*---------------------------------------------------------------------------*/
#ifndef noChemistySolver_H
#define noChemistySolver_H
#include "chemistrySolver.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// Forward declaration of classes
template<class CompType, class ThermoType>
class noChemistrySolver;
/*---------------------------------------------------------------------------*\
Class noChemistrySolver Declaration
\*---------------------------------------------------------------------------*/
template<class CompType, class ThermoType>
class noChemistrySolver
:
public chemistrySolver<CompType, ThermoType>
{
public:
//- Runtime type information
TypeName("none");
// Constructors
//- Construct from components
noChemistrySolver
(
ODEChemistryModel<CompType, ThermoType>& model,
const word& modelName
);
//- Destructor
virtual ~noChemistrySolver();
// Member Functions
//- Update the concentrations and return the chemical time
scalar solve
(
scalarField &c,
const scalar T,
const scalar p,
const scalar t0,
const scalar dt
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "noChemistrySolver.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //