2018-07-16 17:07 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002717OpenFOAM[All Projects] Bugpublic2017-11-28 10:14
Assigned Tohenry 
StatusclosedResolutionunable to reproduce 
PlatformLinuxOSUbuntuOS Version16.04 LTS
Product Versiondev 
Target VersionFixed in Version 
Summary0002717: Stream Function feature using wedge mesh with multiple patches
DescriptionWhen using a wedge mesh with multiple patches, I am getting a nonphysical calculation using the streamFunction post Processing tool near the plane of axisymmetry. As see in the attached picture, the streamFunction calculation predicts that the flow in the patch near the axisymmetry plane enters the domain at the inlet (25 mm) and exists the domain within the same patch. In this case however the bottom of the domain has a uniform outlet velocity. It appears that using paraViews highResolution line source accurately calculates the expected streamlines while streamFuction is giving me this nonphysical result. If I don't use a wedge mesh, I do not have this issue, however a wedge mesh is necessary for my problem.
Steps To Reproduce(1) Create a wedge mesh with multiple patches
(2) Run family of heatTransfer solvers
(3) Post process stream function using: post Process -func streamFunction
(4) Look at streamFunction pointField in paraView
Additional InformationThis attached case uses a Blake-Cozeny drag term in the momentum equation to simulate porous media in part of the domain. You can see the curved interface where this source term is applied.
TagsNo tags attached.
Attached Files




henry (reporter)

Can you provide a patch to add this functionality?


colemaj (reporter)

Henry, that is something that I am looking to do now. It appears that there is some functionality for a wedge mesh already integrated into the streamFunction source code. While I need to spend more time looking through this code, it appears that it may be an issue with a conditional statements used for finding the zero flux boundary inside of the forAll(patches, patchi) loop at line 118.


colemaj (reporter)

Henry, an additional note on this. It appears that the "sampleDict" and "probe" postProcessing features have an issue with the wedge mesh. A simple work around is to specify the axis as a "symmetryPlane" instead of "empty". This does not not appear to change my solution at all, but allow for more compatibility with the postProcessing features.


henry (reporter)

How are you generating the wedge meshes? Does the axis have any faces? If not what happens if you remove the axis patch altogether?


colemaj (reporter)

Henry, I am generating the mesh in blockMesh similar to nozzle2D in the tutorials, i.e., using collapsed hexagonal blocks along the axis with a wedge angle of 5 degrees. The axis has no faces so when I remove the patch altogether blockMesh and the solver executes successfully. Additionally, I am now able to use the "sampleDict" and "probe" postProcessing steps. I am awaiting the results of the simulation to evaluate the streamFunction functionality.


colemaj (reporter)

Henry, I am still running into the same problem even without specifying the axis type. I am now realizing that the function is calculating two sets of stream functions: one in the patches that touch the wedge axis, and another in the patches that do not. Independently both calculations appear to be correct, so I think it has to do with a conditional statement. Additionally, when I execute streamFunction is shows that my Zero face is: patch 1 face 0 (which lies along the axis)


colemaj (reporter)

I uploaded a blown up image of my inlet patch to illustrate my last point


henry (reporter)

> my Zero face is: patch 1 face 0 (which lies along the axis)

The axis should either have no faces or be removed altogether.


colemaj (reporter)

Henry, you can mark this issue a resolved. After reading through streamFunction.C I realized that my boundary patches at the periphery of the wedge might be incorrect. I went back into blockMesh and saw that I had these boundaries set as type "patch" from debugging my own partial slip boundary conditions for slurry flow. I changed these patches to type "wall" (which they should be) and streamFunction gave me the proper results. Thank you for your help and sorry for wasting your time. If something in the logic of this note appears incorrect feel free to call me out on it.



colemaj (reporter)

Henry, I was a bit premature on thinking this was fixed. My scaling was off in paraview. I am still getting the same issue which also appears on other various wedge meshes I have put together, and the nozzle2D mesh in the tutorials. I will begin to revist the source code for this as I believe it is a helpful feature.


colemaj (reporter)

Sorry that I forgot to follow up on this. I was able to get the streamFunction to calculate correctly on a multiPatch wedge mesh by changing the conditional statement at line 254 to only perform a stream function calculation if the boundary patch is of type "wall" or "generic". I still cannot figure out why the previous conditional statement was giving me issues, however for now it appears that this new method works for my case.


henry (reporter)

Can you provide a simple case which demonstrates the need for this change with results before and after the change? Can it be demonstrated on a tutorial case?


henry (reporter)

Not enough information provided to reproduce the problem.

-Issue History
Date Modified Username Field Change
2017-10-10 01:58 colemaj New Issue
2017-10-10 01:58 colemaj File Added: streamFunctionWedge.png
2017-10-10 13:58 henry Note Added: 0008852
2017-10-11 13:37 colemaj Note Added: 0008857
2017-10-16 15:36 colemaj Note Added: 0008878
2017-10-16 15:50 henry Note Added: 0008879
2017-10-16 16:13 colemaj Note Added: 0008880
2017-10-16 17:12 colemaj File Added: streamLines.png
2017-10-16 17:12 colemaj Note Added: 0008881
2017-10-16 17:13 colemaj Note Added: 0008882
2017-10-16 17:24 henry Note Added: 0008883
2017-10-16 17:37 colemaj Note Added: 0008884
2017-10-16 17:46 henry Assigned To => henry
2017-10-16 17:46 henry Status new => closed
2017-10-16 17:46 henry Resolution open => no change required
2017-10-16 20:49 colemaj Status closed => feedback
2017-10-16 20:49 colemaj Resolution no change required => reopened
2017-10-16 20:49 colemaj Note Added: 0008885
2017-10-25 13:13 colemaj Note Added: 0008939
2017-10-25 13:13 colemaj Status feedback => assigned
2017-10-25 17:44 henry Note Added: 0008942
2017-11-28 10:14 henry Status assigned => closed
2017-11-28 10:14 henry Resolution reopened => unable to reproduce
2017-11-28 10:14 henry Note Added: 0009076
+Issue History