|
[Sponsors] |
multiphaseEulerFoam v8: PhaseSystems - help understanding typedefs |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Join Date: Aug 2013
Posts: 7
Rep Power: 13 ![]() |
Hi,
to make it short I am going straight to the point. My apologies for the lack of accuracy with the language and/or technicalities with regards to either the programming language or the OpenFOAM's code terminologies. For the solver in the subject we find under the multiphaseSystem.C all the aliases for the multiphase system types (the ones we must specify in constant/phaseProperties when setting up a case). For example: Code:
typedef ThermalPhaseChangePhaseSystem < PhaseTransferPhaseSystem < TwoResistanceHeatTransferPhaseSystem < MomentumTransferPhaseSystem<phaseSystem> > > > thermalPhaseChangeMultiphaseSystem; addNamedToRunTimeSelectionTable ( phaseSystem, thermalPhaseChangeMultiphaseSystem, dictionary, thermalPhaseChangeMultiphaseSystem ); 1.The parameter that is past to these PhaseSystems is the phaseSystem class. Is it correct to say that all these typedefs are also a phaseSystem? 2.Most of member functions used by these PhaseSystems come from the phaseSystem class. For example, the pure virtual member function: Code:
virtual autoPtr<momentumTransferTable> momentumTransfer() = 0 In .H: Code:
virtual autoPtr<phaseSystem::momentumTransferTable> momentumTransfer(); Code:
template<class BasePhaseSystem> Foam::autoPtr<Foam::phaseSystem::momentumTransferTable> Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::momentumTransfer() { <body's function> } Code:
momentumTransfer() In .H: Code:
virtual autoPtr<phaseSystem::momentumTransferTable> momentumTransfer(); Code:
template<class BasePhaseSystem> Foam::autoPtr<Foam::phaseSystem::momentumTransferTable> Foam::PhaseTransferPhaseSystem<BasePhaseSystem>::momentumTransferf() { autoPtr<phaseSystem::momentumTransferTable> eqnsPtr = BasePhaseSystem::momentumTransferf(); phaseSystem::momentumTransferTable& eqns = eqnsPtr(); this->addDmdtUfs(totalDmdtfs(), eqns); return eqnsPtr; } b.If so, this is why the MomentumTransferPhaseSystem is an inner class in this typedef, so that by using Code:
BasePhaseSystem::momentumTransferf() There are other member functions that could be used in place of the Code:
momentumTransfer() Extra question: If someone would be able to explain better these templated classes under PhaseSystem which are of type BasePhaseSystem, but at the same time inherits from BasePhaseSystem itself, it would be a great help. Thank you very much for your time. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Join Date: Aug 2013
Posts: 7
Rep Power: 13 ![]() |
Well, after talking to someone that knows the code much better than I do, the answers for the question 2 are:
a.Yes, the momentumTransfer() is a necessary member function to account for the mass transfer process, which is not modeled in the MomentumTransferPhaseSystem class, hence it does not exist in the inherited code. b.Basically, the momentumTransfer() declared/defined in PhaseTransferPhaseSystem is just adding new momentum sources on top of the already existent in MomentumTransferPhaseSystem. |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
New Member
Join Date: Aug 2013
Posts: 7
Rep Power: 13 ![]() |
As for the extra question, a quick explanation is given here ( http://www.researchgate.net/publicat...le_user_manual on page 203), which uses KinematicParcel rather than BasePhaseSystem as an example.
First the code snippet: Code:
template < class ParcelType > class KinematicParcel : public ParcelType { public : /* the rest of the code ... */ Quote:
|
||
![]() |
![]() |
![]() |
Tags |
basephasesystem, multiphaseeulerfoam, phasesystem, typedef |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
volume fraction problem in multiphaseEulerFoam | vishalgarg474 | OpenFOAM Running, Solving & CFD | 2 | September 15, 2021 16:19 |
Understanding hardware & parallel processing requirements | yk2359 | Hardware | 3 | May 24, 2018 13:34 |
multiphaseInterFoam vs multiphaseEulerFoam | rahulksoni | OpenFOAM | 0 | August 11, 2017 02:14 |
Adding Boussinesq Approximation to multiphaseEulerFoam? | dschmidt | OpenFOAM Programming & Development | 1 | January 16, 2017 16:40 |
[waves2Foam] Still not understanding what pressure is being solved for | arieljeds | OpenFOAM Community Contributions | 6 | April 22, 2016 04:28 |