CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Gradeint calc to produce Schlieren images. Issues with snappyHexMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 7, 2024, 14:47
Default Gradeint calc to produce Schlieren images. Issues with snappyHexMesh
  #1
New Member
 
Nate
Join Date: Feb 2022
Posts: 2
Rep Power: 0
NES81 is on a distinguished road
Hi all,

I have been trying to figure out why ParaView produces "erroneous" gradient values at the "boundary" of cell level (size) changes for a simple 2D case meshed with snappyHexMesh. Trying to produce a Schlieren type of image by taking the gradient of density (rho).

Basically I have the OpenFoam 2D supersonic wedge tutorial case running with rhoPimplefoam, at ~mach 3. It solves fine, and all is good, but when I use the gradient filter in paraView (version 5.10.0) it calculates very high gradients randomly at locations where there mesh elements change size due to the settings in snappyHexMesh dict.

I may have found a work around solution by using the grad(rho) postprocess command in OpenFoam, which is displayed on the left of the attached images. The ParaView gradient filter is shown on the right. Same exact data set. (see images).

command for openfoam to calc gradient: postProcess -latestTime -func "grad(rho)"

Any ideas on how to get better results from ParaView, or methods of improving the "cell level" transition zone within snappyHexMesh Dict, it would be appreciated, otherwise use the openfoam grad(rho) function.

The other method I've played with is to use the filter "Resample to Image", which appears to generate a structured "mesh" and resamples the field. Then take the gradient of this resampled field, and it does improve the visual results, but comes with potential issues with choosing sample size (grid).

Of course when you have more complex geometry, and use snappyHexMesh, the number of "erroneous" points can get quite large and make it difficult to visualize the real field.
Attached Images
File Type: jpg Mesh1.jpg (167.3 KB, 4 views)
File Type: jpg Grad1.jpg (31.6 KB, 5 views)
File Type: jpg ParaViewGradSettings.jpg (62.0 KB, 2 views)
NES81 is offline   Reply With Quote

Reply

Tags
gradient, openfoam, schlieren


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with FOAM fatal error (fault lying in snappyhexmesh) alexc1 OpenFOAM 0 February 1, 2022 10:01
[snappyHexMesh] SnappyHexMesh Issues deji OpenFOAM Meshing & Mesh Conversion 16 October 20, 2021 07:13
[snappyHexMesh] Issues in using snappyHexMesh sihaqqi OpenFOAM Meshing & Mesh Conversion 4 January 19, 2021 03:42
[snappyHexMesh] snappyHexMesh add-layers issues, warped cells heling OpenFOAM Meshing & Mesh Conversion 9 August 19, 2013 13:01
[snappyHexMesh] SnappyHexMesh issues Alessio_1985 OpenFOAM Meshing & Mesh Conversion 4 November 6, 2012 19:59


All times are GMT -4. The time now is 04:32.