Added exmaple file
This commit is contained in:
parent
bbfad835c9
commit
432f7c08a3
27
examples/wells_example.cpp
Normal file
27
examples/wells_example.cpp
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#include <iostream>
|
||||||
|
#include <opm/core/eclipse/EclipseGridParser.hpp>
|
||||||
|
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||||
|
#include <opm/core/WellsManager.hpp>
|
||||||
|
#include <opm/core/GridManager.hpp>
|
||||||
|
|
||||||
|
#include "opm/core/newwells.h"
|
||||||
|
|
||||||
|
int main(int argc, char** argv) {
|
||||||
|
|
||||||
|
using namespace Opm::parameter;
|
||||||
|
using namespace Opm;
|
||||||
|
ParameterGroup parameters( argc, argv, false );
|
||||||
|
std::string file_name = parameters.getDefault<std::string>("inputdeck", "data.data");
|
||||||
|
|
||||||
|
// Read input file
|
||||||
|
EclipseGridParser parser(file_name);
|
||||||
|
std::cout << "Done!" << std::endl;
|
||||||
|
// Setup grid
|
||||||
|
GridManager grid(parser);
|
||||||
|
|
||||||
|
// Finally handle the wells
|
||||||
|
WellsManager wells(parser, *grid.c_grid(), NULL);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
@ -20,7 +20,7 @@
|
|||||||
#ifndef OPM_WELLSMANAGER_HEADER_INCLUDED
|
#ifndef OPM_WELLSMANAGER_HEADER_INCLUDED
|
||||||
#define OPM_WELLSMANAGER_HEADER_INCLUDED
|
#define OPM_WELLSMANAGER_HEADER_INCLUDED
|
||||||
|
|
||||||
|
#include <boost/property_tree/ptree.hpp>
|
||||||
|
|
||||||
struct Wells;
|
struct Wells;
|
||||||
struct UnstructuredGrid;
|
struct UnstructuredGrid;
|
||||||
@ -63,6 +63,8 @@ namespace Opm
|
|||||||
WellsManager& operator=(const WellsManager& other);
|
WellsManager& operator=(const WellsManager& other);
|
||||||
// The managed Wells.
|
// The managed Wells.
|
||||||
Wells* w_;
|
Wells* w_;
|
||||||
|
|
||||||
|
boost::property_tree groups_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
@ -25,7 +25,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum well_type { INJECTOR, PRODUCER };
|
enum well_type { INJECTOR, PRODUCER };
|
||||||
enum control_type { BHP , RATE, GRUP };
|
enum control_type { BHP , RATE };
|
||||||
enum surface_component { WATER = 0, OIL = 1, GAS = 2 };
|
enum surface_component { WATER = 0, OIL = 1, GAS = 2 };
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user