[Gmsh] Mesh size definition referring to surface or volumenumbers.]

Mark Starnes mark.starnes at fttech.co.uk
Tue May 31 11:12:50 CEST 2011


On Mon, May 30, 2011 at 12:30:56AM +0100, Geordie McBain wrote:
> 2011/5/27 Mark Starnes <mark.starnes at fttech.co.uk>:
> > On Fri, May 27, 2011 at 11:30:14AM +0100, Geordie McBain wrote:
> >> 2011/5/26 Mark Starnes <mark.starnes at fttech.co.uk>:
> >> > Hi Geordie, ?thanks for the rapid reply.
> >> >
> >> > Your example helped a great deal. ?Thanks!
> >> > I went on with it, attempting to define the
> >> > field for more than one surface, using MathEval
> >> > to set the mesh size for an initial field, then
> >> > defined a new second field for each surface using
> >> > Restrict (following your example).
> >> >
> >> > Can you tell me how to combine these field
> >> > definitions, please? ?I tried Min, Max, MathEval
> >> > and MinAniso types to define my last field
> >> > (referenced as the background field) but the
> >> > element sizes in different regions all appear the
> >> > same.
> >> >
> >> > I have attached my efforts (for what they are worth).
> >>
> >> Hmm. ?I get a good result with your third option, MinAniso. ?Indeed I
> >> get the similar good result with Min, but you only want to apply Min
> >> to the three Restricted fields {4, 5, 6}, not the constant fields {1,
> >> 2, 3}. ?I attach my version of your .geo file, with your third option
> >> uncommented, and then a picture of the mesh I get with "gmsh -2
> >> minaniso.geo".
> >>
> >> Actually this is a terrible mesh, but I assume that's beside the point
> >> at the moment.
> >
> > Hi again, Geordie and more thanks for your time.
> >
> > I ran your geometry here and it works; ?I don't
> > know why it didn't the first time. ?Thanks for
> > having a look.
> >
> > I have two last questions, if you don't mind.
> > First, my impression is that if all Points used
> > to define a volume have a characteristic length
> > smaller than that described by a field applied,
> > the smaller characteristic length will be adopted.
> > Can this behaviour be changed? ?I have an acoustic
> > volume filling a structural shell and the points
> > on the shell have small lengths: ?this results in
> > the elements in the acoustic volume becoming small
> > when I can get away with them being large.
> 
> I haven't tried to combine the three different ways of specifying the
> size of the mesh elements described at
> 
>   http://geuz.org/gmsh/doc/texinfo/gmsh.html#Specifying-mesh-element-sizes
> 
> as I thought things might get confusing.
> 
> One thing to bear in mind is that Gmsh meshes lines first, then
> surfaces, and then volumes.  It looks as though the Restrict to
> surface used in the previously discussed example had no effect on the
> one-dimensional stage.  I see Restrict can also be applied to an
> EdgesList, but I haven't tried that.
>

Hi Geordie.  I spotted that option and used it. I
managed to control the mesh along lines,
surfaces and volumes using Restrict.
> > Second, is it possible to define a vector field?
> > I would like to be able to define a vector field
> > in my structure, to stretch the generated elements
> > in one direction relative to the other.
> 
> I think you want a (second-order) tensor field rather than vector.
> For that, try Field.MathEvalAniso
> 
> http://geuz.org/gmsh/doc/texinfo/gmsh.html#index-MathEvalAniso-301
> 
> (I haven't actually used this myself, or seen an example, but it looks
> like it might be what you're after.)
> 
> 

Great.  I'll investigate further.  Thanks!

One thing I haven't seen mentioned anywhere was
how to force a mesh to become more coarse.  I
don't recall the Max field value working for me
in the example above, and from memory the manual
says that the smallest mesh value is adopted in a
space.  If I am correct, do you know of a way to change
this behaviour?  

Thanks again.

-- 
Dr. Mark Starnes
Senior Physicist
FT Technologies
Church Lane
Teddington
TW11 8PA

web:  www.fttech.co.uk
DDI:  0208 614 2730 
  
FT Technologies Limited is registered in England and Wales under registered number 01603909. Its registered office is at Church Lane, Teddington, Middlesex, TW11 8PA.
The information in this message is confidential and is intended only for the use of the intended recipient(s). If you are not an intended recipient, you should not disclose, use or copy this information. Please contact the sender immediately if you have received this message in error.