Skip to content

Commit 51196d8

Browse files
committed
Removed usage of Component::makeFunctionControllableIfConstant
Re-golded Brayton cycle due to avoiding the bug that changed the results. Refs #31869
1 parent b19e0df commit 51196d8

File tree

25 files changed

+521
-517
lines changed

25 files changed

+521
-517
lines changed

modules/thermal_hydraulics/doc/content/source/components/ShaftConnectedMotor.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ the time variable $t$ in these functions (and the space variables are
1515
discarded); therefore, the user is actually specifying the functions
1616
$\tau(\omega)$ and $I(\omega)$, not $\tau(t,x,y,z)$ and $I(t,x,y,z)$.
1717

18-
If dependence on time is desired, the [ControlLogic/index.md] can be used. To
19-
do this, supply an arbitrary constant value instead of a function name. Then
20-
use a [TimeFunctionComponentControl.md]. See the `motor` component in
18+
If dependence on time is desired, [ControlLogic](ControlLogic/index.md) can be used. To
19+
do this, supply the name of a [ConstantFunction.md] and then control that function
20+
using the value of the time function ([GetFunctionValueControl.md] followed by [SetRealValueControl.md]).
21+
See the `motor` component in
2122
[open_brayton_cycle.i](test/tests/problems/brayton_cycle/open_brayton_cycle.i)
2223
for an example.
2324

modules/thermal_hydraulics/src/base/FlowModel.C

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ FlowModel::addCommonInitialConditions()
8989
const Function & fn = _sim.getFunction(area_function);
9090
_sim.addConstantIC(AREA, fn.value(0, Point()), block);
9191
_sim.addConstantIC(AREA_LINEAR, fn.value(0, Point()), block);
92-
93-
_flow_channel.makeFunctionControllableIfConstant(area_function, "Area", "value");
9492
}
9593
else
9694
{

modules/thermal_hydraulics/src/closures/Closures1PhaseBase.C

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ void
2424
Closures1PhaseBase::addWallFrictionFunctionMaterial(const FlowChannel1Phase & flow_channel) const
2525
{
2626
const FunctionName & f_D_fn_name = flow_channel.getParam<FunctionName>("f");
27-
flow_channel.makeFunctionControllableIfConstant(f_D_fn_name, "f");
2827

2928
const std::string class_name = "ADWallFrictionFunctionMaterial";
3029
InputParameters params = _factory.getValidParams(class_name);

modules/thermal_hydraulics/src/closures/Closures1PhaseSimple.C

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ Closures1PhaseSimple::addMooseObjectsHeatTransfer(const HeatTransferBase & heat_
9999
_sim.addMaterial(
100100
class_name, genName(heat_transfer.name(), "Hw_material", flow_channel.name()), params);
101101
}
102-
103-
heat_transfer.makeFunctionControllableIfConstant(Hw_fn_name, "Hw");
104102
}
105103

106104
void

modules/thermal_hydraulics/src/components/FlowChannel1PhaseBase.C

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ FlowChannel1PhaseBase::validParams()
2626
SlopeReconstruction1DInterface<true>::getSlopeReconstructionMooseEnum("None"),
2727
"Slope reconstruction type for rDG spatial discretization");
2828

29-
params.declareControllable("initial_p initial_T initial_vel D_h");
29+
params.declareControllable("initial_p initial_T initial_vel");
3030
params.addParamNamesToGroup("initial_p initial_T initial_vel", "Variable initialization");
3131
params.addParamNamesToGroup("rdg_slope_reconstruction", "Numerical scheme");
3232

@@ -118,8 +118,6 @@ FlowChannel1PhaseBase::addHydraulicDiameterMaterial()
118118
params.set<std::vector<std::string>>("prop_names") = {THM::HYDRAULIC_DIAMETER};
119119
params.set<std::vector<FunctionName>>("prop_values") = {D_h_fn_name};
120120
getTHMProblem().addMaterial(class_name, mat_name, params);
121-
122-
makeFunctionControllableIfConstant(D_h_fn_name, "D_h");
123121
}
124122
else
125123
{

modules/thermal_hydraulics/src/components/FlowChannelBase.C

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ FlowChannelBase::validParams()
105105
"curved flow channels, it is the (tangent) direction at the start position.");
106106

107107
params.addPrivateParam<std::string>("component_type", "pipe");
108-
params.declareControllable("A f");
109108

110109
return params;
111110
}
@@ -259,7 +258,6 @@ FlowChannelBase::addCommonObjects()
259258
params.set<ExecFlagEnum>("execute_on") = ts_execute_on;
260259
const std::string aux_kernel_name = genName(name(), "area_linear_aux");
261260
getTHMProblem().addAuxKernel(class_name, aux_kernel_name, params);
262-
makeFunctionControllableIfConstant(_area_function, "Area");
263261
}
264262
{
265263
const std::string class_name = "ProjectionAux";
@@ -270,7 +268,6 @@ FlowChannelBase::addCommonObjects()
270268
params.set<ExecFlagEnum>("execute_on") = ts_execute_on;
271269
const std::string aux_kernel_name = genName(name(), "area_aux");
272270
getTHMProblem().addAuxKernel(class_name, aux_kernel_name, params);
273-
makeFunctionControllableIfConstant(_area_function, "Area");
274271
}
275272
}
276273
}

modules/thermal_hydraulics/src/components/HSBoundarySpecifiedTemperature.C

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ HSBoundarySpecifiedTemperature::validParams()
1919

2020
params.addRequiredParam<FunctionName>("T", "Prescribed temperature [K]");
2121

22-
params.declareControllable("T");
23-
2422
params.addClassDescription("Applies Dirichlet boundary conditions on a heat structure");
2523

2624
return params;
@@ -43,6 +41,5 @@ HSBoundarySpecifiedTemperature::addMooseObjects()
4341
pars.set<std::vector<BoundaryName>>("boundary") = _boundary;
4442
pars.set<FunctionName>("function") = _T_func;
4543
getTHMProblem().addBoundaryCondition(class_name, genName(name(), "bc"), pars);
46-
makeFunctionControllableIfConstant(_T_func, "T");
4744
}
4845
}

modules/thermal_hydraulics/src/components/HeatTransfer1PhaseBase.C

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ HeatTransfer1PhaseBase::validParams()
1818
{
1919
InputParameters params = HeatTransferBase::validParams();
2020
params.addParam<FunctionName>("Hw", "Convective heat transfer coefficient [W/(m^2-K)]");
21-
params.declareControllable("Hw");
2221
return params;
2322
}
2423

modules/thermal_hydraulics/src/components/HeatTransferBase.C

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ HeatTransferBase::validParams()
2424
params.addParam<bool>(
2525
"P_hf_transferred", false, "Is heat flux perimeter transferred from an external source?");
2626
params.addParam<FunctionName>("P_hf", "Heat flux perimeter [m]");
27-
params.declareControllable("P_hf");
2827
return params;
2928
}
3029

@@ -135,8 +134,6 @@ HeatTransferBase::addHeatedPerimeter()
135134
InputParameters params = _factory.getValidParams(class_name);
136135
params.set<FunctionName>("area_function") = _A_fn_name;
137136
getTHMProblem().addFunction(class_name, _P_hf_fn_name, params);
138-
139-
makeFunctionControllableIfConstant(_P_hf_fn_name, "P_hf");
140137
}
141138

142139
if (!_app.isRestarting())

modules/thermal_hydraulics/src/components/HeatTransferFromSpecifiedTemperature1Phase.C

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ HeatTransferFromSpecifiedTemperature1Phase::validParams()
1616
{
1717
InputParameters params = HeatTransferFromTemperature1Phase::validParams();
1818
params.addRequiredParam<FunctionName>("T_wall", "Specified wall temperature [K]");
19-
params.declareControllable("T_wall");
2019
params.addClassDescription(
2120
"Heat transfer connection from a fixed temperature function for 1-phase flow");
2221
return params;
@@ -35,8 +34,6 @@ HeatTransferFromSpecifiedTemperature1Phase::addVariables()
3534

3635
if (!_app.isRestarting())
3736
getTHMProblem().addFunctionIC(_T_wall_name, _T_wall_fn_name, _flow_channel_subdomains);
38-
39-
makeFunctionControllableIfConstant(_T_wall_fn_name, "T_wall");
4037
}
4138

4239
void

0 commit comments

Comments
 (0)