/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2013 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::ThermoCloud Description Templated base class for thermodynamic cloud - Adds to kinematic cloud - Heat transfer SourceFiles ThermoCloudI.H ThermoCloud.C \*---------------------------------------------------------------------------*/ #ifndef ThermoCloud_H #define ThermoCloud_H #include "KinematicCloud.H" #include "thermoCloud.H" #include "SLGThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { // Forward declaration of classes template class HeatTransferModel; /*---------------------------------------------------------------------------*\ Class ThermoCloud Declaration \*---------------------------------------------------------------------------*/ template class ThermoCloud : public CloudType, public thermoCloud { public: // Public typedefs //- Type of cloud this cloud was instantiated for typedef CloudType cloudType; //- Type of parcel the cloud was instantiated for typedef typename CloudType::particleType parcelType; //- Convenience typedef for this cloud type typedef ThermoCloud thermoCloudType; private: // Private data //- Cloud copy pointer autoPtr > cloudCopyPtr_; // Private member functions //- Disallow default bitwise copy construct ThermoCloud(const ThermoCloud&); //- Disallow default bitwise assignment void operator=(const ThermoCloud&); protected: // Protected data //- Thermo parcel constant properties typename parcelType::constantProperties constProps_; // References to the carrier gas fields //- SLG thermodynamics package const SLGThermo& thermo_; //- Temperature [K] const volScalarField& T_; //- Pressure [Pa] const volScalarField& p_; // References to the cloud sub-models //- Heat transfer model autoPtr > > heatTransferModel_; // Reference to the particle integration schemes //- Temperature integration autoPtr TIntegrator_; // Modelling options //- Include radiation Switch radiation_; //- Radiation sum of parcel projected areas autoPtr > radAreaP_; //- Radiation sum of parcel temperature^4 autoPtr > radT4_; //- Radiation sum of parcel projected areas * temperature^4 autoPtr > radAreaPT4_; // Sources //- Sensible enthalpy transfer [J/kg] autoPtr > hsTrans_; //- Coefficient for carrier phase hs equation [W/K] autoPtr > hsCoeff_; // Protected Member Functions // Initialisation //- Set cloud sub-models void setModels(); // Cloud evolution functions //- Reset state of cloud void cloudReset(ThermoCloud& c); public: // Constructors //- Construct given carrier gas fields ThermoCloud ( const word& cloudName, const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, const SLGThermo& thermo, bool readFields = true ); //- Copy constructor with new name ThermoCloud(ThermoCloud& c, const word& name); //- Copy constructor with new name - creates bare cloud ThermoCloud ( const fvMesh& mesh, const word& name, const ThermoCloud& c ); //- Construct and return clone based on (this) with new name virtual autoPtr > clone(const word& name) { return autoPtr > ( new ThermoCloud(*this, name) ); } //- Construct and return bare clone based on (this) with new name virtual autoPtr > cloneBare(const word& name) const { return autoPtr > ( new ThermoCloud(this->mesh(), name, *this) ); } //- Destructor virtual ~ThermoCloud(); // Member Functions // Access //- Return a reference to the cloud copy inline const ThermoCloud& cloudCopy() const; //- Return the constant properties inline const typename parcelType::constantProperties& constProps() const; //- Return access to the constant properties inline typename parcelType::constantProperties& constProps(); //- Return const access to thermo package inline const SLGThermo& thermo() const; //- Return const access to the carrier temperature field inline const volScalarField& T() const; //- Return const access to the carrier prressure field inline const volScalarField& p() const; // Sub-models //- Return reference to heat transfer model inline const HeatTransferModel >& heatTransfer() const; // Integration schemes //-Return reference to velocity integration inline const scalarIntegrationScheme& TIntegrator() const; // Modelling options //- Radiation flag inline bool radiation() const; //- Radiation sum of parcel projected areas [m2] inline DimensionedField& radAreaP(); //- Radiation sum of parcel projected areas [m2] inline const DimensionedField& radAreaP() const; //- Radiation sum of parcel temperature^4 [K4] inline DimensionedField& radT4(); //- Radiation sum of parcel temperature^4 [K4] inline const DimensionedField& radT4() const; //- Radiation sum of parcel projected area*temperature^4 [m2K4] inline DimensionedField& radAreaPT4(); //- Radiation sum of parcel temperature^4 [m2K4] inline const DimensionedField& radAreaPT4() const; // Sources // Enthalpy //- Sensible enthalpy transfer [J/kg] inline DimensionedField& hsTrans(); //- Sensible enthalpy transfer [J/kg] inline const DimensionedField& hsTrans() const; //- Return coefficient for carrier phase hs equation inline DimensionedField& hsCoeff(); //- Return const coefficient for carrier phase hs equation inline const DimensionedField& hsCoeff() const; //- Return sensible enthalpy source term [J/kg/m3/s] inline tmp Sh(volScalarField& hs) const; // Radiation - overrides thermoCloud virtual abstract members //- Return tmp equivalent particulate emission inline tmp Ep() const; //- Return tmp equivalent particulate absorption inline tmp ap() const; //- Return tmp equivalent particulate scattering factor inline tmp sigmap() const; // Check //- Maximum temperature inline scalar Tmax() const; //- Minimum temperature inline scalar Tmin() const; // Cloud evolution functions //- Set parcel thermo properties void setParcelThermoProperties ( parcelType& parcel, const scalar lagrangianDt ); //- Check parcel properties void checkParcelProperties ( parcelType& parcel, const scalar lagrangianDt, const bool fullyDescribed ); //- Store the current cloud state void storeState(); //- Reset the current cloud to the previously stored state void restoreState(); //- Reset the cloud source terms void resetSourceTerms(); //- Apply relaxation to (steady state) cloud sources void relaxSources(const ThermoCloud& cloudOldTime); //- Apply scaling to (transient) cloud sources void scaleSources(); //- Pre-evolve void preEvolve(); //- Evolve the cloud void evolve(); // Mapping //- Remap the cells of particles corresponding to the // mesh topology change with a default tracking data object virtual void autoMap(const mapPolyMesh&); // I-O //- Print cloud information void info(); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "ThermoCloudI.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository # include "ThermoCloud.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* //