paraview displays the time-averaged graph of the specified time period (two methods)

method one:

First, the grid data at each moment will be obtained after calculation, as shown below:

But we only want the data of the last 2s. If you import it directly, paraview will load all the data from the 0s time. When doing the time-averaged graph, it means to do the time-averaged for the entire time period, which is not the effect we want. At this time, you can create a new folder and copy the data files corresponding to the last 20s to that folder, as shown below:

As you can see, the data here starts from 1000, and my time step is 0.01, so it starts at 10s, and then use paraview to import the data, as shown below:

Select the data whose first Type is Group, the effect is as follows:

Then start doing time-average processing:

I am showing the time average of the void ratio here, and you can also define the time average of other variables by yourself.

 

Method Two:

There is nothing wrong with the above method. The only drawback is that the time cannot be displayed, because the time data is stored in it, and *.vtu only saves the grid data at the corresponding time. The specific relationship between pvd data and vtu data can be referred to The tutorial in mfix-2016.1\tutorials\vtk_regions, here is a short description:

"The term VTK refers to a family of files that include a series of VTU (transient) files and a PVD file that stores the simulation time associated with each VTU file. Typically, the PVD file is opened with Paraview for post‐processing. Once loaded, Paraview can loop through all VTU files. " -- from VTK Regions tutorial (obtained in mfix-2016.1\tutorials\vtk_regions)

 So we just need to slightly modify the content in pvd and let it read only part of the content behind. Open the FB2D.pvd text file with notepad++ or notepad (remember to back it up before this):

It is easy to understand, one moment corresponds to one data, for example, if I want to remove the content of the previous 2s, just delete the corresponding part:

As you can see, it now fetches data from 2s back. It should be noted that the *.pvd text here should not change the path casually, because it will find the *.vtu file according to its relative path. You can see that the part of file="./VTU/FB2D_0202.vtu" means to go to Find the vtu file in the VTU folder under the current path.

Finally, we can directly import the pvd file:

It can be found that the 0th frame is 2s, and then the method of taking the time average is the same as before:

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324687038&siteId=291194637