CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Operator declaration in Thermophysical library

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 12, 2009, 10:47
Default Hi, I'm just implementing r
  #1
New Member
 
Lena
Join Date: Mar 2009
Posts: 1
Rep Power: 0
lena is on a distinguished road
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
lena is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use thermophysical data lasb OpenFOAM Running, Solving & CFD 1 September 23, 2010 09:36
Problem with the thermophysical ivanyao OpenFOAM Running, Solving & CFD 1 July 14, 2009 09: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 09:12
thermophysical properties of ham Alex Ivancic Main CFD Forum 1 November 5, 1998 12:09


All times are GMT -4. The time now is 02:11.