export_FEA_model#

Model.export_FEA_model(project, cca_name, export_file, analysis, drill_hole_parameters, detect_lead_modeling, lead_model_parameters, display_model, clear_FEA_database, use_FEA_model_id, coordinate_units, pcb_material_type=1, geometry_type=1)#

Export a FEA model.

Parameters:
  • project (str) – str: Name of the Sherlock project.

  • cca_name (str) – str: Name of the CCA.

  • export_file (str) – str: Full path for saving exported files to. The file extension must be .wbjn.

  • analysis (str) – str: The type of analysis that is being exported. Valid values are NaturalFreq, HarmonicVibe, ICTAnalysis, MechanicalShock, RandomVibe, or ThermalMech.

  • drill_hole_parameters (list[dict[str, str | Measurement]]) –

    list[dict[str, str | Measurement]]: List of the drill hole parameters consisting of these properties:

    • drill_hole_modeling: str

      The status of the drill hole modeling feature. If enabled, automatically enable drill hole modeling. Valid values are ENABLED/enabled or DISABLED/disabled.

    • min_hole_diameter: MinHoleDiameter

      The properties of the minimum hole diameter.

    • max_edge_length: MaxEdgeLength

      The properties of the maximum edge length.

    detect_lead_modeling: str

    The status of the detect lead modeling feature. If enabled, automatically enable lead modeling if any part has lead geometry defined. Valid values are ENABLED or DISABLED.

    lead_model_parameters: list[dict[str, int | str | Measurement]]

    List of the lead model parameters consisting of these properties:

    • lead_modeling: str

      The status of the lead modeling feature. If enabled, automatically enable lead modeling. Valid values are ENABLED or DISABLED.

    • lead_element_order: str

      The type of the element order. Valid values are First Order (Linear), Second Order (Quadratic), Solid Shell, or Shells And Beam for CDB export only.

    • max_mesh_size: MaxMeshSize

      The properties of the maximum mesh size.

    • vertical_mesh_size: VerticalMeshSize

      The properties of the vertical mesh size.

    • thicknessCount: int, optional
      The number of elements through the lead thickness that will be created per lead.

      The default value is 3 and the maximum is 5. Only used when the advanced lead mesh setting is enabled.

    • aspectRatio: int, optional

      The aspect ratio is multiplied by the lead thickness divided by the through thickness count to give the lead element height. The default value is 2 and the maximum is 10. Only used when the advanced lead mesh setting is enabled.

    display_model: bool

    Whether to display the model after export.

    clear_FEA_database: bool

    Whether to clear FEA database before defining model.

    use_FEA_model_id: bool

    Whether to use FEA model ID.

    coordinate_units: str

    Units of the model coordinates to use when exporting a model.

    pcb_material_type: PcbMaterialType

    The type of PCB material type to use when exporting a model. The default value is PcbMaterialType.Isotropic.

    geometry_type: GeometryType

    The type of geometry to export for WBJN file. The default value is GeometryType.Step.

Return type:

int

Returns:

:
int

Status code of the response. 0 for success.

Examples

>>> from ansys.api.sherlock.v0.SherlockModelService_pb2 import (
>>> GeometryType,
>>> PcbMaterialType,
>>> )
>>> from ansys.sherlock.core.types.common_types import (
>>> Measurement,
>>> )
>>> from ansys.sherlock.core import launcher
>>> sherlock, install_dir = launcher.launch_and_connect(transport_mode="wnua")
>>> sherlock.model.export_FEA_model(
>>>     project="Test Project",
>>>     cca_name="Main Board",
>>>     export_file="C:/Temp/export.wbjn",
>>>     analysis="NaturalFreq",
>>>     drill_hole_parameters=[
>>>         {
>>>             "drill_hole_modeling": "ENABLED",
>>>             "min_hole_diameter": Measurement(value=0.5, unit="mm"),
>>>             "max_edge_length": Measurement(value=1.0, unit="mm")
>>>         }
>>>     ],
>>>     detect_lead_modeling="ENABLED",
>>>     lead_model_parameters=[
>>>         {
>>>             "lead_modeling": "ENABLED",
>>>             "lead_element_order": "First Order (Linear)",
>>>             "max_mesh_size": Measurement(value=0.5, unit="mm"),
>>>             "vertical_mesh_size": Measurement(value=0.1, unit="mm"),
>>>             "thicknessCount": 3,
>>>             "aspectRatio": 2
>>>         }
>>>     ],
>>>     display_model=True,
>>>     clear_FEA_database=True,
>>>     use_FEA_model_id=True,
>>>     coordinate_units="mm",
>>>     pcb_material_type=PcbMaterialType.Isotropic,
>>>     geometry_type=GeometryType.PartManager
>>> )