https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
MultiControlDrumFunction Class Referenceabstract

A function that returns an absorber fraction for multiple control drums application. More...

#include <MultiControlDrumFunction.h>

Inheritance diagram for MultiControlDrumFunction:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 
typedef FunctorBase< RealFunctorType
 
typedef Real ValueType
 
typedef typename FunctorReturnType< Real, FunctorEvaluationKind::Gradient >::type GradientType
 
typedef ValueType DotType
 

Public Member Functions

 MultiControlDrumFunction (const InputParameters &parameters)
 
virtual Real value (Real t, const Point &p) const override
 
virtual Real value (Real t, const Point &p) const
 
virtual ADReal value (const ADReal &t, const ADPoint &p) const
 
ChainedReal value (const ChainedReal &t) const
 
auto value (const U &t) const
 
auto value (const U &t, const U &x, const U &y=0, const U &z=0) const
 
ChainedReal value (const ChainedReal &t) const
 
auto value (const U &t) const
 
auto value (const U &t, const U &x, const U &y=0, const U &z=0) const
 
virtual ADReal value (const ADReal &t, const ADPoint &p) const
 
ChainedReal value (const ChainedReal &t) const
 
auto value (const U &t) const
 
auto value (const U &t, const U &x, const U &y=0, const U &z=0) const
 
virtual RealVectorValue vectorValue (Real t, const Point &p) const
 
virtual RealVectorValue curl (Real t, const Point &p) const
 
virtual Real div (Real t, const Point &p) const
 
virtual RealGradient gradient (Real t, const Point &p) const
 
GradientType gradient (const ElemArg &elem, const StateArg &state) const
 
GradientType gradient (const FaceArg &face, const StateArg &state) const
 
GradientType gradient (const ElemQpArg &qp, const StateArg &state) const
 
GradientType gradient (const ElemSideQpArg &qp, const StateArg &state) const
 
GradientType gradient (const ElemPointArg &elem_point, const StateArg &state) const
 
GradientType gradient (const NodeArg &node, const StateArg &state) const
 
GradientType gradient (const ElemArg &elem, const StateArg &state) const
 
GradientType gradient (const FaceArg &face, const StateArg &state) const
 
GradientType gradient (const ElemQpArg &qp, const StateArg &state) const
 
GradientType gradient (const ElemSideQpArg &qp, const StateArg &state) const
 
GradientType gradient (const ElemPointArg &elem_point, const StateArg &state) const
 
GradientType gradient (const NodeArg &node, const StateArg &state) const
 
GradientType gradient (const ElemArg &elem, const StateArg &state) const
 
GradientType gradient (const FaceArg &face, const StateArg &state) const
 
GradientType gradient (const ElemQpArg &qp, const StateArg &state) const
 
GradientType gradient (const ElemSideQpArg &qp, const StateArg &state) const
 
GradientType gradient (const ElemPointArg &elem_point, const StateArg &state) const
 
GradientType gradient (const NodeArg &node, const StateArg &state) const
 
virtual Real timeDerivative (Real t, const Point &p) const
 
auto timeDerivative (const U &t) const
 
auto timeDerivative (const U &t, const U &x, const U &y=0, const U &z=0) const
 
auto timeDerivative (const U &t) const
 
auto timeDerivative (const U &t, const U &x, const U &y=0, const U &z=0) const
 
virtual Real integral () const
 
virtual Real average () const
 
virtual Real timeIntegral (Real t1, Real t2, const Point &p) const
 
void timestepSetup () override
 
void residualSetup () override final
 
void jacobianSetup () override final
 
void customSetup (const ExecFlagType &exec_type) override final
 
bool hasBlocks (SubdomainID) const override
 
bool supportsFaceArg () const override final
 
bool supportsElemSideQpArg () const override final
 
virtual bool enabled () const
 
std::shared_ptr< MooseObjectgetSharedPtr ()
 
std::shared_ptr< const MooseObjectgetSharedPtr () const
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
virtual void initialSetup ()
 
virtual void subdomainSetup ()
 
const ExecFlagEnumgetExecuteOnEnum () const
 
bool isImplicit ()
 
Moose::StateArg determineState () const
 
bool isDefaultPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessor (const std::string &param_name, const unsigned int index=0) const
 
bool hasPostprocessorByName (const PostprocessorName &name) const
 
std::size_t coupledPostprocessors (const std::string &param_name) const
 
const PostprocessorName & getPostprocessorName (const std::string &param_name, const unsigned int index=0) const
 
UserObjectName getUserObjectName (const std::string &param_name) const
 
