CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   calling janaf coefficients (http://www.cfd-online.com/Forums/openfoam-programming-development/105941-calling-janaf-coefficients.html)

sebastien_F1 August 13, 2012 15:51

calling janaf coefficients
 
Hi,

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.

thanks
sebastien


All times are GMT -4. The time now is 21:28.