https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ProductionWell.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 "ProductionWell.h"
11
13registerActionComponent("ThermalHydraulicsApp", ProductionWell);
14
17{
19
20 params.addRequiredParam<FunctionName>("outlet_pressure", "Outlet pressure function [Pa]");
21
22 params.addClassDescription("Adds the components and controls for a production well.");
23
24 return params;
25}
26
28
29void
35
36void
38{
39 const std::string get_fn_name = name() + "_get_outlet_p_ctrl";
40 {
41 const std::string class_name = "GetFunctionValueControl";
42 auto params = _factory.getValidParams(class_name);
43 params.set<FunctionName>("function") = getParam<FunctionName>("outlet_pressure");
44 params.set<Point>("point") = _surface_point;
45 addControlLogicObject(class_name, get_fn_name, params);
46 }
47 {
48 const std::string class_name = "SetComponentRealValueControl";
49 auto params = _factory.getValidParams(class_name);
50 params.set<std::string>("component") = outletName();
51 params.set<std::string>("parameter") = "p";
52 params.set<std::string>("value") = get_fn_name + ":value";
53 addControlLogicObject(class_name, name() + "_set_outlet_p_ctrl", params);
54 }
55}
56
57void
59{
60 const std::string class_name = "Outlet1Phase";
61 auto params = _factory.getValidParams(class_name);
62 params.set<BoundaryName>("input") = flowChannelName(0) + ":out";
63 params.set<Real>("p") = 1e5; // arbitrary placeholder value; this gets controlled
64 addTHMComponent(class_name, outletName(), params);
65}
66
67std::string
69{
70 return name() + "_outlet";
71}
registerActionComponent("ThermalHydraulicsApp", ProductionWell)
registerTHMActionComponentTasks("ThermalHydraulicsApp", ProductionWell)
InputParameters getValidParams(const std::string &name) const
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
const std::string & name() const
Factory & _factory
Adds the components and controls for a production well.
ProductionWell(const InputParameters &params)
void addOutlet()
Adds outlet component.
static InputParameters validParams()
virtual void addControlLogic() override
std::string outletName() const
Outlet component name.
virtual void addTHMComponents() override
void addControlLogicObject(const std::string &class_name, const std::string &obj_name, InputParameters &params)
Adds a ControlLogic object.
void addTHMComponent(const std::string &class_name, const std::string &obj_name, InputParameters &params)
Adds a THM component.
Base class for injection and production wells.
Definition WellBase.h:18
std::string flowChannelName(unsigned int i) const
Name of a flow channel.
Definition WellBase.C:179
static InputParameters validParams()
Definition WellBase.C:14
const Point & _surface_point
Surface point.
Definition WellBase.h:43
void addWellBaseComponents(bool is_production)
Adds the components common to both injection and production.
Definition WellBase.C:73