-
Notifications
You must be signed in to change notification settings - Fork 47
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
Unify all Single Empiric Helmoltz models under one struct #148
Conversation
@ianhbell , about the coolprop files, what do you recommend? |
I would recommend that you import CoolProp via Python, and then get the JSON data for a fluid from the Python interface. There is also this Julia package: https://github.com/CoolProp/CoolProp.jl but I don't think it is feature complete to expose the necessary function ( |
The julia library uses the shared library, so some direct access can be done:
edit: the function |
At the moment, we have IAPWS95, PropaneRef, Thol's LJ (LJRef), and now Ammonia 2023. of course, all those models are specific instances of a Multiparameter single fluid. this PR:
EmpiricSingleFluid
, instead of each respective structEmpiricSingleFluid
models. the parser can be called viaSingleFluid(component::String; userlocations =String[])
Parsing all the current files in CoolProp, those are the available terms format:
Ideal models:
IdealGasHelmholtzLead
doneIdealGasHelmholtzLogTau
doneIdealGasHelmholtzPlanckEinstein
done, it is transformed to generalized einsteinIdealGasHelmholtzEnthalpyEntropyOffset
done, same as LeadIdealGasHelmholtzPower
doneIdealGasHelmholtzPlanckEinsteinGeneralized
doneIdealGasHelmholtzCP0PolyT
done, transformed to a combination of lead, logtau and power termsIdealGasHelmholtzCP0AlyLee
#not done, only n-Heptane and D6 have it, only 5 termsIdealGasHelmholtzCP0Constant
done, transformed to a combination of lead and logtau termsresidual models:
ResidualHelmholtzPower
doneResidualHelmholtzGaussian
doneResidualHelmholtzGaoB
doneResidualHelmholtzNonAnalytic
done, only water have it, maybe optimize the heck out of it?ResidualHelmholtzExponential
doneResidualHelmholtzAssociating
doneResidualHelmholtzLemmon2005
not done, only R125 have it.the ancilliaries are handled by our
CompositeModel
infraestructure, so if models are missing, it is just a matter of adding those. at the moment we only use the saturation pressure, vapour density and liquid density ancilliaries.Ideal models are of the type
IdealEmpiricSingleFluid
. they are generated from the fields ofEmpiricSingleFluid
with no cost.Another thing is bothering me is the coolprop files, i don't know if do we want (or can) ship those or get those from a predetermined location. ideally, i would like to use something an already existent instalation of CoolProp and get Clapeyron to automatically recognize said location. we can use our current database shortcut format to store:
solves #110, #111