Mesh

Mesh
This container holds Mesh data for an instance of the Meshing application.

Methods

Edit

Opens the Meshing editor. If the editor has never been opened, the command will import the geometry file associated with the Geometry cell in the Mesh system.

Optional Arguments

Interactive    Specifies whether the editor should open in interactive mode. The default value is true.
    Type     bool
    Default Value    True
Example

To edit the mesh component with default optional parameter values:

    mesh.Edit()

Or by specifying optional parameter values:

    mesh.Edit(Interactive=True )


Exit

Exits the Meshing editor.

Optional Arguments

SaveDatabase    Bool flag to save the database on exit of the editor
    Type     bool
    Default Value    True

Export

Saves the current state of the Meshing editor and exports a *.meshdat file. If the Meshing editor is not currently open, the cached state (the state of the editor the last time it was closed) of the Meshing editor will be exported.

Required Arguments

FilePath    The path and name of the .meshdat file to be written.
    Type     string

ExportASMJournal

Exports an ASM Journal (.wbjn) and supporting files for the model component.

Required Arguments

FilePath    The path and name of the .wbjn file to be written. Supporting files written alongside.
    Type     string

ExportGeometry

Exports a PartManager database (.pmdb) file for the geometry in the model component.

Required Arguments

FilePath    The path and name of the .pmdb file to be written.
    Type     string

ExportMesh

Exports a .acmo file for the mesh in the model component.

Required Arguments

FilePath    The path and name of the .acmo file to be written.
    Type     string

GetMechanicalMeshFile

Returns the data reference to the container's MechanicalMeshFile data entity.

Return     A reference to the requested MechanicalMeshFile data entity.
    Type     DataReference

GetMechanicalModel

Returns the data reference to the container's MechanicalModel data entity.

Return     A reference to the requested MechanicalModel data entity.
    Type     DataReference

GetMechanicalSystemType

Returns the data reference to the container's MechanicalSystemType data entity.

Return     A reference to the requested MechanicalSystemType data entity.
    Type     DataReference

GetMeshingImportOptions

Query to return the data reference to the meshing import options

Return     The Data Entity containing settings for this component.
    Type     DataReference

Required Arguments

Name    The entity of interest.
    Type     string

GetMeshProperties

Query to return the data reference to the meshing properties

Return     The Data Entity containing settings for this component.
    Type     DataReference

Import

Import a mesh data file. This action will delete the geometry container from the Mesh system and convert the Mesh cell into a file container. It is not possible to view meshes that are imported through this command in the Meshing editor; however, the files imported can be transferred to downstream mesh consumers (such as CFX, FLUENT, etc.) by way of normal component to component data transfer.

Required Arguments

FilePath    The data file to be imported.
    Type     string
MeshType    The type of mesh data file.
    Type     MeshFileType
Example

To import a data file into the mesh component with default optional parameter values:

    mesh.Import(FilePath=r"C:\temp\data.cfx", MeshType="CFX")


ImportRepositoryMesh

Import a mesh data file from a repository location. This action will delete the geometry container from the Mesh system and convert the Mesh cell into a file container. It is not possible to view meshes that are imported through this command in the Meshing editor; however, the files imported can be transferred to downstream mesh consumers (such as CFX, FLUENT, etc.) by way of normal component to component data transfer.

Required Arguments

File    The data file to be imported from the repository.
    Type     DataReference
MeshType    The type of mesh data file.
    Type     MeshFileType

SendCommand

Sends commands to the Meshing editor using JScript or Python syntax.

If the Meshing editor is not open, then the editor's GUI will not be available to the script, causing some commands to fail. In this case, consider calling Edit() to open the editor before using SendCommand. Furthermore,if the Meshing editor is not open,SendCommand will start the editor without GUI,issue the specified command,and then close the editor. For multiple SendCommands,this may degrade performance.

Required Arguments

Command    The command(s) to execute in the Meshing editor.
    Type    string

Optional Arguments

Language    Language of the command. The default value of Language is "Javascript".
    Type    string
    Default Value    Javascript
Example

To execute some arbitrary command (in this case, causing a dialog box to appear) in the Meshing editor:

    mesh.SendCommand(Command=r"WBScript.Out("My Text",true);" )


Data Entities

GeneralMeshAssemblyProperties

Class used to expose general properties for the mesh assembly workflow

Properties

DisplayText

The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.

Type     string
Read Only    No
GroupObjectsBySource

Group objects in Meshing based on source

Type     bool
Read Only    No
LengthUnit

Target Length Unit for Assembled Model

Type     string
Read Only    No
ObjectRenaming

Name objects in Meshing based on selected option

Type     ObjectRenamingTypeInMeshing
Read Only    No

MechanicalModel

The data entity that contains the identifiers which maintain a relationship between the Mesh data contain and the objects in the Meshing editor tree.

Properties

Caption

Caption to identify the model.

Type     string
Read Only    No
DisplayText

The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.

Type     string
Read Only    No
ModelId

Identifier which corresponds to the Model object in the Meshing editor tree. This ID can be used in conjunction with SendCommand to perform operations such as inserting mesh controls or manipulating mesh settings within the Meshing editor itself.

Type     int
Read Only    No
PrototypeId

Identifier which corresponds to the Geometry object in the Meshing editor tree. This ID can be used in conjunction with SendCommand to perform operations such as inserting mesh controls or manipulating mesh settings within the Meshing editor itself.

Type     int
Read Only    No

MechanicalSystemType

This entity provides string based information about the physics, analysis, and solver settings for the Mesh component. As the Mesh component may be used independent of any specific physics, analysis, or solver, the properties exposed by this entity may take a value of "Any", meaning simply that it is up to the user to initialize and correctly configure the mesh settings within the Meshing editor.

Properties

AnalysisTypeDisplayString

The string which represents the current analysis type setting - this value will always be "Any".

Type     string
Read Only    Yes
DisplayText

The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.

Type     string
Read Only    No
ICEngineAutoSetup

The boolean which represents the IC Engine mesh setup options.

Type     bool
Read Only    No
ICEngineMeshSettings

The string is a hyper link which opens the IC Engine mesh setting dialog.

Type     string
Read Only    No
PhysicsTypeDisplayString

The string which represents current physics type setting - the value can be "Any" or "CFD".

Type     string
Read Only    Yes
RefMeshSize

The quantity represent the reference mesh size for IC Engine mesh settings.

Type     Quantity
Read Only    No
SolverTypeDisplayString

The string which represents the current solver setting - the value can be "Any", "FLUENT", "CFX", or "POLYFLOW".

Type     string
Read Only    Yes

MeshingImportOptions

Import options for model assembly available on the downstream model

Properties

DisplayText

The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.

Type     string
Read Only    No
NumberOfCopies

By default this value is 0, specifies how many additional copies of the upstream mesh are needed

Type     int
Read Only    No
RenumberMeshElementsAutomatically

By default this value is true, specifies whether the user would like us to automatically renumber his mesh elements to prevent unique id conflicts during assembly

Type     bool
Read Only    No
RigidTransform

Rigid Transformations for the Source Geometry

Type     RigidTransformOptionsForMeshing
Read Only    No
Source

The upstream mesh source

Type     DataReference
Read Only    No

MeshProperties

Contains properties to control mesh generation in Meshing application

Properties

DisplayText

The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.

Type     string
Read Only    No
saveMeshFileInSeparateFile

Group objects in Meshing based on source

Type     bool
Read Only    No


Release 18.2 - © ANSYS, Inc. All rights reserved.