Line data Source code
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 "FlowJunction1Phase.h" 11 : #include "FlowChannel1Phase.h" 12 : 13 : InputParameters 14 1468 : FlowJunction1Phase::validParams() 15 : { 16 1468 : InputParameters params = FlowJunction::validParams(); 17 1468 : return params; 18 : } 19 : 20 734 : FlowJunction1Phase::FlowJunction1Phase(const InputParameters & params) : FlowJunction(params) {} 21 : 22 : void 23 727 : FlowJunction1Phase::init() 24 : { 25 727 : FlowJunction::init(); 26 : 27 2300 : for (const auto i : index_range(_connections)) 28 : { 29 1573 : const std::string comp_name = _connections[i]._component_name; 30 : if (hasComponentByName<FlowChannel1Phase>(comp_name)) 31 : { 32 : const FlowChannel1Phase & comp = 33 1573 : getTHMProblem().getComponentByName<FlowChannel1Phase>(comp_name); 34 : 35 1573 : _numerical_flux_names.push_back(comp.getNumericalFluxUserObjectName()); 36 : 37 1573 : if (i == 0) 38 2181 : _passives_names = comp.getParam<std::vector<VariableName>>("passives_names"); 39 1692 : else if (comp.getParam<std::vector<VariableName>>("passives_names") != _passives_names) 40 0 : logError("All connected channels must have the same 'passives_names' parameter."); 41 : } 42 : } 43 727 : } 44 : 45 : void 46 714 : FlowJunction1Phase::check() const 47 : { 48 714 : FlowJunction::check(); 49 : 50 2261 : for (const auto & comp_name : _connected_component_names) 51 1547 : checkComponentOfTypeExistsByName<FlowChannel1Phase>(comp_name); 52 : 53 714 : if (_passives_names.size() > 0 && !supportsPassiveTransport()) 54 0 : logError("This Component type does not support passive transport."); 55 714 : }