Model.acousticmeshcreate#
- Model.acousticmeshcreate(fixed_nodes_collection, mesh_type, max_structural_cavities, min_jacobian, min_tet_collapse, create_comp_collection, create_cavity_faces, reserved1, reserved2)#
Options are available for creating the mesh using specified type and quality parameters, to create face elements, to input fixed nodes within the cavities and optionally to only create a mesh for particular AC_Structural.N components. The AC_Structural.N naming convention is used to separate each cavity by placing them in components of different names, where N ranges from 1 to the number of structural cavities found.
This function can be run multiple times after running
Model.acousticmeshinit()a single time. Each timeModel.acousticmeshcreate()is run, it automatically deletes any existing AC_Structural.N and AC_Seat.M components. Note that a similar naming convention is used for seat cavities, AC_Seat.M. In order to avoid memory leaks, theModel.acousticmeshend()function should be called when the acoustic cavity mesh process is complete.- Parameters:
fixed_nodes_collection (Collection) – The collection containing the fixed nodes. An empty collection can be used if there are no fixed nodes specified.
mesh_type (int) –
The type of mesh. Valid values are:
0 - Preview mesh
13 - For all-tetrahedral
14 - For hexa-tetrahedral, non-conforming
max_structural_cavities (int) –
A flag used to denote the number of cavities for which to output elements. Valid values are:
0 - All
\(\gt\) 0 - The number of largest cavities found.
\(\lt\) 0 - Those above this (positive) percent of largest cavities found.
min_jacobian (double) – The minimum Jacobian for any hexa elements created. It is measured at the corner nodes of the elements.
min_tet_collapse (double) – The minimum tet-collapse for any tetrahedral elements created.
create_comp_collection (Collection) – The collection containing the entities. These (entities) components are those with the AC_Structural.N naming convention.
create_cavity_faces (int) – Create faces for any solid-meshed cavities. These elements are placed in the ^cavity_faces component.
reserved1 (int) – Reserved for future use. Must be specified as 0.
reserved2 (double) – Reserved for future use. Must be specified as 0.
Examples#
Produce an acoustic cavity mesh preview of the 10 largest cavities#import hm import hm.entities as ent model = hm.Model() model.acousticmeshcreate( fixed_nodes_collection=hm.Collection(model, ent.Node, populate=False), mesh_type=0, max_structural_cavities=10, min_jacobian=0.0, min_tet_collapse=0.0, create_comp_collection=hm.Collection(model, ent.Component, populate=False), create_cavity_faces=0, reserved1=0, reserved2=0, )
Produce an acoustic cavity mesh hexa - tetrahedral mesh of the 10 largest cavities . There are fixed nodes and cavities to output . Also , the output of cavity faces is enabled . There are also minimum acceptable Jacobian and tet - collapse values specified ( 0.2 and 0.1 , respectively )#import hm import hm.entities as ent model = hm.Model() # Take as fixed nodes all nodes from 1-10 fixedNodeCol = hm.Collection(model,ent.Node,list(range(1,11))) # Create an empty Node collection for the output outputCol = hm.Collection(model,ent.Node,populate=False) model.acousticmeshcreate( fixed_nodes_collection=fixedNodeCol, mesh_type=14, max_structural_cavities=10, min_jacobian=0.2, min_tet_collapse=0.1, create_comp_collection=outputCol, create_cavity_faces=1, reserved1=0, reserved2=0, )