|
[Sponsors] | |||||
Inconsistent declaration of hConstThermo vs janafThermo |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
New Member
Dominik Christ
Join Date: Mar 2009
Posts: 28
Rep Power: 18 ![]() |
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 |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,908
Rep Power: 34 ![]() |
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 |
|
|
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 23 ![]() |
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 |
|
|
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 23 ![]() |
P.S. I don't believe the *= operator is needed as it simply calls the inherited operator from the equationOfState.
H |
|
|
|
|
|
|
|
|
#5 |
|
New Member
Alekh
Join Date: Mar 2009
Posts: 9
Rep Power: 18 ![]() |
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 |
|
|
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 23 ![]() |
These changes are in the files on our git repository, you could download that and pull out the files/changes you need.
H |
|
|
|
|
|
|
|
|
#7 |
|
New Member
Alekh
Join Date: Mar 2009
Posts: 9
Rep Power: 18 ![]() |
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 |
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
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 |