|
[Sponsors] |
Operator declaration in Thermophysical library |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 12, 2009, 10:47 |
Hi,
I'm just implementing r
|
#1 |
New Member
Lena
Join Date: Mar 2009
Posts: 1
Rep Power: 0 |
Hi,
I'm just implementing real gas thermodynamics into the reactingFoam solver and I have some problems with the operator declaration in janafThermoI.H and janafThermo.H. Up to now I made the following modifications: I changed the standard Chemkin format of therm.inp to make it able to read the critical properties in addition to the standard values form the prescribed file. Form those data I calculated two coefficients needed to get a 'real' density. One of those coefficients is temperature dependent, therefore I gave the memberfunction cellMixture in multiComponentMixture.C the temperature as an additional parameter and gernerated a new operator, which should calculate this second coefficient form the temperature. Unfortunately I didn't succeed in running this properly. What I did is to copy the operator* like it is implemented in the standard version template<class> inline janafThermo<equationofstate> operator* ( const scalar s, const janafThermo<equationofstate>& jt ) { return janafThermo<equationofstate> ( s*static_cast<const>(jt), jt.Tlow_, jt.Thigh_, jt.Tcommon_, jt.Tc_, jt.pc_, jt.omega_, jt.bPR_, jt.a0PR_, jt.kappaPR_, jt.highCpCoeffs_, jt.lowCpCoeffs_ ); } and defined an operator% which lookes a very similar. I added this operator in everyfile, where the operator* is also mentioned. template<class> inline janafThermo<equationofstate> operator% ( const scalar T, const janafThermo<equationofstate>& jt ) { return janafThermo<equationofstate> ( static_cast<const>(jt), jt.Tlow_, jt.Thigh_, jt.Tcommon_, jt.Tc_, jt.pc_, jt.omega_, jt.bPR_, jt.a0PR_*T, jt.kappaPR_, jt.highCpCoeffs_, jt.lowCpCoeffs_ ); } Compiling of the specie library is no problem, and I also can call this new operator in multicomponent mixture by, for example mixture_ = T%speciesData[0]; without getting an error, but it doesn't do anything!!! Is it possible that it is simply not allowed to redefine the % operator??? Is there any operator I could use instead? Thanks a lot in advance!!! Best regards, Lena |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to use thermophysical data | lasb | OpenFOAM Running, Solving & CFD | 1 | September 23, 2010 10:36 |
Problem with the thermophysical | ivanyao | OpenFOAM Running, Solving & CFD | 1 | July 14, 2009 10:45 |
Thermophysical properties in a cylinder | guilherme | OpenFOAM Running, Solving & CFD | 1 | December 3, 2006 09:37 |
Boundary declaration | Tadiwos | CFX | 4 | August 22, 2001 10:12 |
thermophysical properties of ham | Alex Ivancic | Main CFD Forum | 1 | November 5, 1998 12:09 |