|
[Sponsors] |
Access molecular weight from basicMultiComponentMixture |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 25, 2018, 19:54 |
Access molecular weight from basicMultiComponentMixture
|
#1 |
New Member
Somesh
Join Date: Mar 2013
Posts: 2
Rep Power: 0 |
Hello,
I am trying to convert an old custom library from OpenFOAM-2.3.x to OpenFOAM-4.x The library uses molecular weights of different species in calculations. Earlier in OF-2.3.x the library had routines such as: Code:
void Foam::custom::computeCustom ( ... basicMultiComponentMixture& mixture ... ) { ... mixture.W(spIndex); // spIndex is an already-defined label ... } Does anyone have any suggestion on how to access molecular weight of species from basicMultiComponentMixture? |
|
April 26, 2018, 00:39 |
|
#2 |
Senior Member
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 12 |
Can it be replaced by
Code:
this->getLocalThermo(speciei).W() |
|
April 26, 2018, 09:45 |
|
#3 |
New Member
Somesh
Join Date: Mar 2013
Posts: 2
Rep Power: 0 |
Thanks zhangyan for the quick reply.
I did not try your method, but I think I have figured it out (my C/C++ skills are rusty at best!) I used Code:
void Foam::custom::computeCustom ( ... basicMultiComponentMixture& mixture ... ) { ... const basicSpecieMixture& spMixture = dynamic_cast<const basicSpecieMixture&>(mixture); spMixture.W(spIndex); // spIndex is an already-defined label ... } |
|
Tags |
4.x, molecular weight |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to access species molecular weight in UDFs | Ellen | FLUENT | 3 | June 2, 2019 20:55 |
polymerization molecular weight distribution | Tleja | FLUENT | 0 | August 1, 2014 18:03 |
How to change molecular weight of a species in pdf-mixture | Jenny_W | FLUENT | 0 | November 3, 2012 17:49 |
Pressure and molecular weight ? | Jane | FLUENT | 0 | January 2, 2009 05:17 |
Molecular weight of the solid phase? | imburse | CFX | 3 | May 9, 2002 19:28 |