Closed yalinli2 closed 1 year ago
Then in the setting the model parameters, you used the conversion factor V_ng
:
https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/71e39de4b1d5792654cf31ab9042a652d4337c7e/biorefineries/oilcane/__init__.py#L654
which I think is about 1.525 m3/kg for CH4, in setting the price: https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/71e39de4b1d5792654cf31ab9042a652d4337c7e/biorefineries/oilcane/__init__.py#L734
you used the $/m3 price divided by V_ng
to get to the $/kg price, but I think you should multiply by V_ng
(e.g., if 1 kg has more than 1 m3 natural gas, the price per kg should be higher than the price per m3)
let me know if I misinterpreted any of your calculations, it's really confusing since they are all in different units... Thanks!
Oh btw, this might explain the differences in natural gas price I observed in different biorefineries, e.g., for cornstover:
>>> from biorefineries import cornstover as cs
>>> cs.load()
>>> cs.BT.natural_gas_price
0.218
but for oilcane it's much lower:
>>> from biorefineries import oilcane as oc
>>> oc.load('O1')
>>> oc.BT.natural_gas_price
0.08356757357116563
I initially thought this because the changes in natural gas price (is 0.218 from Humbird?), but if the price has been increasing in recent years, then the oilcane number should be higher? Thanks!
Hi Yalin, thanks so much for finding this issue and going over it in detail here. You're absolutely right, the natural gas prices (to go from USD per 1000 ft3 to USD per m3) should be multiplied (not divided) by 35.3147 (ft3/m3) and should also be divided by 1000. To get prices to USD per kg, they should be multiplied (not divided) by 1.525 m3/kg. As you noted this gives a value more in line with the natural gas price in BioSTEAM (which is originally from Warren Sieder's Process Design and Development textbook).
This should not change any biorefinery results since natural gas is not being consumed.
Thanks!
Feel free to update it, or I can update it later this week. I'll leave this issue open until it's been taken care of :)
Done in https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/commit/1c2528164e9ad6140afdbb76cdf2a6d226172ee0, checked results for O1 config and indeed it didn't change the price, I'll close this issue!
Hi @yoelcortes , something wasn't adding up to me on the natural gas price in the oilcane biorefinery, specifically, here https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/71e39de4b1d5792654cf31ab9042a652d4337c7e/biorefineries/oilcane/_distributions.py#L102
It looks like the given prices (e.g., 4.16, 4.23) are in USD/cf, and it was trying to convert to USD/m3 by dividing 35.3146667. However, 1 m3 = 35.3146667 cf, so to convert from USD/cf to USD/m3, I think you should multiply by 35.3146667 and the price would go crazy.
I'm wondering if the original price was given in USD/mcf, which is USD/1000 scf? Then to convert to $/m3 you should divide the number by (1000/35.3146667) = 28.32, which is more or less in line with the calculation
Also, it would fit more with the natural gas price I see somewhere else, e.g., EIA has it at ~$5/MM Btu, consider the LHV of natural gas is 983 Btu/scf, it's about 5/(1e6/983) = $0.004915/scf, or $4.915/mcf, which match the original distribution in the oilcane biorefinery