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

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

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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: 13
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: 13
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

Old   August 23, 2018, 05:35
Default
  #3
cyw
Member
 
Yuanwei Cao
Join Date: Jun 2017
Location: Munich,Germany
Posts: 54
Rep Power: 9
cyw is on a distinguished road
Quote:
Originally Posted by shipman View Post
Ok sorry for boring question. I found it finally. It reads from const/thermophyPro dic.
Hello, where did you find it? I cannot find the dict in the code.
cyw is offline   Reply With Quote

Reply


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
fortran code to read mesh HaKu Main CFD Forum 3 December 15, 2020 14:13
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
Design Integration with CFD? John C. Chien Main CFD Forum 19 May 17, 2001 16:56
What is the Better Way to Do CFD? John C. Chien Main CFD Forum 54 April 23, 2001 09:10


All times are GMT -4. The time now is 10:23.