NREL / GEOPHIRES-X

MIT License
26 stars 21 forks source link

HIP-RA-X technical review 2024-02-01 #109

Open softwareengineerprogrammer opened 5 months ago

softwareengineerprogrammer commented 5 months ago

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:

AmountFluidProduced [kg] = self.reservoir_stored_heat.value / fluid_net_enthalpy (equation 4 in Garg and Combs (2011))

FluidExergy [kJ/kg] = fluid_net_enthalpy - rejection_temperature_Kelvin*fluid_net_entropy (equation 7 in Garg and Combs (2011))

MaximumLifetimeElectricity [kJ] = AmountFluidProduced* FluidExergy (equation 8 in Garg and Combs (2011))

ProducibleLifetimeElectricity [kJ] = MaximumElectricity*ConversionEfficiency # (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](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)

# Now assuming a 30 year lifetime:

MaximumPower [kW] = MaximumElectricity /(30*365*24*3600)

ProduciblePower [kW] = ElectricityWithActualPowerPlant /(30*365*24*3600)

To convert MaximumLifetimeElectricity to units of for example kWh, we would need to multiply MaximumLifetimeElectricity with 2.778×10^-4

softwareengineerprogrammer commented 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?
softwareengineerprogrammer commented 4 months ago

Unassigned from myself since https://github.com/NREL/GEOPHIRES-X/pull/108 is merged; outstanding issues will be addressed by SMEs

softwareengineerprogrammer commented 2 weeks ago

Assigned to @malcolm-dsider to verify whether the outstanding items have been addressed (copied here from list in description issue for clarity):

  1. [ ] The tool currently asks for the fluid_heat_capacity. However, since we are using the IAPWS, we don’t really need the fluid_heat_capacity anymore.
  2. [ ] 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.