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

Parameters visualization problem (Gas saturation, XCO2aq, etc) #142

Closed
jousheinfo opened this issue May 22, 2023 · 7 comments · Fixed by #144
Closed

Parameters visualization problem (Gas saturation, XCO2aq, etc) #142

jousheinfo opened this issue May 22, 2023 · 7 comments · Fixed by #144

Comments

@jousheinfo
Copy link

Hello,

I am trying to obtain data on the gas saturation from a T2WELL output file, but it is not working. I want to extract the data for the first hour of the simulation and plot it with time (also extracted using toughio), but when using slicing ([:24]), I get a problem.

I would like to kindly request your help. Thank you for your time and consideration!

Please take a look at the Python code below and the error I get.

import toughio
output = toughio.read_output('injection.listing')[:24]
SG = output.data['SG']

AttributeError: 'list' object has no attribute 'data'

@jousheinfo
Copy link
Author

Moreover, I get a deprecation warning with using the above mentioned code

@keurfonluu
Copy link
Owner

Hi @jousheinfo,

toughio.read_output returns a list of outputs for each time step requested in block TIMES, so output is a list.
I am not sure what your 24 means, but output = toughio.read_output('injection.listing')[:24] will return the 24 first time steps.
If you want to get SG of the Nth time step, you should use:

SG = output[N].data['SG']

What's the deprecation warning you get?

@jousheinfo
Copy link
Author

Dear @keurfonluu,

unfortunately, the code you suggested did not work correctly. I get the following output:

[1.0, 2.0, 346270.0, 35.25, 0.0, 0.0, 0.0, 1.0, 7.2418e-09, 0.0, 1.0, 6.07, 994.12]

It is mixing pressure, temperature, saturation........how to fix this, please?

And regarding the deprecation warning, when I type this:

toughio.read_output('injection.listing')[22]

I get the following message:

C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\toughio_io\output\tough_tough.py:80: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
variables = np.array([[v[2:] for v in variable] for variable in variables])

Thank you so much!

@keurfonluu
Copy link
Owner

I will need the simulations files in order to be able to investigate.

@jousheinfo
Copy link
Author

Dear @keurfonluu,

please find attached the input and output file of my simulation. Thanks!

injection_Pwh_50_gas_CO2_salinity_output.txt
injection_Pwh_50_gas_CO2_salinity_input.txt

@keurfonluu
Copy link
Owner

keurfonluu commented Jun 21, 2023

Hi @jousheinfo,

Sorry for the delay, I have been pretty busy lately.
Your issue has been fixed in the development branch, please install that version as follows:

pip uninstall toughio
pip install https://github.com/keurfonluu/toughio/archive/devel.zip

Let me know if it doesn't work.

@keurfonluu keurfonluu mentioned this issue Aug 8, 2023
4 tasks
@keurfonluu
Copy link
Owner

Fixed in #144.

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

Successfully merging a pull request may close this issue.

2 participants