CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] Problems with streamlines for 2D porous media flow simulations (https://www.cfd-online.com/Forums/paraview/129493-problems-streamlines-2d-porous-media-flow-simulations.html)

twophaseflow February 6, 2014 07:24

Problems with streamlines for 2D porous media flow simulations
 
Howdy,

I am doing 2d simulations of pure water flow in porous media and am trying to use streamlines to get an idea of the flow paths. I feel like this would be a really neat application of the streamline functionality in paraview but, after a week of trying or so, I can't for the life of me figure out how to generate streamlines that make any sense. I have consulted previous threads in this forum about 2D streamlines but none of them seem to directly apply to the issues I'm having. I am using paraview 3.98 on a 64 bit linux machine, but have had similar issues when trying different versions (4.0, 3.12, 3.14).

Generally, I have been using a high resolution line source in the 2D plane as the seed source. The main problem is that the streamlines are way too short (terminate prematurely or never even show up at all) or that they don't actually seem to follow the flow field in a meaningful way. I have experimented with adjusting the step sizes over several orders of magnitude and that only seems to make small differences. Same with the terminal velocity and the error tolerance. If I allow a greater number of steps, the lines will get longer but are not at all convincing to me in terms of actually following the 2d vector field.

I have tried extracting a surface prior to trying to use the streamline filter, and also extracting points from the surface and trying to use these as the seed points when applying streamtracer with custom source filter. All to no avail. What am I doing wrong?

I have made some files available for anyone whose interested (pore velocity liquid, which contains the vector field I'm interested in, and also fluid pressure just for reference). They can be accessed from dropbox here (couldn't attach them due to size restrictions):

https://dl.dropboxusercontent.com/u/33358034/vtk.tar


As you will see, it is an unstructured mesh, but I don't know why this should make a big difference. As an example, you can try with a line source between (-1000,-1000) and (-500,-1000) with the default settings and get an idea of why I'm not happy at all with the resulting streamlines. Again, playing with the step lengths doesn't seem to make a huge difference. What am I doing wrong?

By the way, I've also tried to calculate the streamlines in Matlab but it is a major headache with my unstructured mesh (can't use the built-in stream2 function).

Any help for this geologist turned modeler would be very appreciated!

Thanks in advance,
Sam

wyldckat February 7, 2014 16:13

5 Attachment(s)
Greetings Sam and welcome to the forum!

Here is my diagnosis, step by step:
  1. The rar file only provides the same file several times, where the one named "fluid pressure9000.vtk" is actually a tar.gz file that has got "pore velocity liquid9000.vtk" several times inside it.
  2. I've opened the file "pore velocity liquid9000.vtk" in ParaView and noticed that the data looked very strangely funny looking (not sure how to describe it ;)), as shown in the first attached image.
  3. There is a particular detail in this data: the X,Y dimensions extend for roughly 15000 m by 4910 m, which is 15 km by 4.9 km, which I initially thought is too much for ParaView to be able to render properly :(
    I assume that you were working in millimetre, but the VTK file does not have any units integrated, to get the proper representation scale.
  4. But even after applying the Transform filter to make it 1000 times smaller, it still had the same rendering problems.
  5. So I tried rendering by points, and now it makes some more sense, as shown in the 2nd picture.
  6. Close examination indicates that this data was originally only points and that the original mesh might indicate that this was done with a finite element solver... but I'm just guessing here.
  7. The base problem is that it's not possible in ParaView to generate streamlines without a proper mesh, may it be structured or not. Therefore, you first need to get a proper surface mesh, before being able to generate the streamlines.
  8. I applied the filter "Delaunay 2D" to the data and got the 3rd image. It's a much better looking surface than the original data :)
  9. In the 4th picture is what I see when I use the "Surface LIC" plugin, which is described elsewhere here on the forum.
  10. As partially mentioned before, the "Stream Tracer" filter cannot be used without a mesh. The detail is that it does not work without a 3D mesh.
  11. Therefore, if I apply the following filter succession, to the "Delaunay2D1" entry:
    • Transform, to scale by 0.001 over X and Y.
      • Linear Extrusion, with a scale factor of 1 and with Capping turned on.
        • Delaunay 3D, with the default options. It will give some warnings, but ignore them.
          • "Stream Tracer", with a line along X.
    And I get the 5th picture :) I think this is what you were looking for!
And there you have it!
But keep in mind that by using the "Delaunay" filters, these are in fact only replacement meshes, since we don't have a good original mesh to work with :(

Best regards,
Bruno

twophaseflow February 11, 2014 05:13

Bruno,

Thank you so much for your patience in investigating and responding! The streamlines look brilliant...

I have another follow up question. How is it be possible to select one of the streamlines? I can inspect the streamline dataset via spreadsheet view and select points from it, but I can not easily select all the points that correpond to a single streamline. Afterwards, I would like to append temperature and fluid pressure to the streamline dataset, allowing me to extract the temperature/pressure sequence along a path.

This is probably relatively straightforward, I must be doing something wrong...

Thanks again,
Sam

twophaseflow February 11, 2014 11:59

I think I figured out how to select a certain stream line (Paraview treats the streamlines as cells, not objects) but still can't figure out how to AppendAttributes with the pore velocity vtks and the temperature and fluid pressure and then extract temperature/pressure along the streamline...

Here is a link to the vtks I'm working with if you want to try: https://dl.dropboxusercontent.com/u/33358034/vtk.tar

This time the tar should work ;-)

Thanks,
Sam

wyldckat February 11, 2014 14:32

Hi Sam,

Sorry, this time I don't have time to take a look into the files :(

But I believe I know what steps you should take:
  1. Load all VTK files into the same ParaView.
  2. Select all of them in the "Pipeline Browser".
  3. Apply the filter "Append ..."... I'm never certain of which one it is. It's either "Append Attributes" or "Append Datasets".
  4. Then you can follow the steps from the previous post, by applying the steps to the result of the append filter.
As for controlling a single streamline - choose in the "Stream Tracer" filter to use:
  1. A point as the source, from which the streamline will be calculated on both directions (back and forth).
  2. The point as source is actually a sphere with random points inside. Configure it to only have 1 point and a very small radius, if not 0, so that it defines only one point.
And I think that answers the question you made :)

Best regards,
Bruno


All times are GMT -4. The time now is 06:29.