CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] Set surface normal manually in groovyBC (https://www.cfd-online.com/Forums/openfoam-community-contributions/167237-set-surface-normal-manually-groovybc.html)

Mitchell Baum February 25, 2016 20:22

Set surface normal manually in groovyBC
 
1 Attachment(s)
Hi all,

I am using groovyBC to define a power law velocity profile at a pipe outlet. According to the attached figure I have a nozzle in a rectangular domain which I have meshed using the snappyHexMesh utility. Due to the limitations of snappyHexMesh I have some surface irregularities at the edge of the orifice. When I implement the line:
Code:

valueExpression "-Un*pow((1-(r/R)),(1/n))*normal()";
I understand that when I define the according velocity normal in the valueExpression I am defining velocity vectors to the surface of the constituent cells of that patch, however due to my surface irregularities at the orifice edge I am getting some vectors pointing away from my desired direction. Is it possible to set the direction using the surface vector say (5.000000e-001 3.041372e-014 8.660254e-001) (which corresponds directly from my patch .stl file) as opposed to using normal()?

Thanks in advance for your help.
Mitchell

Mitchell Baum March 15, 2016 00:25

1 Attachment(s)
While I didn't manage to attain a solution to my original question in this post, I achieved a much more sound solution by adjusting my snappyHexMesh processes. Prior to running the snappyHexMesh command I ran the surfaceFeatureExtract command while I also changed around some settings in snappyHexMeshDict. I have attached my most recent mesh.

Although I have solved my original issue in this case, I feel it would be beneficial if anyone could offer guidance in assigning a predefined vector to a patch.

Regards,
Mitchell


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