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

Inconsistent declaration of hConstThermo vs janafThermo

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 18, 2008, 09:53
Default Hello everyone, I came acro
  #1
New Member
 
Dominik Christ
Join Date: Mar 2009
Posts: 28
Rep Power: 17
dominik_christ is on a distinguished road
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
dominik_christ is offline   Reply With Quote

Old   July 18, 2008, 10:13
Default 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
hjasak will become famous soon enough
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
hjasak is offline   Reply With Quote

Old   July 24, 2008, 05:22
Default Dear Dominik, Thanks for th
  #3
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
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
henry is offline   Reply With Quote

Old   July 24, 2008, 05:49
Default P.S. I don't believe the *= op
  #4
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
P.S. I don't believe the *= operator is needed as it simply calls the inherited operator from the equationOfState.

H
henry is offline   Reply With Quote

Old   October 27, 2008, 03:42
Default Dear Henry, I am using the
  #5
New Member
 
Alekh
Join Date: Mar 2009
Posts: 9
Rep Power: 17
kallipygian is on a distinguished road
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
kallipygian is offline   Reply With Quote

Old   October 27, 2008, 04:10
Default These changes are in the files
  #6
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
These changes are in the files on our git repository, you could download that and pull out the files/changes you need.

H
henry is offline   Reply With Quote

Old   October 31, 2008, 05:15
Default Dear Henry, Thanks for you
  #7
New Member
 
Alekh
Join Date: Mar 2009
Posts: 9
Rep Power: 17
kallipygian is on a distinguished road
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
kallipygian 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
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


All times are GMT -4. The time now is 03:17.