[Nek5000-users] Arbitrary mesh deformation

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Mon Mar 14 08:29:58 CDT 2011


Markus,

I often shift all of the GLL points - see the old primer.pdf
either on my website or on the wiki, where it gives an example
of how to do this within usrdat2(), which is the right place for it.

There are some issues to be aware of.   The main point is that you
want to avoid, to the extent possible, messing up the GLL point 
distribrution.    Let's consider a 1-D deformation --- think of it
as your wall-normal direction.  Assume y_old \in [0,1] and consider
the following loop:

        do i=1,n
           y = ym1(i,1,1,1)
           ym1(i,1,1,1) = y*y
        enddo

What does this do?   It concentrates points near y=0.  There are
reasons you might want to do something like this (or a perhaps 
more severe stretching), say if you wanted to capture a boundary
layer or whatever.

Unfortunately, this mapping would not be good for the GLL (Gauss
Lobatto Legendre) point distribution that is essential for stability
of the high-order interpolants and for the accuracy of the quadrature
rules used in nek.   The mapping is OK at the element level, but not
at the point level.

What to do?  One option is to go back and re-map the points interior
to each element so that they locally satisfy a GLL distribution. 
There is a routine "fix_geom" that does essentially this.  It 
implements the Gordon Hall mapping that is described in chapter 4
of Deville F & Mund.    I've used it many times (even this weekend),
but to date it's probably been used only by me -- which means that
it hasn't been tested under a wide range of usage conditions.  Thus,
you'll need to let me know if it breaks.

Coming back to your surface deformation, there are other issues.
Suppose you want to deform a surface but don't have a "volumetric"
deformation function (like above).  How can you blend the surface
deformation into the interior?   One approach that I've used - also
not yet perfect, but apparently functional for my cases to date -
is to solve a sequence of Laplace equations, one each for "x" "y" and
"z" where I specify the deformation on the surface as a Diriclet
condition (0 meaning no deformation on that part of the surface).
Because of the maximum principle, a Laplace solve makes a reasonable
blending function and will move the entire mesh to accommodate the
surface deformation.  I usually run "fix geom" afterwards.   I can
provide an example.    The key to having blending is that it 
spreads the local deformation over multiple elements, which is
particularly important if you have very thin boundary layer elements
near the surface that could otherwise end up inverted if the amplitude
of the surface deformation were greater than the element thickness in
the wall-normal direction.

Finally, a 3rd option that I just coded up this weekend is to "skin" the
mesh after it is set up --- Here, you add a thin layer of elements to
a mesh that has been constructed (presumably, without the usual layer
of boundary-layer resolving elements), but you add the skinning elements
after the deformation.    You can control which surfaces you skin - e.g.,
walls, while avoiding inlets and outlets.

A 4th option, there are some routines called "match normal" and they
will try to add curvature that will remove element faceting.  We use
these for our vascular flow modeling where we don't have an analytical
expression for the surface in any case.

hth,

Paul




On Mon, 14 Mar 2011, nek5000-users at lists.mcs.anl.gov wrote:

> Howdy neks,
>
> I am interested in deforming meshes (i.e. a wall surface shifted in the wall 
> normal direction) with an arbitrary coordinate list - that means I have the 
> new coordinates for every grid point, but they don't adhere to any particular 
> mathematical function.
> What I did in the past is that I only used the deformation for the element 
> corners (and nek would linearly interpolate in between). Depending on the 
> element resolution, this yielded a more or less accurate first order 
> approximation of the surface I intended to generate.
> My question is: can I use this procedure on every GL grid point? I know that 
> the routine we currently use for complex surfaces approximates with 2nd order 
> functions. Can one do sines/cosines/third or higher order as well? Or can the 
> GL point shifting in usrdat2 be completely arbitrary?
>
> Thanks,
> Markus
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>



More information about the Nek5000-users mailing list