- npropNumber of tabulated property values
C++ Type:unsigned int
Controllable:No
Description:Number of tabulated property values
- prop_file_nameName of the property file name
C++ Type:FileName
Controllable:No
Description:Name of the property file name
- read_typeType of property distribution: element:by element node: by node voronoi:nearest neighbor / voronoi grain structure block:by mesh block grain: deprecated, use voronoi
C++ Type:MooseEnum
Controllable:No
Description:Type of property distribution: element:by element node: by node voronoi:nearest neighbor / voronoi grain structure block:by mesh block grain: deprecated, use voronoi
PropertyReadFile
User Object to read property data from an external file and assign to elements.
This user object may load data sorted in four different ways. The read modes are toggled using the "read_type" parameter.
In element mode, the file read contains "nprop" values for each element in the mesh.
In grain/voronoi mode, a Voronoi tessellation with "nvoronoi" random centers is either created randomly or read from the first columns of the
CSV
file, depending on the "use_random_voronoi" parameter. The file read should still contain "nprop" columns, even though 1-3 columns may be used for the Voronoi tesselation positions.In block mode, the file read contains "nprop" values for each block in the mesh. "nblock" is the number of blocks in the mesh.
In node mode, the file read contains "nprop" values for each node in the mesh.
For the element
(block
and node
respectively) modes, both the elements (blocks and nodes respectively) in the mesh and the data in the CSV
file must be ordered consecutively. The element (block and node respectively) IDs must be contiguous and usually start from 1.
The "use_zero_based_block_indexing" parameter indicates whether the block numbers start with zero (true
) or one (false
).
Object use
Values can be queried from the object by passing in a property ID and an element pointer. In element mode a direct lookup from the data table based on element ID is performed. In grain mode the centroid of the passed in element is taken and the grain ID is determined as the ID of the Voronoi center closest to the element centroid.
An example of a MOOSE object using the PropertyReadFile
is the PiecewiseConstantFromCSV function.
Example input syntax
In this example input file, the PropertyReadFile
user object is used to load data from a CSV file then a PiecewiseConstantFromCSV function and a FunctionIC are used to populate a field with this data. This is done for each "read_type".
Data sorted by element
[reader_element]
type = PropertyReadFile
prop_file_name = 'data_element.csv'
read_type = 'element'
nprop = 3 # number of columns in CSV
[]
(../moose/test/tests/functions/piecewise_constant_from_csv/piecewise_constant.i)0,0,0.1
0,0,0.8
0,0,0.4
0,0,0.9
0,0,1
1,0,1.1
1,0,2.1
1,0,3.1
1,0,17.1
1,0,24
1,0,10
1,0,0.1
1,0,11
1,0,17
1,0,1.8
1,0,-1
(../moose/test/tests/functions/piecewise_constant_from_csv/data_element.csv)Data sorted by nearest-neighbor
[reader_nearest]
type = PropertyReadFile
prop_file_name = 'data_nearest.csv'
read_type = 'voronoi'
nprop = 3
nvoronoi = 3
[]
(../moose/test/tests/functions/piecewise_constant_from_csv/piecewise_constant.i)1,0,0.1
0,0.8,4
2,3.1,7
(../moose/test/tests/functions/piecewise_constant_from_csv/data_nearest.csv)Data sorted by block
[reader_block]
type = PropertyReadFile
prop_file_name = 'data_nearest.csv'
read_type = 'block'
nprop = 3
nblock = 3
[]
(../moose/test/tests/functions/piecewise_constant_from_csv/piecewise_constant.i)In this example, the same CSV file as the nearest neighbor case is used. It is however processed and used differently.
Data sorted by node
[reader_node]
type = PropertyReadFile
prop_file_name = 'data_node.csv'
read_type = 'node'
nprop = 3 # number of columns in CSV
[]
(../moose/test/tests/functions/piecewise_constant_from_csv/piecewise_constant.i)0,0,0.1
0,0,0.8
0,0,0.4
0,0,0.9
0,0,1
1,0,1.1
1,0,2.1
1,0,3.1
1,0,17.1
1,0,24
1,0,10
1,0,0.1
1,0,11
1,0,17
1,0,1.8
1,0,-1
1,0,17.1
1,0,24
1,0,10
1,0,0.1
1,0,11
1,0,17
1,0,1.8
1,0,-1
1,0,-3
(../moose/test/tests/functions/piecewise_constant_from_csv/data_node.csv)Input Parameters
- 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
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.
- nblock0Number of blocks
Default:0
C++ Type:unsigned int
Controllable:No
Description:Number of blocks
- nvoronoi0Number of voronoi tesselations/grains/nearest neighbor regions
Default:0
C++ Type:unsigned int
Controllable:No
Description:Number of voronoi tesselations/grains/nearest neighbor regions
- 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.
- rand_seed2000random seed
Default:2000
C++ Type:unsigned int
Controllable:No
Description:random seed
- rve_typenonePeriodic or non-periodic grain distribution: Default is non-periodic
Default:none
C++ Type:MooseEnum
Controllable:No
Description:Periodic or non-periodic grain distribution: Default is non-periodic
- use_random_voronoiFalseWether to generate random positions for the Voronoi tesselation
Default:False
C++ Type:bool
Controllable:No
Description:Wether to generate random positions for the Voronoi tesselation
- use_zero_based_block_indexingTrueAre the blocks numbered starting at zero?
Default:True
C++ Type:bool
Controllable:No
Description:Are the blocks numbered starting at zero?
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
- 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.