|
[Sponsors] |
incompressibleTwoPhaseInteractingMixture implementation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 10, 2016, 21:01 |
incompressibleTwoPhaseInteractingMixture implementation
|
#1 |
New Member
Desanga
Join Date: Dec 2013
Posts: 19
Rep Power: 12 |
Hi Foamers,
I have a question to ask you. This isn't directly related to CFD but its about C++ implementation of incompressibleTwoPhaseInteractingMixture.H (applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/). As you can see inside incompressibleTwoPhaseInteractingMixture.H, this is a derived class from three base classes ( public IOdictionary,public transportModel, public twoPhaseMixture). The constructor of this class is implemented as below ( incompressibleTwoPhaseInteractingMixture.C). Foam::incompressibleTwoPhaseInteractingMixture:: incompressibleTwoPhaseInteractingMixture ( const volVectorField& U, const surfaceScalarField& phi ) : IOdictionary ( IOobject ( "transportProperties", U.time().constant(), U.db(), IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), twoPhaseMixture(U.mesh(), *this), it only invokes the constructors of IOdictionary, twoPhaseMixture. As long as I know, we should call all the base class constructors inside the constructor of the derived class. There is no sign of transportModel class constructor (transportModel.H does not have any default constructors). This is the original code inside driftfluxFoam and it compiles without any errors.I think, I have missed something here. Do you guys have some explanation to matter? Thanks in advance |
|
August 12, 2016, 13:14 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi,
a) you do not give any information about which foam version you are using (http://www.cfd-online.com/Forums/ope...tml#post613817) b) the next time it would be better to use code tags c) In the latest release (Foundation 4.x) the class you mentioned inherits everything from these classes: Code:
class incompressibleTwoPhaseInteractingMixture : public IOdictionary, public compressibleTransportModel, public twoPhaseMixture { Code:
// Constructors //- Construct from components compressibleTransportModel ();
__________________
Keep foaming, Tobias Holzmann |
|
Tags |
c++, openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free CFD code with implementation of Menter's k-omega SST model | nikola_m | Main CFD Forum | 2 | May 8, 2020 13:13 |
Issues in FGM combustion model implementation | Lisandro Maders | OpenFOAM Programming & Development | 15 | April 22, 2020 20:18 |
a little confused with the implementation of compressibleInterFoam | su_junwei | OpenFOAM Running, Solving & CFD | 2 | May 7, 2014 18:33 |
Implementation issues of fvSchemes / laplacianScheme, in particular gaussLaplacianSch | thomek | OpenFOAM Programming & Development | 0 | October 18, 2010 06:10 |
Please explain the implementation of species transport Eqn in reactingFoam | kallipygian | OpenFOAM Running, Solving & CFD | 0 | October 13, 2008 08:29 |