simdata.py¶
- class SimData(num_spat_dims=3, time=None, coords=None, connect=None, side_sets=None, node_vars=None, elem_vars=None, glob_vars=None)[source]¶
Bases:
object
Data class for simulation output. Allows for structured meshes with connectivity tables or for point clouds.
- num_spat_dims = 3¶
Number of spatial dimensions in the simulation, required to determine element types given that all coords are padded to [x,y,z]. Allows for 2D and 1D simulations using any combination of the [x,y,z] axes.
- time = None¶
Vector of time steps with dimensions [t]. Defaults to None.
- coords = None¶
Array of nodal coordinates in N by 3 where N is the number of nodes columns are [x,y,z] coordinates and rows are the nth node. Defaults to None.
- connect = None¶
Element connectivity table: key = “connectX” where X is the subdomain e.g. connect1 Element table given as E by n_e rows where E is the number of elements in the given subdomain. n_e is the number of nodes per element. Defaults to None.
- side_sets = None¶
Sidesets by name and associated node and element numbers. key = (name, “node” or “elem”) e.g. (“bottom”,”node”) will return node numbers associated with associated with sideset called “bottom” as a numpy array with n_s entries where n_s is the number of nodes in the sideset. Defaults to None.
- node_vars = None¶
Nodal variable by name. key = “name” e.g. “disp_x” or “temp” Gives the nodal variable as a numpy array, N by t where N is the number of nodes and t is the number of time steps. Note that element variables can be stored as nodal depending on output options or material output order selected. Defaults to None.
- elem_vars = None¶
Element variables by name and block. key = (name, block num) Gives the element variable as a numpy array, E by t where E is the number of elements and t is the number of time steps. Note that element variables might exist as nodal variables only depending on output options and specified material output order. Defaults to None.
- glob_vars = None¶
Global variables by name. Global variable include postprocessors and extracted reactions at boundaries. key = name (as specified in input file post-processor), e.g. “react_y” Gives a numpy array with t entries corresponding to the number of time steps in the simulation. Defaults to None.
- __init__(num_spat_dims=3, time=None, coords=None, connect=None, side_sets=None, node_vars=None, elem_vars=None, glob_vars=None)¶
- class SimReadConfig(time=True, coords=True, connect=True, sidesets=None, node_vars=None, elem_vars=None, glob_vars=None, time_inds=None)[source]¶
Bases:
object
Used to specify names of variables to be read into the SimData class. This class allows the user to only extract the required variables by name.
- time¶
- __init__(time=True, coords=True, connect=True, sidesets=None, node_vars=None, elem_vars=None, glob_vars=None, time_inds=None)¶
- coords¶
- connect¶
- sidesets¶
- node_vars¶
- elem_vars¶
- glob_vars¶
- time_inds¶