How to work with .csv data in Mechanical: Export, Import and plot
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:
- Automatically export displacements to a .csv file on solve
- Import from a .csv file to create a displacement condition for each node on a face
- 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.