well_state.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2011 Equinor ASA, Norway.
3
4 The file 'well_state.h' is part of ERT - Ensemble based Reservoir Tool.
5
6 ERT is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 ERT is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.
14
15 See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
16 for more details.
17*/
18
19
20#ifndef ERT_WELL_STATE_H
21#define ERT_WELL_STATE_H
22
23
24#include <time.h>
25
26#include <ert/ecl/ecl_file.hpp>
27#include <ert/ecl/ecl_grid.hpp>
28
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39#define GLOBAL_GRID_NAME "GLOBAL" // The name assigned to the global grid for name based lookup.
40
41 typedef struct well_state_struct well_state_type;
42
43 well_state_type * well_state_alloc(const char * well_name , int global_well_nr , bool open, well_type_enum type , int report_nr, time_t valid_from);
44 well_state_type * well_state_alloc_from_file( ecl_file_type * ecl_file , const ecl_grid_type * grid , int report_step , int well_nr , bool load_segment_information);
45 well_state_type * well_state_alloc_from_file2( ecl_file_view_type * file_view , const ecl_grid_type * grid , int report_nr , int global_well_nr ,bool load_segment_information);
46
48 const ecl_grid_type * grid ,
49 ecl_file_view_type * rst_view ,
50 int well_nr);
51
53 const ecl_grid_type * grid ,
54 ecl_file_type * rst_file ,
55 int well_nr);
56
58 ecl_file_type * rst_file ,
59 int well_nr,
60 bool load_segment_information);
61
62
64 ecl_file_view_type * rst_view,
65 int well_nr,
66 bool load_segment_information);
67
68
69 bool well_state_is_MSW( const well_state_type * well_state);
70
72
75
76
78 const char * well_state_get_name( const well_state_type * well );
79 int well_state_get_report_nr( const well_state_type * well_state );
80 time_t well_state_get_sim_time( const well_state_type * well_state );
82 bool well_state_is_open( const well_state_type * well_state );
83 int well_state_get_well_nr( const well_state_type * well_state );
84
86 const well_conn_type * well_state_iget_wellhead( const well_state_type * well_state , int grid_nr);
87 const well_conn_type * well_state_get_wellhead( const well_state_type * well_state , const char * grid_name);
88
90
91 const well_conn_collection_type * well_state_get_grid_connections( const well_state_type * well_state , const char * grid_name);
93 bool well_state_has_grid_connections( const well_state_type * well_state , const char * grid_name);
95
96 double well_state_get_oil_rate( const well_state_type * well_state );
97 double well_state_get_gas_rate( const well_state_type * well_state );
98 double well_state_get_water_rate( const well_state_type * well_state);
99 double well_state_get_volume_rate( const well_state_type * well_state);
101 double well_state_get_oil_rate_si( const well_state_type * well_state );
103 double well_state_get_gas_rate_si( const well_state_type * well_state );
104
105
107
108#ifdef __cplusplus
109}
110#endif
111
112#endif
ecl_grid_struct ecl_grid_type
Definition: ECLGraph.hpp:43
struct ecl_file_struct ecl_file_type
Definition: ECLResultData.hpp:39
struct ecl_file_view_struct ecl_file_view_type
Definition: ecl_file_view.hpp:50
struct well_branch_collection_struct well_branch_collection_type
Definition: well_branch_collection.hpp:34
struct well_conn_struct well_conn_type
Definition: well_conn.hpp:44
struct well_conn_collection_struct well_conn_collection_type
Definition: well_conn_collection.hpp:34
well_type_enum
Definition: well_const.hpp:133
struct well_segment_collection_struct well_segment_collection_type
Definition: well_segment_collection.hpp:37
void well_state_free(well_state_type *well)
bool well_state_is_open(const well_state_type *well_state)
double well_state_get_water_rate_si(const well_state_type *well_state)
double well_state_get_oil_rate_si(const well_state_type *well_state)
well_type_enum well_state_translate_ecl_type_int(int int_type)
double well_state_get_gas_rate(const well_state_type *well_state)
time_t well_state_get_sim_time(const well_state_type *well_state)
double well_state_get_volume_rate_si(const well_state_type *well_state)
well_state_type * well_state_alloc(const char *well_name, int global_well_nr, bool open, well_type_enum type, int report_nr, time_t valid_from)
const well_conn_collection_type * well_state_get_global_connections(const well_state_type *well_state)
double well_state_get_oil_rate(const well_state_type *well_state)
UTIL_IS_INSTANCE_HEADER(well_state)
struct well_state_struct well_state_type
Definition: well_state.hpp:41
well_type_enum well_state_get_type(const well_state_type *well_state)
well_state_type * well_state_alloc_from_file2(ecl_file_view_type *file_view, const ecl_grid_type *grid, int report_nr, int global_well_nr, bool load_segment_information)
bool well_state_add_MSW2(well_state_type *well_state, ecl_file_view_type *rst_view, int well_nr, bool load_segment_information)
const char * well_state_get_name(const well_state_type *well)
double well_state_get_water_rate(const well_state_type *well_state)
const well_conn_type * well_state_iget_wellhead(const well_state_type *well_state, int grid_nr)
const well_conn_type * well_state_get_global_wellhead(const well_state_type *well_state)
void well_state_add_connections2(well_state_type *well_state, const ecl_grid_type *grid, ecl_file_view_type *rst_view, int well_nr)
bool well_state_add_MSW(well_state_type *well_state, ecl_file_type *rst_file, int well_nr, bool load_segment_information)
const well_conn_type * well_state_get_wellhead(const well_state_type *well_state, const char *grid_name)
well_segment_collection_type * well_state_get_segments(const well_state_type *well_state)
bool well_state_has_global_connections(const well_state_type *well_state)
well_state_type * well_state_alloc_from_file(ecl_file_type *ecl_file, const ecl_grid_type *grid, int report_step, int well_nr, bool load_segment_information)
bool well_state_has_grid_connections(const well_state_type *well_state, const char *grid_name)
const well_conn_collection_type * well_state_get_grid_connections(const well_state_type *well_state, const char *grid_name)
bool well_state_has_segment_data(const well_state_type *well_state)
int well_state_get_well_nr(const well_state_type *well_state)
void well_state_add_connections(well_state_type *well_state, const ecl_grid_type *grid, ecl_file_type *rst_file, int well_nr)
well_branch_collection_type * well_state_get_branches(const well_state_type *well_state)
double well_state_get_volume_rate(const well_state_type *well_state)
int well_state_get_report_nr(const well_state_type *well_state)
bool well_state_is_MSW(const well_state_type *well_state)
double well_state_get_gas_rate_si(const well_state_type *well_state)