https://mooseframework.inl.gov
PorousFlowWaterNCGTest.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 "PorousFlowWaterNCG.h"
15 #include "Water97FluidProperties.h"
16 #include "CO2FluidProperties.h"
17 
19 {
20 public:
22 
23 protected:
24  void buildObjects()
25  {
26  InputParameters pc_params = _factory.getValidParams("PorousFlowCapillaryPressureVG");
27  pc_params.set<Real>("m") = 0.5;
28  pc_params.set<Real>("alpha") = 1.0e-4;
29  _fe_problem->addUserObject("PorousFlowCapillaryPressureVG", "pc", pc_params);
30  _pc = &_fe_problem->getUserObject<PorousFlowCapillaryPressureVG>("pc");
31 
32  InputParameters water_params = _factory.getValidParams("Water97FluidProperties");
33  _fe_problem->addUserObject("Water97FluidProperties", "water_fp", water_params);
34  _water_fp = &_fe_problem->getUserObject<SinglePhaseFluidProperties>("water_fp");
35 
36  InputParameters ncg_params = _factory.getValidParams("CO2FluidProperties");
37  _fe_problem->addUserObject("CO2FluidProperties", "ncg_fp", ncg_params);
38  _ncg_fp = &_fe_problem->getUserObject<SinglePhaseFluidProperties>("ncg_fp");
39 
40  InputParameters uo_params = _factory.getValidParams("PorousFlowWaterNCG");
41  uo_params.set<UserObjectName>("water_fp") = "water_fp";
42  uo_params.set<UserObjectName>("gas_fp") = "ncg_fp";
43  uo_params.set<UserObjectName>("capillary_pressure") = "pc";
44  _fe_problem->addUserObject("PorousFlowWaterNCG", "fs", uo_params);
45  _fs = &_fe_problem->getUserObject<PorousFlowWaterNCG>("fs");
46 
47  // Indices for derivatives
50  _Zidx = _fs->getZIndex();
51  }
52 
57  unsigned int _pidx;
58  unsigned int _Tidx;
59  unsigned int _Zidx;
60 };
std::shared_ptr< FEProblem > _fe_problem
const PorousFlowCapillaryPressureVG * _pc
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
const PorousFlowWaterNCG * _fs
Common class for single phase fluid properties.
Specialized class for water and a non-condensable gas (NCG) Includes dissolution of gas in liquid wat...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const SinglePhaseFluidProperties * _water_fp
const SinglePhaseFluidProperties * _ncg_fp
van Genuchten form of capillary pressure.