|
[Sponsors] |
multiphaseEulerFoam v8: PhaseSystems - help understanding typedefs |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 27, 2021, 00:11 |
multiphaseEulerFoam v8: PhaseSystems - help understanding typedefs
|
#1 |
New Member
Join Date: Aug 2013
Posts: 7
Rep Power: 12 |
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. |
|
Tags |
basephasesystem, multiphaseeulerfoam, phasesystem, typedef |
|
|
Similar Threads | ||||
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 |