|
[Sponsors] |
How to read the phaseName: alpha.water from the code |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 25, 2015, 04:18 |
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 |
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 Code:
class twoPhaseMixture { protected: // Protected data word phase1Name_; word phase2Name_; volScalarField alpha1_; volScalarField alpha2_; 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 |
|
December 25, 2015, 04:42 |
|
#2 |
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 13 |
Ok sorry for boring question. I found it finally. It reads from const/thermophyPro dic.
|
|
August 23, 2018, 05:35 |
|
#3 |
Member
Yuanwei Cao
Join Date: Jun 2017
Location: Munich,Germany
Posts: 54
Rep Power: 9 |
||
|
|
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 |