Hello,
I am writing a Solver, I have a 2D body with different materials and I need to define the boundary conditions between the materials. For that purpose I need the normal vector.
In "ElmerSolver Manual" is written that the normal vector "is pointing towards the body with lower density". Nevertheless, when I change the density the normal vector always points the same direction and does not change. I am calculating it by using the function NormalVector( Element, Nodes, X, Y, .TRUE.)
I noticed that (in the cases I did) the normal vector is oriented from Right element to Left (I get these elements by: Element % BoundaryInfo % Right and Element % BoundaryInfo % Left) where Right and Left are two elements with different materials and between them I am applying the boundary condition. May I assume that always the normal vector points from Right to Left elements?
Regards,
Stan
NormalVector
Re: NormalVector
Hi,
The documentation seems badly out of date, sorry 'bout that. The normal orientation
can be set using a BC section keyword
Normal Target Body = Integer n
such that the normal will then point in the direction of body "n". By default the normal
will point towards the lower numbered body.
Hope it helps, Juha
The documentation seems badly out of date, sorry 'bout that. The normal orientation
can be set using a BC section keyword
Normal Target Body = Integer n
such that the normal will then point in the direction of body "n". By default the normal
will point towards the lower numbered body.
Hope it helps, Juha
Re: NormalVector
Hi Juha,
Thank you for the answer! Yes, one option is to use "Normal Target Body = Integer n", but I wish to do general program which works for complex domains and to avoid specifying the direction of the normal vector manually. Thus, I would prefer to use the default normal, i.e. as it points towards the lower numbered body. In such case, may I assume that the Right element (Element % BoundaryInfo % Right) will always be the element with bigger number and the Left element will be lower numbered body?
Regards,
Stan
Thank you for the answer! Yes, one option is to use "Normal Target Body = Integer n", but I wish to do general program which works for complex domains and to avoid specifying the direction of the normal vector manually. Thus, I would prefer to use the default normal, i.e. as it points towards the lower numbered body. In such case, may I assume that the Right element (Element % BoundaryInfo % Right) will always be the element with bigger number and the Left element will be lower numbered body?
Regards,
Stan