/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2016 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 . Class Foam::GasState Description SourceFiles GasStateI.H GasState.C GasStateIO.C \*---------------------------------------------------------------------------*/ #ifndef GasState_H #define GasState_H #include "thermoPhysicsTypes.H" #include "constants.H" #include "scalarField.H" #include "diffusivityModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { // Forward declaration of classes class Istream; class Ostream; // Forward declaration of friend functions and operators class GasState; Istream& operator>>(Istream&, GasState&); Ostream& operator<<(Ostream&, const GasState&); /*---------------------------------------------------------------------------*\ Class GasState Declaration \*---------------------------------------------------------------------------*/ class GasState { public: // Data type typedef gasHThermoPhysics thermoType; private: // Private data //- Presssure [Pa] scalar p_; //- Temperature [k] scalar T_; //- Mass fractions scalarField Y_; //- Mole fractions scalarField X_; //- Mean molecular weight [kg/kmol] scalar W_; // Private Member Functions //- Disallow default bitwise copy construct GasState(const GasState&); //- Disallow default bitwise assignment void operator=(const GasState&); //- Static data staticData inline const PtrList &thermos() const; inline const thermoType &thermos(label i) const; inline void calculateW(); inline void calculateX(); public: // Static data members //- Static data staticData // static const dataType staticData; // Constructors //- Construct null GasState(); //- Construct from components GasState(const scalar p, const scalar T, const label n); GasState(const scalar p, const scalar T, const scalarField &Y); GasState(const scalar p, const scalar T, tmp Y); //- Construct from Istream GasState(Istream&); //- Construct as copy //- Destructor ~GasState(); // Member Functions // Access inline scalar T() const; inline scalar &T(); inline scalar p() const; inline scalar &p(); inline scalar Y(label i) const; inline const scalarField &Y() const; inline scalarField &Y(); inline const scalarField &X() const; inline scalarField &X(); inline scalar W() const; inline scalar rho() const; inline scalar rhoQc2() const; // Check // Edit // Write // Member Operators // Friend Functions // Friend Operators // IOstream Operators friend Istream& operator>>(Istream&, GasState&); friend Ostream& operator<<(Ostream&, const GasState&); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "GasStateI.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* //