Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compressibility factor for humid air #503

Closed
TimHarvey2 opened this issue Feb 26, 2015 · 7 comments
Closed

Add compressibility factor for humid air #503

TimHarvey2 opened this issue Feb 26, 2015 · 7 comments
Milestone

Comments

@TimHarvey2
Copy link

1.The HAPropsSI viscosity Routine is using the viscosity of pure water rather than water vapor in calculation. I assume incorporating IF97 for water may solve this Ref P.T. Tsilingiris text and formular in this link "http://www.wiley.com/legacy/wileychi/morvayindustrial/supp/toolbox6.pdf"
I god good correlation with ASHREA LibHuAirProp and REFPROP using the First Viscosity of water part of equation 10 i..e.. equation 11 in "Release on the IAPWS Formulation 2008 for the Viscosity of Ordinary Water Substance" not sure how correct this is but it seems to work in Tsilingiris formular.

  1. I am not sure ic HAPropsSI calculation of Cp is correct. I he good correlation with ASHREA LibHuAirProp and REFPROP when I use C but when I use Cha the value is higher the other two are calculating Specific heat capacity of humid air in kJ/(kg K May be I am not understanding something but all othre Functions I tested worked well.
  2. Wishlist
    It would be good to have Isentropic Exponent in HAPropsSI to using in Differential pressure flow calculations. (I think that requires the addition of Cv and Speed of sound as well). Also density and Compressibility as functions would be helpful although they are easily calculated for Specific Volume and from Real and Idea gas densities.
@jowr
Copy link
Member

jowr commented Feb 26, 2015

Is this related to #498 ?

@ibell
Copy link
Contributor

ibell commented Feb 26, 2015

W.R.T. point 1, C is J/kg_{da}/K while Cha is J/kg_{ha}/K, so they differ by a factor of (1+W), and (1+W) has units of kg_ha/kg_da, which is why C should agree with the other sources, while Cha should not. They others use J/kg_da/K though it is quite poorly documented.

W.R.T. wishlist, I'm not sure how easy this would be to implement. I calculate Cp using a finite difference in enthalpy, and its not as straightforward to calculate cv for a virial expansion, or through numerical derivatives. I can think about this a bit. Density can be obtained using the parameter 'V' which is the volume in m^3/kg_da or 'Vha' which is the volume in m^3/kg_ha. When you say compressibility, do you mean Z, the compressibility factor, or the isothermal compressibility?

@TimHarvey2
Copy link
Author

Thanks for the reply I Did not Read #498 before I sent this.
as regard to Cp I will need to read more, but using Refprop with moist air mix I can calculate Cp from small differences in H divided by temperature difference and get the right Cp I would not have thought refprop would have reported H in J/kg_(da) from a moist air mix.therefore I assume Cp was in J/kg_(ha)-K.
I tried a calculation of Cv from internal energy (but it did not work when I tried it from Refprop results). I guess I assumed you have all the required derivatives available in coolprop to use the methods documented in ASHRAE RP1485 and "Determination of Thermodynamic and Transport Properties for Humid Air for Power-Cycle Calculations. PTB-Verlag, Braunschweig (2009)".

I was after a direct function for Z rather than calculate it from Dividing in Ideal gas density by Real gas density which seems to give correct value.

@TimHarvey2 TimHarvey2 reopened this Feb 27, 2015
@ibell ibell added this to the v5.0.8 milestone Feb 28, 2015
@ibell
Copy link
Contributor

ibell commented Feb 28, 2015

Can you provide the code you used to call REFPROP? I too am surprised to find that you get the same c_p between REFPROP and CoolProp. If you look at the code of CoolProp, you find that we also calculate the c_p using numerical derivatives.

@ibell
Copy link
Contributor

ibell commented Mar 1, 2015

Hmm, I'm not sure how easy c_v would be. Internal energy isn't too difficult, its just u = h-pv, but taking the derivative of u w.r.t. T with v held constant is not as trivial as you might think. Pressure is not constant, so I'd have to think a little bit about this. Please open a separate issue for this and add it to the wishlist. It ought to be relatively straightforward, just requires a good amount of work.

I will add a function to get Z directly, its actually nothing more than Z = p_HAPropsSI("Vha","P",p,"R",R,"T",T)/(R_T), but it saves you having to do the calculation yourself

@ibell ibell changed the title HAPropsSI Viscosity + Add compressibility factor for humid air Mar 1, 2015
@ibell ibell closed this as completed in c3026be Mar 1, 2015
@TimHarvey2
Copy link
Author

Thanks for this. I will resubmit wish list as suggested. as to code for Cp I will email mail you the spreadsheet I did calculations with in a couple of days (I have another deadline first) I used Refprop directly not through coolprop. I will make three sheets one with what I did , the second with results range valued and the third with formulas as text so you can follow. Even if you have Reprop, Coolprop and ASHRAE LibHuAirProp functions loaded in excel, I doubt if spreadsheet would work without editing some of the paths in some of functions. If you would prefer just a description I could do that instead.

@ibell
Copy link
Contributor

ibell commented Mar 1, 2015

A list of inputs and outputs would probably do the trick, I agree that
getting all the bits and bobs working together in the spreadsheet might be
a bit tricky

On Sat, Feb 28, 2015 at 9:32 PM, TimHarvey2 notifications@github.com
wrote:

Thanks for this. I will resubmit wish list as suggested. as to code for Cp
I will email mail you the spreadsheet I did calculations with in a couple
of days (I have another deadline first) I used Refprop directly not through
coolprop. I will make three sheets one with what I did , the second with
results range valued and the third with formulas as text so you can follow.
Even if you have Reprop, Coolprop and ASHRAE LibHuAirProp functions loaded
in excel, I doubt if spreadsheet would work without editing some of the
paths in some of functions. If you would prefer just a description I could
do that instead.


Reply to this email directly or view it on GitHub
#503 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants