Pymechanical Embedded - Animation Export

Options
mjc
mjc Member Posts: 4
First Comment

This is probably a simple naive question. A mechanical simulation has already a "total deformation" result object. When trying to generate the animation file in .mp4 extension I can generate the file but the nodes somehow do not "move". Only the contour displacement color filed changes in the parts but without "movement" or "inflation".

On the other hand, this alternative script option can not run.

This line generates an error:
totalDeform.ExportAnimation("D:\file18.mp4",GraphicsAnimationExportFormat.MP4)

Error is:
NameError: name 'GraphicsAnimationExportFormat' is not defined

Probably I am just missing an API to use before GraphicsAnimationExportFormat.MP4

I tried using different entry points such as "Ansys.ExtAPI.Graphics.GraphicsAnimationExportFormat.MP4" with no success.

Can you please provide the correct entry point to produce an animation .mp4 file that also has nodes displacement?

Thank you.

Best Answer

  • Landon Mitchell Kanner
    Landon Mitchell Kanner Member, Employee Posts: 256
    First Answer First Comment 5 Likes First Anniversary
    Answer ✓
    Options

    It works fine on my end. Output attached. I suggest you check that you are using Ansys compatible hardware and then contact your Ansys Technical Support provider.

Answers

  • Landon Mitchell Kanner
    Landon Mitchell Kanner Member, Employee Posts: 256
    First Answer First Comment 5 Likes First Anniversary
    Options

    I could not reproduce the issue in 24.1. Can you share SYS-2.mechdb? My guess is that you need to adjust the result scaling so that the movement can be seen better.

  • mjc
    mjc Member Posts: 4
    First Comment
    Options

    Hello Landon, Sure.
    I am attaching a .zip file that contains that file as well as both python scripts and if necessary the .mp4 animation file that has no displacement.
    Let me know if you need more information. Thank you.

  • mjc
    mjc Member Posts: 4
    First Comment
    Options

    Any help?

  • mjc
    mjc Member Posts: 4
    First Comment
    Options

    Thank you Landon. This is weird, I'll check that as you suggest.