|
[Sponsors] |
Derive fixed number of phase from clone () in multiphaseEulerFoam Solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 16, 2013, 21:41 |
Derive fixed number of phase from clone () in multiphaseEulerFoam Solver
|
#1 |
Member
AJ
Join Date: Sep 2013
Posts: 30
Rep Power: 13 |
Guys as you all know this is a phase model of multiphaseEulerFoam, this solver has capability of obtaining n phases from phase model of it . Can you suggest me how to get three phases from it rather than n.It uses the concept of clone.
P.S: i just want to go with this code as it exactly fits my need. #ifndef phaseModel_H #define phaseModel_H #include "dictionary.H" #include "dictionaryEntry.H" #include "dimensionedScalar.H" #include "volFields.H" #include "surfaceFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { // Forward declarations class diameterModel; /*---------------------------------------------------------------------------*\ Class phaseModel Declaration \*---------------------------------------------------------------------------*/ class phaseModel : public volScalarField { // Private data //- Name of phase word name_; dictionary phaseDict_; //- Kinematic viscosity dimensionedScalar nu_; //- Thermal conductivity dimensionedScalar kappa_; //- Heat capacity dimensionedScalar Cp_; //- Density dimensionedScalar rho_; //- Velocity volVectorField U_; //-Temperature volScalarField T_; //- Substantive derivative of the velocity volVectorField DDtU_; //- Volumetric flux of the phase surfaceScalarField phiAlpha_; //- Volumetric flux for the phase autoPtr<surfaceScalarField> phiPtr_; //- Diameter model autoPtr<diameterModel> dPtr_; public: // Constructors phaseModel ( const word& phaseName, const dictionary& phaseDict, const fvMesh& mesh ); //- Return clone autoPtr<phaseModel> clone() const; //- Return a pointer to a new phase created on freestore // from Istream class iNew { const fvMesh& mesh_; public: iNew ( const fvMesh& mesh ) : mesh_(mesh) {} autoPtr<phaseModel> operator()(Istream& is) const { dictionaryEntry ent(dictionary::null, is); return autoPtr<phaseModel> ( new phaseModel(ent.keyword(), ent, mesh_) ); } }; //- Destructor virtual ~phaseModel(); // Member Functions const word& name() const { return name_; } const word& keyword() const { return name(); } tmp<volScalarField> d() const; const dimensionedScalar& nu() const { return nu_; } const dimensionedScalar& kappa() const { return kappa_; } const dimensionedScalar& Cp() const { return Cp_; } const dimensionedScalar& rho() const { return rho_; } const volVectorField& U() const { return U_; } volVectorField& U() { return U_; } const volScalarField& T() const { return T_; } volScalarField& T() { return T_; } const volVectorField& DDtU() const { return DDtU_; } volVectorField& DDtU() { return DDtU_; } const surfaceScalarField& phi() const { return phiPtr_(); } surfaceScalarField& phi() { return phiPtr_(); } const surfaceScalarField& phiAlpha() const { return phiAlpha_; } surfaceScalarField& phiAlpha() { return phiAlpha_; } //- Correct the phase properties void correct(); //- Read base transportProperties dictionary bool read(const dictionary& phaseDict); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************** *********************** // |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[mesh manipulation] Mesh Refinement | Luiz Eduardo Bittencourt Sampaio (Sampaio) | OpenFOAM Meshing & Mesh Conversion | 42 | January 8, 2017 13:55 |
Definition of continuous phase Reynolds number | gaurav_bhutani | Main CFD Forum | 0 | November 8, 2013 11:31 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |
compressible two phase flow in CFX4.4 | youngan | CFX | 0 | July 2, 2003 00:32 |
CFX 5.5 | Roued | CFX | 1 | October 2, 2001 17:49 |