Dear ASPECT Community,
I am currently working on a simulation of a 2D annular region with an open angle of 90 degrees. The main objective of my simulation is to analyze the plume initiation and development from three evenly spaced compositional fields placed 100 km above the core-mantle boundary (CMB). These compositional fields have different physical properties, primarily varying thermal conductivities, as illustrated in the attached image.
I have successfully run some simulations using a modified version of the cookbooks/shell_simple_2d.prm
file. However, I am encountering some difficulties with postprocessing the data and would greatly appreciate your assistance.
- Extracting Temperature Isosurface Fluctuations Near the CMB: I aim to extract and visualize the temperature isosurface fluctuations near the CMB. Could someone guide me on how to achieve this? Is it possible to extract this information directly from ParaView?
- Extracting Physical Quantities Above the Three Compositional Fields: I would like to extract and plot the Vx, Vy, RMS velocity, and vorticity directly above the three regions with varying thermal conductivities. However, the
statistics
file does not seem to contain this information. What would be the best approach to obtain and visualize these quantities?
Thank you in advance for your assistance. Any guidance or suggestions on how to proceed with these postprocessing tasks would be highly appreciated.
Best regards,
Ting He
Dear Ting He,
Welcome to the ASPECT community!
- Do you want to plot surfaces (lines) corresponding to particular temperatures on your paraview plot? You can certainly do that in paraview (Beginning Sources and Filters - KitwarePublic). Or do you want something else? If you want “depth between CMB and first crossing of temperature contour as a function of angle from vertical”, or something like this, it might be easiest to write the ASPECT output to hdf5 and read/manipulate it in your own (?python) script.
- Your output vtu file should contain the velocities, so you can plot everything you want in paraview. This may require some use of search engines (e.g. How to compute vorticity in Paraview - ParaView Support - ParaView). Again, if you want some specialised output it might be easiest to write your own script.
Best wishes,
Bob
Dear Bob,
Thank you for your response.
Yes, I would like to plot surfaces (or lines) corresponding to particular temperatures in Paraview. I will refer to the “Beginning Sources and Filters” section in KitwarePublic to learn how to do this.
Additionally, my current approach involves exporting some temperature field PNG images from Paraview and then using ffmpeg to create a video. This process is somewhat cumbersome for me. Therefore, I would like to establish a more streamlined workflow, writing a script to output a large amount of data at once, especially when I have specific output requirements. However, I encountered many issues while writing the script.
Initially, when I attempted to write a Python script to directly read the VTU files from the solution, the output images were incorrect. You suggested writing the ASPECT output to HDF5 files and using my own script (e.g., a Python script) to read and process them. Could you provide some specific advice or example code to help me start this process?
Regarding the velocity information, I will follow your advice and look for relevant tutorials in Paraview.
Thank you again for your assistance!
Best regards,
Ting He
Dear Ting He,
Could you provide some specific advice or example code to help me start this process?
Change the output format to hdf5 in aspect (Postprocess — ASPECT 2.6.0-pre), then use the h5py package to read in the output file. I’d suggest using a jupyter notebook to start with - it will allow you to play around with the data structure and see how things are stored (and how big they are). You could start by looking at the various keys:
import h5py
f = h5py.File('aspect_output.hdf5')
print(list(f.keys()))
The same advice goes for many data storage formats - you aren’t going to destroy anything by reading it into python, so you might as well have a look!
Best wishes,
Bob
I don’t know Paraview well enough, but in Visit you can export directly
to a video from an entry under “File” in the top left entry of the menu bar.
Best
W.