Closed andr1976 closed 3 years ago
How did you generate this compound?
I used the compound creator wizard, but maybe this unintended for pseudo component?
yep. without entering UNIFAC structure information or Joback groups DWSIM has no way of estimating ideal gas Cp. When you use the Petroleum fraction characterization utilities, it calculates Watson K, which can be used by a Lee-Kesler correlation to estimate Cp.
Hmm, I am still far off with respect to density (DWSIM 6.3 kg/m3 vs 2.87 ) (was close before) and still off on Cp (DWSIM 1,25 vs 2.33 kJ/kg K, very strange since the Pure component Cp for ideal gas is quite close to 2.3 in DWSIM), compressibility now also off (DWSIM 0.87 vs 0.97). petrol_hypo.zip
You have some options to choose from
I know we might be comparing oranges with apples here, but the diffs are still quite significant. We use "phase behavior of pertroleum reservoir fluids" Pedersen, Christensen for calculating coefs for Cp (4).
Yeah, but Pc, Tc, omega, SG, MW is quite close, so I suspect the main diff is the method for Cp - and somehow compressibility is strange
Also the ideal gas Cp looks fine, but is significantly below in the stream tab - I wouldn't expect such a profound real gas effect on Cp
Perhaps there is something wrong in here?
I can check, but Cp_ig seems ok. Ok, I am sorry, I must be tired, I just tried setting Tc, Pc methods to Lee-Kessler and now we are getting there, density much closer and Cp also much closer. It is 20 to midnight here in Denmark, so off to bed, I will look more into this tomorrow
Ok, fresh eyes on the problem. It seems to give reasonable results now for Cp, Density and compressibility. There seems to be an error in the critical pressure when estimated by Lee-Keesler by a factor of 10
Another thing: Speed of Sound is enormous! 3436-5000 m/s depending on property methods.
Bulk modulus is the inverse of Isothermal Compressibility, which depends on the selected model.
My quick and dirty handcalc gives me approx. 200 m/s based on SQRT(Cp/Cv R T/M), back calculating with a vapor density of 2.86 kg/m3 gives me an isothermal compressibility 2 orders magnitude lower than stated in the stream tab
Maybe Dim K As Double = 1 / P0 - 1 / Z (Z1 - Z) / (P1 - P0) shall be Dim K As Double = - 1 / Z (Z1 - Z) / (P1 - P0)
is Z really Z (compressibility), or is it actually the molar volume returned from AUX_Z? the K formula is on volume, but your symbols might indicate compressibility factor?
Ahh ok, I just checked the basic definition. Also stated: For gases at low pressures, the second term is small, and the isothermal compressibility can be approximated by cg ≈ 1/p. i.e. 1/1.013e5 approx. 9e-6 1/Pa, DWSIM gives 1.37858E-08 1/Pa
Because it always calculates the second term?
You can get a report of the internals by enabling the solution inspector.
It was just to get a reality check of the estimated magnitude of the isothermal compressibility, which still seems to be off by 1.5-2 orders of magnitude compared to hand calcs. Real gas effects should be fairly minimal at the chosen conditions, so the handcalcs should be a good benchmark for a sanity check.
Try the solution inspector. It will be easier to spot the error since you have the correct values at hand.
Ok I will try
It doesn't get me any closer to finding the root cause - maybe next step will be running DWSIM from source :-) The isothermal compressibility is like a solid and not a gas
Everything looks right in the code - but my wildest guess would be that the wrong root of Z is returned actually corresponding to a liquid phase
Possibly. And you're right, the inspector report has nothing for isothermal compressibility 😅
Isothermal Compressibility is calculated analytically for PR/SRK. The error is probably in here:
If we're not able to find the error I'll switch to the general numerical method.
Methane at RT looks sane, 392 m/s, 1/K = 9.9e-6 1/Pa
calculated numerically:
That seems more like it - strange though that the analytically derived quantity isn't right. Just tried Octane at I get 4328 m/s at 200 C and ambient. Maybe the number for methane was on the low side also (i find a tabulated value of 446 m/s at RT) - so the suspicion might be that something is off in the analytical expression - i might look more into this another day.
Now for the J-T coefficient.... ahh just kidding, that will be another day :-)
I'll use numerical derivatives for now. It doesn't seem to be that much slower.
I wonder why there's no difference in the analytical expressions for PR and SRK? I found this in a thesis for the Joule-Thomson, but 1/(dV/dP) is also defined
I am closing this for now, since we now get expected values. The above can be used for inspiration, when revoking the analytical method for isothermal compressibility/J-T coefficient. I have made a separate case for the Lee-Kessler Method for Pc
I have tried to look a little more into the isothermal compressibility. I tried implemeting the above and also reinstanted the analytical methods in the MichelsenBase.vb both seems to give around the same as the numerical method. Hmm, which I think is a little strange given that I previously got much too high values with the analytical method.
I suspect something might be off with the estimation of polynomial coefficients for the calculation of heat capacity/temperature dependant properties.
I have tried adding a hypothetical component with NBP, MW, Pc, Tc, Zc and omega. I get significantly lower mass specific heat capacity 0.27 KJ/kg K vs 2.32 kJ/kg K also the Cp/Cv values seems high 1.45 vs 1.04 from other simulator/thermpackage.
P = 1 atm T = 200 C
The hypo is C7 like fraction.
MW = 108.47 Tc = 302.45 C Pc = 2789.28 kPa Accentric= 0.3265 Vc = 0.4470 m3/kmole
No group contribution methods selected
hypo1.zip