How to work with .csv data in Mechanical: Export, Import and plot

Mike.Thompson Member, Employee Posts: 278
First Anniversary First Comment 5 Likes Ansys Employee

There is often a need to work with data in a .csv format (comma delimited text file). You can store results, import conditions etc…

This attached analysis uses python code and results objects to:

  1. Automatically export displacements to a .csv file on solve
  2. Import from a .csv file to create a displacement condition for each node on a face
  3. Plot data directly from a .csv file onto nodes, allowing user to plot any arbitrary data on a given mesh.

The first analysis exports the data, while the second one imports it as a condition and plots it from a .csv directly. You will need to update the CSV file path selections in the import/plotting objects for your local paths after solving the first analysis.