Files
OpenFOAM-12/applications/modules/multicomponentFluid/multicomponentFluid.H
Will Bainbridge 3c542d664b thermophysicalModels: Primitive mixture classes
Mixture classes (e.g., pureMixtrure, coefficientMulticomponentMixture),
now have no fvMesh or volScalarField dependence. They operate on
primitive values only. All the fvMesh-dependent functionality has been
moved into the base thermodynamic classes. The 'composition()' access
function has been removed from multi-component thermo models. Functions
that were once provided by composition base classes such as
basicSpecieMixture and basicCombustionMixture are now implemented
directly in the relevant multi-component thermo base class.
2023-07-27 08:39:58 +01:00

171 lines
4.6 KiB
C++

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2022-2023 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/>.
Class
Foam::solvers::multicomponentFluid
Description
Solver module for steady or transient turbulent flow of compressible
multicomponent fluids with optional mesh motion and change.
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient and steady simulations.
Optional fvModels and fvConstraints are provided to enhance the simulation
in many ways including adding various sources, chemical reactions,
combustion, Lagrangian particles, radiation, surface film etc. and
constraining or limiting the solution.
Reference:
\verbatim
Greenshields, C. J., & Weller, H. G. (2022).
Notes on Computational Fluid Dynamics: General Principles.
CFD Direct Ltd.: Reading, UK.
\endverbatim
SourceFiles
multicomponentFluid.C
See also
Foam::solvers::fluidSolver
Foam::solvers::isothermalFluid
\*---------------------------------------------------------------------------*/
#ifndef multicomponentFluid_H
#define multicomponentFluid_H
#include "isothermalFluid.H"
#include "fluidMulticomponentThermo.H"
#include "combustionModel.H"
#include "fluidMulticomponentThermophysicalTransportModel.H"
#include "multivariateScheme.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace solvers
{
/*---------------------------------------------------------------------------*\
Class multicomponentFluid Declaration
\*---------------------------------------------------------------------------*/
class multicomponentFluid
:
public isothermalFluid
{
protected:
// Thermophysical properties
fluidMulticomponentThermo& thermo_;
// Composition
PtrList<volScalarField>& Y_;
// Reactions
autoPtr<combustionModel> reaction;
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
// Thermophysical transport
autoPtr<fluidMulticomponentThermophysicalTransportModel>
thermophysicalTransport;
private:
// Private Member Functions
//- Set rDeltaT for LTS
virtual void setRDeltaT();
public:
// Public Data
//- Reference to the fluid thermophysical properties
const fluidMulticomponentThermo& thermo;
//- Reference to the composition
const PtrList<volScalarField>& Y;
//- Runtime type information
TypeName("multicomponentFluid");
// Constructors
//- Construct from region mesh
multicomponentFluid(fvMesh& mesh);
//- Disallow default bitwise copy construction
multicomponentFluid(const multicomponentFluid&) = delete;
//- Destructor
virtual ~multicomponentFluid();
// Member Functions
//- Called at the start of the PIMPLE loop
virtual void prePredictor();
//- Construct and solve the energy equation,
// convert to temperature
// and update thermophysical and transport properties
virtual void thermophysicalPredictor();
//- Correct the momentum and thermophysical transport modelling
virtual void postCorrector();
// Member Operators
//- Disallow default bitwise assignment
void operator=(const multicomponentFluid&) = delete;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace solvers
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //