[Gmsh] Questions on the background mesh/data

Christophe Geuzaine cgeuzaine at ulg.ac.be
Mon May 11 23:13:25 CEST 2009


dolfyn wrote:
> Dear all,
> 
> Intrigued by the possibility to use STL files I decided to try one. 
> Found a STL file on the internet of a man. First runs in Gmsh did 
> not succeed; the STL file needs to be closed and not too wild (no 
> intersecting triangles). 
> 
> Using the default meshing algorithm works; Mesh.Algorithm3D = 4 does 
> not. Results, see figure, look nice.
> 
> Next step is to go for a 'poor mans mesh refinement' i.e. not 
> automatic but stopping the simulation run, remesh based on the 
> results so far, interpolate old results on the new mesh and start a 
> new analysis. The method of exporting a field out of dolfyn to Gmsh 
> is in place (the interpolation subroutines have to be written).
> 
> Some questions:
> 1) Obviously the first mesh is driven by the STL surface details 
> (and if I may say so, very well). Is there any way to control it's 
> behavior/characteristic length attractor or distance threshold?

Not very reliably at the moment. It's planned...

> 2) What is the characteristic length? A sphere within the 
> tetrahedral cell? Does not seem to be the case, nor is an edge 
> length. What is it? Volume?

edge length


> 3) The background field is it cell/zone based or on the 
> vertices/nodes? 

It can be pretty much anything you want: it's just a function that
returns a value at any point (x,y,z) in space.


> 4) Can I switch off Gmsh random meshing? (useful when debugging)

No :-(

> 
> Not related... but... is it possible to 'push' away the layer at the 
> surface and as a result we'll have one or more prism layers next to 
> the surface?
> 

Only for geometries created within Gmsh at the moment. We've been
thinking about a nice way to do this for purely discrete models, but
it's not implemented at the moment.



> Regards and thanks in advance!
> Henk
> 
> === man.geo ===
> 
> //Mesh.Algorithm3D   = 4 ;
> Geometry.Tolerance = 1.e-6;
> MeshSize =  2.  ;
> StdSize  = 10.  ;
> 
> Merge "man_model.stl" ;
> 
> // a small 'tunnel':
> Point(1) = { 1.5 * StdSize,-13.0, 1 * StdSize, MeshSize};
> Point(2) = {-1.5 * StdSize,-13.0, 1 * StdSize, MeshSize};
> Point(3) = {-1.5 * StdSize,-13.0,-2 * StdSize, MeshSize};
> Point(4) = { 1.5 * StdSize,-13.0,-2 * StdSize, MeshSize};
> 
> Line(1)  = {1 , 2};
> Line(2)  = {2 , 3};
> Line(3)  = {3 , 4};
> Line(4)  = {4 , 1};
> 
> Line Loop(1) = {1, 2, 3, 4};
> Plane Surface(2) = {1};
> 
> Extrude{0, 3.0 * StdSize, 0 }{ Surface{2}; }
> //Delete{ Volume{1}; }
> 
> Surface Loop(1) = {1};
> Surface Loop(2) = { 2, 13, 17, 21, 25, 26};
> 
> //Volume(1) = {1}; // interior STL model
> Volume(2) = {2,1};
> 
> Physical Volume("Fluid")  = {2};
> 
> Physical Surface("Man  ") = {1};
> Physical Surface("Floor") = {2};
> Physical Surface("Inlet") = {13};
> Physical Surface("Outlet") = {21};
> Physical Surface("Walls") = {17, 25, 26};
> 
> === mand.din ===
> 
> title Test Gmsh man model
> steps 1000 1.e-3
> 
> opendx off
> #use gmsh
> use vtk
> 
> density,1.0
> vislam 18.6e-6
> pref,85562
> 
> relax 0.4 0.1 0.4 0.8
> #thermal on
> init,field,0.0 0.0 -0.1,,1.e-4,1e-4
> 
> scheme UVW  GAMMA
> scheme T    LUX 0.8
> 
> slope UVW  vnf
> slope P    vnf
> slope KEPS vnf
> slope T    vnf
> 
> post p    vert
> 
> boundary,man
> wall
> noslip
> 0.0 0.0 0.0
> fixed
> 273 + 38 0.0
> 
> boundary,inlet
> inlet
> 0.0 0.0 -1.0
> 1.0
> 293
> inle
> 0.25 0.01
> 
> boundary,outlet
> outlet
> 1.0
> 
> boundary,floor
> symp
> 
> boundary,walls
> symp
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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