|
[Sponsors] |
Inconsistent declaration of hConstThermo vs janafThermo |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 18, 2008, 09:53 |
Hello everyone,
I came acro
|
#1 |
New Member
Dominik Christ
Join Date: Mar 2009
Posts: 28
Rep Power: 17 |
Hello everyone,
I came across this inconsistency when trying to run a new combination of thermophysicalProperties: makeCombustionThermo ( hCombustionThermo, hMixtureThermo, multiComponentMixture, constTransport, hConstThermo, perfectGas ); The problem is that multiComponentMixture::cellMixture() does not calculate the mixture value but only takes the value of the first species. (I posted a detailed description here: http://www.cfd-online.com/cgi-bin/Op...4276#POST24276 ) The reason seem to be different declarations in hConstThermo.H and janafThermo.H. In janafThermo.H the operators += , -= and *= are defined, in hConstThermo they're not. The cell mixture is calculated in multiComponentMixture.C from: mixture_ += Y_[n][celli]/speciesData_[n].W()*speciesData_[n]; Changing this to: mixture_ = mixture_ + Y_[n][celli]/speciesData_[n].W()*speciesData_[n]; solves the error. You have to do the same in patchFaceMixture. Though this solves the problem, it is actually only a workaround for multiComponentMixture. I think the right solution would be to implement += , -= and *= in hConstThermo as well. All this now seems quite straightforward but it actually took me well over a month to figure out. Thanks to Tommaso Lucchini for his help that guided me into the right direction!! Regards, Dominik
__________________
__________________ Dominik Christ Providing commercial foam-extend/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
July 18, 2008, 10:13 |
Tommaso, can you have a go at
|
#2 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
Tommaso, can you have a go at this - should not be a problem...
Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
July 24, 2008, 05:22 |
Dear Dominik,
Thanks for th
|
#3 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
Dear Dominik,
Thanks for the detailed bug report. I have now added the missing operators to hConstThermo and eConstThermo and these changes will be included in a patched-release of 1.5 as soon as we have sorted out all the other major issues being reported. H |
|
July 24, 2008, 05:49 |
P.S. I don't believe the *= op
|
#4 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
P.S. I don't believe the *= operator is needed as it simply calls the inherited operator from the equationOfState.
H |
|
October 27, 2008, 03:42 |
Dear Henry,
I am using the
|
#5 |
New Member
Alekh
Join Date: Mar 2009
Posts: 9
Rep Power: 17 |
Dear Henry,
I am using the similar declaration from hCombusionThermo (refer the first post from Dominik) for calculating mixture properties and didn't realize that there might a problem in reading the values. I am using OpenFOAM-1.4 Can you please enlist the missing operators in hConstThermo and eConstThermo? Regards |
|
October 27, 2008, 04:10 |
These changes are in the files
|
#6 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
These changes are in the files on our git repository, you could download that and pull out the files/changes you need.
H |
|
October 31, 2008, 05:15 |
Dear Henry,
Thanks for you
|
#7 |
New Member
Alekh
Join Date: Mar 2009
Posts: 9
Rep Power: 17 |
Dear Henry,
Thanks for your reply. I downloaded the files from the git repo. But, there are no documents which mentions the specific changes in the library. I had been working with 1.4.1 and am a bit reluctant to try 1.5 now. I wish somehow you can help me modify the library. Regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
XiFoam janafthermo error AT | tavasoly | OpenFOAM Running, Solving & CFD | 1 | July 1, 2008 12:15 |
Array declaration | kdarc | OpenFOAM Running, Solving & CFD | 0 | August 24, 2007 00:21 |
FORTRAN variable declaration | sriram | Main CFD Forum | 3 | October 22, 2005 07:08 |
variable declaration | zheh | Phoenics | 0 | September 7, 2001 23:58 |
Boundary declaration | Tadiwos | CFX | 4 | August 22, 2001 10:12 |