20 #ifndef OPM_INITSTATE_IMPL_HEADER_INCLUDED
21 #define OPM_INITSTATE_IMPL_HEADER_INCLUDED
27 #include <opm/common/ErrorMacros.hpp>
35 #include <opm/parser/eclipse/Utility/EquilWrapper.hpp>
46 #pragma clang diagnostic push
47 #pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
53 void cellsBelowAbove(
int number_of_cells,
54 T begin_cell_centroids,
57 std::vector<int>& below,
58 std::vector<int>& above)
60 below.reserve(number_of_cells);
61 above.reserve(number_of_cells);
62 for (
int c = 0; c < number_of_cells; ++c) {
75 #pragma clang diagnostic pop
78 enum WaterInit { WaterBelow, WaterAbove };
83 template <
class T,
class Props,
class State>
84 void initWaterOilContact(
int number_of_cells,
85 T begin_cell_centroids,
89 const WaterInit waterinit,
93 std::vector<int>
water;
102 cellsBelowAbove(number_of_cells, begin_cell_centroids, dimensions,
106 cellsBelowAbove(number_of_cells, begin_cell_centroids, dimensions,
110 state.setFirstSat(oil, props, State::MinSat);
111 state.setFirstSat(water, props, State::MaxSat);
126 template <
class T,
class State>
127 void initHydrostaticPressure(
int number_of_cells,
128 T begin_cell_centroids,
130 const double* densities,
133 const double datum_z,
134 const double datum_p,
137 std::vector<double>& p = state.pressure();
139 const double rho_datum = datum_z > woc ? densities[0] : densities[1];
140 const double woc_p = datum_p + (woc - datum_z)*gravity*rho_datum;
141 for (
int c = 0; c < number_of_cells; ++c) {
146 const double rho = z > woc ? densities[0] : densities[1];
147 p[c] = woc_p + (z - woc)*gravity*rho;
154 template <
class T,
class State>
155 void initHydrostaticPressure(
int number_of_cells,
156 T begin_cell_centroids,
158 const IncompPropertiesInterface& props,
160 const double gravity,
161 const double datum_z,
162 const double datum_p,
165 const double* densities = props.density();
166 initHydrostaticPressure(number_of_cells, begin_cell_centroids, dimensions,
167 densities, woc, gravity, datum_z, datum_p, state);
175 const BlackoilPropertiesInterface& props_;
176 Density(
const BlackoilPropertiesInterface& props) : props_(props) {}
177 double operator()(
const double pressure,
const double temperature,
const int phase)
179 assert(props_.numPhases() == 2);
180 const double surfvol[2][2] = { { 1.0, 0.0 },
184 double A[4] = { 0.0 };
185 props_.matrix(1, &pressure, &temperature, surfvol[phase], &cell, A, 0);
186 double rho[2] = { 0.0 };
187 props_.density(1, A, &cell, rho);
199 template <
class T,
class State>
200 void initHydrostaticPressure(
int number_of_cells,
201 T begin_cell_centroids,
203 const BlackoilPropertiesInterface& props,
205 const double gravity,
206 const double datum_z,
207 const double datum_p,
210 assert(props.numPhases() == 2);
213 double zlim[2] = { 1e100, -1e100 };
214 for (
int c = 0; c < number_of_cells; ++c) {
218 zlim[0] = std::min(zlim[0], z);
219 zlim[1] = std::max(zlim[1], z);
223 const double hmin = (zlim[1] - zlim[0])/100.0;
226 std::map<double, double> press_by_z;
227 press_by_z[datum_z] = datum_p;
233 int phase = (datum_z > woc) ? 0 : 1;
234 int num_steps = int(std::ceil(std::fabs(woc - datum_z)/hmin));
235 double pval = datum_p;
236 double Tval = 273.15 + 20;
237 double zval = datum_z;
238 double h = (woc - datum_z)/
double(num_steps);
239 for (
int i = 0; i < num_steps; ++i) {
241 const double dp = rho(pval, Tval, phase)*
gravity;
243 press_by_z[zval] = pval;
248 double z_end = (datum_z > woc) ? zlim[1] : zlim[0];
249 num_steps = int(std::ceil(std::fabs(z_end - datum_z)/hmin));
252 h = (z_end - datum_z)/
double(num_steps);
253 for (
int i = 0; i < num_steps; ++i) {
255 const double dp = rho(pval, Tval, phase)*
gravity;
257 press_by_z[zval] = pval;
262 phase = (phase + 1) % 2;
263 z_end = (datum_z > woc) ? zlim[0] : zlim[1];
266 h = (z_end - datum_z)/
double(num_steps);
267 for (
int i = 0; i < num_steps; ++i) {
269 const double dp = rho(pval, Tval, phase)*
gravity;
271 press_by_z[zval] = pval;
275 std::vector<double> zv, pv;
276 zv.reserve(press_by_z.size());
277 pv.reserve(press_by_z.size());
278 for (std::map<double, double>::const_iterator it = press_by_z.begin();
279 it != press_by_z.end(); ++it) {
280 zv.push_back(it->first);
281 pv.push_back(it->second);
283 MonotCubicInterpolator press(zv, pv);
286 std::vector<double>& p = state.pressure();
287 for (
int c = 0; c < number_of_cells; ++c) {
296 template <
class State,
class FaceCells,
class FCI,
class CCI>
297 void initFacePressure(
int dimensions,
299 FaceCells face_cells,
300 FCI begin_face_centroids,
301 CCI begin_cell_centroids,
304 const std::vector<double>& cp = state.pressure();
305 std::vector<double>& fp = state.facepressure();
306 for (
int f = 0; f < number_of_faces; ++f) {
307 double dist[2] = { 0.0, 0.0 };
308 double press[2] = { 0.0, 0.0 };
310 for (
int j = 0; j < 2; ++j) {
311 const int c = face_cells(f, j);
323 dist[j] += diff*diff;
325 dist[j] = std::sqrt(dist[j]);
332 fp[f] = press[0]*(dist[1]/(dist[0] + dist[1])) + press[1]*(dist[0]/(dist[0] + dist[1]));
334 fp[f] = press[(bdy_idx + 1) % 2];
344 template <
class State>
348 const double gravity,
358 template <
class FaceCells,
class CCI,
class FCI,
class State>
360 const int* global_cell,
363 FaceCells face_cells,
364 FCI begin_face_centroids,
365 CCI begin_cell_centroids,
369 const double gravity,
372 const int num_phases = props.
numPhases();
373 if (num_phases != 2) {
374 OPM_THROW(std::runtime_error,
"initStateTwophaseBasic(): currently handling only two-phase scenarios.");
376 state.init(number_of_cells, number_of_faces, num_phases);
377 const int num_cells = props.
numCells();
379 std::vector<int> all_cells(num_cells);
380 for (
int i = 0; i < num_cells; ++i) {
383 state.setFirstSat(all_cells, props, State::MinSat);
384 const bool convection_testcase = param.
getDefault(
"convection_testcase",
false);
385 const bool segregation_testcase = param.
getDefault(
"segregation_testcase",
false);
386 if (convection_testcase) {
388 std::vector<int> left_cells;
389 left_cells.reserve(num_cells/2);
390 for (
int cell = 0; cell < num_cells; ++cell) {
391 const int gc = global_cell == 0 ? cell : global_cell[cell];
392 bool left = (gc % cartdims[0]) < cartdims[0]/2;
394 left_cells.push_back(cell);
397 state.setFirstSat(left_cells, props, State::MaxSat);
399 std::fill(state.pressure().begin(), state.pressure().end(), init_p);
400 }
else if (segregation_testcase) {
402 if (gravity == 0.0) {
403 std::cout <<
"**** Warning: running gravity segregation scenario, but gravity is zero." << std::endl;
405 if (cartdims[2] <= 1) {
406 std::cout <<
"**** Warning: running gravity segregation scenario, which expects nz > 1." << std::endl;
409 const double woc = param.
get<
double>(
"water_oil_contact");
410 initWaterOilContact(number_of_cells, begin_cell_centroids, dimensions,
411 props, woc, WaterAbove, state);
415 initHydrostaticPressure(number_of_cells, begin_cell_centroids, dimensions,
416 dens, woc, gravity, woc, ref_p, state);
417 }
else if (param.
has(
"water_oil_contact")) {
419 if (gravity == 0.0) {
420 std::cout <<
"**** Warning: running gravity convection scenario, but gravity is zero." << std::endl;
422 if (cartdims[2] <= 1) {
423 std::cout <<
"**** Warning: running gravity convection scenario, which expects nz > 1." << std::endl;
426 const double woc = param.
get<
double>(
"water_oil_contact");
427 initWaterOilContact(number_of_cells, begin_cell_centroids, dimensions,
428 props, woc, WaterBelow, state);
431 initHydrostaticPressure(number_of_cells, begin_cell_centroids, dimensions,
433 }
else if (param.
has(
"init_saturation")) {
435 const double init_saturation = param.
get<
double>(
"init_saturation");
436 for (
int cell = 0; cell < num_cells; ++cell) {
437 state.saturation()[2*cell] = init_saturation;
438 state.saturation()[2*cell + 1] = 1.0 - init_saturation;
442 const double rho = props.
density()[0]*init_saturation + props.
density()[1]*(1.0 - init_saturation);
443 const double dens[2] = { rho, rho };
445 initHydrostaticPressure(number_of_cells, begin_cell_centroids, dimensions,
446 dens, ref_z, gravity, ref_z, ref_p, state);
451 const double rho = props.
density()[1];
452 const double dens[2] = { rho, rho };
454 initHydrostaticPressure(number_of_cells, begin_cell_centroids, dimensions,
455 dens, ref_z, gravity, ref_z, ref_p, state);
459 initFacePressure(dimensions, number_of_faces, face_cells, begin_face_centroids,
460 begin_cell_centroids, state);
465 template <
class State>
469 const double gravity,
475 props, param, gravity, state);
478 template <
class FaceCells,
class FCI,
class CCI,
class State>
480 const int* global_cell,
483 FaceCells face_cells,
484 FCI begin_face_centroids,
485 CCI begin_cell_centroids,
489 const double gravity,
493 const int num_phases = props.
numPhases();
494 if (num_phases != 2) {
495 OPM_THROW(std::runtime_error,
"initStateTwophaseBasic(): currently handling only two-phase scenarios.");
497 state.init(number_of_cells, number_of_faces, num_phases);
498 const int num_cells = props.
numCells();
500 std::vector<int> all_cells(num_cells);
501 for (
int i = 0; i < num_cells; ++i) {
504 state.setFirstSat(all_cells, props, State::MinSat);
505 const bool convection_testcase = param.
getDefault(
"convection_testcase",
false);
506 if (convection_testcase) {
508 std::vector<int> left_cells;
509 left_cells.reserve(num_cells/2);
510 for (
int cell = 0; cell < num_cells; ++cell) {
511 const int gc = global_cell == 0 ? cell : global_cell[cell];
512 bool left = (gc % cartdims[0]) < cartdims[0]/2;
514 left_cells.push_back(cell);
517 state.setFirstSat(left_cells, props, State::MaxSat);
519 std::fill(state.pressure().begin(), state.pressure().end(), init_p);
520 }
else if (param.
has(
"water_oil_contact")) {
522 if (gravity == 0.0) {
523 std::cout <<
"**** Warning: running gravity convection scenario, but gravity is zero." << std::endl;
525 if (cartdims[2] <= 1) {
526 std::cout <<
"**** Warning: running gravity convection scenario, which expects nz > 1." << std::endl;
529 const double woc = param.
get<
double>(
"water_oil_contact");
530 initWaterOilContact(number_of_cells, begin_cell_centroids, dimensions,
531 props, woc, WaterBelow, state);
534 initHydrostaticPressure(number_of_cells, begin_cell_centroids, dimensions,
535 props, woc, gravity, woc, ref_p, state);
541 const double woc = -1e100;
542 initHydrostaticPressure(number_of_cells, begin_cell_centroids, dimensions,
543 props, woc, gravity, ref_z, ref_p, state);
547 initFacePressure(dimensions, number_of_faces, face_cells, begin_face_centroids,
548 begin_cell_centroids, state);
553 template <
class Props,
class State>
556 Opm::DeckConstPtr deck,
557 const double gravity,
563 props, deck, gravity, state);
566 template <
class FaceCells,
class FCI,
class CCI,
class Props,
class State>
568 const int* global_cell,
570 FaceCells face_cells,
571 FCI begin_face_centroids,
572 CCI begin_cell_centroids,
575 Opm::DeckConstPtr deck,
576 const double gravity,
579 const int num_phases = props.numPhases();
582 OPM_THROW(std::runtime_error,
"initStateFromDeck(): user specified property object with " << num_phases <<
" phases, "
583 "found " << pu.
num_phases <<
" phases in deck.");
585 state.init(number_of_cells, number_of_faces, num_phases);
586 if (deck->hasKeyword(
"EQUIL") && deck->hasKeyword(
"PRESSURE")) {
587 OPM_THROW(std::runtime_error,
"initStateFromDeck(): The deck must either specify the initial "
588 "condition using the PRESSURE _or_ the EQUIL keyword (currently it has both)");
591 if (deck->hasKeyword(
"EQUIL")) {
592 if (num_phases != 2) {
593 OPM_THROW(std::runtime_error,
"initStateFromDeck(): EQUIL-based init currently handling only two-phase scenarios.");
596 OPM_THROW(std::runtime_error,
"initStateFromDeck(): EQUIL-based init currently handling only oil-water scenario (no gas).");
599 EquilWrapper equil(deck->getKeyword(
"EQUIL"));
600 if (equil.numRegions() != 1) {
601 OPM_THROW(std::runtime_error,
"initStateFromDeck(): No region support yet.");
603 const double woc = equil.waterOilContactDepth(0);
604 initWaterOilContact(number_of_cells, begin_cell_centroids, dimensions,
605 props, woc, WaterBelow, state);
607 const double datum_z = equil.datumDepth(0);
608 const double datum_p = equil.datumDepthPressure(0);
609 initHydrostaticPressure(number_of_cells, begin_cell_centroids, dimensions,
610 props, woc, gravity, datum_z, datum_p, state);
611 }
else if (deck->hasKeyword(
"PRESSURE")) {
613 std::vector<double>& s = state.saturation();
614 std::vector<double>& p = state.pressure();
615 const std::vector<double>& p_deck = deck->getKeyword(
"PRESSURE")->getSIDoubleData();
616 const int num_cells = number_of_cells;
617 if (num_phases == 2) {
620 if (!deck->hasKeyword(
"SGAS")) {
621 OPM_THROW(std::runtime_error,
"initStateFromDeck(): missing SGAS keyword in 2-phase init");
623 const std::vector<double>& sg_deck = deck->getKeyword(
"SGAS")->getSIDoubleData();
626 for (
int c = 0; c < num_cells; ++c) {
627 int c_deck = (global_cell == NULL) ? c : global_cell[c];
628 s[2*c + gpos] = sg_deck[c_deck];
629 s[2*c + opos] = 1.0 - sg_deck[c_deck];
630 p[c] = p_deck[c_deck];
634 if (!deck->hasKeyword(
"SWAT")) {
635 OPM_THROW(std::runtime_error,
"initStateFromDeck(): missing SWAT keyword in 2-phase init");
637 const std::vector<double>& sw_deck = deck->getKeyword(
"SWAT")->getSIDoubleData();
639 const int nwpos = (wpos + 1) % 2;
640 for (
int c = 0; c < num_cells; ++c) {
641 int c_deck = (global_cell == NULL) ? c : global_cell[c];
642 s[2*c + wpos] = sw_deck[c_deck];
643 s[2*c + nwpos] = 1.0 - sw_deck[c_deck];
644 p[c] = p_deck[c_deck];
647 }
else if (num_phases == 3) {
648 const bool has_swat_sgas = deck->hasKeyword(
"SWAT") && deck->hasKeyword(
"SGAS");
649 if (!has_swat_sgas) {
650 OPM_THROW(std::runtime_error,
"initStateFromDeck(): missing SGAS or SWAT keyword in 3-phase init.");
655 const std::vector<double>& sw_deck = deck->getKeyword(
"SWAT")->getSIDoubleData();
656 const std::vector<double>& sg_deck = deck->getKeyword(
"SGAS")->getSIDoubleData();
657 for (
int c = 0; c < num_cells; ++c) {
658 int c_deck = (global_cell == NULL) ? c : global_cell[c];
659 s[3*c + wpos] = sw_deck[c_deck];
660 s[3*c + opos] = 1.0 - (sw_deck[c_deck] + sg_deck[c_deck]);
661 s[3*c + gpos] = sg_deck[c_deck];
662 p[c] = p_deck[c_deck];
665 OPM_THROW(std::runtime_error,
"initStateFromDeck(): init with SWAT etc. only available with 2 or 3 phases.");
668 OPM_THROW(std::runtime_error,
"initStateFromDeck(): we must either have EQUIL, or PRESSURE and SWAT/SOIL/SGAS.");
672 initFacePressure(dimensions, number_of_faces, face_cells, begin_face_centroids,
673 begin_cell_centroids, state);
679 template <
class Props,
class State>
687 template <
class Props,
class State>
692 state.surfacevol() = state.saturation();
693 const int np = props.numPhases();
694 const int nc = number_of_cells;
695 std::vector<double> allA(nc*np*np);
696 std::vector<int> allcells(nc);
697 for (
int c = 0; c < nc; ++c) {
703 props.matrix(nc, &state.pressure()[0], &state.temperature()[0], &state.surfacevol()[0], &allcells[0], &allA[0], 0);
704 for (
int c = 0; c < nc; ++c) {
706 double* z = &state.surfacevol()[c*np];
707 const double* s = &state.saturation()[c*np];
708 const double* A = &allA[c*np*np];
710 for (
int row = 0; row < np; ++row) { z[row] = 0.0; }
712 for (
int col = 0; col < np; ++col) {
713 for (
int row = 0; row < np; ++row) {
715 z[row] += A[row + np*col]*s[col];
723 template <
class Props,
class State>
731 template <
class Props,
class State>
737 if (props.numPhases() != 3) {
738 OPM_THROW(std::runtime_error,
"initBlackoilSurfvol() is only supported in three-phase simulations.");
740 const std::vector<double>& rs = state.gasoilratio();
741 const std::vector<double>& rv = state.rv();
744 state.surfacevol() = state.saturation();
747 const int np = props.numPhases();
749 std::vector<double> allA_a(number_of_cells*np*np);
750 std::vector<double> allA_l(number_of_cells*np*np);
751 std::vector<double> allA_v(number_of_cells*np*np);
753 std::vector<int> allcells(number_of_cells);
754 std::vector<double> z_init(number_of_cells*np);
755 std::fill(z_init.begin(),z_init.end(),0.0);
757 for (
int c = 0; c < number_of_cells; ++c) {
761 std::vector<double> capPressures(number_of_cells*np);
762 props.capPress(number_of_cells,&state.saturation()[0],&allcells[0],&capPressures[0],NULL);
764 std::vector<double> Pw(number_of_cells);
765 std::vector<double> Pg(number_of_cells);
767 for (
int c = 0; c < number_of_cells; ++c){
777 for (
int c = 0; c < number_of_cells ; ++c){
778 for (
int p = 0; p < np ; ++p){
784 z_init[c*np + p] = z_tmp;
787 props.matrix(number_of_cells, &state.pressure()[0], &state.temperature()[0], &z_init[0], &allcells[0], &allA_a[0], 0);
791 for (
int c = 0; c < number_of_cells ; ++c){
792 for (
int p = 0; p < np ; ++p){
794 if(state.saturation()[np*c + p] > 0)
804 z_init[c*np + p] = z_tmp;
809 props.matrix(number_of_cells, &state.pressure()[0], &state.temperature()[0], &z_init[0], &allcells[0], &allA_l[0], 0);
812 for (
int c = 0; c < number_of_cells ; ++c){
813 for (
int p = 0; p < np ; ++p){
815 if(state.saturation()[np*c + p] > 0)
825 z_init[c*np + p] = z_tmp;
830 props.matrix(number_of_cells, &state.pressure()[0], &state.temperature()[0], &z_init[0], &allcells[0], &allA_v[0], 0);
832 for (
int c = 0; c < number_of_cells; ++c) {
834 double* z = &state.surfacevol()[c*np];
835 const double* s = &state.saturation()[c*np];
836 const double* A_a = &allA_a[c*np*np];
837 const double* A_l = &allA_l[c*np*np];
838 const double* A_v = &allA_v[c*np*np];
840 for (
int row = 0; row < np; ++row) { z[row] = 0.0; }
842 for (
int col = 0; col < np; ++col) {
843 z[0] += A_a[0 + np*col]*s[col];
844 z[1] += A_l[1 + np*col]*s[col];
845 z[2] += A_v[2 + np*col]*s[col];
856 template <
class Props,
class State>
859 Opm::DeckConstPtr deck,
860 const double gravity,
866 props, deck, gravity, state);
870 template <
class FaceCells,
class FCI,
class CCI,
class Props,
class State>
872 const int* global_cell,
874 FaceCells face_cells,
875 FCI begin_face_centroids,
876 CCI begin_cell_centroids,
879 Opm::DeckConstPtr deck,
880 const double gravity,
884 face_cells, begin_face_centroids, begin_cell_centroids,
885 dimensions, props, deck, gravity, state);
886 if (deck->hasKeyword(
"RS")) {
887 const std::vector<double>& rs_deck = deck->getKeyword(
"RS")->getSIDoubleData();
888 const int num_cells = number_of_cells;
889 for (
int c = 0; c < num_cells; ++c) {
890 int c_deck = (global_cell == NULL) ? c : global_cell[c];
891 state.gasoilratio()[c] = rs_deck[c_deck];
895 }
else if (deck->hasKeyword(
"RV")){
896 const std::vector<double>& rv_deck = deck->getKeyword(
"RV")->getSIDoubleData();
897 const int num_cells = number_of_cells;
898 for (
int c = 0; c < num_cells; ++c) {
899 int c_deck = (global_cell == NULL) ? c : global_cell[c];
900 state.rv()[c] = rv_deck[c_deck];
906 state.gasoilratio() = std::vector<double>(number_of_cells, 0.0);
907 state.rv() = std::vector<double>(number_of_cells, 0.0);
916 #endif // OPM_INITSTATE_IMPL_HEADER_INCLUDED
Definition: IncompPropertiesInterface.hpp:35
virtual int numPhases() const =0
double getCoordinate(T *cc, int i)
Get the i-th corrdinate of a centroid.
Definition: GridHelpers.hpp:337
FaceCellTraits< UnstructuredGrid >::Type faceCells(const UnstructuredGrid &grid)
Get the face to cell mapping of a grid.
Definition: AnisotropicEikonal.hpp:43
Definition: BlackoilPhases.hpp:32
Definition: ParameterGroup.hpp:109
int phase_used[MaxNumPhases]
Definition: BlackoilPhases.hpp:39
virtual const double * density() const =0
T getDefault(const std::string &name, const T &default_value) const
This method is used to read a parameter from the parameter group.
Definition: ParameterGroup_impl.hpp:226
virtual int numPhases() const =0
bool water(const PhaseUsage &pu)
Definition: initStateEquil_impl.hpp:252
T get(const std::string &name) const
This method is used to read a parameter from the parameter group.
Definition: ParameterGroup_impl.hpp:173
const double barsa
Definition: Units.hpp:136
Definition: BlackoilPropertiesInterface.hpp:37
int phase_pos[MaxNumPhases]
Definition: BlackoilPhases.hpp:40
int number_of_faces
Definition: grid.h:111
int num_phases
Definition: BlackoilPhases.hpp:38
int number_of_cells
Definition: grid.h:109
double * face_centroids
Definition: grid.h:168
int dimensions(const UnstructuredGrid &grid)
Get the dimensions of a grid.
void initBlackoilSurfvol(const UnstructuredGrid &grid, const Props &props, State &state)
Definition: initState_impl.hpp:680
int dimensions
Definition: grid.h:106
bool has(const std::string &name) const
This method checks if there is something with name name in the parameter gropup.
const double gravity
Definition: Units.hpp:120
double * cell_centroids
Definition: grid.h:192
void computeSaturation(const BlackoilPropertiesInterface &props, BlackoilState &state)
Computes saturation from surface volume densities.
T * increment(T *cc, int i, int dim)
Increment an iterator over an array that reresents a dense row-major matrix with dims columns...
Definition: GridHelpers.hpp:318
virtual int numCells() const =0
Definition: BlackoilPhases.hpp:32
int cartdims[3]
Definition: grid.h:227
const UnstructuredGrid & grid
Definition: ColumnExtract.hpp:31
int * global_cell
Definition: grid.h:214
bool oil(const PhaseUsage &pu)
Definition: initStateEquil_impl.hpp:258
void initStateFromDeck(const UnstructuredGrid &grid, const Props &props, Opm::DeckConstPtr deck, const double gravity, State &state)
Initialize a state from input deck.
Definition: initState_impl.hpp:554
void initBlackoilSurfvolUsingRSorRV(const UnstructuredGrid &grid, const Props &props, State &state)
Definition: initState_impl.hpp:724
virtual int numCells() const =0
PhaseUsage phaseUsageFromDeck(Opm::EclipseStateConstPtr eclipseState)
Definition: phaseUsageFromDeck.hpp:35
void initStateBasic(const UnstructuredGrid &grid, const IncompPropertiesInterface &props, const parameter::ParameterGroup ¶m, const double gravity, State &state)
Initialize a twophase state from parameters.
Definition: initState_impl.hpp:345
Definition: BlackoilPhases.hpp:32
std::vector< double > temperature(const Grid &, const Region &, const CellRange &cells)
Definition: initStateEquil_impl.hpp:667
Definition: BlackoilPhases.hpp:36
void initBlackoilStateFromDeck(const UnstructuredGrid &grid, const Props &props, Opm::DeckConstPtr deck, const double gravity, State &state)
Initialize a blackoil state from input deck.
Definition: initState_impl.hpp:857