CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Derive fixed number of phase from clone () in multiphaseEulerFoam Solver

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 16, 2013, 20:41
Question Derive fixed number of phase from clone () in multiphaseEulerFoam Solver
  #1
Member
 
AJ
Join Date: Sep 2013
Posts: 30
Rep Power: 13
Aj Nair is on a distinguished road
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

// ************************************************** *********************** //
Aj Nair is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 12:55
Definition of continuous phase Reynolds number gaurav_bhutani Main CFD Forum 0 November 8, 2013 10:31
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 21:11
compressible two phase flow in CFX4.4 youngan CFX 0 July 1, 2003 23:32
CFX 5.5 Roued CFX 1 October 2, 2001 16:49


All times are GMT -4. The time now is 15:35.