CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   How to get Inlet Surface Normal Vector (https://www.cfd-online.com/Forums/star-ccm/134187-how-get-inlet-surface-normal-vector.html)

phys-zephyr April 25, 2014 11:47

How to get Inlet Surface Normal Vector
 
Dear all,

I am new in Star-CCM+ and thus I am not sure whether I simply did not find the answer in the tutorials or the user guide, but I can not believe that this is not accessible:

How can I get the normal vector of my inlet surface?

As My geometry is rather complex and not of special orientation, the derivation of the surface normal vector is not straightforward. But as in the view options of the geometry scene one can select "Align View to Surface Normal", this has to be accessible somehow. I imagine something like $SurfaceNormal(Inlet)... I need this variable to set the inlet velocity vector, which has to be perpendicular to the inlet surface.

This immediately leads me to the second question: Where can I look up how any variables/quantities can be accessed? Is there somewhere a lookup table for $Position, $Centroid, etc.? I only found those from the "Volume Meshing Field Functions Reference"-part in the Star-CCM+ user guide. Or where do you get all the necessary key variables from?

Many thanks for any suggestions/ideas in advance.

Cheers

olesen April 28, 2014 02:40

Quote:

Originally Posted by phys-zephyr (Post 488211)
Dear all,

I am new in Star-CCM+ and thus I am not sure whether I simply did not find the answer in the tutorials or the user guide, but I can not believe that this is not accessible:

How can I get the normal vector of my inlet surface?

As My geometry is rather complex and not of special orientation, the derivation of the surface normal vector is not straightforward. But as in the view options of the geometry scene one can select "Align View to Surface Normal", this has to be accessible somehow. I imagine something like $SurfaceNormal(Inlet)... I need this variable to set the inlet velocity vector, which has to be perpendicular to the inlet surface.

This immediately leads me to the second question: Where can I look up how any variables/quantities can be accessed? Is there somewhere a lookup table for $Position, $Centroid, etc.? I only found those from the "Volume Meshing Field Functions Reference"-part in the Star-CCM+ user guide. Or where do you get all the necessary key variables from?

Many thanks for any suggestions/ideas in advance.

The user guide is an okay place to start, but it's easiest just to browse your simulation tree (Tools > Field Functions) to see what's available. Note that the functions available are influenced by your current simulation setup (eg, Lagrangian information etc).

To figure out something like a surface-normal of your inlet, you'll need to jump through a few extra hoops and probably need to write it as your own type of StarMacro. Unless you need full automationm however, the simplest is to simply define a local coordinate system on your inlet region by picking three points in the geometry scene. You can either use this coordinate system when defining/using field functions. Or, if you query the three basis vectors from the coordinate system.

Of course, if you are just trying to define a surface-normal velocity, it is all even easier: "Boundary-Normal" is one of the standard STARCCM methods that can be used as the "Flow Direction Specification" for velocity and mass-flow boundaries.

/mark

me3840 April 28, 2014 12:13

Area is a vector quantity. The direction of the area vector is the surface normal. Do $$Area.

phys-zephyr April 30, 2014 02:24

Many thanks for your help! I already managed to solve the problem. Indeed, $$Area gives you the surface vector, to get the surface normal, use $$Area/$$Area.mag()

Cheers


All times are GMT -4. The time now is 15:25.