LineValueSampler

Samples variable(s) along a specified line

Description

LineValueSampler samples the given variables/auxvariables at equally spaced points between the start and end points of a user provided line segment. The sampled points and the values are written to a csv file at every time step. The sorting order of the points can be changed using the sort_by parameter which takes x, y, z or id (increasing distance from start point) as input.

LineValueSampler could also be used as an UserObject with the MultiAppUserObjectTransfer to transfer values to AuxVariables in the master or sub application. When using the LineValueSampler with the MultiAppUserObjectTransfer, an error is generated if more than one variable is supplied as input to the LineValueSampler as the transfer currently works only with one variable. Also, when calculating the value of the UserObject (LineValueSampler in this case) at a given point, the point is first projected onto the user defined line segment and the interpolated value at the projected point is returned as output. If the projected point falls outside the line segment, infinity is returned as output.

If the variable to be plotted needs to be scaled, this can be done by supplying a postprocessor. Caution should be used to make sure that the postprocessor is being evaluated in such a way that its value will not be lagged when being called by LineValueSampler.

commentnote

If the line value sampler is used with a discontinuous variable on the edge/face of a 2D/3D element, then the value from the element with the lowest ID will be returned.

commentnote:Vector names / CSV output column names

LineValueSampler declares a vector for each spatial coordinate, (x, y, z), of the sampled points, the distance along the sampled line in a vector called id, and a vector named after each value sampled, containing the variable values at each point.

Input Parameters

  • end_pointThe ending of the line

    C++ Type:libMesh::Point

    Controllable:No

    Description:The ending of the line

  • num_pointsThe number of points to sample along the line

    C++ Type:unsigned int

    Controllable:No

    Description:The number of points to sample along the line

  • sort_byWhat to sort the samples by

    C++ Type:MooseEnum

    Options:x, y, z, id

    Controllable:No

    Description:What to sort the samples by

  • start_pointThe beginning of the line

    C++ Type:libMesh::Point

    Controllable:No

    Description:The beginning of the line

  • variableThe names of the variables that this VectorPostprocessor operates on

    C++ Type:std::vector<VariableName>

    Controllable:No

    Description:The names of the variables that this VectorPostprocessor operates on

Required Parameters

  • _auto_broadcastFalse

    Default:False

    C++ Type:bool

    Controllable:No

  • contains_complete_historyFalseSet this flag to indicate that the values in all vectors declared by this VPP represent a time history (e.g. with each invocation, new values are added and old values are never removed). This changes the output so that only a single file is output and updated with each invocation

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Set this flag to indicate that the values in all vectors declared by this VPP represent a time history (e.g. with each invocation, new values are added and old values are never removed). This changes the output so that only a single file is output and updated with each invocation

  • execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, ALWAYS.

    Default:TIMESTEP_END

    C++ Type:ExecFlagEnum

    Options:NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, ALWAYS

    Controllable:No

    Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, ALWAYS.

  • parallel_typeREPLICATEDSet how the data is represented within the VectorPostprocessor (VPP); 'distributed' indicates that data within the VPP is distributed and no auto communication is performed, this setting will result in parallel output within the CSV output; 'replicated' indicates that the data within the VPP is correct on processor 0, the data will automatically be broadcast to all processors unless the '_auto_broadcast' param is set to false within the validParams function.

    Default:REPLICATED

    C++ Type:MooseEnum

    Options:DISTRIBUTED, REPLICATED

    Controllable:No

    Description:Set how the data is represented within the VectorPostprocessor (VPP); 'distributed' indicates that data within the VPP is distributed and no auto communication is performed, this setting will result in parallel output within the CSV output; 'replicated' indicates that the data within the VPP is correct on processor 0, the data will automatically be broadcast to all processors unless the '_auto_broadcast' param is set to false within the validParams function.

  • prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

    C++ Type:MaterialPropertyName

    Controllable:No

    Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

  • scaling1The postprocessor that the variables are multiplied with

    Default:1

    C++ Type:PostprocessorName

    Controllable:No

    Description:The postprocessor that the variables are multiplied with

  • warn_discontinuous_face_valuesTrueWhether to return a warning if a discontinuous variable is sampled on a face

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Whether to return a warning if a discontinuous variable is sampled on a face

Optional Parameters

  • allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

    Default:False

    C++ Type:bool

    Controllable:No

    Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

    Default:0

    C++ Type:int

    Controllable:No

    Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

  • force_postauxFalseForces the UserObject to be executed in POSTAUX

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in POSTAUX

  • force_preauxFalseForces the UserObject to be executed in PREAUX

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in PREAUX

  • force_preicFalseForces the UserObject to be executed in PREIC during initial setup

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in PREIC during initial setup

  • outputsVector of output names where you would like to restrict the output of variables(s) associated with this object

    C++ Type:std::vector<OutputName>

    Controllable:No

    Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Advanced Parameters