Replies: 9 comments
-
|
Hm... If I add ideal gas: mod_H2O_ig = BasicIdeal(["water"])
mod_H2_ig = BasicIdeal(["hydrogen"])
mod_O2_ig = BasicIdeal(["oxygen"])the result is: julia> G_o(50+273.15,Ht_oo_H2,St_oo_H2,ctp_H2), gibbs_energy(mod_H2_ig,p_o,50+273.15,1), gibbs_energy(mod_H2_pr,p_o,50+273.15,1)
(-42362.23012868961, -13569.40800266611, -13568.639305566825)
julia> G_o(50+273.15,Ht_oo_O2,St_oo_O2,ctp_O2), gibbs_energy(mod_O2_ig,p_o,50+273.15,1), gibbs_energy(mod_O2_pr,p_o,50+273.15,1)
(-66275.33012868962, -13569.40800266611, -13571.171789817974)
julia> G_o(50+273.15,Ht_oo_H2O_g,St_oo_H2O_g,ctp_H2O_g), gibbs_energy(mod_H2O_ig,p_o,50+273.15,1), gibbs_energy(mod_H2O_pr,p_o,50+273.15,1)
(-303110.0301508775, -13569.40800266611, -19505.96059134758)NOTE:
Questions:
|
Beta Was this translation helpful? Give feedback.
-
|
Hello, We are slowly getting there on terms of reactive equilibria. but first, let's talk about reference states, mainly to get this written somewhere. Entropies, Enthalpies, Gibbs energies, Internal Energies and Helmholtz energies are defined in relation to an equation of state and a reference state, that is: If we work in a helmholtz or gibbs base, and after a little bit of math, we can express the functional form of On multicomponent equations of state: On a lot of thermodynamic properties, reference states are not used. that is because most algorithms are expressed as a difference between two states, and in equilibria, the temperature is the same, so the reference state terms cancel each other. I'm intentionally omitting the fact that If we have any equation of state and a pair of If we only care about normal equilibria, in pressure-temperature or pressure-volume specifications, then reference states are not used. However, we need We created a model that follows the Standard Temperature and Pressure conditions (h = s = 0 at 1 bar, 0 °C fluid of the most stable phase): julia> entropy(model,1e5,273.15,[1.0,0.0])
-0.0
julia> enthalpy(model,1e5,273.15,[1.0,0.0])
-4.980904577678296e-13
julia> enthalpy(model,1e5,273.15,[0.5,0.5]) #deviation from ideal behaviour
204.3629321343185If you create an On the technical implementation, the reference state struct is normally stored as a parameter of the ideal model: julia> id_model = model.idealmodel
ReidIdeal with 2 components:
"isopentane"
"toluene"
Contains parameters: a, b, c, d, e, coeffs, reference_state, Mw
Reference state: stp
julia> id_model.params.reference_state
ReferenceState(:stp) with 2 components:
"isopentane" => 29230.6 - 136.942*T
"toluene" => 42049.7 - 153.594*TSo, we have almost all the pieces to add support for setting formation entropies and enthalpies as reference states. What is missing is:
I haven't had the time to implement those last steps. any help in that regard is appreciated. a good api would probably be along the lines of: Now, as a design decision, if an ideal model is not selected, it defaults to With no parameters, each instance of That should explain the equality of gibbs free energies that you observed. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
for the gibbs energy, you can use the relation What you said about heat capacities is correct, for On the reference state, the CRC handbook states:
So, |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Hm. A little bit more of testing of using Clapeyron
mod_H2O_igref = ReidIdeal(["water"], reference_state=:stp)
mod_H2_igref = ReidIdeal(["hydrogen"], reference_state=:stp)
mod_O2_igref = ReidIdeal(["oxygen"], reference_state=:stp)When I do: mod_H2O_igref.params.reference_stateetc., I get: # "water" => 831.289 - 41.9727*T
# "hydrogen" => 713.122 - 41.5586*T
# "oxygen" => 728.643 - 41.613*TQuestion:
The reference values extracted above are very different from what I find in Aylward and Findlay: Ht_oo_H2 = 0 # J/mol
Ht_oo_O2 = 0 # J/mol
Ht_oo_H2O_g = -242e3 # J/mol
Ht_oo_H2O_L = -286e3 # J/mol
St_oo_H2 = 131 # J/K mol
St_oo_O2 = 205 # J/K mol
St_oo_H2O_g = 189 # J/K molQuestion: |
Beta Was this translation helpful? Give feedback.
-
|
The default values depend on the implementation, but we use the CoolProp reference states (plus some others). Here is the list from the
We took those reference states from what CoolProp uses: https://coolprop.org/coolprop/HighLevelAPI.html#reference-states . In addition to those predefined states, we support passing directly the values of p0,T0,H0,S0 to the reference state constructor. For example On the values from ReidIdeal, by default, we use the coefficients from Poling, Bruce E. The Properties of Gases and Liquids, 5th edition, if i remember correctly. The coefficients in You can provide your own values of a,b,c,d,d,e in the following way (as shown in the idealmodel = ReidIdeal(["water","butane"];
userlocations = (a = [32.24, 9.487],
b = [0.00192, 0.3313],
c = [1.06e-5, -0.0001108],
d = [-3.6e-9, -2.822e-9],
e = [0.0, 0.0])
)On the gibbs energy of the reid ideal model, It seems like the reference state is the problem, (you can check the slopes of |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
On the ReidIdeal model. our current implementation does have some constant terms (there is an integration from a temperature T0 = 298 to T). The constants printed by the Take for example the IAPWS95 EoS. their reference state is the triple point, but we can "translate" the reference state to s.t.p. conditions if we add a pair of constants The error provided vector is genuine, but i believe it is fixed in the last release. I also added what could be seen as a start of the support for ideal gas formation reference states: julia> ref = Clapeyron.IGFormReferenceState(["water"])
ReferenceState(:ideal_gas) (not set)
julia> model = ReidIdeal(["water"],reference_state = ref)
ReidIdeal with 1 component:
"water"
Contains parameters: a, b, c, d, e, coeffs, reference_state, Mw
Reference state: ideal_gas
julia> enthalpy(model,1e5,298.15)
-241800.0
julia> entropy(model,1e5,298.15)
188.8
julia> model.params.reference_state.H0
1-element Vector{Float64}:
-241800.0
julia> model.params.reference_state.S0
1-element Vector{Float64}:
188.8
julia> model.params.reference_state
ReferenceState(:ideal_gas) with 1 component:
"water" => -241805.0 - 227.843*Tnote that, while, at 1 bar, 298.15 K, the values of entropy and enthalpy evaluated by the EoS correspond to the formation values, the constants I'm starting to think that displaying |
Beta Was this translation helpful? Give feedback.










Uh oh!
There was an error while loading. Please reload this page.
-
I'm considering electrolysis of water into hydrogen and oxygen. As part of the study, I need Gibbs molar energy for each of these substances. I have implemented an ideal gas model assuming constant heat capacities, which is given as:
Here, decoration$T^\circ$ .
~means "molar". Superscriptoin energies/entropy is "standard state", and subscriptoin energies/entropy is "at reference temperature"Standard state enthalpy at reference temperature = enthalpy of formation. I find enthalpy of formation + standard state/reference temperature entropy + heat capacities in Aylward and Findley (2002): SI Chemical Data, 5th edition.
Problem: My ideal gas expression gives wildly different results than Clapeyron (using PR). As an example, for Hydrogen:
I'm relatively sure that my ideal gas model is ok.
Question: Why this extreme discrepancy?
Julia code:
Beta Was this translation helpful? Give feedback.
All reactions