www.mooseframework.org
TwoPhaseNCGFluidProperties.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<TwoPhaseFluidProperties>();
17  params.addCustomTypeParam<std::string>(
18  "fp_type", "two-phase-ncg-fp", "FPType", "Type of the fluid property object");
19  params.addParam<UserObjectName>("fp_2phase",
20  "Name of fluid properties user object(s) for two-phase model");
21  return params;
22 }
23 
24 TwoPhaseNCGFluidProperties::TwoPhaseNCGFluidProperties(const InputParameters & parameters)
25  : TwoPhaseFluidProperties(parameters),
26  _2phase_name(isParamValid("fp_2phase") ? getParam<UserObjectName>("fp_2phase")
27  : UserObjectName(name() + ":2phase")),
28  _vapor_mixture_name(name() + ":vapor_mixture")
29 {
30  // check that the user has not already created user objects of the same name
31  if (_tid == 0 && _fe_problem.hasUserObject(_vapor_mixture_name))
32  mooseError(name(), ": A user object with the name '", _vapor_mixture_name, "' already exists.");
33 }
TwoPhaseNCGFluidProperties::TwoPhaseNCGFluidProperties
TwoPhaseNCGFluidProperties(const InputParameters &parameters)
Definition: TwoPhaseNCGFluidProperties.C:24
validParams< TwoPhaseNCGFluidProperties >
InputParameters validParams< TwoPhaseNCGFluidProperties >()
Definition: TwoPhaseNCGFluidProperties.C:14
validParams< TwoPhaseFluidProperties >
InputParameters validParams< TwoPhaseFluidProperties >()
Definition: TwoPhaseFluidProperties.C:15
TwoPhaseNCGFluidProperties.h
name
const std::string name
Definition: Setup.h:21
TwoPhaseFluidProperties
Base class for fluid properties used with two-phase flow.
Definition: TwoPhaseFluidProperties.h:23
TwoPhaseNCGFluidProperties::_vapor_mixture_name
const UserObjectName _vapor_mixture_name
Vapor mixture fluid properties user object name.
Definition: TwoPhaseNCGFluidProperties.h:82