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

incompressibleTwoPhaseInteractingMixture implementation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 10, 2016, 20:01
Default incompressibleTwoPhaseInteractingMixture implementation
  #1
New Member
 
Desanga
Join Date: Dec 2013
Posts: 19
Rep Power: 12
desanga is on a distinguished road
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
desanga is offline   Reply With Quote

Old   August 12, 2016, 12:14
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
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
{
and the constructor call that you miss for the compressibleTransportModel is:
Code:
    // Constructors

        //- Construct from components
        compressibleTransportModel
        ();
It does not take any argument and hence you do not need to call it. Hence, the world is fine
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Reply

Tags
c++, openfoam


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
Free CFD code with implementation of Menter's k-omega SST model nikola_m Main CFD Forum 2 May 8, 2020 12:13
Issues in FGM combustion model implementation Lisandro Maders OpenFOAM Programming & Development 15 April 22, 2020 19:18
a little confused with the implementation of compressibleInterFoam su_junwei OpenFOAM Running, Solving & CFD 2 May 7, 2014 17:33
Implementation issues of fvSchemes / laplacianScheme, in particular gaussLaplacianSch thomek OpenFOAM Programming & Development 0 October 18, 2010 05:10
Please explain the implementation of species transport Eqn in reactingFoam kallipygian OpenFOAM Running, Solving & CFD 0 October 13, 2008 07:29


All times are GMT -4. The time now is 19:04.