analyticmeshgen¶
Analytic mesh creation tools for testing pyvale sensor simulation and uncertainty quantification functionality with a known analytic function for the scalar/vector/tensor field of interest.
- pyvale.analyticmeshgen.fill_dims_2d(coord_x: ndarray, coord_y: ndarray, time: ndarray) tuple[ndarray, ndarray, ndarray] [source]¶
Helper function to generate 2D filled arrays tih consistent dimensions for array based maths operations. Takes 1D input vectors for the x, y and time dimensions and returns 2D arrays with shape=(num_coords,num_timesteps). Useful for evaluating analytical functions in space and time.
- Parameters:
coord_x (np.ndarray) -- 1D flattened coordinate list for the x axis.
coord_y (np.ndarray) -- 1D flattened coordinate list for the y axis.
time (np.ndarray) -- 1D array of time steps.
- Returns:
tuple[np.ndarray,np.ndarray,np.ndarray] -- Filled 2D arrays with shape=(num_coords,num_timesteps) for the x, y and time parameters respectively.
- pyvale.analyticmeshgen.rectangle_mesh_2d(leng_x: float, leng_y: float, n_elem_x: int, n_elem_y: int) tuple[ndarray, ndarray] [source]¶
Creates the nodal coordinates and element connectivity table for a simple 2D quad mesh for a rectangular plate.
- Parameters:
leng_x (float) -- Length of the plate in the x direction.
leng_y (float) -- Length of the plate in the y direction.
n_elem_x (int) -- Number of elements along the x axis
n_elem_y (int) -- Number of elements along the y axis
- Returns:
tuple[np.ndarray,np.ndarray] -- The coordinates and connectivity table as numpy arrays. The coordinates have shape=(n_nodes,coord[x,y,z]). The connectivity tables has shape= (nodes_per_elem,num_elems).