[Gmsh] Fine mesh only at boundary?
Nico Schlömer
nico.schloemer at gmail.com
Fri Dec 28 13:17:02 CET 2012
Hi Felipe,
thanks a lot for looking into this!
> very fine region inside the circle, I assume this is what you're trying to
> avoid, right?
Exactly. The problem is that I'll need a *very* fine mesh at the
boundary; if extended into the circle, the number of degrees of
freedom in the FEM application would be prohibitively large.
> I played around a bit after adding the
> "Mesh.CharacteristicLengthExtendFromBoundary= 0;"
So did I, and I've got a better idea now of where my problems come from.
Try for example
z = 0;
lcar = 0.2;
lcar_fine = lcar / 100.0;
width = 0.01;
and you'll see the funny behavior that I see: The coarsest elements
are refined in a weird way around the boundaries (see attachment).
When increasing the width of the boundary region, the mesh gets back
to sanity. Hm...
--Nico
On Fri, Dec 28, 2012 at 1:20 AM, F. A. Portela
<felipe.alves.portela at gmail.com> wrote:
> Hi Nico,
>
> Without adding "Mesh.CharacteristicLengthExtendFromBoundary= 0", I tried to
> mesh a quarter of the circle at a time and noticed that the refinement near
> the centre increases as more quarters are meshed, to the extent of having a
> very fine region inside the circle, I assume this is what you're trying to
> avoid, right?
>
> I played around a bit after adding the
> "Mesh.CharacteristicLengthExtendFromBoundary= 0;" line, and the quality did
> seem to deteriorate. So what I tried was to increase change line 43,
> specifically I tried setting "Field[4].DistMax = 15 * width;". This makes
> the transition between "lcar_fine" and "lcar" smoother and the result seems
> a bit better (not sure if it's what you're looking for though).
>
> Another solution could be to set the characteristic lengths of
> "tp2,tp3,tp4,tp5" to "lcar_fine" but this seems to give the same result as
> the Attractor-Threshold method...
>
> Regards,
> Felipe
>
>
> --
> Felipe Alves Portela
> MSc student in Aerospace Eng. at TU Delft
> http://www.linkedin.com/in/felipealvesportela
>
>
> On 26 December 2012 14:02, Nico Schlömer <nico.schloemer at gmail.com> wrote:
>>
>> > Mesh.CharacteristicLengthExtendFromBoundary= 0;
>>
>> This is producing the weiiirdest elements by taking a very coarse mesh
>> and then basically adding extra nodes only on specific edges of the
>> that mesh. The resulting elemens would be very bad quality.
>>
>> --Nico
>>
>>
>>
>> On Mon, Dec 24, 2012 at 5:38 PM, F. A. Portela
>> <felipe.alves.portela at gmail.com> wrote:
>> > Hi Nico,
>> >
>> > Try adding the following line to your .geo and see if it helps:
>> >
>> > Mesh.CharacteristicLengthExtendFromBoundary= 0;
>> >
>> > Merry xmas,
>> > Felipe
>> >
>> >
>> > --
>> > Felipe Alves Portela
>> > MSc student in Aerospace Eng. at TU Delft
>> > http://www.linkedin.com/in/felipealvesportela
>> >
>> >
>> > On 21 December 2012 15:04, Nico Schlömer <nico.schloemer at gmail.com>
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >> things are working pretty much okay with the mesh refinement along the
>> >> boundary; there's thing however which I wasn't able to resolve by
>> >> myself.
>> >> When I refine a mesh in the vicinity of the boundary of a circle, the
>> >> entire circle gets refined. The lcar statement for the center point of
>> >> the circle doesn't seem to be accounted for.
>> >> I attached a minimal script to highlight what's going wrong (remove
>> >> the last line for meshing without any refinement).
>> >> Is there a canonical way to deal with this?
>> >>
>> >> Cheers,
>> >> Nico
>> >>
>> >> On Thu, Dec 20, 2012 at 12:49 AM, Nico Schlömer
>> >> <nico.schloemer at gmail.com> wrote:
>> >> > This is *exactly* what I needed. Thanks for the hint!
>> >> >
>> >> > On Thu, Dec 20, 2012 at 12:10 AM, F. A. Portela
>> >> > <felipe.alves.portela at gmail.com> wrote:
>> >> >> Hi Nico,
>> >> >>
>> >> >> Have you tried using the Attractor and Threshold fields? If not, you
>> >> >> might
>> >> >> want to have a look at Tutorial 10.
>> >> >>
>> >> >> The MathEval field might also be helpful, depending on the domain
>> >> >> geometry
>> >> >> (also used in Tutorial 10.
>> >> >>
>> >> >> Good luck.
>> >> >>
>> >> >> Cheers,
>> >> >> Felipe
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Felipe Alves Portela
>> >> >> MSc student in Aerospace Eng. at TU Delft
>> >> >> http://www.linkedin.com/in/felipealvesportela
>> >> >>
>> >> >>
>> >> >>
>> >> >> On 19 December 2012 15:41, Nico Schlömer <nico.schloemer at gmail.com>
>> >> >> wrote:
>> >> >>>
>> >> >>> Hi,
>> >> >>>
>> >> >>> I have a PDE the solution of which is known to have a steep
>> >> >>> gradient
>> >> >>> close to the boundary of the domain, and to be well behaved inside
>> >> >>> the
>> >> >>> domain. I'd thus like to create a mesh that's fine close to the
>> >> >>> boundary, and somewhat coarser inside the domain.
>> >> >>>
>> >> >>> What are my options with Gmsh?
>> >> >>>
>> >> >>> Cheers,
>> >> >>> Nico
>> >> >>>
>> >> >>> _______________________________________________
>> >> >>> gmsh mailing list
>> >> >>> gmsh at geuz.org
>> >> >>> http://www.geuz.org/mailman/listinfo/gmsh
>> >> >>
>> >> >>
>> >
>> >
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: boundary.png
Type: image/png
Size: 30011 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20121228/f30c3ef9/attachment.png>