19 params.
addRequiredParam<std::vector<Point>>(
"junction_points",
"Junction points [m]");
21 "end_point",
"End point [m]. If not provided, the well ends at the final volume junction");
23 "Number of elements in each well section");
25 "Cross-sectional flow area function of the well [m^2]");
27 "Flow surface area for each junction point [m^2]");
31 params.
addRequiredParam<FunctionName>(
"initial_pressure",
"Initial pressure function [Pa]");
32 params.
addRequiredParam<FunctionName>(
"initial_temperature",
"Initial temperature function [K]");
34 params.
addRequiredParam<UserObjectName>(
"fluid_properties",
"Fluid properties object");
35 params.
addParam<FunctionName>(
"friction_factor",
"0.0",
"Darcy friction factor function");
39 "If provided, transfers occur with this MultiApp. The following would be transferred: mass " 40 "flow rate, energy flow rate, temperature, and pressure at each junction.");
47 _surface_point(getParam<Point>(
"surface_point")),
48 _junction_points(getParam<
std::vector<Point>>(
"junction_points")),
49 _section_n_elems(getParam<
std::vector<unsigned
int>>(
"section_n_elems")),
50 _n_sections(_section_n_elems.size()),
51 _junction_coupling_areas(getParam<
std::vector<
Real>>(
"junction_coupling_areas")),
52 _closures_name(
name() +
"_closures")
58 _all_points.push_back(getParam<Point>(
"end_point"));
60 checkVectorParamsSameLength<Point, unsigned int>(
"junction_points",
"section_n_elems");
61 checkVectorParamsSameLength<Point, Real>(
"junction_points",
"junction_coupling_areas");
67 const std::string class_name =
"Closures1PhaseSimple";
92 Point start_position, end_position;
106 const std::string class_name =
"FlowChannel1Phase";
108 params.
set<Point>(
"position") = start_position;
110 params.set<std::vector<Real>>(
"length") = {translation.
norm()};
112 params.set<FunctionName>(
"A") = getParam<FunctionName>(
"area");
113 params.set<FunctionName>(
"initial_p") = getParam<FunctionName>(
"initial_pressure");
114 params.set<FunctionName>(
"initial_T") = getParam<FunctionName>(
"initial_temperature");
115 params.set<FunctionName>(
"initial_vel") =
"0.0";
118 params.set<UserObjectName>(
"fp") = getParam<UserObjectName>(
"fluid_properties");
119 params.set<std::vector<std::string>>(
"closures") = {
_closures_name};
120 params.set<FunctionName>(
"f") = getParam<FunctionName>(
"friction_factor");
121 params.set<
MooseEnum>(
"rdg_slope_reconstruction") =
"full";
122 params.set<std::vector<Real>>(
"scaling_factor_1phase") = {1.0, 1.0, 1e-5};
123 params.set<std::vector<VariableName>>(
"vpp_vars") = {
"p"};
124 params.set<
bool>(
"create_flux_vpp") =
true;
131 const std::string in_or_out = is_production ?
":in" :
":out";
133 const std::string class_name =
"SolidWall1Phase";
142 const std::string first_end = is_production ?
":in" :
":out";
143 const std::string second_end = is_production ?
":out" :
":in";
144 std::vector<BoundaryName> connections;
149 const std::string class_name =
"VolumeJunction1Phase";
152 params.set<std::vector<BoundaryName>>(
"connections") = connections;
153 params.set<FunctionName>(
"initial_p") = getParam<FunctionName>(
"initial_pressure");
154 params.set<FunctionName>(
"initial_T") = getParam<FunctionName>(
"initial_temperature");
155 params.set<FunctionName>(
"initial_vel_x") =
"0.0";
156 params.set<FunctionName>(
"initial_vel_y") =
"0.0";
157 params.set<FunctionName>(
"initial_vel_z") =
"0.0";
158 params.set<
Real>(
"volume") = getParam<Real>(
"junction_volume");
159 params.set<
Real>(
"scaling_factor_rhoEV") = 1e-5;
166 const std::string class_name =
"VolumeJunctionCoupledFlux1Phase";
170 getParam<RealVectorValue>(
"fracture_direction");
172 params.set<std::string>(
"pp_suffix") =
name() + std::to_string(i + 1);
174 params.set<MultiAppName>(
"multi_app") = getParam<MultiAppName>(
"multi_app");
181 return name() + std::to_string(i + 1);
187 return name() +
"_junc" + std::to_string(i + 1);
const auto acceleration_of_gravity
std::string volumeJunctionName(unsigned int i) const
Name of a volume junction.
const std::vector< Point > & _junction_points
Junction points.
void addFlowChannel(unsigned int i, bool is_production)
Adds a flow channel.
const std::string _closures_name
Closures name.
InputParameters getValidParams(const std::string &name) const
WellBase(const InputParameters ¶ms)
std::vector< Point > _all_points
Surface point, junction points, and optional end point.
void addWall(bool is_production)
Adds a wall at the end of a well.
void addJunction(unsigned int i, bool is_production)
Adds a junction.
const std::string & name() const
void addWellBaseComponents(bool is_production)
Adds the components common to both injection and production.
const Point & _surface_point
Surface point.
static InputParameters validParams()
const unsigned int _n_sections
Number of flow channels.
void addJunctionFlux(unsigned int i)
Adds a junction coupling.
const std::vector< Real > & _junction_coupling_areas
Coupled flow area of each junction.
virtual void addClosures() override
std::string flowChannelName(unsigned int i) const
Name of a flow channel.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClosuresObject(const std::string &class_name, const std::string &obj_name, InputParameters ¶ms)
Adds a Closures object.
bool isParamValid(const std::string &name) const
Base class for ActionComponents that build THM components.
void addTHMComponent(const std::string &class_name, const std::string &obj_name, InputParameters ¶ms)
Adds a THM component.
void ErrorVector unsigned int
auto index_range(const T &sizable)
const std::vector< unsigned int > & _section_n_elems
Number of elements in each flow channel.
static InputParameters validParams()