https://mooseframework.inl.gov
PorousFlowBrineCO2Test.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "MooseObjectUnitTest.h"
14 #include "PorousFlowBrineCO2.h"
15 #include "BrineFluidProperties.h"
16 #include "Water97FluidProperties.h"
17 #include "NaClFluidProperties.h"
18 #include "CO2FluidProperties.h"
19 
21 {
22 public:
24 
25 protected:
26  void buildObjects()
27  {
28  InputParameters pc_params = _factory.getValidParams("PorousFlowCapillaryPressureVG");
29  pc_params.set<Real>("m") = 0.5;
30  pc_params.set<Real>("alpha") = 1.0e-4;
31  _fe_problem->addUserObject("PorousFlowCapillaryPressureVG", "pc", pc_params);
32  _pc = &_fe_problem->getUserObject<PorousFlowCapillaryPressureVG>("pc");
33 
34  InputParameters brine_params = _factory.getValidParams("BrineFluidProperties");
35  _fe_problem->addUserObject("BrineFluidProperties", "brine_fp", brine_params);
36  _brine_fp = &_fe_problem->getUserObject<BrineFluidProperties>("brine_fp");
37 
38  InputParameters water_params = _factory.getValidParams("Water97FluidProperties");
39  _fe_problem->addUserObject("Water97FluidProperties", "water_fp", water_params);
40  _water_fp = &_fe_problem->getUserObject<Water97FluidProperties>("water_fp");
41 
42  InputParameters co2_params = _factory.getValidParams("CO2FluidProperties");
43  _fe_problem->addUserObject("CO2FluidProperties", "co2_fp", co2_params);
44  _co2_fp = &_fe_problem->getUserObject<SinglePhaseFluidProperties>("co2_fp");
45 
46  InputParameters uo_params = _factory.getValidParams("PorousFlowBrineCO2");
47  uo_params.set<UserObjectName>("brine_fp") = "brine_fp";
48  uo_params.set<UserObjectName>("co2_fp") = "co2_fp";
49  uo_params.set<UserObjectName>("capillary_pressure") = "pc";
50  _fe_problem->addUserObject("PorousFlowBrineCO2", "fs", uo_params);
51  _fs = &_fe_problem->getUserObject<PorousFlowBrineCO2>("fs");
52 
53  // Indices for derivatives
56  _Zidx = _fs->getZIndex();
57  _Xidx = _fs->getXIndex();
58  }
59 
65  unsigned int _pidx;
66  unsigned int _Tidx;
67  unsigned int _Zidx;
68  unsigned int _Xidx;
69 };
std::shared_ptr< FEProblem > _fe_problem
const SinglePhaseFluidProperties * _co2_fp
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Brine (NaCl in H2O) fluid properties as a function of pressure (Pa), temperature (K) and NaCl mass fr...
const PorousFlowBrineCO2 * _fs
const PorousFlowCapillaryPressureVG * _pc
const Water97FluidProperties * _water_fp
Common class for single phase fluid properties.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const BrineFluidProperties * _brine_fp
Water (H2O) fluid properties as a function of pressure (Pa) and temperature (K) from IAPWS-IF97: Revi...
Specialized class for brine and CO2 including calculation of mutual solubility of the two fluids usin...
van Genuchten form of capillary pressure.