Skip to content

The issue of saving format and calling pyANSYS model #2801

Answered by germa89
COOLEST-GET asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @COOLEST-GET

We should discriminate here between:

  • MAPDL model. It is the MAPDL finite element model, and it is reflected by the mapdl object. It is hosted in the MAPDL instance, and PyMAPDL query against it. You can save and restore as follow:
mapdl.save("mymodel.cdb")
...
mapdl.clear()
mapdl.resume("mymodel.cdb")
  • Pyvista VTK model. It is a graphical representation of the above. You can save it by saving mesh object:
mapdl = launch_mapdl() ..
...
...
# Create model
mapdl.block(...)
mapdl.et(...)
...
...
mesh = mapdl.mesh

# save mesh
mapdl.mesh.save("file.vtk")

For more info check this: https://mapdl.docs.pyansys.com/version/0.67/api/_autosummary/ansys.mapdl.core.mesh_grpc.MeshGrpc…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@COOLEST-GET
Comment options

@COOLEST-GET
Comment options

Answer selected by germa89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants