https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Closures1PhaseBase.C
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#include "Closures1PhaseBase.h"
12#include "FlowChannel1Phase.h"
13
20
22
23void
25{
26 const FunctionName & f_D_fn_name = flow_channel.getParam<FunctionName>("f");
27
28 const std::string class_name = "ADWallFrictionFunctionMaterial";
29 InputParameters params = _factory.getValidParams(class_name);
30 params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
31 params.set<MaterialPropertyName>("f_D") = FlowModelSinglePhase::FRICTION_FACTOR_DARCY;
32 params.set<FunctionName>("function") = f_D_fn_name;
33 _sim.addMaterial(class_name, genName(flow_channel.name(), "f_wall_fn_mat"), params);
34}
35
36void
38{
39 const std::string class_name = "ADAverageWallTemperature3EqnMaterial";
40 InputParameters params = _factory.getValidParams(class_name);
41 params.set<std::vector<SubdomainName>>("block") = flow_channel.getSubdomainNames();
42 params.set<std::vector<VariableName>>("T_wall_sources") = flow_channel.getWallTemperatureNames();
43 params.set<std::vector<MaterialPropertyName>>("Hw_sources") =
44 flow_channel.getWallHTCNames1Phase();
45 params.set<std::vector<VariableName>>("P_hf_sources") = flow_channel.getHeatedPerimeterNames();
46 params.set<std::vector<VariableName>>("P_hf_total") = {FlowModel::HEAT_FLUX_PERIMETER};
47 params.set<std::vector<VariableName>>("T_fluid") = {FlowModelSinglePhase::TEMPERATURE};
48 _sim.addMaterial(class_name, genName(flow_channel.name(), "avg_T_wall_3eqn_mat"), params);
49}
static InputParameters validParams()
void addAverageWallTemperatureMaterial(const FlowChannel1Phase &flow_channel) const
Adds average wall temperature material.
Closures1PhaseBase(const InputParameters &params)
void addWallFrictionFunctionMaterial(const FlowChannel1Phase &flow_channel) const
Adds material that computes wall friction factor from a specified function.
Base class for closures implementations.
static InputParameters validParams()
Factory & _factory
Factory associated with the MooseApp.
THMProblem & _sim
Simulation.
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
Definition Component.C:345
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
InputParameters getValidParams(const std::string &name) const
std::vector< MaterialPropertyName > getWallHTCNames1Phase() const
Gets 1-phase wall heat transfer coefficient names for connected heat transfers.
Single-component, single-phase flow channel.
std::vector< VariableName > getHeatedPerimeterNames() const
Gets heated perimeter names for connected heat transfers.
std::vector< VariableName > getWallTemperatureNames() const
Gets wall temperature names for connected heat transfers.
static const std::string FRICTION_FACTOR_DARCY
static const std::string TEMPERATURE
static const std::string HEAT_FLUX_PERIMETER
Definition FlowModel.h:105
T & set(const std::string &name, bool quiet_mode=false)
const std::string & name() const
const T & getParam(const std::string &name) const
std::string genName(const std::string &prefix, unsigned int id, const std::string &suffix="") const
Build a name from a prefix, number and possible suffix.