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

incompressibleTwoPhaseMixture call/constructor

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 1, 2013, 23:10
Default incompressibleTwoPhaseMixture call/constructor
  #1
Member
 
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 13
chrisb2244 is on a distinguished road
Hi,

I'm working on modifying the interFoam solver (OpenFoam 2.2.2 if it makes any difference?) and am currently reading through the (unmodified) source files and using the Doxygen documentation to try and gain some understanding.

I'm a little confused by the incompressibleTwoPhaseMixture constructor(?) in createFields.H

The section in question reads

Code:
Info<< "Reading transportProperties\n" << endl;
    incompressibleTwoPhaseMixture twoPhaseProperties(U, phi);

    volScalarField& alpha1(twoPhaseProperties.alpha1());
    volScalarField& alpha2(twoPhaseProperties.alpha2());

    const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
    const dimensionedScalar& rho2 = twoPhaseProperties.rho2();
and having found the constructor information, it seems that it requires U, phi, alpha1 and alpha2, with defaults for alpha1 and alpha2 if they're not specified.

Code:
// Constructors

        //- Construct from components
        incompressibleTwoPhaseMixture
        (
            const volVectorField& U,
            const surfaceScalarField& phi,
            const word& alpha1Name = "alpha1",
            const word& alpha2Name = "alpha2"
        );
This would be fine, but the call has no brackets around the other terms. How is it using the terms that follow, and if those are separate, what is "twoPhaseProperties" all about? The documentation just links to the createFields.H file and gives me the lines that I put in the first code box.

If someone could explain how this is working, I'd appreciate it very much.

(On a side note, there isn't a namespace using statement in createFields.H. Does this work because Foam::incompressibleTwoPhaseMixture::incompressibl eTwoPhaseMixture is the only possible call for that?)

Thanks,

Christian
chrisb2244 is offline   Reply With Quote

Reply

Tags
constructor, interfoam, openfoam 2.2.2

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



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