const T & getUserObject (const std::string &param_name, bool is_dependency=true) const
 
const T & getUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const
 
const UserObjectgetUserObjectBase (const std::string &param_name, bool is_dependency=true) const
 
const UserObjectgetUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const
 
virtual void meshChanged ()
 
const std::vector< MooseVariableScalar *> & getCoupledMooseScalarVars ()
 
const std::set< TagID > & getScalarVariableCoupleableVectorTags () const
 
const std::set< TagID > & getScalarVariableCoupleableMatrixTags () const
 
FunctorReturnType< Real, FET >::type genericEvaluate (const Space &r, const State &state) const
 
const MooseFunctorName & functorName () const
 
void setCacheClearanceSchedule (const std::set< ExecFlagType > &clearance_schedule)
 
virtual bool isExtrapolatedBoundaryFace (const FaceInfo &, const Elem *, const StateArg &) const
 
bool isInternalFace (const FaceInfo &) const
 
virtual bool isConstant () const
 
virtual bool hasFaceSide (const FaceInfo &fi, const bool fi_elem_side) const override
 
void checkFace (const Moose::FaceArg &face) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValue (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOld (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
const PostprocessorValuegetPostprocessorValueOlder (const std::string &param_name, const unsigned int index=0) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
virtual const PostprocessorValuegetPostprocessorValueByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOldByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
const PostprocessorValuegetPostprocessorValueOlderByName (const PostprocessorName &name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObject (const std::string &param_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
bool hasUserObjectByName (const UserObjectName &object_name) const
 
ValueType operator() (const ElemArg &elem, const StateArg &state) const
 
ValueType operator() (const FaceArg &face, const StateArg &state) const
 
ValueType operator() (const ElemQpArg &qp, const StateArg &state) const
 
ValueType operator() (const ElemSideQpArg &qp, const StateArg &state) const
 
ValueType operator() (const ElemPointArg &elem_point, const StateArg &state) const
 
ValueType operator() (const NodeArg &node, const StateArg &state) const
 
ValueType operator() (const ElemArg &elem, const StateArg &state) const
 
ValueType operator() (const FaceArg &face, const StateArg &state) const
 
ValueType operator() (const ElemQpArg &qp, const StateArg &state) const
 
ValueType operator() (const ElemSideQpArg &qp, const StateArg &state) const
 
ValueType operator() (const ElemPointArg &elem_point, const StateArg &state) const
 
ValueType operator() (const NodeArg &node, const StateArg &state) const
 
ValueType operator() (const ElemArg &elem, const StateArg &state) const
 
ValueType operator() (const FaceArg &face, const StateArg &state) const
 
ValueType operator() (const ElemQpArg &qp, const StateArg &state) const
 
ValueType operator() (const ElemSideQpArg &qp, const StateArg &state) const
 
ValueType operator() (const ElemPointArg &elem_point, const StateArg &state) const
 
ValueType operator() (const NodeArg &node, const StateArg &state) const
 
DotType dot (const ElemArg &elem, const StateArg &state) const
 
DotType dot (const FaceArg &face, const StateArg &state) const
 
DotType dot (const ElemQpArg &qp, const StateArg &state) const
 
DotType dot (const ElemSideQpArg &qp, const StateArg &state) const
 
DotType dot (const ElemPointArg &elem_point, const StateArg &state) const
 
DotType dot (const NodeArg &node, const StateArg &state) const
 
DotType dot (const ElemArg &elem, const StateArg &state) const
 
DotType dot (const FaceArg &face, const StateArg &state) const
 
DotType dot (const ElemQpArg &qp, const StateArg &state) const
 
DotType dot (const ElemSideQpArg &qp, const StateArg &state) const
 
DotType dot (const ElemPointArg &elem_point, const StateArg &state) const
 
DotType dot (const NodeArg &node, const StateArg &state) const
 
DotType dot (const ElemArg &elem, const StateArg &state) const
 
DotType dot (const FaceArg &face, const StateArg &state) const
 
DotType dot (const ElemQpArg &qp, const StateArg &state) const
 
DotType dot (const ElemSideQpArg &qp, const StateArg &state) const
 
DotType dot (const ElemPointArg &elem_point, const StateArg &state) const
 
DotType dot (const NodeArg &node, const StateArg &state) const
 
GradientType gradDot (const ElemArg &elem, const StateArg &state) const
 
GradientType gradDot (const FaceArg &face, const StateArg &state) const
 
GradientType gradDot (const ElemQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemSideQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemPointArg &elem_point, const StateArg &state) const
 
GradientType gradDot (const NodeArg &node, const StateArg &state) const
 
GradientType gradDot (const ElemArg &elem, const StateArg &state) const
 
GradientType gradDot (const FaceArg &face, const StateArg &state) const
 
GradientType gradDot (const ElemQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemSideQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemPointArg &elem_point, const StateArg &state) const
 
GradientType gradDot (const NodeArg &node, const StateArg &state) const
 
GradientType gradDot (const ElemArg &elem, const StateArg &state) const
 
GradientType gradDot (const FaceArg &face, const StateArg &state) const
 
GradientType gradDot (const ElemQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemSideQpArg &qp, const StateArg &state) const
 
GradientType gradDot (const ElemPointArg &elem_point, const StateArg &state) const
 
GradientType gradDot (const NodeArg &node, const StateArg &state) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
virtual unsigned int getElementIDIndex (const std::string &id_parameter_name, unsigned int comp=0) const
 
virtual unsigned int getElementIDIndexByName (const std::string &id_name) const
 
virtual const dof_id_typegetElementID (const std::string &id_parameter_name, unsigned int comp=0) const
 
dof_id_type getElementID (const Elem *elem, unsigned int elem_id_index) const
 
virtual const dof_id_typegetElementIDNeighbor (const std::string &id_parameter_name, unsigned int comp=0) const
 
virtual const dof_id_typegetElementIDByName (const std::string &id_name) const
 
virtual const dof_id_typegetElementIDNeighborByName (const std::string &id_name) const
 
bool hasElementID (const std::string &id_name) const
 
dof_id_type maxElementID (unsigned int elem_id_index) const
 
dof_id_type minElementID (unsigned int elem_id_index) const
 
bool areElemIDsIdentical (const std::string &id_name1, const std::string &id_name2) const
 
std::unordered_map< dof_id_type, std::set< dof_id_type > > getElemIDMapping (const std::string &id_name1, const std::string &id_name2) const
 
std::set< dof_id_typegetAllElemIDs (unsigned int elem_id_index) const
 
std::set< dof_id_typegetElemIDsOnBlocks (unsigned int elem_id_index, const std::set< SubdomainID > &blks) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Public Attributes

const ConsoleStream _console
 

Static Public Attributes

static constexpr auto SYSTEM
 
static constexpr auto NAME
 

Protected Member Functions

virtual void addPostprocessorDependencyHelper (const PostprocessorName &) const
 
virtual void addUserObjectDependencyHelper (const UserObject &) const
 
T & declareRestartableData (const std::string &data_name, Args &&... args)
 
ManagedValue< T > declareManagedRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
const T & getRestartableData (const std::string &data_name) const
 
T & declareRestartableDataWithContext (const std::string &data_name, void *context, Args &&... args)
 
T & declareRecoverableData (const std::string &data_name, Args &&... args)
 
T & declareRestartableDataWithObjectName (const std::string &data_name, const std::string &object_name, Args &&... args)
 
T & declareRestartableDataWithObjectNameWithContext (const std::string &data_name, const std::string &object_name, void *context, Args &&... args)
 
std::string restartableName (const std::string &data_name) const
 
bool isCoupledScalar (const std::string &var_name, unsigned int i=0) const
 
unsigned int coupledScalarComponents (const std::string &var_name) const
 
unsigned int coupledScalar (const std::string &var_name, unsigned int comp=0) const
 
libMesh::Order coupledScalarOrder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< is_ad > & coupledGenericScalarValue (const std::string &var_name, unsigned int comp=0) const
 
const GenericVariableValue< false > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const GenericVariableValue< true > & coupledGenericScalarValue (const std::string &var_name, const unsigned int comp) const
 
const VariableValuecoupledVectorTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledMatrixTagScalarValue (const std::string &var_name, TagID tag, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarValueOlder (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const ADVariableValueadCoupledScalarDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDot (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotOld (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDu (const std::string &var_name, unsigned int comp=0) const
 
const VariableValuecoupledScalarDotDotDu (const std::string &var_name, unsigned int comp=0) const
 
const MooseVariableScalargetScalarVar (const std::string &var_name, unsigned int comp) const
 
virtual GradientType evaluateGradDot (const ElemArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const FaceArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemSideQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemPointArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const NodeArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const FaceArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemSideQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemPointArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const NodeArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const FaceArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemSideQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const ElemPointArg &, const StateArg &) const
 
virtual GradientType evaluateGradDot (const NodeArg &, const StateArg &) const
 
virtual ValueType evaluate (const ElemArg &elem, const StateArg &state) const =0
 
virtual ValueType evaluate (const FaceArg &face, const StateArg &state) const =0
 
virtual ValueType evaluate (const ElemQpArg &qp, const StateArg &state) const =0
 
virtual ValueType evaluate (const ElemSideQpArg &side_qp, const StateArg &state) const =0
 
virtual ValueType evaluate (const ElemPointArg &elem_point, const StateArg &state) const =0
 
virtual ValueType evaluate (const NodeArg &node, const StateArg &state) const =0
 
virtual GradientType evaluateGradient (const ElemArg &, const StateArg &) const
 
virtual GradientType evaluateGradient (const FaceArg &, const StateArg &) const
 
virtual GradientType evaluateGradient (const ElemQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradient (const ElemSideQpArg &, const StateArg &) const
 
virtual GradientType evaluateGradient (const ElemPointArg &, const StateArg &) const
 
virtual GradientType evaluateGradient (const NodeArg &, const StateArg &) const
 
virtual DotType evaluateDot (const ElemArg &, const StateArg &) const
 
virtual DotType evaluateDot (const FaceArg &, const StateArg &) const
 
virtual DotType evaluateDot (const ElemQpArg &, const StateArg &) const
 
virtual DotType evaluateDot (const ElemSideQpArg &, const StateArg &) const
 
virtual DotType evaluateDot (const ElemPointArg &, const StateArg &) const
 
virtual DotType evaluateDot (const NodeArg &, const StateArg &) const
 
const T & getMeshProperty (const std::string &data_name, const std::string &prefix)
 
const T & getMeshProperty (const std::string &data_name)
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name) const
 
bool hasMeshProperty (const std::string &data_name) const
 
std::string meshPropertyName (const std::string &data_name) const
 

Static Protected Member Functions

static std::string meshPropertyName (const std::string &data_name, const std::string &prefix)
 

Protected Attributes

const MeshGeneratorName _mesh_generator
 Name of the mesh generator to get MeshMetaData from. More...
 
const std::vector< Real_angular_speeds
 Vector of angular speeds of control drums. More...
 
const std::vector< Real_start_angles
 Vector of initial starting angles of control drums. More...
 
const std::vector< Real_angle_ranges
 Vector of angular ranges of control drums. More...
 
const Real _rotation_start_time
 Start time of control drums rotation. More...
 
const Real _rotation_end_time
 End time of control drums rotation. More...
 
const bool _use_control_drum_id
 Whether extra element id user_control_drum_id is used. More...
 
const dof_id_type_control_drum_id
 ExtraElementID: control drum ExtraElementID. More...
 
const std::vector< Point > & _control_drum_positions
 MeshMetaData: positions of control drums. More...
 
const std::vector< std::vector< Real > > & _control_drums_azimuthal_meta
 MeshMetaData: vector of azimuthal angles of all nodes of each control drum. More...
 
const bool & _enabled
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
const ExecFlagEnum_execute_enum
 
const ExecFlagType_current_execute_flag
 
const InputParameters_ti_params
 
FEProblemBase_ti_feproblem
 
bool _is_implicit
 
Real_t
 
const Real_t_old
 
int_t_step
 
Real_dt
 
Real_dt_old
 
bool _is_transient
 
MooseApp_restartable_app
 
const std::string _restartable_system_name
 
const THREAD_ID _restartable_tid
 
const bool _restartable_read_only
 
FEProblemBase_mci_feproblem
 
FEProblemBase_sc_fe_problem
 
const THREAD_ID _sc_tid
 
const Real_real_zero
 
const VariableValue_scalar_zero
 
const Point & _point_zero
 
const Parallel::Communicator & _communicator
 

Detailed Description

A function that returns an absorber fraction for multiple control drums application.

Definition at line 19 of file MultiControlDrumFunction.h.

Constructor & Destructor Documentation

◆ MultiControlDrumFunction()

MultiControlDrumFunction::MultiControlDrumFunction ( const InputParameters parameters)

Definition at line 42 of file MultiControlDrumFunction.C.

45  ElementIDInterface(this),
46  _mesh_generator(getParam<MeshGeneratorName>("mesh_generator")),
47  _angular_speeds(getParam<std::vector<Real>>("angular_speeds")),
48  _start_angles(getParam<std::vector<Real>>("start_angles")),
49  _angle_ranges(getParam<std::vector<Real>>("angle_ranges")),
50  _rotation_start_time(getParam<Real>("rotation_start_time")),
51  _rotation_end_time(getParam<Real>("rotation_end_time")),
52  _use_control_drum_id(getParam<bool>("use_control_drum_id")),
54  : DofObject::invalid_id),
56  getMeshProperty<std::vector<Point>>("control_drum_positions", _mesh_generator)),
57  _control_drums_azimuthal_meta(getMeshProperty<std::vector<std::vector<Real>>>(
58  "control_drums_azimuthal_meta", _mesh_generator))
59 {
60  if (_angular_speeds.size() != _start_angles.size())
61  paramError("start_angles",
62  "the size of 'start_angles' must be identical to the size of 'angular_speeds'");
63  if (_angular_speeds.size() != _angle_ranges.size())
64  paramError("angle_ranges",
65  "the size of 'angle_ranges' must be identical to the size of 'angular_speeds'");
66  if (_angular_speeds.size() != _control_drum_positions.size())
67  paramError("angular_speeds",
68  "the size of this parameter must be identical to the control drum number recorded "
69  "in the MeshMetaData.");
71  paramError("rotation_end_time", "this parameter must be larger than rotation_start_time.");
72 }
const T & getMeshProperty(const std::string &data_name, const std::string &prefix)
const std::vector< Real > _angle_ranges
Vector of angular ranges of control drums.
const dof_id_type & _control_drum_id
ExtraElementID: control drum ExtraElementID.
const std::vector< std::vector< Real > > & _control_drums_azimuthal_meta
MeshMetaData: vector of azimuthal angles of all nodes of each control drum.
MeshMetaDataInterface(const MooseObject *moose_object)
const Real _rotation_start_time
Start time of control drums rotation.
Function(const InputParameters &parameters)
const std::vector< Real > _start_angles
Vector of initial starting angles of control drums.
const T & getParam(const std::string &name) const
virtual const dof_id_type & getElementIDByName(const std::string &id_name) const
const std::vector< Real > _angular_speeds
Vector of angular speeds of control drums.
void paramError(const std::string &param, Args... args) const
const Real _rotation_end_time
End time of control drums rotation.
const InputParameters & parameters() const
const std::vector< Point > & _control_drum_positions
MeshMetaData: positions of control drums.
ElementIDInterface(const MooseObject *moose_object)
const bool _use_control_drum_id
Whether extra element id user_control_drum_id is used.
const MeshGeneratorName _mesh_generator
Name of the mesh generator to get MeshMetaData from.

Member Function Documentation

◆ validParams()

InputParameters MultiControlDrumFunction::validParams ( )
static

Definition at line 15 of file MultiControlDrumFunction.C.

16 {
18  params.addClassDescription(
19  "A function that returns an absorber fraction for multiple control drums application.");
20  params.addRequiredParam<MeshGeneratorName>(
21  "mesh_generator",
22  "Name of the mesh generator to be used to retrieve control drums information.");
23  params.addRequiredParam<std::vector<Real>>(
24  "angular_speeds", "Vector of angular rotation speeds of the control drum.");
25  params.addRequiredParam<std::vector<Real>>(
26  "start_angles",
27  "Vector of initial angular positions of the beginning of the absorber components.");
28  params.addRequiredParam<std::vector<Real>>(
29  "angle_ranges", "Vector of angular ranges of the beginning of the absorber components.");
30  params.addParam<Real>(
31  "rotation_start_time", 0.0, "The time point at which the control drums start rotating.");
32  params.addParam<Real>("rotation_end_time",
33  std::numeric_limits<Real>::max(),
34  "The time point at which the control drums stop rotating.");
35  params.addParam<bool>(
36  "use_control_drum_id", true, "Whether extra element id user_control_drum_id is used.");
37  params.addParamNamesToGroup("use_control_drum_id", "Advanced");
38 
39  return params;
40 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)

◆ value() [1/9]

ChainedReal Function::value

◆ value() [2/9]

auto Function::value

◆ value() [3/9]

auto Function::value

◆ value() [4/9]

auto Function::value

◆ value() [5/9]

virtual Real Function::value

◆ value() [6/9]

auto Function::value

◆ value() [7/9]

ChainedReal Function::value

◆ value() [8/9]

virtual ADReal Function::value

◆ value() [9/9]

Real MultiControlDrumFunction::value ( Real  t,
const Point &  p 
) const
overridevirtual

Reimplemented from Function.

Definition at line 75 of file MultiControlDrumFunction.C.

76 {
77  // Calculate the effective rotation time
78  const Real t_eff = t < _rotation_start_time
79  ? 0.0
81  : t - _rotation_start_time);
82  // Find the closest control drum for a given Point p; only needed if control drum id is not used.
83  std::vector<std::pair<Real, unsigned int>> meshcontrol_drum_dist_vec;
85  {
86  for (unsigned int i = 0; i < _control_drum_positions.size(); i++)
87  {
88  Real cd_dist = std::sqrt(Utility::pow<2>(p(0) - _control_drum_positions[i](0)) +
89  Utility::pow<2>(p(1) - _control_drum_positions[i](1)));
90  meshcontrol_drum_dist_vec.push_back(std::make_pair(cd_dist, i));
91  }
92  std::sort(meshcontrol_drum_dist_vec.begin(), meshcontrol_drum_dist_vec.end());
93  }
94  const unsigned int cd_id = _use_control_drum_id
95  ? (_control_drum_id > 0 ? _control_drum_id - 1 : 0)
96  : meshcontrol_drum_dist_vec.front().second;
97  const auto & cd_pos = _control_drum_positions[cd_id];
98 
99  Real dynamic_start_angle = (_angular_speeds[cd_id] * t_eff + _start_angles[cd_id]) / 180.0 * M_PI;
100  Real dynamic_end_angle = dynamic_start_angle + _angle_ranges[cd_id] / 180.0 * M_PI;
101 
102  dynamic_start_angle = atan2(std::sin(dynamic_start_angle),
103  std::cos(dynamic_start_angle)) /
104  M_PI * 180.0; // quick way to move to -M_PI to M_PI
105  dynamic_end_angle = atan2(std::sin(dynamic_end_angle),
106  std::cos(dynamic_end_angle)) /
107  M_PI * 180.0; // quick way to move to -M_PI to M_PI
108 
109  // Locate the first mesh azimuthal angle that is greater than dynamic_start_angle
110  auto start_bound = std::upper_bound(_control_drums_azimuthal_meta[cd_id].begin(),
111  _control_drums_azimuthal_meta[cd_id].end(),
112  dynamic_start_angle);
113  // Locate the first mesh azimuthal angle that is greater than dynamic_end_angle
114  auto end_bound = std::upper_bound(_control_drums_azimuthal_meta[cd_id].begin(),
115  _control_drums_azimuthal_meta[cd_id].end(),
116  dynamic_end_angle);
117 
118  // Locate the elements that contain the start/end angles.
119  // This part seems long; but it only solves one simple issue -> transition from M_PI to -M_PI
120 
121  // The two azimuthal ends of the element that the start angle intercepts;
122  // and the two azimuthal ends of the element that the end angle intercepts;
123  Real start_low, start_high, end_low, end_high;
124  // This means that the dynamic_start_angle is greater than the lowest mesh azimuthal angle and
125  // lower than the greatest mesh azimuthal angle. Namely, dynamic_start_angle does not cause the
126  // "transition from M_PI to -M_PI" issue.
127  if (start_bound != _control_drums_azimuthal_meta[cd_id].begin() &&
128  start_bound != _control_drums_azimuthal_meta[cd_id].end())
129  {
130  start_low = *(start_bound - 1);
131  start_high = *start_bound;
132  }
133  // On the contrary, this means the dynamic_start_angle intercepts an element across the
134  // M_PI(-M_PI) azimuthal angle. Namely, start_high is actually lower than start_low because of
135  // this transition.
136  else
137  {
138  start_high = _control_drums_azimuthal_meta[cd_id].front();
139  start_low = _control_drums_azimuthal_meta[cd_id].back();
140  }
141 
142  // This means that dynamic_end_angle is greater than the lowest mesh azimuthal angle and lower
143  // than the greatest mesh azimuthal angle. Namely, dynamic_end_angle does not cause the
144  // "transition from M_PI to -M_PI" issue.
145  if (end_bound != _control_drums_azimuthal_meta[cd_id].begin() &&
146  end_bound != _control_drums_azimuthal_meta[cd_id].end())
147  {
148  end_low = *(end_bound - 1);
149  end_high = *end_bound;
150  }
151  // On the contrary, this means the dynamic_end_angle intercepts an element across the
152  // M_PI(-M_PI) azimuthal angle. Namely, end_high is actually lower than end_low because of
153  // this transition.
154  else
155  {
156  end_high = _control_drums_azimuthal_meta[cd_id].front();
157  end_low = _control_drums_azimuthal_meta[cd_id].back();
158  }
159 
160  // azimuthal_p is the azimuthal angle of the point whose functon value needs to be calculated.
161  Real azimuthal_p = atan2(p(1) - cd_pos(1), p(0) - cd_pos(0)) / M_PI * 180;
162 
163  // If there is not periodical transition from M_PI to -M_PI, we always have:
164  // start_low < start_high < end_low < end_high
165  // In the presence of "transition from M_PI to -M_PI", the relation above is compromised.
166  // Based on how the relation is compromised, we can tell where the transition occurs.
167 
168  // Most trivial scenario -> no transition from M_PI to -M_PI is involved (it happens to a pure
169  // reflector element)
170  if (end_high >= start_low)
171  {
172  // the point is located in an element that is purely absorber.
173  if (azimuthal_p >= start_high && azimuthal_p <= end_low)
174  return 100.0;
175  // the point is located in an element that is purely reflector.
176  else if (azimuthal_p <= start_low || azimuthal_p >= end_high)
177  return 0.0;
178  // the point is located in a mixed element intercepted by dynamic_start_angle so that volume
179  // fraction is calculated.
180  else if (azimuthal_p < start_high && azimuthal_p > start_low)
181  {
182  Real start_interval = start_high - start_low;
183  Real stab_interval = start_high - dynamic_start_angle;
184  return stab_interval / start_interval * 100.0;
185  }
186  // the point is located in a mixed element intercepted by dynamic_end_angle so that volume
187  // fraction is calculated.
188  else
189  {
190  Real end_interval = end_high - end_low;
191  Real endab_interval = dynamic_end_angle - end_low;
192  return endab_interval / end_interval * 100.0;
193  }
194  }
195  // The element intercepted by dynamic_end_angle has the "transition from M_PI to -M_PI" issue.
196  // This is still relatively simple because only one of the mixed element is affected.
197  else if (end_low >= end_high)
198  {
199  // (Not affected) the point is located in an element that is purely absorber.
200  if (azimuthal_p >= start_high && azimuthal_p <= end_low)
201  return 100.0;
202  // (Affected) the point is located in an element that is purely reflector.
203  else if (azimuthal_p <= start_low && azimuthal_p >= end_high)
204  return 0.0;
205  // (Not affected) the point is located in a mixed element intercepted by dynamic_start_angle so
206  // that volume fraction is calculated.
207  else if (azimuthal_p < start_high && azimuthal_p > start_low)
208  {
209  Real start_interval = start_high - start_low;
210  Real stab_interval = start_high - dynamic_start_angle;
211  return stab_interval / start_interval * 100.0;
212  }
213  // (Affected) the point is located in a mixed element intercepted by dynamic_end_angle so that
214  // volume fraction is calculated. As this element is also intercepted by azimuthal_angle = M_PI
215  // (-M_PI), an extra 2 * M_PI (360 degrees) shift is used to correct this transition effect.
216  else
217  {
218  Real end_interval = end_high - end_low + 360.0;
219  Real endab_interval = (dynamic_end_angle - end_low >= 0.0)
220  ? (dynamic_end_angle - end_low)
221  : (dynamic_end_angle - end_low + 360.0);
222  return endab_interval / end_interval * 100.0;
223  }
224  }
225  // The "transition from M_PI to -M_PI" happens to an pure absorber element
226  else if (start_high >= end_low)
227  {
228  // (Affected) the point is located in an element that is purely absorber.
229  if (azimuthal_p >= start_high || azimuthal_p <= end_low)
230  return 100.0;
231  // (Affected) the point is located in an element that is purely reflector.
232  else if (azimuthal_p >= end_high && azimuthal_p <= start_low)
233  return 0.0;
234  // (Not affected) the point is located in a mixed element intercepted by dynamic_start_angle so
235  // that volume fraction is calculated.
236  else if (azimuthal_p < start_high && azimuthal_p > start_low)
237  {
238  Real start_interval = start_high - start_low;
239  Real stab_interval = start_high - dynamic_start_angle;
240  return stab_interval / start_interval * 100.0;
241  }
242  // (Not affected) the point is located in a mixed element intercepted by dynamic_end_angle so
243  // that volume fraction is calculated.
244  else
245  {
246  Real end_interval = end_high - end_low;
247  Real endab_interval = dynamic_end_angle - end_low;
248  return endab_interval / end_interval * 100.0;
249  }
250  }
251  // The element intercepted by dynamic_start_angle has the "transition from M_PI to -M_PI" issue.
252  // This is still relatively simple because only one of the mixed element is affected.
253  else
254  {
255  // (Not affected) the point is located in an element that is purely absorber.
256  if (azimuthal_p >= start_high && azimuthal_p <= end_low)
257  return 100.0;
258  // (Affected) the point is located in an element that is purely reflector.
259  else if (azimuthal_p >= end_high && azimuthal_p <= start_low)
260  return 0.0;
261  // (Affected) the point is located in a mixed element intercepted by dynamic_start_angle so that
262  // volume fraction is calculated. As this element is also intercepted by azimuthal_angle = M_PI
263  // (-M_PI), an extra 2 * M_PI (360 degrees) shift is used to correct this transition effect.
264  else if (azimuthal_p > start_low || azimuthal_p < start_high)
265  {
266  Real start_interval = start_high - start_low + 360.0;
267  Real stab_interval = (start_high - dynamic_start_angle >= 0.0)
268  ? (start_high - dynamic_start_angle)
269  : (start_high - dynamic_start_angle + 360.0);
270  return stab_interval / start_interval * 100.0;
271  }
272  // (Not affected) the point is located in a mixed element intercepted by dynamic_end_angle so
273  // that volume fraction is calculated.
274  else
275  {
276  Real end_interval = end_high - end_low;
277  Real endab_interval = dynamic_end_angle - end_low;
278  return endab_interval / end_interval * 100.0;
279  }
280  }
281 }
const std::vector< Real > _angle_ranges
Vector of angular ranges of control drums.
const dof_id_type & _control_drum_id
ExtraElementID: control drum ExtraElementID.
const std::vector< std::vector< Real > > & _control_drums_azimuthal_meta
MeshMetaData: vector of azimuthal angles of all nodes of each control drum.
const Real _rotation_start_time
Start time of control drums rotation.
const std::vector< Real > _start_angles
Vector of initial starting angles of control drums.
const std::vector< Real > _angular_speeds
Vector of angular speeds of control drums.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real _rotation_end_time
End time of control drums rotation.
const std::vector< Point > & _control_drum_positions
MeshMetaData: positions of control drums.
const bool _use_control_drum_id
Whether extra element id user_control_drum_id is used.

Member Data Documentation

◆ _angle_ranges

const std::vector<Real> MultiControlDrumFunction::_angle_ranges
protected

Vector of angular ranges of control drums.

Definition at line 39 of file MultiControlDrumFunction.h.

Referenced by MultiControlDrumFunction(), and value().

◆ _angular_speeds

const std::vector<Real> MultiControlDrumFunction::_angular_speeds
protected

Vector of angular speeds of control drums.

Definition at line 35 of file MultiControlDrumFunction.h.

Referenced by MultiControlDrumFunction(), and value().

◆ _control_drum_id

const dof_id_type& MultiControlDrumFunction::_control_drum_id
protected

ExtraElementID: control drum ExtraElementID.

Definition at line 47 of file MultiControlDrumFunction.h.

Referenced by value().

◆ _control_drum_positions

const std::vector<Point>& MultiControlDrumFunction::_control_drum_positions
protected

MeshMetaData: positions of control drums.

Definition at line 49 of file MultiControlDrumFunction.h.

Referenced by MultiControlDrumFunction(), and value().

◆ _control_drums_azimuthal_meta

const std::vector<std::vector<Real> >& MultiControlDrumFunction::_control_drums_azimuthal_meta
protected

MeshMetaData: vector of azimuthal angles of all nodes of each control drum.

Definition at line 51 of file MultiControlDrumFunction.h.

Referenced by value().

◆ _mesh_generator

const MeshGeneratorName MultiControlDrumFunction::_mesh_generator
protected

Name of the mesh generator to get MeshMetaData from.

Definition at line 33 of file MultiControlDrumFunction.h.

◆ _rotation_end_time

const Real MultiControlDrumFunction::_rotation_end_time
protected

End time of control drums rotation.

Definition at line 43 of file MultiControlDrumFunction.h.

Referenced by MultiControlDrumFunction(), and value().

◆ _rotation_start_time

const Real MultiControlDrumFunction::_rotation_start_time
protected

Start time of control drums rotation.

Definition at line 41 of file MultiControlDrumFunction.h.

Referenced by MultiControlDrumFunction(), and value().

◆ _start_angles

const std::vector<Real> MultiControlDrumFunction::_start_angles
protected

Vector of initial starting angles of control drums.

Definition at line 37 of file MultiControlDrumFunction.h.

Referenced by MultiControlDrumFunction(), and value().

◆ _use_control_drum_id

const bool MultiControlDrumFunction::_use_control_drum_id
protected

Whether extra element id user_control_drum_id is used.

Definition at line 45 of file MultiControlDrumFunction.h.

Referenced by value().


The documentation for this class was generated from the following files: