You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1003 B
C++
49 lines
1003 B
C++
#pragma once
|
|
#include <string>
|
|
#include <vector>
|
|
#include <cstdint>
|
|
|
|
struct RunnerParams
|
|
{
|
|
// 6 params
|
|
double k;
|
|
double skin;
|
|
double wellboreC;
|
|
double phi;
|
|
double h;
|
|
double Cf;
|
|
|
|
// optional schedule extension
|
|
uint32_t sectionIndex; // wellFlowSectionIndex
|
|
std::vector<double> timeQ; // hours
|
|
std::vector<double> q; // m^3/d
|
|
|
|
RunnerParams()
|
|
: k(0), skin(0), wellboreC(0), phi(0), h(0), Cf(0), sectionIndex(0)
|
|
{}
|
|
};
|
|
|
|
struct RunnerResult
|
|
{
|
|
unsigned int nWells;
|
|
unsigned int nSteps;
|
|
std::vector<double> t;
|
|
std::vector< std::vector<double> > pw;
|
|
|
|
std::vector< std::vector<double> > loglog_t;
|
|
std::vector< std::vector<double> > loglog_p;
|
|
std::vector< std::vector<double> > loglog_deriv;
|
|
|
|
RunnerResult() : nWells(0), nSteps(0) {}
|
|
};
|
|
|
|
namespace RunnerIO
|
|
{
|
|
bool fileExists(const std::string& path);
|
|
|
|
bool readParamsBin(const std::string& path, RunnerParams& out);
|
|
bool writeResultBin(const std::string& path, const RunnerResult& r);
|
|
|
|
void printParams(const RunnerParams& p);
|
|
}
|