Define a Gas with gas constant, temperature, pressure and molar mass?

64 views
Skip to first unread message

Dennis Straub

unread,
Aug 29, 2024, 4:23:47 PM8/29/24
to coolprop-users
Hello,

if I have the gas constant, the temperature, the pressure and the molar mass is it possible to get properties like density with PropsSI? I can't figure out how I can do this request.

Thanks for your help!

Ian Bell

unread,
Aug 29, 2024, 4:26:20 PM8/29/24
to coolpro...@googlegroups.com

Only if you want to use the ideal gas law.  Otherwise you need an equation of state


--
You received this message because you are subscribed to the Google Groups "coolprop-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coolprop-users/aa68f8ca-8ef7-4aec-b6ee-458fe4cbff97n%40googlegroups.com.

Dennis Straub

unread,
Aug 29, 2024, 4:33:03 PM8/29/24
to coolprop-users
Okay the ideal gas law would be fine.

Can you tell me how to write this PropsSI-Request?
This for example:
``PropsSI('D','GAS_CONSTANT',208, 'MOLMASS', 39, 'T', 293)``
won't work:
    x = PropsSI('D','GAS_CONSTANT',208, 'MOLMASS', 39, 'T', 293)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "CoolProp/CoolProp.pyx", line 384, in CoolProp.CoolProp.PropsSI
  File "CoolProp/CoolProp.pyx", line 468, in CoolProp.CoolProp.PropsSI
ValueError: input #7 cannot be provided

Ian Bell

unread,
Aug 29, 2024, 4:43:10 PM8/29/24
to coolpro...@googlegroups.com
No CoolProp is needed here. p=rho*R*T, so rho=p/(T*R)

Dennis Straub

unread,
Aug 29, 2024, 5:31:57 PM8/29/24
to coolprop-users
I think I made something wrong. Is it possible that you get privat messages from me? I wanted to answer here, may you can copy them and answer here, please?

Ian Bell

unread,
Aug 29, 2024, 7:04:17 PM8/29/24
to coolpro...@googlegroups.com
It seems fine, the response went to the mailing list

Dennis Straub

unread,
Aug 30, 2024, 1:50:04 AM8/30/24
to coolprop-users
Okay.
I know that I could write code to calcualte my gas properties with the gasconstant and so one, but I asked for using CoolProp because I already use CoolProp for standard gases in my Project and it would be nice if I could use CoopProp for this part, too. Otherwise I have double functions in my project, one get for example density from CoolProp and one by calculation from my own. So it's no problem, but not so nice.

Thanks for your help!

Dennis Straub

unread,
Aug 30, 2024, 5:34:30 PM8/30/24
to coolprop-users

It isn't that easy as I thought, because I need to calculate the viscosity of the gas and I can't find any information how to do this.

Maybe you can help me again?

Fausto A. A. Barbuto

unread,
Sep 2, 2024, 1:05:19 PM9/2/24
to coolprop-users

Hi, D. Straub,

To the best of my quite superficial knowledge, PropsSI cannot do that for you. It works with a list of predefined pure substances or mixtures or user-defined mixtures. But still you got me curious: what is a GAS_CONSTANT and, in your example, why was it set to 208 (units?)?

I believe you might define your gas as a .mix file and use it with PropsSI, but I have no idea on how to do that and the amount of work required to put such a file together. Just a thought.

F.


Dennis Straub

unread,
Sep 2, 2024, 3:18:22 PM9/2/24
to coolprop-users
Hi,

I mean the specific gas constant. In my example this was the constant of Argon, see: https://de.wikipedia.org/wiki/Gaskonstante#cite_note-3

Thank you
Reply all
Reply to author
Forward
0 new messages