API Reference¶
calculate_doublet_performance(reservoir_properties, utc_properties=None, rng_seed=None, chunk_size=None, print_execution_duration=False, mask_value=np.nan)
¶
Perform a deterministic Doublet performance simulation.
This function computes doublet performance metrics across all dimensions of the input dataset. The input can be scalar, 1D, or 2D gridded data.
If no temperature values are provided, they are estimated from a gradient defined in utc_properties.
If a mask is provided, any non-NaN values in the mask datarray will result in zeroing the output values at those locations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reservoir_properties
|
Dataset
|
An xarray Dataset containing the required input variables: - thickness, units: m - porosity, units: [0-1] - ntg, units [0-1] - depth, units: m +ive downwards - permeability, units: mD Optional variables:
- transmissivity, units: Dm, if provided then permeability is ignored.
- temperature : If not provided, temperature is estimated using the depth and a temperature gradient from |
required |
utc_properties
|
JClass
|
A Java class specifying the properties of the doublet being simulated |
None
|
rng_seed
|
int
|
Random seed used for stochastic components of the simulation. |
None
|
chunk_size
|
int
|
None by default, if set to an integer then chunking of the reservoir properties occurs. The chunk size is used to split up the number of simulations into "chunks" which can be processed in parallel using the dask framework. Chunk size involves trade-offs: smaller chunks = more parallelism, but more overhead, while larger chunks = less overhead, but can lead to memory pressure. The optimal chunk size is dependent on the hardware being used to run the simulation. The user should test to find the optimal chunk size. |
None
|
print_execution_duration
|
bool
|
False by default, If set to True print the time in seconds it took to simulate across all reservoir properties |
False
|
mask_value
|
float
|
0.0 by default, Any cell that results in a failed simulation or corresponds to a non-nan value in the mask parameter will be assigned the mask value |
nan
|
Returns:
| Name | Type | Description |
|---|---|---|
output_data |
Dataset
|
An xarray Dataset with the same spatial dimensions as |
Source code in src/pythermogis/doublet_simulation/deterministic_doublet.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |
validate_input(reservoir_properties)
¶
Ensure that the reservoir_properties Dataset contains the minimum required variables, and that these variables meet certain conditions. Other-wise raise an informative error.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reservoir_properties
|
Dataset
|
Input reservoir_properties that must contain the required ThermoGIS variables. |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in src/pythermogis/doublet_simulation/deterministic_doublet.py
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |