co2injectionproblem.hh
Go to the documentation of this file.
1 // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 // vi: set et ts=4 sw=4 sts=4:
3 /*
4  This file is part of the Open Porous Media project (OPM).
5 
6  OPM 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 2 of the License, or
9  (at your option) any later version.
10 
11  OPM is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 
19  Consult the COPYING file in the top-level source directory of this
20  module for the precise wording of the license and the list of
21  copyright holders.
22 */
28 #ifndef EWOMS_CO2_INJECTION_PROBLEM_HH
29 #define EWOMS_CO2_INJECTION_PROBLEM_HH
30 
33 
34 #include <opm/material/fluidsystems/H2ON2FluidSystem.hpp>
35 #include <opm/material/fluidsystems/BrineCO2FluidSystem.hpp>
36 #include <opm/material/fluidstates/CompositionalFluidState.hpp>
37 #include <opm/material/fluidstates/ImmiscibleFluidState.hpp>
38 #include <opm/material/constraintsolvers/ComputeFromReferencePhase.hpp>
39 #include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
40 #include <opm/material/fluidmatrixinteractions/RegularizedBrooksCorey.hpp>
41 #include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
42 #include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
43 #include <opm/material/heatconduction/Somerton.hpp>
44 #include <opm/material/binarycoefficients/Brine_CO2.hpp>
45 #include <opm/material/common/UniformTabulated2DFunction.hpp>
46 #include <opm/common/Unused.hpp>
47 
48 #include <dune/grid/yaspgrid.hh>
49 #include <dune/grid/io/file/dgfparser/dgfyasp.hh>
50 
51 #include <dune/common/version.hh>
52 #include <dune/common/fvector.hh>
53 #include <dune/common/fmatrix.hh>
54 
55 #include <sstream>
56 #include <iostream>
57 #include <string>
58 
59 namespace Ewoms {
61 template <class TypeTag>
62 class Co2InjectionProblem;
63 
64 namespace Co2Injection {
65 #include <opm/material/components/co2tables.inc>
66 }
68 
69 namespace Properties {
70 NEW_TYPE_TAG(Co2InjectionBaseProblem);
71 
72 // declare the CO2 injection problem specific property tags
73 NEW_PROP_TAG(FluidSystemPressureLow);
74 NEW_PROP_TAG(FluidSystemPressureHigh);
75 NEW_PROP_TAG(FluidSystemNumPressure);
76 NEW_PROP_TAG(FluidSystemTemperatureLow);
77 NEW_PROP_TAG(FluidSystemTemperatureHigh);
78 NEW_PROP_TAG(FluidSystemNumTemperature);
79 
80 NEW_PROP_TAG(MaxDepth);
81 NEW_PROP_TAG(Temperature);
82 NEW_PROP_TAG(SimulationName);
83 
84 // Set the grid type
85 SET_TYPE_PROP(Co2InjectionBaseProblem, Grid, Dune::YaspGrid<2>);
86 
87 // Set the problem property
88 SET_TYPE_PROP(Co2InjectionBaseProblem, Problem,
90 
91 // Set fluid configuration
92 SET_PROP(Co2InjectionBaseProblem, FluidSystem)
93 {
94 private:
95  typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
96  typedef Ewoms::Co2Injection::CO2Tables CO2Tables;
97 
98 public:
99  typedef Opm::FluidSystems::BrineCO2<Scalar, CO2Tables> type;
100  //typedef Opm::FluidSystems::H2ON2<Scalar, /*useComplexRelations=*/false> type;
101 };
102 
103 // Set the material Law
104 SET_PROP(Co2InjectionBaseProblem, MaterialLaw)
105 {
106 private:
107  typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
108  enum { liquidPhaseIdx = FluidSystem::liquidPhaseIdx };
109  enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
110 
111  typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
112  typedef Opm::TwoPhaseMaterialTraits<Scalar,
113  /*wettingPhaseIdx=*/FluidSystem::liquidPhaseIdx,
114  /*nonWettingPhaseIdx=*/FluidSystem::gasPhaseIdx> Traits;
115 
116  // define the material law which is parameterized by effective
117  // saturations
118  typedef Opm::RegularizedBrooksCorey<Traits> EffMaterialLaw;
119 
120 public:
121  // define the material law parameterized by absolute saturations
122  typedef Opm::EffToAbsLaw<EffMaterialLaw> type;
123 };
124 
125 // Set the heat conduction law
126 SET_PROP(Co2InjectionBaseProblem, HeatConductionLaw)
127 {
128 private:
129  typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
130  typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
131 
132 public:
133  // define the material law parameterized by absolute saturations
134  typedef Opm::Somerton<FluidSystem, Scalar> type;
135 };
136 
137 // Use the algebraic multi-grid linear solver for this problem
138 SET_TAG_PROP(Co2InjectionBaseProblem, LinearSolverSplice, ParallelAmgLinearSolver);
139 
140 // Write the Newton convergence behavior to disk?
141 SET_BOOL_PROP(Co2InjectionBaseProblem, NewtonWriteConvergence, false);
142 
143 // Enable gravity
144 SET_BOOL_PROP(Co2InjectionBaseProblem, EnableGravity, true);
145 
146 // set the defaults for the problem specific properties
147 SET_SCALAR_PROP(Co2InjectionBaseProblem, FluidSystemPressureLow, 3e7);
148 SET_SCALAR_PROP(Co2InjectionBaseProblem, FluidSystemPressureHigh, 4e7);
149 SET_INT_PROP(Co2InjectionBaseProblem, FluidSystemNumPressure, 100);
150 SET_SCALAR_PROP(Co2InjectionBaseProblem, FluidSystemTemperatureLow, 290);
151 SET_SCALAR_PROP(Co2InjectionBaseProblem, FluidSystemTemperatureHigh, 500);
152 SET_INT_PROP(Co2InjectionBaseProblem, FluidSystemNumTemperature, 100);
153 
154 SET_SCALAR_PROP(Co2InjectionBaseProblem, MaxDepth, 2500);
155 SET_SCALAR_PROP(Co2InjectionBaseProblem, Temperature, 293.15);
156 SET_STRING_PROP(Co2InjectionBaseProblem, SimulationName, "co2injection");
157 
158 // The default for the end time of the simulation
159 SET_SCALAR_PROP(Co2InjectionBaseProblem, EndTime, 1e4);
160 
161 // The default for the initial time step size of the simulation
162 SET_SCALAR_PROP(Co2InjectionBaseProblem, InitialTimeStepSize, 250);
163 
164 // The default DGF file to load
165 SET_STRING_PROP(Co2InjectionBaseProblem, GridFile, "data/co2injection.dgf");
166 } // namespace Properties
167 } // namespace Ewoms
168 
169 namespace Ewoms {
192 template <class TypeTag>
193 class Co2InjectionProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
194 {
195  typedef typename GET_PROP_TYPE(TypeTag, BaseProblem) ParentType;
196 
197  typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
198  typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
199  typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
200  typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
201 
202  enum { dim = GridView::dimension };
203  enum { dimWorld = GridView::dimensionworld };
204 
205  // copy some indices for convenience
206  typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
207  enum { numPhases = FluidSystem::numPhases };
208  enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
209  enum { liquidPhaseIdx = FluidSystem::liquidPhaseIdx };
210  enum { CO2Idx = FluidSystem::CO2Idx };
211  enum { BrineIdx = FluidSystem::BrineIdx };
212  enum { conti0EqIdx = Indices::conti0EqIdx };
213  enum { contiCO2EqIdx = conti0EqIdx + CO2Idx };
214 
215  typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
216  typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
217  typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
218  typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
219  typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
220  typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
221  typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
222  typedef typename GET_PROP_TYPE(TypeTag, HeatConductionLaw) HeatConductionLaw;
223  typedef typename HeatConductionLaw::Params HeatConductionLawParams;
224 
225  typedef Opm::MathToolbox<Evaluation> Toolbox;
226  typedef typename GridView::ctype CoordScalar;
227  typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
228  typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
229 
230 public:
235  : ParentType(simulator)
236  { }
237 
241  void finishInit()
242  {
243  ParentType::finishInit();
244 
245  eps_ = 1e-6;
246 
247  temperatureLow_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemTemperatureLow);
248  temperatureHigh_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemTemperatureHigh);
249  nTemperature_ = EWOMS_GET_PARAM(TypeTag, unsigned, FluidSystemNumTemperature);
250 
251  pressureLow_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemPressureLow);
252  pressureHigh_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemPressureHigh);
253  nPressure_ = EWOMS_GET_PARAM(TypeTag, unsigned, FluidSystemNumPressure);
254 
255  maxDepth_ = EWOMS_GET_PARAM(TypeTag, Scalar, MaxDepth);
256  temperature_ = EWOMS_GET_PARAM(TypeTag, Scalar, Temperature);
257 
258  // initialize the tables of the fluid system
259  // FluidSystem::init();
260  FluidSystem::init(/*Tmin=*/temperatureLow_,
261  /*Tmax=*/temperatureHigh_,
262  /*nT=*/nTemperature_,
263  /*pmin=*/pressureLow_,
264  /*pmax=*/pressureHigh_,
265  /*np=*/nPressure_);
266 
267  fineLayerBottom_ = 22.0;
268 
269  // intrinsic permeabilities
270  fineK_ = this->toDimMatrix_(1e-13);
271  coarseK_ = this->toDimMatrix_(1e-12);
272 
273  // porosities
274  finePorosity_ = 0.3;
275  coarsePorosity_ = 0.3;
276 
277  // residual saturations
278  fineMaterialParams_.setResidualSaturation(liquidPhaseIdx, 0.2);
279  fineMaterialParams_.setResidualSaturation(gasPhaseIdx, 0.0);
280  coarseMaterialParams_.setResidualSaturation(liquidPhaseIdx, 0.2);
281  coarseMaterialParams_.setResidualSaturation(gasPhaseIdx, 0.0);
282 
283  // parameters for the Brooks-Corey law
284  fineMaterialParams_.setEntryPressure(1e4);
285  coarseMaterialParams_.setEntryPressure(5e3);
286  fineMaterialParams_.setLambda(2.0);
287  coarseMaterialParams_.setLambda(2.0);
288 
289  fineMaterialParams_.finalize();
290  coarseMaterialParams_.finalize();
291 
292  // parameters for the somerton law of heat conduction
293  computeHeatCondParams_(fineHeatCondParams_, finePorosity_);
294  computeHeatCondParams_(coarseHeatCondParams_, coarsePorosity_);
295  }
296 
300  static void registerParameters()
301  {
302  ParentType::registerParameters();
303 
304  EWOMS_REGISTER_PARAM(TypeTag, Scalar, FluidSystemTemperatureLow,
305  "The lower temperature [K] for tabulation of the "
306  "fluid system");
307  EWOMS_REGISTER_PARAM(TypeTag, Scalar, FluidSystemTemperatureHigh,
308  "The upper temperature [K] for tabulation of the "
309  "fluid system");
310  EWOMS_REGISTER_PARAM(TypeTag, unsigned, FluidSystemNumTemperature,
311  "The number of intervals between the lower and "
312  "upper temperature");
313 
314  EWOMS_REGISTER_PARAM(TypeTag, Scalar, FluidSystemPressureLow,
315  "The lower pressure [Pa] for tabulation of the "
316  "fluid system");
317  EWOMS_REGISTER_PARAM(TypeTag, Scalar, FluidSystemPressureHigh,
318  "The upper pressure [Pa] for tabulation of the "
319  "fluid system");
320  EWOMS_REGISTER_PARAM(TypeTag, unsigned, FluidSystemNumPressure,
321  "The number of intervals between the lower and "
322  "upper pressure");
323 
324  EWOMS_REGISTER_PARAM(TypeTag, Scalar, Temperature,
325  "The temperature [K] in the reservoir");
326  EWOMS_REGISTER_PARAM(TypeTag, Scalar, MaxDepth,
327  "The maximum depth [m] of the reservoir");
328  EWOMS_REGISTER_PARAM(TypeTag, std::string, SimulationName,
329  "The name of the simulation used for the output "
330  "files");
331  }
332 
336 
341  std::string name() const
342  {
343  std::ostringstream oss;
344  oss << EWOMS_GET_PARAM(TypeTag, std::string, SimulationName)
345  << "_" << Model::name();
346  if (GET_PROP_VALUE(TypeTag, EnableEnergy))
347  oss << "_ni";
348  oss << "_" << Model::discretizationName();
349  return oss.str();
350  }
351 
355  void endTimeStep()
356  {
357 #ifndef NDEBUG
358  Scalar tol = this->model().newtonMethod().tolerance()*1e5;
359  this->model().checkConservativeness(tol);
360 
361  // Calculate storage terms
362  PrimaryVariables storageL, storageG;
363  this->model().globalPhaseStorage(storageL, /*phaseIdx=*/0);
364  this->model().globalPhaseStorage(storageG, /*phaseIdx=*/1);
365 
366  // Write mass balance information for rank 0
367  if (this->gridView().comm().rank() == 0) {
368  std::cout << "Storage: liquid=[" << storageL << "]"
369  << " gas=[" << storageG << "]\n" << std::flush;
370  }
371 #endif // NDEBUG
372  }
373 
377  template <class Context>
378  Scalar temperature(const Context& context, unsigned spaceIdx, unsigned timeIdx) const
379  {
380  const auto& pos = context.pos(spaceIdx, timeIdx);
381  if (inHighTemperatureRegion_(pos))
382  return temperature_ + 100;
383  return temperature_;
384  }
385 
389  template <class Context>
390  const DimMatrix& intrinsicPermeability(const Context& context, unsigned spaceIdx,
391  unsigned timeIdx) const
392  {
393  const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
394  if (isFineMaterial_(pos))
395  return fineK_;
396  return coarseK_;
397  }
398 
402  template <class Context>
403  Scalar porosity(const Context& context, unsigned spaceIdx, unsigned timeIdx) const
404  {
405  const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
406  if (isFineMaterial_(pos))
407  return finePorosity_;
408  return coarsePorosity_;
409  }
410 
414  template <class Context>
415  const MaterialLawParams& materialLawParams(const Context& context,
416  unsigned spaceIdx, unsigned timeIdx) const
417  {
418  const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
419  if (isFineMaterial_(pos))
420  return fineMaterialParams_;
421  return coarseMaterialParams_;
422  }
423 
429  template <class Context>
430  Scalar heatCapacitySolid(const Context& context OPM_UNUSED,
431  unsigned spaceIdx OPM_UNUSED,
432  unsigned timeIdx OPM_UNUSED) const
433  {
434  return 790 // specific heat capacity of granite [J / (kg K)]
435  * 2700; // density of granite [kg/m^3]
436  }
437 
441  template <class Context>
442  const HeatConductionLawParams &
443  heatConductionParams(const Context& context, unsigned spaceIdx, unsigned timeIdx) const
444  {
445  const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
446  if (isFineMaterial_(pos))
447  return fineHeatCondParams_;
448  return coarseHeatCondParams_;
449  }
450 
452 
456 
461  template <class Context>
462  void boundary(BoundaryRateVector& values, const Context& context,
463  unsigned spaceIdx, unsigned timeIdx) const
464  {
465  const auto& pos = context.pos(spaceIdx, timeIdx);
466  if (onLeftBoundary_(pos)) {
467  Opm::CompositionalFluidState<Scalar, FluidSystem> fs;
468  initialFluidState_(fs, context, spaceIdx, timeIdx);
469  fs.checkDefined();
470 
471  // impose an freeflow boundary condition
472  values.setFreeFlow(context, spaceIdx, timeIdx, fs);
473  }
474  else if (onInlet_(pos)) {
475  RateVector massRate(0.0);
476  massRate[contiCO2EqIdx] = -1e-3; // [kg/(m^3 s)]
477 
478  typedef Opm::ImmiscibleFluidState<Scalar, FluidSystem> FluidState;
479  FluidState fs;
480  fs.setSaturation(gasPhaseIdx, 1.0);
481  const auto& pg =
482  context.intensiveQuantities(spaceIdx, timeIdx).fluidState().pressure(gasPhaseIdx);
483  fs.setPressure(gasPhaseIdx, Toolbox::value(pg));
484  fs.setTemperature(temperature(context, spaceIdx, timeIdx));
485 
486  typename FluidSystem::template ParameterCache<Scalar> paramCache;
487  paramCache.updatePhase(fs, gasPhaseIdx);
488  Scalar h = FluidSystem::template enthalpy<FluidState, Scalar>(fs, paramCache, gasPhaseIdx);
489 
490  // impose an forced inflow boundary condition for pure CO2
491  values.setMassRate(massRate);
492  values.setEnthalpyRate(massRate[contiCO2EqIdx] * h);
493  }
494  else
495  // no flow on top and bottom
496  values.setNoFlow();
497  }
498 
499  // \}
500 
504 
509  template <class Context>
510  void initial(PrimaryVariables& values, const Context& context, unsigned spaceIdx,
511  unsigned timeIdx) const
512  {
513  Opm::CompositionalFluidState<Scalar, FluidSystem> fs;
514  initialFluidState_(fs, context, spaceIdx, timeIdx);
515 
516  // const auto& matParams = this->materialLawParams(context, spaceIdx,
517  // timeIdx);
518  // values.assignMassConservative(fs, matParams, /*inEquilibrium=*/true);
519  values.assignNaive(fs);
520  }
521 
528  template <class Context>
529  void source(RateVector& rate,
530  const Context& context OPM_UNUSED,
531  unsigned spaceIdx OPM_UNUSED,
532  unsigned timeIdx OPM_UNUSED) const
533  { rate = Scalar(0.0); }
534 
536 
537 private:
538  template <class Context, class FluidState>
539  void initialFluidState_(FluidState& fs,
540  const Context& context,
541  unsigned spaceIdx,
542  unsigned timeIdx) const
543  {
544  const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
545 
547  // set temperature
549  fs.setTemperature(temperature(context, spaceIdx, timeIdx));
550 
552  // set saturations
554  fs.setSaturation(FluidSystem::liquidPhaseIdx, 1.0);
555  fs.setSaturation(FluidSystem::gasPhaseIdx, 0.0);
556 
558  // set pressures
560  Scalar densityL = FluidSystem::Brine::liquidDensity(temperature_, Scalar(1e5));
561  Scalar depth = maxDepth_ - pos[dim - 1];
562  Scalar pl = 1e5 - densityL * this->gravity()[dim - 1] * depth;
563 
564  Scalar pC[numPhases];
565  const auto& matParams = this->materialLawParams(context, spaceIdx, timeIdx);
566  MaterialLaw::capillaryPressures(pC, matParams, fs);
567 
568  fs.setPressure(liquidPhaseIdx, pl + (pC[liquidPhaseIdx] - pC[liquidPhaseIdx]));
569  fs.setPressure(gasPhaseIdx, pl + (pC[gasPhaseIdx] - pC[liquidPhaseIdx]));
570 
572  // set composition of the liquid phase
574  fs.setMoleFraction(liquidPhaseIdx, CO2Idx, 0.005);
575  fs.setMoleFraction(liquidPhaseIdx, BrineIdx,
576  1.0 - fs.moleFraction(liquidPhaseIdx, CO2Idx));
577 
578  typename FluidSystem::template ParameterCache<Scalar> paramCache;
579  typedef Opm::ComputeFromReferencePhase<Scalar, FluidSystem> CFRP;
580  CFRP::solve(fs, paramCache,
581  /*refPhaseIdx=*/liquidPhaseIdx,
582  /*setViscosity=*/true,
583  /*setEnthalpy=*/true);
584  }
585 
586  bool onLeftBoundary_(const GlobalPosition& pos) const
587  { return pos[0] < eps_; }
588 
589  bool onRightBoundary_(const GlobalPosition& pos) const
590  { return pos[0] > this->boundingBoxMax()[0] - eps_; }
591 
592  bool onInlet_(const GlobalPosition& pos) const
593  { return onRightBoundary_(pos) && (5 < pos[1]) && (pos[1] < 15); }
594 
595  bool inHighTemperatureRegion_(const GlobalPosition& pos) const
596  { return (pos[0] > 20) && (pos[0] < 30) && (pos[1] > 5) && (pos[1] < 35); }
597 
598  void computeHeatCondParams_(HeatConductionLawParams& params, Scalar poro)
599  {
600  Scalar lambdaWater = 0.6;
601  Scalar lambdaGranite = 2.8;
602 
603  Scalar lambdaWet = std::pow(lambdaGranite, (1 - poro))
604  * std::pow(lambdaWater, poro);
605  Scalar lambdaDry = std::pow(lambdaGranite, (1 - poro));
606 
607  params.setFullySaturatedLambda(gasPhaseIdx, lambdaDry);
608  params.setFullySaturatedLambda(liquidPhaseIdx, lambdaWet);
609  params.setVacuumLambda(lambdaDry);
610  }
611 
612  bool isFineMaterial_(const GlobalPosition& pos) const
613  { return pos[dim - 1] > fineLayerBottom_; }
614 
615  DimMatrix fineK_;
616  DimMatrix coarseK_;
617  Scalar fineLayerBottom_;
618 
619  Scalar finePorosity_;
620  Scalar coarsePorosity_;
621 
622  MaterialLawParams fineMaterialParams_;
623  MaterialLawParams coarseMaterialParams_;
624 
625  HeatConductionLawParams fineHeatCondParams_;
626  HeatConductionLawParams coarseHeatCondParams_;
627 
628  Scalar temperature_;
629  Scalar maxDepth_;
630  Scalar eps_;
631 
632  unsigned nTemperature_;
633  unsigned nPressure_;
634 
635  Scalar pressureLow_, pressureHigh_;
636  Scalar temperatureLow_, temperatureHigh_;
637 };
638 } // namespace Ewoms
639 
640 #endif
#define SET_BOOL_PROP(EffTypeTagName, PropTagName,...)
Set a property to a simple constant boolean value.
Definition: propertysystem.hh:361
const HeatConductionLawParams & heatConductionParams(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
Definition: co2injectionproblem.hh:443
Scalar heatCapacitySolid(const Context &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) const
Definition: co2injectionproblem.hh:430
const DimMatrix & intrinsicPermeability(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
Definition: co2injectionproblem.hh:390
Definition: baseauxiliarymodule.hh:37
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
Definition: co2injectionproblem.hh:403
void endTimeStep()
Called by the simulator after each time integration.
Definition: co2injectionproblem.hh:355
void finishInit()
Called by the Ewoms::Simulator in order to initialize the problem.
Definition: co2injectionproblem.hh:241
#define GET_PROP_VALUE(TypeTag, PropTagName)
Access the value attribute of a property for a type tag.
Definition: propertysystem.hh:469
#define NEW_TYPE_TAG(...)
Define a new type tag.
Definition: propertysystem.hh:169
const MaterialLawParams & materialLawParams(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
Definition: co2injectionproblem.hh:415
#define GET_PROP_TYPE(TypeTag, PropTagName)
Access the type attribute of a property for a type tag.
Definition: propertysystem.hh:486
#define SET_TAG_PROP(EffTypeTagName, PropTagName, ValueTypeTagName)
Define a property containing a type tag.
Definition: propertysystem.hh:436
#define SET_INT_PROP(EffTypeTagName, PropTagName,...)
Set a property to a simple constant integer value.
Definition: propertysystem.hh:345
#define EWOMS_REGISTER_PARAM(TypeTag, ParamType, ParamName, Description)
Register a run-time parameter.
Definition: parametersystem.hh:68
Problem where is injected under a low permeable layer at a depth of 2700m.
Definition: co2injectionproblem.hh:193
void source(RateVector &rate, const Context &context OPM_UNUSED, unsigned spaceIdx OPM_UNUSED, unsigned timeIdx OPM_UNUSED) const
Evaluate the source term for all phases within a given sub-control-volume.
Definition: co2injectionproblem.hh:529
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx, unsigned timeIdx) const
Evaluate the initial value for a control volume.
Definition: co2injectionproblem.hh:510
#define EWOMS_GET_PARAM(TypeTag, ParamType, ParamName)
Retrieve a runtime parameter.
Definition: parametersystem.hh:99
#define SET_PROP(EffTypeTagName, PropTagName)
Set a property for a specific type tag.
Definition: propertysystem.hh:297
static void registerParameters()
Definition: co2injectionproblem.hh:300
void boundary(BoundaryRateVector &values, const Context &context, unsigned spaceIdx, unsigned timeIdx) const
Evaluate the boundary conditions for a boundary segment.
Definition: co2injectionproblem.hh:462
std::string name() const
The problem name.
Definition: co2injectionproblem.hh:341
Provides a linear solver backend using the parallel algebraic multi-grid (AMG) linear solver from DUN...
Manages the initializing and running of time dependent problems.
Definition: simulator.hh:75
#define NEW_PROP_TAG(PTagName)
Define a property tag.
Definition: propertysystem.hh:247
Co2InjectionProblem(Simulator &simulator)
Definition: co2injectionproblem.hh:234
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
Definition: co2injectionproblem.hh:378
#define SET_TYPE_PROP(EffTypeTagName, PropTagName,...)
Set a property which defines a type.
Definition: propertysystem.hh:377
#define SET_STRING_PROP(EffTypeTagName, PropTagName,...)
Set a property to a simple constant string value.
Definition: propertysystem.hh:416
A fully-implicit multi-phase flow model which assumes immiscibility of the phases.
#define SET_SCALAR_PROP(EffTypeTagName, PropTagName,...)
Set a property to a simple constant scalar value.
Definition: propertysystem.hh:394