Files
OpenFOAM-12/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.H
Will Bainbridge e352828514 reactingMultiphaseEulerFoam: Stationary phase
Two new phase models have been added as selectable options for
reactingMultiphaseEulerFoam; pureStationaryPhaseModel and
pureStationaryIsothermalPhaseModel. These phases do not store a
velocity and their phase fractions remain constant throughout the
simulation. They are intended for use in modelling static particle beds
and other forms of porous media by means of the existing Euler-Euler
transfer models (drag, heat transfer, etc...).

Note that this functionality has not been extended to
reactingTwoPhaseEulerFoam, or the non-reacting *EulerFoam solvers.

Additional maintenance work has been carried out on the phase model
and phase system structure. The system can now loop over subsets of
phases with specific functionality (moving, multi-component, etc...) in
order to avoid testing for the existence of equations or variables in
the top level solver. The mass transfer handling and it's effect on
per-phase source terms has been refactored to reduce duplication. Const
and non-const access to phase properties has been formalised by renaming
non-const accessors with a "Ref" suffix, which is consistent with other
recent developments to classes including tmp and GeometricField, among
others. More sub-modelling details have been made private in order to
reduce the size of interfaces and improve abstraction.

This work was supported by Zhen Li, at Evonik
2018-03-23 09:08:52 +00:00

128 lines
3.6 KiB
C++

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015-2018 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::MultiComponentPhaseModel
Description
Class which represents a phase with multiple species. Returns the species'
mass fractions, and their governing equations.
SourceFiles
MultiComponentPhaseModel.C
\*---------------------------------------------------------------------------*/
#ifndef MultiComponentPhaseModel_H
#define MultiComponentPhaseModel_H
#include "phaseModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class MultiComponentPhaseModel Declaration
\*---------------------------------------------------------------------------*/
template<class BasePhaseModel>
class MultiComponentPhaseModel
:
public BasePhaseModel
{
protected:
// Protected data
//- Schmidt number
dimensionedScalar Sc_;
//- Residual phase fraction
dimensionedScalar residualAlpha_;
//- Inert species index
label inertIndex_;
//- Pointer list to active species
UPtrList<volScalarField> YActive_;
public:
// Constructors
MultiComponentPhaseModel
(
const phaseSystem& fluid,
const word& phaseName,
const label index
);
//- Destructor
virtual ~MultiComponentPhaseModel();
// Member Functions
//- Correct the thermodynamics
virtual void correctThermo();
//- Return whether the phase is pure (i.e., not multi-component)
virtual bool pure() const;
//- Return the species fraction equation
virtual tmp<fvScalarMatrix> YiEqn(volScalarField& Yi);
//- Return the species mass fractions
virtual const PtrList<volScalarField>& Y() const;
//- Access the species mass fractions
virtual PtrList<volScalarField>& YRef();
//- Return the active species mass fractions
virtual const UPtrList<volScalarField>& YActive() const;
//- Access the active species mass fractions
virtual UPtrList<volScalarField>& YActiveRef();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "MultiComponentPhaseModel.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //