-
Notifications
You must be signed in to change notification settings - Fork 52
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
Can you add example for gas-polymer system using SL eos? #139
Comments
hi!, yes, we could add one. some particularities on the current SL implementation:
with that in mind, now we can go to a concrete example: First, we need some parameters. for PS we can obtain some data from here (DOI: 10.1039/c8sm00794b) (note that they dont use the Neau formulation, so i would expect inaccurate results): so, for CO2 (SI units): (P⋆,T⋆,ρ⋆) = (419.9e6,341.8,1.397e3) so, we need in this particular implementation, the molecular weights. for CO2, Mw = 44.009 (g/mol). for PS, it depends, but we can suppose 20000 (g/mol) ? (we can also suppose the segment diameter and obtain the molecular weight from there) using this utility function: function sl_transform(P,T,rho, Mw)
R = Clapeyron.R̄ #gas constant
v0 = R*T/P
epsilon = R*T
m = (0.001*Mw)/(rho*v0) #Mw in g/mol
return epsilon,v0,m
end we obtain that (epsilon,vol,segment) for those two is: CO2 (epsilon,vol,segment): (2841.8833228847775, 6.768000292652483e-6, 4.654625296462685) with the data, we can build our model. let's ignore the unlike values (kij, lij) for now. we put this data in a CSV (we can just pass a string and Clapeyron will recognize it as a CSV if it starts with the correct text): species_data = """Clapeyron Database File
SL example parameters [csvtype = like]
species,epsilon,vol,segment,Mw
CO2,2841.8833228847775, 6.768000292652483e-6, 4.654625296462685,44.009
PS20000,5718.687388765798, 1.355781742239402e-5, 1319.4666294134743,20000
"""
model = Clapeyron.SL(["CO2","PS20000"],userlocations = [species_data]) that should result in: julia> model = Clapeyron.SL(["CO2","PS20000"],userlocations = [species_data])
SanchezLacombe{SLk0k1lMixingRule, BasicIdeal} with 2 components:
"CO2"
"PS20000"
Contains parameters: Mw, segment, epsilon, vol |
Sanchez Lacombe eos for like Polystyrene and CO2 system.
The text was updated successfully, but these errors were encountered: