diff --git a/modules/subchannel/doc/content/source/transfers/MultiAppUserObjectTransfer2.md b/modules/subchannel/doc/content/source/transfers/MultiAppUserObjectTransfer2.md deleted file mode 100644 index d33cef1cc96e..000000000000 --- a/modules/subchannel/doc/content/source/transfers/MultiAppUserObjectTransfer2.md +++ /dev/null @@ -1,13 +0,0 @@ -# MultiAppUserObjectTransfer2 - -!syntax description /Transfers/MultiAppUserObjectTransfer2 - -## Example Input File Syntax - -!listing /examples/coupling/HeatConduction_SC/main.i block=Transfers language=cpp - -!syntax parameters /Transfers/MultiAppUserObjectTransfer2 - -!syntax inputs /Transfers/MultiAppUserObjectTransfer2 - -!syntax children /Transfers/MultiAppUserObjectTransfer2 diff --git a/modules/subchannel/doc/content/source/transfers/MultiAppUserObjectTransferSCM.md b/modules/subchannel/doc/content/source/transfers/MultiAppUserObjectTransferSCM.md new file mode 100644 index 000000000000..60a757d2fae3 --- /dev/null +++ b/modules/subchannel/doc/content/source/transfers/MultiAppUserObjectTransferSCM.md @@ -0,0 +1,13 @@ +# MultiAppUserObjectTransferSCM + +!syntax description /Transfers/MultiAppUserObjectTransferSCM + +## Example Input File Syntax + +!listing /examples/coupling/HeatConduction_SC/main.i block=Transfers language=cpp + +!syntax parameters /Transfers/MultiAppUserObjectTransferSCM + +!syntax inputs /Transfers/MultiAppUserObjectTransferSCM + +!syntax children /Transfers/MultiAppUserObjectTransferSCM diff --git a/modules/subchannel/examples/coupling/1pinHex_thermomech_SC/seven_pin_problem.i b/modules/subchannel/examples/coupling/1pinHex_thermomech_SC/seven_pin_problem.i index c8454bd112c9..6996a7cdb33d 100644 --- a/modules/subchannel/examples/coupling/1pinHex_thermomech_SC/seven_pin_problem.i +++ b/modules/subchannel/examples/coupling/1pinHex_thermomech_SC/seven_pin_problem.i @@ -261,21 +261,21 @@ pitch = 7.26e-3 [Transfers] [Tpin] # send pin surface temperature to bison, - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM to_multi_app = sub variable = Pin_surface_temperature user_object = Tpin_avg_uo [] [diameter] # send diameter information from /BISON/heatConduction to subchannel - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM from_multi_app = sub variable = Dpin user_object = pin_diameter_uo [] [q_prime] # send heat flux from /BISON/heatConduction to subchannel - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM from_multi_app = sub variable = q_prime user_object = q_prime_uo diff --git a/modules/subchannel/examples/coupling/1pinSquare_thermomech_SC/one_pin_problem.i b/modules/subchannel/examples/coupling/1pinSquare_thermomech_SC/one_pin_problem.i index 72d25b2678f4..c2404373391f 100644 --- a/modules/subchannel/examples/coupling/1pinSquare_thermomech_SC/one_pin_problem.i +++ b/modules/subchannel/examples/coupling/1pinSquare_thermomech_SC/one_pin_problem.i @@ -265,21 +265,21 @@ heated_length = 1.0 [Transfers] [Tpin] # send pin surface temperature to bison, - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM to_multi_app = sub variable = Pin_surface_temperature user_object = Tpin_avg_uo [] [diameter] # send diameter information from /BISON/heatConduction to subchannel - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM from_multi_app = sub variable = Dpin user_object = pin_diameter_uo [] [q_prime] # send heat flux from /BISON/heatConduction to subchannel - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM from_multi_app = sub variable = q_prime user_object = q_prime_uo diff --git a/modules/subchannel/examples/coupling/BISON_SC/main.i b/modules/subchannel/examples/coupling/BISON_SC/main.i index 8bfcccf7262b..08944ba0935c 100644 --- a/modules/subchannel/examples/coupling/BISON_SC/main.i +++ b/modules/subchannel/examples/coupling/BISON_SC/main.i @@ -296,14 +296,14 @@ pitch = 0.0126 [Transfers] [Tpin] # send pin surface temperature to bison, - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM to_multi_app = sub variable = Pin_surface_temperature user_object = Tpin_avg_uo [] [q_prime] - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM from_multi_app = sub variable = q_prime user_object = q_prime_uo @@ -311,21 +311,21 @@ pitch = 0.0126 [] # [Tpin1] # send pin surface temperature to bison, - # type = MultiAppUserObjectTransfer2 + # type = MultiAppUserObjectTransferSCM # to_multi_app = sub1 # variable = Pin_surface_temperature # user_object = Tpin_avg_uo # [] # # [Tpin2] # send pin surface temperature to bison, - # type = MultiAppUserObjectTransfer2 + # type = MultiAppUserObjectTransferSCM # to_multi_app = sub2 # variable = Pin_surface_temperature # user_object = Tpin_avg_uo # [] # # [q_prime1] # send heat flux from BISON/heatConduction to subchannel - # type = MultiAppUserObjectTransfer2 + # type = MultiAppUserObjectTransferSCM # from_multi_app = sub1 # variable = q_prime # user_object = q_prime_uo @@ -333,7 +333,7 @@ pitch = 0.0126 # [] # # [q_prime2] # send heat flux from BISON/heatConduction to subchannel - # type = MultiAppUserObjectTransfer2 + # type = MultiAppUserObjectTransferSCM # from_multi_app = sub2 # variable = q_prime # user_object = q_prime_uo diff --git a/modules/subchannel/examples/coupling/HeatConduction_SC/main.i b/modules/subchannel/examples/coupling/HeatConduction_SC/main.i index f798970f1bc9..5871829abd24 100644 --- a/modules/subchannel/examples/coupling/HeatConduction_SC/main.i +++ b/modules/subchannel/examples/coupling/HeatConduction_SC/main.i @@ -238,14 +238,14 @@ heated_length = 1.0 # m [Transfers] [Tpin] # send pin surface temperature to bison, - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM to_multi_app = sub variable = Pin_surface_temperature user_object = Tpin_avg_uo [] [q_prime] # send heat flux from BISON/heatConduction to subchannel - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM from_multi_app = sub variable = q_prime user_object = q_prime_uo diff --git a/modules/subchannel/include/transfers/MultiAppUserObjectTransfer2.h b/modules/subchannel/include/transfers/MultiAppUserObjectTransferSCM.h similarity index 94% rename from modules/subchannel/include/transfers/MultiAppUserObjectTransfer2.h rename to modules/subchannel/include/transfers/MultiAppUserObjectTransferSCM.h index 181c5771467b..b36d3cf4ae63 100644 --- a/modules/subchannel/include/transfers/MultiAppUserObjectTransfer2.h +++ b/modules/subchannel/include/transfers/MultiAppUserObjectTransferSCM.h @@ -16,7 +16,7 @@ #include "MultiAppConservativeTransfer.h" -class MultiAppUserObjectTransfer2; +class MultiAppUserObjectTransferSCM; /** * This is a copy of MultiAppUserObjectTransfer, but swaps y-, and z- coordinate, so we can @@ -26,12 +26,12 @@ class MultiAppUserObjectTransfer2; * * NOTE: This will need a better name before merging into devel */ -class MultiAppUserObjectTransfer2 : public MultiAppConservativeTransfer +class MultiAppUserObjectTransferSCM : public MultiAppConservativeTransfer { public: static InputParameters validParams(); - MultiAppUserObjectTransfer2(const InputParameters & parameters); + MultiAppUserObjectTransferSCM(const InputParameters & parameters); virtual void execute() override; diff --git a/modules/subchannel/src/transfers/MultiAppUserObjectTransfer2.C b/modules/subchannel/src/transfers/MultiAppUserObjectTransferSCM.C similarity index 90% rename from modules/subchannel/src/transfers/MultiAppUserObjectTransfer2.C rename to modules/subchannel/src/transfers/MultiAppUserObjectTransferSCM.C index dff515a278f2..7cb2850dca5b 100644 --- a/modules/subchannel/src/transfers/MultiAppUserObjectTransfer2.C +++ b/modules/subchannel/src/transfers/MultiAppUserObjectTransferSCM.C @@ -12,7 +12,7 @@ /* See COPYRIGHT for full restrictions */ /********************************************************************/ -#include "MultiAppUserObjectTransfer2.h" +#include "MultiAppUserObjectTransferSCM.h" #include @@ -29,13 +29,13 @@ #include "libmesh/mesh_function.h" #include "libmesh/mesh_tools.h" -registerMooseObject("SubChannelApp", MultiAppUserObjectTransfer2); +registerMooseObject("SubChannelApp", MultiAppUserObjectTransferSCM); InputParameters -MultiAppUserObjectTransfer2::validParams() +MultiAppUserObjectTransferSCM::validParams() { InputParameters params = MultiAppConservativeTransfer::validParams(); - // MultiAppUserObjectTransfer2 does not need source variable since it query values from user + // MultiAppUserObjectTransferSCM does not need source variable since it query values from user // objects params.suppressParameter>("source_variable"); params.set>("source_variable") = std::vector{}; @@ -61,20 +61,22 @@ MultiAppUserObjectTransfer2::validParams() "parameter is used)."); params.addClassDescription( - "Samples a variable's value in the Master domain at the point where the MultiApp is and " - "copies that value into a post-processor in the MultiApp"); + "Transfers a variable's value that has been sampled into a UserObject, in the " + "MainApp/MultiApp domain, into a post-processor or variable in the MultiApp/MainApp. " + "This is a copy of MultiAppUserObjectTransfer, but swaps y-, and z- coordinate, so we can " + "map the SCM solution that lives in a 3D mesh on a (2D) RZ-mesh of a heating pin."); return params; } -MultiAppUserObjectTransfer2::MultiAppUserObjectTransfer2(const InputParameters & parameters) +MultiAppUserObjectTransferSCM::MultiAppUserObjectTransferSCM(const InputParameters & parameters) : MultiAppConservativeTransfer(parameters), _user_object_name(getParam("user_object")), _all_master_nodes_contained_in_sub_app(getParam("all_master_nodes_contained_in_sub_app")), _skip_bbox_check(getParam("skip_bounding_box_check")) { // This transfer does not work with DistributedMesh - _fe_problem.mesh().errorIfDistributedMesh("MultiAppUserObjectTransfer2"); + _fe_problem.mesh().errorIfDistributedMesh("MultiAppUserObjectTransferSCM"); if (_to_var_names.size() != 1) paramError("variable", " Support single to-variable only "); @@ -89,9 +91,9 @@ MultiAppUserObjectTransfer2::MultiAppUserObjectTransfer2(const InputParameters & } void -MultiAppUserObjectTransfer2::execute() +MultiAppUserObjectTransferSCM::execute() { - _console << "Beginning MultiAppUserObjectTransfer2 " << name() << std::endl; + _console << "Beginning MultiAppUserObjectTransferSCM " << name() << std::endl; switch (_current_direction) { @@ -244,7 +246,7 @@ MultiAppUserObjectTransfer2::execute() // Only works with a serialized mesh to transfer to! mooseAssert(to_sys.get_mesh().is_serial(), - "MultiAppUserObjectTransfer2 only works with ReplicatedMesh!"); + "MultiAppUserObjectTransferSCM only works with ReplicatedMesh!"); unsigned int to_var_num = to_sys.variable_number(to_var.name()); @@ -316,14 +318,14 @@ MultiAppUserObjectTransfer2::execute() if (node_found_in_sub_app == 0) { Point n = *node; - mooseError("MultiAppUserObjectTransfer2: Master node ", + mooseError("MultiAppUserObjectTransferSCM: Master node ", n, " not found within the bounding box of any of the sub applications."); } else if (node_found_in_sub_app > 1) { Point n = *node; - mooseError("MultiAppUserObjectTransfer2: Master node ", + mooseError("MultiAppUserObjectTransferSCM: Master node ", n, " found within the bounding box of two or more sub applications."); } @@ -383,14 +385,14 @@ MultiAppUserObjectTransfer2::execute() } if (elem_found_in_sub_app == 0) - mooseError("MultiAppUserObjectTransfer2: Master element with ", + mooseError("MultiAppUserObjectTransferSCM: Master element with ", n_points > 1 ? "node" : "centroid", " at ", point, " not found within the bounding box of any of the sub applications."); else if (elem_found_in_sub_app > 1) - mooseError("MultiAppUserObjectTransfer2: Master element with ", + mooseError("MultiAppUserObjectTransferSCM: Master element with ", n_points > 1 ? "node" : "centroid", " at ", point, @@ -439,9 +441,10 @@ MultiAppUserObjectTransfer2::execute() if (from_value == std::numeric_limits::infinity()) { Point n = *node; - mooseError("MultiAppUserObjectTransfer2: Point corresponding to master node at (", - n, - ") not found in the sub application."); + mooseError( + "MultiAppUserObjectTransferSCM: Point corresponding to master node at (", + n, + ") not found in the sub application."); } to_solution->set(dof, from_value); } @@ -503,7 +506,7 @@ MultiAppUserObjectTransfer2::execute() if (from_value == std::numeric_limits::infinity()) mooseError( - "MultiAppUserObjectTransfer2: Point corresponding to element's centroid (", + "MultiAppUserObjectTransferSCM: Point corresponding to element's centroid (", point, ") not found in sub application."); @@ -521,31 +524,31 @@ MultiAppUserObjectTransfer2::execute() } } - _console << "Finished MultiAppUserObjectTransfer2 " << name() << std::endl; + _console << "Finished MultiAppUserObjectTransferSCM " << name() << std::endl; postExecute(); } bool -MultiAppUserObjectTransfer2::blockRestricted() const +MultiAppUserObjectTransferSCM::blockRestricted() const { return !_blk_ids.empty(); } bool -MultiAppUserObjectTransfer2::boundaryRestricted() const +MultiAppUserObjectTransferSCM::boundaryRestricted() const { return !_bnd_ids.empty(); } bool -MultiAppUserObjectTransfer2::hasBlocks(const Elem * elem) const +MultiAppUserObjectTransferSCM::hasBlocks(const Elem * elem) const { return _blk_ids.find(elem->subdomain_id()) != _blk_ids.end(); } bool -MultiAppUserObjectTransfer2::hasBlocks(const MooseMesh * mesh, const Node * node) const +MultiAppUserObjectTransferSCM::hasBlocks(const MooseMesh * mesh, const Node * node) const { const std::set & node_blk_ids = mesh->getNodeBlockIds(*node); std::set u; @@ -558,7 +561,7 @@ MultiAppUserObjectTransfer2::hasBlocks(const MooseMesh * mesh, const Node * node } bool -MultiAppUserObjectTransfer2::isBoundaryNode(const MooseMesh * mesh, const Node * node) const +MultiAppUserObjectTransferSCM::isBoundaryNode(const MooseMesh * mesh, const Node * node) const { for (auto & bid : _bnd_ids) if (mesh->isBoundaryNode(node->id(), bid)) @@ -567,7 +570,7 @@ MultiAppUserObjectTransfer2::isBoundaryNode(const MooseMesh * mesh, const Node * } bool -MultiAppUserObjectTransfer2::isBoundaryElem(const MooseMesh * mesh, const Elem * elem) const +MultiAppUserObjectTransferSCM::isBoundaryElem(const MooseMesh * mesh, const Elem * elem) const { for (auto & bid : _bnd_ids) if (mesh->isBoundaryElem(elem->id(), bid)) @@ -576,7 +579,7 @@ MultiAppUserObjectTransfer2::isBoundaryElem(const MooseMesh * mesh, const Elem * } BoundingBox -MultiAppUserObjectTransfer2::getBoundingBox(unsigned int app, bool displaced_mesh) +MultiAppUserObjectTransferSCM::getBoundingBox(unsigned int app, bool displaced_mesh) { FEProblemBase & fe_problem_base = _multi_app->appProblemBase(app); MooseMesh & mesh = (displaced_mesh && fe_problem_base.getDisplacedProblem().get() != NULL) diff --git a/modules/subchannel/test/tests/problems/coupling/main.i b/modules/subchannel/test/tests/problems/coupling/main.i index c25682cc789a..37783c145c82 100644 --- a/modules/subchannel/test/tests/problems/coupling/main.i +++ b/modules/subchannel/test/tests/problems/coupling/main.i @@ -221,14 +221,14 @@ P_out = 101325 # Pa [Transfers] [Tpin] # send pin surface temperature to bison, - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM to_multi_app = sub variable = Pin_surface_temperature user_object = Tpin_avg_uo [] [from_SLAVE] # send heat flux from BISON to subchannel - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM from_multi_app = sub variable = q_prime user_object = q_prime_uo diff --git a/modules/subchannel/test/tests/transfers/multiapp_user_object_transfer2/gold/main_out.e b/modules/subchannel/test/tests/transfers/multiapp_user_object_transfer_SCM/gold/main_out.e similarity index 100% rename from modules/subchannel/test/tests/transfers/multiapp_user_object_transfer2/gold/main_out.e rename to modules/subchannel/test/tests/transfers/multiapp_user_object_transfer_SCM/gold/main_out.e diff --git a/modules/subchannel/test/tests/transfers/multiapp_user_object_transfer2/gold/main_out_sub0.e b/modules/subchannel/test/tests/transfers/multiapp_user_object_transfer_SCM/gold/main_out_sub0.e similarity index 100% rename from modules/subchannel/test/tests/transfers/multiapp_user_object_transfer2/gold/main_out_sub0.e rename to modules/subchannel/test/tests/transfers/multiapp_user_object_transfer_SCM/gold/main_out_sub0.e diff --git a/modules/subchannel/test/tests/transfers/multiapp_user_object_transfer2/main.i b/modules/subchannel/test/tests/transfers/multiapp_user_object_transfer_SCM/main.i similarity index 93% rename from modules/subchannel/test/tests/transfers/multiapp_user_object_transfer2/main.i rename to modules/subchannel/test/tests/transfers/multiapp_user_object_transfer_SCM/main.i index c577252b4dd7..23ab48e4fb57 100644 --- a/modules/subchannel/test/tests/transfers/multiapp_user_object_transfer2/main.i +++ b/modules/subchannel/test/tests/transfers/multiapp_user_object_transfer_SCM/main.i @@ -87,7 +87,7 @@ [Transfers] [variable_1] - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM all_master_nodes_contained_in_sub_app = true multi_app = sub direction = to_multiapp @@ -95,7 +95,7 @@ user_object = Variable_1_avg [] [variable_2] - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM all_master_nodes_contained_in_sub_app = true multi_app = sub direction = to_multiapp @@ -104,7 +104,7 @@ [] [variable_3] - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM all_master_nodes_contained_in_sub_app = true multi_app = sub direction = from_multiapp @@ -113,7 +113,7 @@ execute_on = 'timestep_end' [] [variable_4] - type = MultiAppUserObjectTransfer2 + type = MultiAppUserObjectTransferSCM all_master_nodes_contained_in_sub_app = true multi_app = sub direction = from_multiapp diff --git a/modules/subchannel/test/tests/transfers/multiapp_user_object_transfer2/sub.i b/modules/subchannel/test/tests/transfers/multiapp_user_object_transfer_SCM/sub.i similarity index 100% rename from modules/subchannel/test/tests/transfers/multiapp_user_object_transfer2/sub.i rename to modules/subchannel/test/tests/transfers/multiapp_user_object_transfer_SCM/sub.i diff --git a/modules/subchannel/test/tests/transfers/multiapp_user_object_transfer2/tests b/modules/subchannel/test/tests/transfers/multiapp_user_object_transfer_SCM/tests similarity index 100% rename from modules/subchannel/test/tests/transfers/multiapp_user_object_transfer2/tests rename to modules/subchannel/test/tests/transfers/multiapp_user_object_transfer_SCM/tests