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 "FXBoundaryFluxUserObject.h" 11 : 12 : registerMooseObject("FunctionalExpansionToolsApp", FXBoundaryFluxUserObject); 13 : 14 : InputParameters 15 114 : FXBoundaryFluxUserObject::validParams() 16 : { 17 114 : InputParameters params = FXBoundaryBaseUserObject::validParams(); 18 : 19 114 : params.addClassDescription("Generates an Functional Expansion representation for a boundary flux " 20 : "condition using a 'FunctionSeries'-type Function"); 21 : 22 228 : params.addRequiredParam<std::string>("diffusivity", 23 : "The name of the material diffusivity " 24 : "property, or raw value, that will be used " 25 : "in the flux computation."); 26 : 27 114 : return params; 28 0 : } 29 : 30 76 : FXBoundaryFluxUserObject::FXBoundaryFluxUserObject(const InputParameters & parameters) 31 : : FXBoundaryBaseUserObject(parameters), 32 76 : _diffusivity_name(parameters.get<std::string>("diffusivity")), 33 152 : _diffusivity(getMaterialProperty<Real>(_diffusivity_name)) 34 : { 35 76 : } 36 : 37 : Real 38 21760 : FXBoundaryFluxUserObject::computeQpIntegral() 39 : { 40 21760 : return -_diffusivity[_qp] * _grad_u[_qp] * _normals[_qp]; 41 : }