pyvale.dataio.simdata module

class EMeshType(*values)[source]

Bases: Enum

Topological class of a finite-element mesh.

VOL = 'volume'
SURF = 'surface'
class SimData(num_spat_dims=3, mesh_type=None, 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

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.

mesh_type

Whether connectivity describes volume cells or surface elements.

None is retained for point clouds and partially populated objects. When coordinates and connectivity are supplied to the constructor, this is inferred geometrically. Call refresh_mesh_type() after assigning either field later.

time

Vector of time steps with dimensions [t]. Defaults to None.

coords

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

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

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

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

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

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.

refresh_mesh_type()[source]

Infer and store the mesh type from the current mesh geometry.

__init__(num_spat_dims=3, mesh_type=None, time=None, coords=None, connect=None, side_sets=None, node_vars=None, elem_vars=None, glob_vars=None)
class SimLoadConfig(time=True, coords=True, connect=True, sidesets=None, node_vars=None, elem_vars=None, glob_vars=None, time_inds=None, enforce_convention=True)[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, enforce_convention=True)
coords
connect
sidesets
node_vars
elem_vars
glob_vars
time_inds
enforce_convention