[Gmsh] gmsh mesh refine exponential left bottom corner of a quader

Christophe Geuzaine cgeuzaine at uliege.be
Tue Dec 5 13:40:07 CET 2017



> On 4 Dec 2017, at 14:07, <baris.aydin at stud.hs-hannover.de> <baris.aydin at stud.hs-hannover.de> wrote:
> 
> To whom it may concern, 
> 
> I want to refine the left bottom corner of an homogenous mesh of a square, exponential with the translation function "e^-lambda*x". The solution should be a stiffness matrix. 
> 
> I don´t have an approach how to  solve this problem. Can you give tell me the proceeding, pls.
> 
> 

Here's one way to do this:

Point(1) = {0,0,0};
Point(2) = {1,0,0};
Point(3) = {1,1,0};
Point(4) = {0,1,0};
Line(1) = {1,2};
Line(2) = {2,3};
Line(3) = {3,4};
Line(4) = {4,1};
Line Loop(5) = {1,2,3,4};
Plane Surface(6) = {5};

// computes the distance to point 1
Field[1] = Distance;
Field[1].NodesList = {1};

// computes a function of the value returned by field 1 ("F1")
Field[2] = MathEval;
Field[2].F = "Exp(-7*(1-F1))";

// applies field 2 as background mesh
Background Field = 2;

CG

> With best regards
> 
> Baris Aydin
> Hochschule Hannover
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh


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

Free software: http://gmsh.info | http://getdp.info | http://onelab.info




More information about the gmsh mailing list