CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

calling janaf coefficients

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

LinkBack Thread Tools Display Modes
Old   August 13, 2012, 15:51
Post calling janaf coefficients
New Member
sebastien vilfayeau
Join Date: Feb 2012
Posts: 11
Rep Power: 5
sebastien_F1 is on a distinguished road

I'm working on fireFoam, OpenFoam and I try to implement a new model. For this model, I need to have access to polynomial Janaf coefficients defined in "constant/thermo.compressibleGas".

My solution was to use a dynamic cast inside my code as follows :

const specieThermo<janafThermo<perfectGas> >& janaf_
dynamic_const<const specieThermo<janafThermo<perfectGas> >&>(thermo_)

And after to call those coefficients with member functions in janafthermo, which are lowCpcoeffs and highCpcoeff.

For example : janaf_.lowCpcoeffs()

When I compile my code, I have no errors, but when I run the code I have a bas cast error ( std::bad_cast)

I don't know how to solve this problem,. If you have any idea you're welcomed.

sebastien_F1 is offline   Reply With Quote


janaf, openfoam, polynomial, thermo

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
A way to optimize the WENO scheme by optimizing the coefficients of linear scheme moon_light Main CFD Forum 1 November 27, 2012 10:19
Calculate aerodynamic coefficients with openfoam using only opensource programs Xwang OpenFOAM 19 September 14, 2012 01:50
calling Janaf coeff sebastien_F1 OpenFOAM Running, Solving & CFD 0 August 13, 2012 15:20
Blottner Coefficients f_sizer Main CFD Forum 0 August 26, 2010 07:03
Computing aerodynamic coefficients on bidimensional sections in 3D problems Aragon FLUENT 0 July 22, 2009 04:07

All times are GMT -4. The time now is 18:49.