Skip to content

Problem with the steam_generator process  #53

Open
@Tristan22400

Description

@Tristan22400

Hi,
I was running some fields with the OPGEE's model. I found it to crash on some fields with steam flooding. I have attached the following file to replicate the error. The error is the following.

_Traceback (most recent call last):
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\tool.py", line 339, in main
_main(argv)
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\tool.py", line 309, in _main
tool.run(args=args)
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\tool.py", line 239, in run
obj.run(args, self)
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\built_ins\run_plugin.py", line 375, in run
for results in mgr.run_packets(
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\manager.py", line 322, in run_packets
results = pkt.run(result_type)
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\manager.py", line 134, in run
results = run_serial(self.model_xml_file, self.analysis_name, field_names,
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\manager.py", line 386, in run_serial
result = _run_field(analysis_name, field_name, xml_string, result_type)
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\manager.py", line 370, in _run_field
field.run(analysis)
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\field.py", line 533, in run
self.run_processes(analysis)
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\field.py", line 1528, in run_processes
proc.run_if_enabled(analysis)
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\process.py", line 791, in run_if_enabled
self.run(analysis)
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\processes\steam_generation.py", line 142, in run
self.steam_generator.once_through_SG(prod_water_mass_rate * fraction_OTSG,
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\processes\steam_generator.py", line 152, in once_through_SG
temp = exhaust_consump_sum * exhaust_consump_MW / gas_MW_combust / available_enthalpy
File "C:\Users\martin\AppData\Local\miniconda3\envs\opgee\lib\site-packages\pint\facets\plain\quantity.py", line 1383, in truediv
return self._mul_div(other, operator.truediv)
File "C:\Users\martin\AppData\Local\miniconda3\envs\opgee\lib\site-packages\pint\facets\plain\quantity.py", line 108, in wrapped
return f(self, *args, **kwargs)
File "C:\Users\martin\AppData\Local\miniconda3\envs\opgee\lib\site-packages\pint\facets\plain\quantity.py", line 88, in wrapped
result = f(self, *args, **kwargs)
File "C:\Users\martin\AppData\Local\miniconda3\envs\opgee\lib\site-packages\pint\facets\plain\quantity.py", line 1323, in _mul_div
magnitude = magnitude_op(self._magnitude, other_magnitude)
FloatingPointError: divide by zero encountered in scalar divide
_

test_opgee_error.txt
Just change the name of the field to .xml extension to run it easily.
By deepening a bit in this issue, I found that this is due to the fact that the input_enthalpy_per_unit_fuel is negative in most of the fields.
Then the computation of the available_enthalpy equals to zero and the computation of the temp crashes the model because there is a division by the available _enthalpy.

input_enthalpy_per_unit_fuel = \
gas_LHV + air_requirement_LHV_fuel - LHV_fuel["outlet_before_economizer"]
shell_loss_per_unit_fuel = \
self.loss_shell_OTSG * gas_LHV if self.OTSG_fuel_type == "Gas" else self.loss_shell_OTSG * self.oil.mass_energy_density()
other_loss_per_unit_fuel = \
self.loss_gaseous_OTSG / gas_MW_combust if self.OTSG_fuel_type == "Gas" else self.loss_liquid_OTSG
available_enthalpy = max(input_enthalpy_per_unit_fuel -
shell_loss_per_unit_fuel -
other_loss_per_unit_fuel, 0)
# calculate recoverable heat
delta_H = \
steam_out_enthalpy_rate - prod_water_enthalpy_rate - \
makeup_water_enthalpy_rate - blowdown_water_recoverable_enthalpy_rate
temp = exhaust_consump_sum * exhaust_consump_MW / gas_MW_combust / available_enthalpy

What should we do to avoid the problem ? Can you send a few documentation on the process if you want me to correct the error ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions