CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

How to read the phaseName: alpha.water from the code

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 25, 2015, 04:18
Default How to read the phaseName: alpha.water from the code
  #1
Senior Member
 
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 5
shipman is on a distinguished road
Dear All,

Maybe it is a bit boring question but I just wondered that how the code read the alpha1 phaseName as alpha.water in the compressibleInterFoam solver?

When I looked at the code, I could not see anywhere alpha1 phaseName assigned as alpha.water.

First I looked at createFields where alpha1 is seen:

Code:
Info<< "Constructing twoPhaseMixtureThermo\n" << endl;
twoPhaseMixtureThermo mixture(mesh); 

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

then looked at twoPhaseMixtureThermo.H which in inherited twoPhaseMixute:

Code:
class twoPhaseMixtureThermo
:
    public psiThermo,
    public twoPhaseMixture
When I checked the twoPhaseMixture.H file:

Code:
class twoPhaseMixture
{
protected:

    // Protected data

        word phase1Name_;
        word phase2Name_;

        volScalarField alpha1_;
        volScalarField alpha2_;
Finally Phase names are defined in twoPhaseMixture.C file as follows:

Code:
 phase1Name_(wordList(dict.lookup("phases"))[0]),
    phase2Name_(wordList(dict.lookup("phases"))[1]),

    alpha1_
    (
        IOobject
        (
            IOobject::groupName("alpha", phase1Name_),
            mesh.time().timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        mesh
    ),

    alpha2_
    (
        IOobject
        (
            IOobject::groupName("alpha", phase2Name_),
            mesh.time().timeName(),
            mesh
        ),
        1.0 - alpha1_
    )

So, my question is how the alpha.water is assigned to name of alpha1?

I may overlook something.

Thank you
shipman is offline   Reply With Quote

Old   December 25, 2015, 04:42
Default
  #2
Senior Member
 
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 5
shipman is on a distinguished road
Ok sorry for boring question. I found it finally. It reads from const/thermophyPro dic.
shipman is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any one send me a 2D FVM code that is easy to read? gchnhn Main CFD Forum 9 December 25, 2015 04:29
How to setup a simple OpenFOAM cluster? TommiPLaiho OpenFOAM Installation 3 October 27, 2013 16:15
fortran code to read mesh HaKu Main CFD Forum 1 June 9, 2011 17:29
Design Integration with CFD? John C. Chien Main CFD Forum 19 May 17, 2001 15:56
What is the Better Way to Do CFD? John C. Chien Main CFD Forum 54 April 23, 2001 08:10


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