-
Notifications
You must be signed in to change notification settings - Fork 8
/
intersected_cell.h
113 lines (92 loc) · 3.63 KB
/
intersected_cell.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
/******************************************************************************
Copyright (C) 2015-2016 Hilmar M. Magnusson <[email protected]>
Modified by Einar J.M. Baumann (2016) <[email protected]>
Modified by Alin G. Chitu (2016-2017) <[email protected], [email protected]>
This file and the WellIndexCalculator as a whole is part of the
FieldOpt project. However, unlike the rest of FieldOpt, the
WellIndexCalculator is provided under the GNU Lesser General Public
License.
WellIndexCalculator is free software: you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
WellIndexCalculator is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with WellIndexCalculator. If not, see
<http://www.gnu.org/licenses/>.
******************************************************************************/
#ifndef FIELDOPT_INTERSECTEDCELL_H
#define FIELDOPT_INTERSECTEDCELL_H
#include "Reservoir/grid/cell.h"
#include <map>
#include <vector>
namespace Reservoir {
namespace WellIndexCalculation {
using namespace Eigen;
using namespace std;
/*!
* \brief The IntersectedCell struct holds information about an intersected cell.
*/
class IntersectedCell : public Grid::Cell {
public:
IntersectedCell() {}
IntersectedCell(const Grid::Cell &cell) : Grid::Cell(cell) {};
/*!
* \brief The cell x axis
*/
Vector3d xvec() const;
/*!
* \brief The cell y axis
*/
Vector3d yvec() const;
/*!
* \brief The cell z axis
*/
Vector3d zvec() const;
// Cell size
double dx() const;
double dy() const;
double dz() const;
void add_new_segment(Vector3d entry_point, Vector3d exit_point,
double segment_radius, double segment_skin);
int num_segments() const;
Vector3d get_segment_entry_point(int segment_index) const;
Vector3d get_segment_exit_point(int segment_index) const;
double get_segment_radius(int segment_index) const;
double get_segment_skin(int segment_index) const;
void update_last_segment_exit_point(Vector3d exit_point);
double cell_well_index_matrix() const;
void set_cell_well_index_matrix(double well_index);
double cell_well_index_fracture() const;
void set_cell_well_index_fracture(double well_index);
void set_segment_calculation_data(int segment_index,
string name,
double value);
map<string, vector<double>>& get_calculation_data();
/*!
* @brief Get the index of an intersected cell. If it is not found, the cell is added
* to the list before the new index is returned.
* @param cells The cell to find the index for.
* @param grdcell The list of cells to search through.
* @return The index of grdcell in cells.
*/
static int GetIntersectedCellIndex(vector<IntersectedCell> &cells,
Grid::Cell grdcell);
private:
// intersecting well segment definition
vector<Vector3d> entry_points_;
vector<Vector3d> exit_points_;
vector<double> segment_radius_;
vector<double> segment_skin_;
// per segment well index calculation data
map<string, vector<double>> calculation_data_;
// well indices
double well_index_matrix_;
double well_index_fracture_;
};
}
}
#endif //FIELDOPT_INTERSECTEDCELL_H