[Gmsh] problem with Matheval field

Christophe Geuzaine cgeuzaine at ulg.ac.be
Tue Jul 17 15:52:11 CEST 2012


On 16 Jul 2012, at 17:12, Giorgos Kourakos wrote:

> Hi I'm trying to mesh a simple geometry with lines and points.
> I want the mesh to be refined around the points and the lines up to a specified distance 
> 
> To do so, I define an Attractor field and a MathEval field with the following relation "20*exp(-(F1/400)^2)" (radial basis function), where 20 is the minimum desired length near the attractor and 400 is the distance from the attractor  that the relation vanishes to zero. 
> 
> I'm attaching also the *.geo file
> The zoom_out.png  image shows that the distribution is somewhat as expected, however when I zoom (zoom_in.png) I see that just around the point attractors the elements have larger size compared to the desired lengths.
> 
> I have tried to change the points desired length, which partly solves my problem (see zoom_in_1.png) but this refines unnecessarily the mesh in the area between the points and line (see zoom_out_1.png plot)
> 

Hi Giorgos,

As defined, the function "20*Fabs(Exp(-(F1/400)^2))" takes the distance to the attractors as argument (which is approx. in [0,10000]): this gives 


which is coherent with the mesh you get (since by default Gmsh takes the minimum of the field and the mesh sizes defined at the CAD points).

For further testing you can plot your fields using Mesh->Define->Fields in the GUI.

Christophe


> I would appreciate any thoughts and suggestion
> 
> Kind regards 
> 
> Giorgos
> 
> -- 
> Giorgos Kourakos, Phd
> Land Air and Water Resources
> 229 Veihmayer Hall
> University of California Davis
> 
> Γιώργος Κουράκος
> <large_examp.geo><zoom_out.png><zoom_in.png><zoom_in_1.png><zoom_out_1.png>_______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20120717/ab15ca6b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: large_examp.png
Type: image/png
Size: 12171 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20120717/ab15ca6b/attachment.png>