Mesh¶
-
class
wfds.Mesh(x_dom, y_dom, z_dom, res, num_meshes)[source]¶ Bases:
objectThe Mesh class can be used to easily and quickly calculate the input parameters needed to define FDS meshes. It is inherited by the
WFDSandGenerateBinaryGridclasses. It has two callable (non-private) methods:stretch_mesh()andformat_mesh()Parameters: - x_dom (integer) – X dimension of the simulation domain
- y_dom (integer) – Y dimension of the simulation domain
- z_dom (integer) – Z dimension of the simulation domain
- res (float) – 3-space resolution prior to mesh stretching
- num_meshes (integer) – Number of meshes
Example: >>> import wfds >>> mesh = wfds.Mesh(160,90,50,1,9) >>> mesh.stretch_mesh([3,33], [1,31]) >>> print mesh.format_mesh()
-
format_mesh()[source]¶ Formats a mesh for the WFDS input file.
Returns: formated WFDS mesh Return type: string
-
stretch_mesh(comp_coord, phys_coord)[source]¶ Defines the parameters for stretching a the mesh along the z axis, distorting the cell sizes. Passes the two sets of coordinates to the self.stretch variable which will be accessed by the
format_mesh()method to format the WFDS input file.Parameters: - comp_coord (python list) – computation coordinates
- phys_coord (python list) – physical coordinates
Note
comp_coord and phys_coord must have an equal number of elements.See the FDS users guide for more information on stretching: https://pages.nist.gov/fds-smv/manuals.html
Example: >>> mesh = wfds.Mesh(200, 150, 100, 1, 1) >>> mesh.stretch_mesh([3,33], [1,31]) >>> print mesh.format_mesh()