Can I view solutions on a 1D mesh (from a .vtu file)

Using deal.II, I have written the finite-element simulation results of a 1D time-dependent diffusion equation as a set of .vtu files (one per time-step). Is there a way I can use paraview to visualise the results?

make sure your set of data file are numbered like this:

data_1.vtu
data_2.vtu
...
data_n.vtu

You should then be able to open the file series in ParaView.

Hi,

Thank you for your reply.

However, my question was specifically about the 1D visualisation capabilities of Paraview. It doesn’t look like ParaView can handle 1D meshes at all. Is that correct?

Krishna

Hello,

A mesh line (1D) can be visualized in several ways. Maybe you can try the LinearExtrusion filter if you want to see a surface from the line mesh. Another alternative is to use WarpByScalar: this deforms the line mesh into a curve depending on the value of a given scalar (you can also apply that filter to the LinearExtrusion output in order to warp the extruded surface). Moreover, you can use the PlotData filter in order to obtain a classical XY plot. These are the tools that I use the most for those applications.

Best regards,

Miguel

1 Like

Thank you very much for your reply. The LinearExtrusion filter is greyed out, and the warp by scalar doesn’t produce what I want.

All that I want is a spatial plot of mesh co-ordinates (x) vs solution value (y). Attached is the data file that I have to visualise. Can you please help further?solution_timestep_007.vtu (1.3 KB)

Hi,

Here you have a PVSM file with all the things you can do with your data (Just in case: File–>LoadState–>Open “TEST.pvsm”)

The key operation here is to apply the “ExtractSurface” filter: this allows recognizing the data as a 1D mesh and then you have acces to all the filters.

Regards,

Miguel

TEST.pvsm (442.8 KB)

I just get a bunch of errors when opening the state file you attached. What version of Paraview did you use? Mine is 5.8.0

Can you please try opening my .vtu file, and see if you are able to do the 1D visualization on it?

Krishna

@krishnakumar : a 1D dataset is just a line for paraview. Most of ParaView tools are for 3D dataset.
In any case, it may still be possible to achieve what you are trying to do.

So, what are you trying to do here ?

@mwestphal I am literally trying to simply plot the solution values over the 1D spatial mesh (i.e. x-co-rdinate of mesh on the x-axis vs. the solution value in y-axis as a simple 2D line graph), and animate the solutions over various time-steps.

Attached are my solutions in .vtu file format. How can I do this very simple/basic thing?

solution_timestep_000.vtu (1.12 KB)

solution_timestep_008.vtu (1.29 KB)

solution_timestep_010.vtu (1.29 KB)

solution_timestep_009.vtu (1.29 KB)

solution_timestep_011.vtu (1.36 KB)

solution_timestep_006.vtu (1.29 KB)

solution_timestep_007.vtu (1.29 KB)

solution_timestep_005.vtu (1.22 KB)

solution_timestep_004.vtu (1.22 KB)

solution_timestep_003.vtu (1.22 KB)

solution_timestep_002.vtu (1.22 KB)

solution_timestep_001.vtu (1.17 KB)

Filters -> PlotData

@mwestphal PlotData is greyed out for me…Can you please try on your end?

I did. Press Apply.

@mwestphal Aah. Got it. Thank you very much. Is there a way to show the x-axis values as that of the original mesh (rather than the data point number?). My mesh is a unit mesh in (0,1).

Uncheck “Use index for X Axis”, and select the array you want to use.

Hi,

Here you have an image of my pipeline browser and the kind of analyses you can obtain from your data. In the left panel you have the setup I used for the PlotOnIntersection line

I hope this helps.

Best regards,

Miguel

Thank you so much! That helps a lot.

Is there any way to keep the y-axes limits of the plots constant over time. i.e. in the animation, if the y-axis limits keep changing between time-steps, it is rather distracting. It is better for the curve to become smaller and have the y-axis fixed.

Once again, thank you so much for your inputs so far. They have been tremendously helpful.

Regards,

Krishna

Check “Left Axis use custom range”

The step-by-step procedure to generate the 1D mesh data plot are

  1. Load the vtu file in paraview.
  2. Select visible (eye option icon) from the pipeline browser.
  3. Press apply from Properties (just below pipeline browser).
  4. Click Filters —> Data Analysis —> Plot Data
  5. Select the visible (eye option) icon of the PlotData option from the pipeline browser.
  6. Then click Apply from the Properties (just below pipeline browser) to see the plot.

This documentation with pictures can be found in the following link. Plot_1D_mesh_data_in_Paraview_from_vtu_file.pdf - Google Drive