Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model not working sometimes on specific field with low GOR #40

Open
Tristan22400 opened this issue Nov 14, 2024 · 2 comments
Open

Model not working sometimes on specific field with low GOR #40

Tristan22400 opened this issue Nov 14, 2024 · 2 comments

Comments

@Tristan22400
Copy link
Contributor

Tristan22400 commented Nov 14, 2024

When you run the following file on the model, while removing the try in the manager.py to get the trace. You get this weird error. You just need to rename it test_3.xml to run the model.
test_3.txt
INFO opgee.field: Running 'Field_58'
{PROGRAM} failed: {e}
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 385, 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 369, 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 1478, 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\separation.py", line 104, in run
compressor_brake_horsepower_of_stages = self.compressor_brake_horsepower_of_stages(self.field,
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\processes\separation.py", line 243, in compressor_brake_horsepower_of_stages
work_sum, _, _ = Compressor.get_compressor_work_temp(field, inlet_temp, inlet_press,
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\processes\compressor.py", line 34, in get_compressor_work_temp
corrected_temp = gas.corrected_pseudocritical_temperature(gas_stream)
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\thermodynamics.py", line 937, in corrected_pseudocritical_temperature
uncorr_pseudocritical_temp = self.uncorrected_pseudocritical_temperature_and_pressure(stream)["temperature"].m
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\thermodynamics.py", line 914, in uncorrected_pseudocritical_temperature_and_pressure
molar_fraction = self.component_molar_fractions(stream).pint.m
File "c:\users\martin\documents\internship_grenoble\opgeev4\opgee\thermodynamics.py", line 831, in component_molar_fractions
raise ModelValidationError("Can't compute molar fractions on an empty stream")
opgee.error.ModelValidationError: <ModelValidationError "Can't compute molar fractions on an empty stream">

This error can be remove by passing the GOR ratio to 100 or more. It does not understand why this is happenning in the model. Is it normal to not be able to run the model for low GOR number?
Can you replicate the error ? Does anyone have an idea on why this is not working ?

@wennanlong
Copy link
Collaborator

The current version of the model does not fully support running with a low GOR (Gas to Oil Ratio). For GOR values lower than 100, the model struggles to calculate certain properties, such as molar fractions, leading to the error you've encountered. This is a limitation of the current implementation. For valid results, I recommend using a GOR of at least 1000. This ensures that all calculations, including thermodynamic properties, are properly handled by the model.

@Tristan22400
Copy link
Contributor Author

Tristan22400 commented Dec 4, 2024

Ok thanks for your answer, I have some questions on that topic then:

  • First, are you saying that the field which are running with a GOR ratio lower than 100 are not valid in results ?
  • Second, I am not sure to know how are properly set the GOR parameter. Does it include the gas that are flaring and the gas that reinjected? It seems to that yes but I am currently not sure of that.
  • Third, How do you count NGL, other liquids such as condensates that are produced ? Because they are normally not taking into account for the computation of GOR, but it should taken into account for the energy intensity computation of the field. Do you count it in the oil production? If not, How do you handle that?
    Thanks for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants