ecl_rsthead.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2011 Equinor ASA, Norway.
3
4 The file 'ecl_RSTHEAD.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#ifndef ERT_ECL_RSTHEAD_H
20#define ERT_ECL_RSTHEAD_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include <time.h>
27
28#include <ert/ecl/ecl_file.hpp>
30#include <ert/ecl/ecl_kw.hpp>
31
32
33 typedef struct {
34 // The report step is from the SEQNUM keyword for unified files,
35 // and inferred from the filename for non unified files.
37 int day;
38 int year;
39 int month;
40 time_t sim_time;
41 int version; // 100, 300, 500 (Eclipse300-Thermal)
42 int phase_sum; // Oil = 1 Gas = 2 Water = 4
43
45
46 int nx;
47 int ny;
48 int nz;
50 /*-----------------------------------------------------------------*/
51 /* All fields below the line are taken literally (apart from
52 lowercasing) from the section about restart files in the
53 ECLIPSE File Formats Reference Manual. The elements typically
54 serve as dimensions in the ?WEL, ?SEG and ?CON arrays.
55 */
56
57 // Pure well properties
58 int nwells; // Number of wells
59 int niwelz; // Number of elements pr well in IWEL array
60 int nzwelz; // Number of 8 character words pr well in ZWEL array
61 int nxwelz; // Number of elements pr well in XWEL array.
62
63 // Connection properties
64 int niconz; // Number of elements per completion in ICON array
65 int ncwmax; // Maximum number of completions per well
66 int nsconz; // Number of elements per completion in SCON array
67 int nxconz; // Number of elements per completion in XCON array
68
69 // Segment properties
70 int nisegz; // Number of entries pr segment in the ISEG array
71 int nsegmx; // The maximum number of segments pr well
72 int nswlmx; // The maximum number of segmented wells
73 int nlbrmx; // The maximum number of lateral branches pr well
74 int nilbrz; // The number of entries pr segment in ILBR array
75 int nrsegz; // The number of entries pr segment in RSEG array
76
77 // Properteies from the LOGIHEAD keyword:
78 bool dualp;
79
80
81 // Properties from the DOUBHEAD keyword:
82 double sim_days;
84
85
86
88 ecl_rsthead_type * ecl_rsthead_alloc_from_kw( int report_step , const ecl_kw_type * intehead_kw , const ecl_kw_type * doubhead_kw , const ecl_kw_type * logihead_kw );
89 ecl_rsthead_type * ecl_rsthead_alloc( const ecl_file_view_type * rst_file , int report_step);
91 time_t ecl_rsthead_date( const ecl_kw_type * intehead_kw );
92 void ecl_rsthead_fprintf( const ecl_rsthead_type * header , FILE * stream);
93 void ecl_rsthead_fprintf_struct( const ecl_rsthead_type * header , FILE * stream);
94 bool ecl_rsthead_equal( const ecl_rsthead_type * header1 , const ecl_rsthead_type * header2);
100
101#ifdef __cplusplus
102}
103#endif
104#endif
struct ecl_file_view_struct ecl_file_view_type
Definition: ecl_file_view.hpp:50
struct ecl_kw_struct ecl_kw_type
Definition: ecl_kw.hpp:39
ecl_rsthead_type * ecl_rsthead_alloc_empty(void)
void ecl_rsthead_fprintf_struct(const ecl_rsthead_type *header, FILE *stream)
ecl_rsthead_type * ecl_rsthead_alloc(const ecl_file_view_type *rst_file, int report_step)
time_t ecl_rsthead_get_sim_time(const ecl_rsthead_type *header)
ecl_rsthead_type * ecl_rsthead_alloc_from_kw(int report_step, const ecl_kw_type *intehead_kw, const ecl_kw_type *doubhead_kw, const ecl_kw_type *logihead_kw)
time_t ecl_rsthead_date(const ecl_kw_type *intehead_kw)
double ecl_rsthead_get_sim_days(const ecl_rsthead_type *header)
void ecl_rsthead_fprintf(const ecl_rsthead_type *header, FILE *stream)
int ecl_rsthead_get_report_step(const ecl_rsthead_type *header)
void ecl_rsthead_free(ecl_rsthead_type *rsthead)
bool ecl_rsthead_equal(const ecl_rsthead_type *header1, const ecl_rsthead_type *header2)
int ecl_rsthead_get_ncwmax(const ecl_rsthead_type *rsthead)
int ecl_rsthead_get_nxconz(const ecl_rsthead_type *rsthead)
ert_ecl_unit_enum
Definition: ecl_util.hpp:99
Definition: ecl_rsthead.hpp:33
time_t sim_time
Definition: ecl_rsthead.hpp:40
int ncwmax
Definition: ecl_rsthead.hpp:65
int report_step
Definition: ecl_rsthead.hpp:36
int nlbrmx
Definition: ecl_rsthead.hpp:73
int ny
Definition: ecl_rsthead.hpp:47
int nactive
Definition: ecl_rsthead.hpp:49
int nisegz
Definition: ecl_rsthead.hpp:70
int nx
Definition: ecl_rsthead.hpp:46
int phase_sum
Definition: ecl_rsthead.hpp:42
int month
Definition: ecl_rsthead.hpp:39
int nswlmx
Definition: ecl_rsthead.hpp:72
int year
Definition: ecl_rsthead.hpp:38
int nxconz
Definition: ecl_rsthead.hpp:67
bool dualp
Definition: ecl_rsthead.hpp:78
double sim_days
Definition: ecl_rsthead.hpp:82
int nilbrz
Definition: ecl_rsthead.hpp:74
int nzwelz
Definition: ecl_rsthead.hpp:60
int nrsegz
Definition: ecl_rsthead.hpp:75
int nxwelz
Definition: ecl_rsthead.hpp:61
int niwelz
Definition: ecl_rsthead.hpp:59
int nz
Definition: ecl_rsthead.hpp:48
int nsconz
Definition: ecl_rsthead.hpp:66
ert_ecl_unit_enum unit_system
Definition: ecl_rsthead.hpp:44
int nwells
Definition: ecl_rsthead.hpp:58
int nsegmx
Definition: ecl_rsthead.hpp:71
int version
Definition: ecl_rsthead.hpp:41
int day
Definition: ecl_rsthead.hpp:37
int niconz
Definition: ecl_rsthead.hpp:64