[aspect-devel] How to grab the outward normal vectors at the quadrature points in boundary cell's volume?

Shangxin Liu sxliu at vt.edu
Wed May 16 14:28:18 PDT 2018


Hi Wolfgang,

As for the definition of the outward normal vector within the boundary
cell, this is indeed a bit subtle but let me describe it and see whether it
can be grabbed somehow.

If the cell has a face along a straight boundary, like a box geometry, if
we imagine that a straight line passing through the quadrature point and is
perpendicular to the cell's boundary, there will be a projection point onto
cell's straight boundary. My definition of the outward normal vector is
just the outward normal vector evaluated at the projection point (Actually
for a straight boundary, the outward normal vector is the same for any
projection point on the boundary so this case is simple).

If the cell has a a curved boundary, like a sphere geometry, if we imagine
a straight line connecting the spherical center (say Earth center) and the
quadrature point within boundary cell's volume, there will be also a
projection point onto cell's curved boundary. My definition of the outward
normal vector is still the outward normal vector evaluated at the
projection point (But in the case, the outward normal vector can be
different from different quadrature points).

Your mention about a cell that has "two faces" at the boundary is indeed a
special case but we need to care about it. in that situation, I see that
maybe we can first use "cell->face(f)->boundary_id()" to grab the boundary
ID and then use this boundary ID to control which boundary face we want to
put the above projection onto.

The implementing of this projection seems not straightforward. Any insights?

Btw, to avoid this kind of projection inconvenience, I'm now thinking of
only grabbing the midpoint of both boundary cell and the boundary face by
constructing two midpoint quadrature formula (QMidpoint(dim-1) and
QMidpoint(dim)), the outward normal vector evaluated at the midpoint of the
boundary face looks like the one I need for the midpoint of the boundary
cell volume. But I'd like to know that whether the projection point (as
described above) of the midpoint of the boundary cell volume onto
the boundary face is exactly the midpoint of the boundary face? Do you
think this is an more applicable way?

Best,
Shangxin

On Wed, May 16, 2018 at 2:49 AM, Wolfgang Bangerth <bangerth at colostate.edu>
wrote:

>
> I found the related instruction in the online dealii manual about the
>> normal vector. It says (I just copy it here for the convenience):
>>
>> "For a face, return the outward normal vector to the cell at the |i|th
>> quadrature point.
>>
>> For a cell of codimension one, return the normal vector. There are of
>> course two normal directions to a manifold in that case, and this function
>> returns the "up" direction as induced by the numbering of the vertices. "
>>
>> I'm a little confused on the normal vector of the cell and got a couple
>> of questions:
>>
>> 1. What does "a cell of codimension one" mean? What kind of cell should
>> it be? (Does it work in ASPECT's cell like that in 3D box, 3D chunk, 3D
>> spherical shell, etc?)
>>
>
> "codimension one" means that you have a 2d cell in a 3d space. This
> happens if, for example, you want to solve PDEs on surfaces (think for
> modeling an erosion process on the two-dimensional surface of the 3d
> earth). This is not applicable in your case.
>
>
> 2. Is the normal vector evaluated at the quadrature points inside the
>> boundary cell's volume what the calculation needs, i.e., the outward normal
>> direction?
>>
>> 3. If not, any other suggestion on how to work around this issue?
>>
>
> The problem you need to think about is what you want this normal vector to
> be. Think about what the normal vector should be at a quadrature point
> inside the cell if this is a cell with a face along a curved boundary? And
> what is supposed to have if you are on a cell that has *two* faces at the
> boundary.
>
> I don't know the answer to this question, but it is not about how to
> *implement* this. You first have to ask yourself *how* the normal vector is
> *supposed to be defined*.
>
> Best
>  W.
>
>
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth          email:                 bangerth at colostate.edu
>                            www: http://www.math.colostate.edu/~bangerth/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20180516/36bb40cf/attachment.html>


More information about the Aspect-devel mailing list