Open softwareengineerprogrammer opened 5 months ago
Current interpretation of "To still follow the approach by Garg and Combs 2011 SGW paper, I would replace everything starting on line 616 with the following lines of code":
# equation 4 in Garg and Combs(2011)
amount_fluid_produced_kg = self.reservoir_stored_heat.value / fluid_net_enthalpy
self.mass_recoverable_fluid.value = amount_fluid_produced_kg
# (equation 7 in Garg and Combs(2011))
fluid_exergy_kJ_per_kg = (
fluid_net_enthalpy - celsius_to_kelvin(self.rejection_temperature.value) * fluid_net_entropy
)
self.enthalpy_fluid.value = fluid_exergy_kJ_per_kg
# (equation 8 in Garg and Combs(2011))
maximum_lifetime_electricity_kJ = amount_fluid_produced_kg * fluid_exergy_kJ_per_kg
# (with conversion efficiency obtained from the function “RecoverableHeat” [however, note that I find
# RecoverableHeat a confusing name as it represents the amount of exergy that can be converted to
# electricity with a power plant not the amount of heat that can be recovered. See figure 2 in this
# paper: https://geothermal-energy-journal.springeropen.com/articles/10.1186/s40517-019-0119-6
# which is the basis for the “RecoverableHeat” function. They also call this property
# utilization_efficiency or 2nd law based efficiency)
conversion_efficiency = RecoverableHeat(self.reservoir_temperature.value)
producible_lifetime_electricity_kj = maximum_lifetime_electricity_kJ * conversion_efficiency
# Now assuming a 30 year lifetime:
maximum_power_kW = maximum_lifetime_electricity_kJ / (30 * 365 * 24 * 3600)
self.producible_electricity_fluid.value = self.ureg.Quantity(maximum_power_kW,'kW').to('MW').magnitude
electricity_with_actual_power_plant = UtilEff_func(self.reservoir_temperature.value) * maximum_power_kW
producible_power_kW = electricity_with_actual_power_plant / (30 * 365 * 24 * 3600) # Does this map to one of the already-defined output parameters or should it be separate?
Unassigned from myself since https://github.com/NREL/GEOPHIRES-X/pull/108 is merged; outstanding issues will be addressed by SMEs
Assigned to @malcolm-dsider to verify whether the outstanding items have been addressed (copied here from list in description issue for clarity):
fluid_heat_capacity
. However, since we are using the IAPWS, we don’t really need the fluid_heat_capacity
anymore.reservoir_mass.value
appears to be a dubious parameter as it not the mass of the reservoir but rather the mass of the rock plus the mass of the recoverable amount of fluid. Why do we need this parameter anyway? It doesn't seem to be used in the calculations. I suggest to remove it and not print it in the output.
HIP-RA-X review from @kfbeckers via email on 2024-02-01:
I reviewed the HIP-RA-X code on https://github.com/NREL/GEOPHIRES-X/blob/main/src/hip_ra_x/hip_ra_x.py and here are my comments and suggestions:
fluid_heat_capacity
,reservoir_enthalpy
,enthalpy_rock
, andenthalpy_fluid
. I would put in their tooltip the word "specific" which is a thermodynamic labeling convention for mass independent properties. (specific heat capacity is not exactly the same as heat capacity). See for example also here: https://en.wikipedia.org/wiki/Enthalpy#Specific_enthalpy and https://en.wikipedia.org/wiki/Specific_heat_capacityfluid_heat_capacity
. However, since we are using the IAPWS, we don’t really need thefluid_heat_capacity
anymore. (see also the bullet below for line 609-613)self.fluid_density.value = density_water * 1_000_000_000.0 # converted to kJ/km3
. The comment appears incorrect as it says it converted to kJ/km3 but this should say kg/km3 (density should have units of mass per volume)reservoir_mass.value
appears to be a dubious parameter as it not the mass of the reservoir but rather the mass of the rock plus the mass of the recoverable amount of fluid. Why do we need this parameter anyway? It doesn't seem to be used in the calculations. I suggest to remove it and not print it in the output.fluid_net_enthalpy = EnthalpyH20_func(delta_temperature_k)
does not appear correct. We should writefluid_net_enthalpy = EnthalpyH20_func(self.reservoir_temperature.value) - EnthalpyH20_func(self.rejection_temperature.value)
. The net enthalpy is more correctly calculated as the produced fluid enthalpy minus rejected fluid enthalpy. Note that enthalpy(100)-enthalpy(50) is not equal to enthalpy(200)-enthalpy(150) even though both have a temperature difference of 50.fluid_net_entropy = EntropyH20_func(self.reservoir_temperature.value) - EntropyH20_func(self.rejection_temperature.value)
self.stored_heat_rock.value = self.recoverable_rock_heat.value * self.enthalpy_rock.value * self.mass_rock.value
[result in kJ]self.stored_heat_fluid.value = fluid_net_enthalpy * self.mass_recoverable_fluid.value
[result in kJ]self.enthalpy_fluid.value = fluid_net_enthalpy - (delta_temperature_k * fluid_net_entropy)
but I believe this got mixed up with exergy = enthalpy – T0* fluid_net_entropy with exergy = maximum amount of energy that can be produced and T0 = dead-state-temperature = rejection temperature and not equal to delta_temperature_k. If you are interested in some of the background, see for example equation 46.23 in this book: https://www.seas.upenn.edu/~lior/documents/Second_Law_of_ThermodynamicsHdbk.pdf To still follow the approach by Garg and Combs 2011 SGW paper, I would replace everything starting on line 616 with the following lines of code:To convert MaximumLifetimeElectricity to units of for example kWh, we would need to multiply MaximumLifetimeElectricity with 2.778×10^-4