|
[Sponsors] |
January 4, 2017, 18:05 |
How to Increase Z axis
|
#1 |
New Member
Join Date: Jan 2017
Posts: 5
Rep Power: 9 |
Hello guys,
I am using Paraview 4.4.0 GUI and I need some help with visualization option to scale the grid in the z-direction only -- i.e., stretch the grid in this direction. I am relatively new to using Paraview and have used some other commercial viewers that allow you to scale the 3d grid in the z-direction. My model dimensions are (x,y,z) 10000ft by 100ft by 500ft discretized into 100 by 1 by 20 grids.. I am modeling fluid flow in the X-Z direction (Z is vertical/depth) only (2-phase flow, oil and water) and want to use paraview for the visualization. I write all the vtk files correctly and the time-lapse of the water saturations in the grid block are fine. The only problem is that I want to increase the Z direction (vertical depth) before I take a snapshot or movie. in my case because X >> Z. Hope this makes sense. Thanks for your help. Also, if there are other visualization tools I could be using, please let me know. My data type are essentially block-centered parameters. |
|
January 5, 2017, 14:32 |
|
#2 |
Member
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9 |
jeosol,
Once your .foam file is loaded all you need to use is the calculator filter. You can either find the filter in the Filters -> Alphabetical section or if its on your toolbar. Once the calculator filter is opened, under properties 1)Make sure Attribute Mode is set on "Point Data" 2)Select "Coordinate Results" 3)Use something along the lines of coordsX*iHat+coordsY*jHat+0.5*coordsZ*kHat 0.5 is simply a scaler coordsX/Y/Z is the current X/Y/Z positions i/j/kHat is what will be your final coordinate axis (aka you can flip axis) Hope this helps. Joshua |
|
January 5, 2017, 15:43 |
|
#3 |
New Member
Join Date: Jan 2017
Posts: 5
Rep Power: 9 |
Hi Joshua,
Thanks for your reply. I have tried to follow your instructions as best as I understood it. First of all, I am not using a .foam file (not sure what that is). I am loading my files using several .vtk files (one sample for each time step and part of the file is shown file). The files are written by a small script and have the following format. I can't upload it due to size limitations. # vtk DataFile Version 3.0 Unstructured grid example: model dimensions 100x1x20 ASCII DATASET UNSTRUCTURED_GRID POINTS 16000 float 0.000 0.000 -10000.000 100.000 0.000 -10000.000 100.000 100.000 -10000.000 0.000 100.000 -10000.000 0.000 0.000 -10029.000 100.000 0.000 -10029.000 100.000 100.000 -10029.0 x-points run from 0 to 10000 while z-points indicating depth run from 10000 to around 10500. Following your instructions, I noticed the "axis guides" on my grid did increase in size but the grid still remains the same. I have included a screenshot of my paraview with the settings on the left. Thanks for your help. |
|
January 5, 2017, 15:56 |
|
#4 |
Member
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9 |
Sorry about that. I made a faulty assumption that you were post processing CFD files from OpenFOAM (aka .foam).
The steps should still work for a .vtk. Its hard to see your picture. Make sure that only the calculator is visible after you hit apply else your original file will block you from being able to see that it shrinked (assuming that it did). Joshua |
|
January 5, 2017, 16:30 |
|
#5 |
New Member
Join Date: Jan 2017
Posts: 5
Rep Power: 9 |
Joshua,
You are the man. Thanks it worked okay the first time around. I had the other case/model selected so I was not able to see the one with new computed arrays. See attached file. The axis is zoomed correctly and my animation is much better. I am doing calculations elsewhere and writing the .vtk files to be viewed with Paraview. Thanks once again. I do appreciate your help. Jeosol. |
|
May 3, 2017, 13:18 |
|
#6 | |
New Member
Tremayne Thomas
Join Date: May 2017
Posts: 6
Rep Power: 9 |
Quote:
I was trying to achieve the same thing (stretch the Z-axis of my model). However, when i try this approach I get an error 'Coordinate output specified, but output is not polydata or unstructured grid' Do you have any idea what would cause this? I am using Paraview 5.0.0 Thanks, Ariel |
||
May 3, 2017, 13:21 |
|
#7 |
Member
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9 |
atthomas,
What kind of file are you using in ParaView (.foam, .stl, etc...). Are you doing any additional steps before stretching it? Joshua |
|
May 3, 2017, 13:27 |
|
#8 |
New Member
Tremayne Thomas
Join Date: May 2017
Posts: 6
Rep Power: 9 |
I am using a .vtk file. Similar to the original problem posted, I did some simulations with another software and I am trying to view the data in Paraview. My model XY dimensions are much larger so I would just like to stretch the Z axis´for better viewing.
I just opened the .vtk file, I have not done any additional steps inside of Paraview. Cheers, AT |
|
May 3, 2017, 13:35 |
|
#9 |
Member
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9 |
atthomas,
It should work. I checked and it does appear that there are two resolved bugs involving vtk's in version 5.0.0. Maybe try a new version of ParaView like 5.2 or 5.3. Versions 4.1 and 4.4 should also be stable. I'm sorry I can't pin point the issue. If I come up with anything else I will let you know. In the mean time try one of those (not all). How did you create the *.vtk? Joshua |
|
May 3, 2017, 13:49 |
|
#10 |
New Member
Tremayne Thomas
Join Date: May 2017
Posts: 6
Rep Power: 9 |
ok I will try to see if I can get another version.
The file was generated by a simulation code called SHEMAT which models groundwater flow through a porous medium. My model is a simple 3 layer subsurface model. Actually a test cube of a much larger model. Below you can see what the vtk file header looks like in case that is of any help. # vtk DataFile Version 2.0 RotTest_2_time_out_1 ASCII DATASET RECTILINEAR_GRID DIMENSIONS 24 45 3 |
|
May 3, 2017, 13:59 |
|
#11 | |
Member
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9 |
atthomas,
Quote:
See if you can do it by having Attribute Mode as Cell Data. Joshua |
||
May 3, 2017, 14:08 |
|
#12 |
New Member
Tremayne Thomas
Join Date: May 2017
Posts: 6
Rep Power: 9 |
Hi Joshua,
Thanks so much for the quick feedback. So I loaded the Paraview 4.4.0 version. I tried the old way (got the same unstructured grid error). I changed the attribute more to cell data but then I got a different error. maybe the syntax has to be different? I got the following: Syntax error: expecting a variable name; see position 0 Cheers, AT |
|
May 3, 2017, 14:30 |
|
#13 |
Member
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9 |
atthomas,
Do you have a *.vtk like this that doesn't work that you can share? That way I can try some things on my end instead of sending you guesses? Joshua |
|
May 3, 2017, 17:12 |
|
#14 |
New Member
Tremayne Thomas
Join Date: May 2017
Posts: 6
Rep Power: 9 |
Hi Joshua,
Yes no problem, I will post the .vtk file first thing tomorrow. I already left for the day and I don't have access to the files from here at home. Cheers, AT |
|
May 4, 2017, 06:47 |
|
#15 |
New Member
Tremayne Thomas
Join Date: May 2017
Posts: 6
Rep Power: 9 |
Hi Joshua,
A copy of my .vtk file can be found here: https://drive.google.com/file/d/0B2j...ew?usp=sharing The file is a simple 3 layer geological model. There are a number of parameters that are output by the software, such as permeability, porosity etc, so that is why it's a bit large. Cheers, AT |
|
May 4, 2017, 12:19 |
|
#16 |
Member
Joshua
Join Date: Dec 2016
Location: St. Louis, Missouri
Posts: 91
Rep Power: 9 |
atthomas,
Thank you for sending me the file. It seems that ParaView does not identify that your file actually has a grid. I got it to work by running the filter "CleantoGrid" and I was able to transform the coordinates. Hope this works on your end! Joshua |
|
May 10, 2017, 04:37 |
|
#17 | |
New Member
Join Date: Jan 2017
Location: Germany
Posts: 19
Rep Power: 9 |
Quote:
Since this are display-options, the object data itself may be unchanged (didn't tested it). If you want be sure to stretch the object itself, use the 'Transform' filter. There is the same 'Scale' option. I tried both solutions with your file and they both worked fine. |
||
Tags |
fluid flow, paraview, scale z-axis |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[DesignModeler] axis display disparity of model and triad | ram881973 | ANSYS Meshing & Geometry | 14 | November 18, 2020 02:21 |
[blockMesh] Wierd behaviour of blockMesh creating axis in wedge | rcastilla | OpenFOAM Meshing & Mesh Conversion | 1 | December 4, 2018 07:24 |
[General] how to increase thickness of axis and ticks in Paraview 5 | swap_9068 | ParaView | 0 | September 17, 2018 07:08 |
[Other] dynamic Mesh with angular velocity not parallel to x axis | donQi | OpenFOAM Meshing & Mesh Conversion | 5 | October 3, 2014 00:19 |
Axis treatment in axisymmetrical problem | Jakob1 | OpenFOAM Pre-Processing | 2 | August 25, 2014 04:09 |