Model#
- class ansys.meshing.prime.Model(comm, id, object_id, name)#
Model is the nucleus of Prime. Model forms the base and contains all the information about Prime.
You can access any information in Prime only through Model. Model allows you to query TopoData, ControlData, Parts, SizeFields and more.
- Parameters:
Methods
Activate the sizefields identified by the given sizefield ids.
Model.as_polydata
([update])Get the model as a polydata.
Model.create_zone
(suggested_name, type)Creates zone for the given zone type.
Deactivate the size fields with the given size field ids.
Model.delete_parts
(part_ids)Delete parts and their contents.
Delete the sizefields identified by the given sizefield ids.
Model.delete_zone
(zone_id)Deletes zone with the given id.
Get the active sizefield ids.
Get global sizing parameters.
Get the number of compute nodes.
Get the number of threads enabled for multithreaded operation.
Model.get_part
(id)Get the part by ID.
Model.get_part_by_name
(name)Get the part by name.
Model.get_scoped_polydata
(scope[, update])Get the scoped polydata of the model.
Model.get_size_field_name
(size_field_id)Gets the name of size field with the given id.
Get the sizefield ids.
Model.get_zone_by_name
(zone_name)Gets the zone with the provided name.
Get the name of given zone.
Model.merge_parts
(part_ids, params)Merge multiple parts into a single part.
Model.set_global_sizing_params
(params)Set global sizing parameters.
Sets the number of threads for multithreaded operation.
Sets the suggested name of size field with the given id.
Model.set_suggested_zone_name
(id, name)Sets the unique name for zone with given id based on the suggested name.
Set working directory.
Enables distributed meshing mode.
Attributes
Get the control data for the model.
Get the id of Model.
Get PyPrimeMesh's logger instance.
Get material point data for the model.
Get the name of Model.
Get the list of parts for the model.
Get python standard logger from PyPrimeMesh's logger instance.
Get the TopoData for the model.
Examples using Model#
Convert data when importing and exporting mesh and CAD formats
Mesh a mid-surfaced bracket for a structural analysis
Mesh a mixing elbow for a flow analysis
Mesh a pipe T-section for structural thermal and fluid flow analysis
Wrap a toy car for a flow analysis
Mesh a PCB for structural thermal analysis
Morph a hexahedral mesh of a turbine blade to a new shape
Mesh a saddle bracket for a structural analysis
Mesh a generic F1 car rear wing for external aero simulation
Mesh a generic PCB geometry with multiple hexa layers
Create a contact patch for wrapping between a wheel and ground interface
Mesh a set of solder balls (beta)