How to calculate Cp (Heat Capacity at Constant Pressure) ?
Hi foamers,
I'm trying to improve a new solver in OpenFOAM, but I have some problems. I need to calculate Cp (Heat Capacity at Constant Pressure), and I must add it in the standard solver "rhoPorousSimpleFoam". I tried to add a line in "createFields.H", but it doesn't work. Quote:
Or can I load properties of air by an external file? |
What does the error say? Is it a compiler error or a runtime error? You will probably find the mistake is in the type you have given for the variable Cp. Check it against the return type of Cp in basicThermo.
|
Hi Laurence, thanks for your reply.
So, I will explain you what is my problem. I want to create a new solutor, and I need for my calculations some variables: - enthalpy - pressure - heat costant Cp - rho But whenever h, p and rho are already gived, I must find the way to calculate Cp. My "createFields.H" file start with these lines: Quote:
Quote:
Quote:
How can I move to correct it? PS: if I check in "basicPsiThermo" file, I find this Quote:
Thanks in advance! |
In short: Change 'volScalarField& Cp = thermo.Cp()' to 'volScalarField Cp = thermo.Cp();'
|
Hi foamers,
Why does cp(p,T) function return zero for ideal gas? How can I calculate it for other equation of states? Thanks |
Cp=Cp.Janaf+Cp.EOS
Quote:
|
All times are GMT -4. The time now is 15:07. |