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

IsFluidType function #552

Closed
abahman opened this issue Mar 23, 2015 · 7 comments
Closed

IsFluidType function #552

abahman opened this issue Mar 23, 2015 · 7 comments
Milestone

Comments

@abahman
Copy link

abahman commented Mar 23, 2015

Hi,

I'm working on ACHP model with CoolProp 5.x, and IsFluidType function is intensively used in the model. If there is no alternative, could you please re-implement the function ?

Thank you

@abahman
Copy link
Author

abahman commented Mar 24, 2015

Hi,

I guess it can be done without re-implementing IsFluidType. Correct me if I'm wrong.
Since the backend "INCOMP" is mostly for Brine and mixture fluids, I can replace the current If statement (if IsFluidType(Ref,'Brine')==:) in ACHP model with (if 'INCOMP' in Ref:).
Can that works ?

@ibell
Copy link
Contributor

ibell commented Mar 24, 2015

Yes, but it doesn't separate pure and pseudo-pure fluids

On Mon, Mar 23, 2015 at 10:39 PM, Ammar Bahman notifications@github.com
wrote:

Hi,

I guess it can be done without re-implementing IsFluidType. Correct me if
I'm wrong.
Since the backend "INCOMP" is mostly for Brine and mixture fluids, I can
replace the current If statement (if IsFluidType(Ref,'Brine')==:) in ACHP
model with (if 'INCOMP' in Ref:).
Can that works ?


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

@ibell ibell modified the milestone: v 5.1 Mar 27, 2015
@ibell
Copy link
Contributor

ibell commented Mar 27, 2015

@abahman
Copy link
Author

abahman commented Mar 27, 2015

It has the same style as before. Thank you

@ibell
Copy link
Contributor

ibell commented Mar 27, 2015

That, in fact, is the old code :)

On Fri, Mar 27, 2015 at 12:38 AM, Ammar Bahman notifications@github.com
wrote:

It has the same style as before. Thank you


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

@ibell
Copy link
Contributor

ibell commented Mar 28, 2015

Ok, new idea. I think it makes more sense to implement the function in ACHP, so what I propose is that I add an output to get_fluid_param_string that returns "true" if it is a pure fluid, or "false" if it is a pseudo-pure fluid. Now that you pretty much have to provide the backend in v5, that simplifies determination of the fluid type.

@ibell ibell closed this as completed in 811e656 Mar 28, 2015
@ibell
Copy link
Contributor

ibell commented Mar 28, 2015

Ok, now that you can differentiate between pure and pseudo-pure fluids with the HEOS backend, I think you have all you need to re-implement the functionality of IsFluidType in ACHP. In the end, I like this solution better than writing a hacky fix in CoolProp.

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

2 participants