[Gmsh] MathEval field in a circle with Open Cascade

Hector Gabriel Espinoza Román hespinoza at utb.edu.co
Fri Jun 22 19:42:26 CEST 2018


Thanks! It works now.


I was only using

Mesh.CharacteristicLengthFromPoints = 0;

but I was missing that other option.


In addition to that I had to delete the lines

Mesh.CharacteristicLengthExtendFromBoundary = 1;

Mesh.CharacteristicLengthFromPoints = 1;

from the .opt file because gmsh reads first the .geo and then the .opt


Sincerely,


Héctor Espinoza

________________________________
De: Christophe Geuzaine <cgeuzaine at uliege.be>
Enviado: viernes, 22 de junio de 2018 1:39:06
Para: Hector Gabriel Espinoza Román
Cc: gmsh at onelab.info
Asunto: Re: [Gmsh] MathEval field in a circle with Open Cascade



On 22 Jun 2018, at 00:55, Hector Gabriel Espinoza Román <hespinoza at utb.edu.co<mailto:hespinoza at utb.edu.co>> wrote:

Hello:

This simple script should draw a circle (2D surface) and when meshed it should be refined on the boundary, but I am not getting that. I have done the same without Open Cascade and it works.


cx = 0.0 ;
cy = 0.0 ;
cz = 0.0 ;
D = 1.0 ;

R = D/2;
SetFactory("OpenCASCADE");
Disk(1) = {cx,cy,cz,R} ; // creates a circle surface
Field[1] = MathEval ;
//Field[1].F = "0.15 - 0.13*((x^2)/(0.5^2))" ; // works 2D, 617 elements: 0.02 to 0.15
Field[1].F = "0.15 - 0.13*(x^2 + y^2)/(0.5^2)" ; // doesnt work 2D
Background Field = 1 ;

What I am doing wrong?


Add

Mesh.CharacteristicLengthExtendFromBoundary = 0;

Christophe


Sincerely,

Héctor
_______________________________________________
gmsh mailing list
gmsh at onelab.info<mailto: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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20180622/14ac9234/attachment.html>


More information about the gmsh mailing list