[Gmsh] RE: Adaptive mesh refinement with getDP and gmsh

Jehudi Maes Jehudi.Maes at rug.ac.be
Thu Apr 26 09:25:00 CEST 2001


Dear Mr. Geuzaine,

Thank you for your quick reply. The main problem is indeed the calculation
the generation of the target mesh size. I think I would better post a
message regarding this issue on the GetDP mailing list.

Regarding the smooth surface: If I make a plot of the calculated B (Norm B)
I would like to see the values as a colored triangle (for my 2D) problem.
Instead of such a plot I get a plot with small colored squares at the middle
of each triangle.

My postprocessing file is:

/*********************************************************************
 *
 *  srm.post
 *
 *  Post-Processing for the switched reluctance motor
 *
 *********************************************************************/

General.Trackball = 0 ;
General.RotationX = 0 ;
General.RotationY = 0 ;
General.RotationZ = 0 ;
General.Color.Background = Black ;
General.Color.Text = White ;
General.Orthographic = 1 ;
// Avoid perpective to allow simultaneous plot of B and field lines,
// make View.OffSetZ>0 to view field lines on top of B plot
General.Axes = 0 ;

Geometry.Color.Points = {128,128,128} ; // Remove geometry points in
postprocessing

Include "bn.pos" ; // Norm[{d a}] with :
Include "a.pos" ;  // a Magnetic vector potential a formulation (2D)

View[0].Name = "B values" ;
View[0].IntervalsType = 2 ;
View[0].OffsetZ = 0.0 ;
View[0].RaiseZ = 0 ;
View[0].Light = 1 ;
View[0].ShowScale = 1 ;

View[1].Name = "Field lines" ;
View[1].IntervalsType = 1;
View[1].OffsetZ = 0.1 ;
View[1].RaiseZ = 0.0 ;
View[1].Light = 1 ;
View[1].ColorTable = { White, White } ;
View[1].NbIso = 20 ;
View[1].ShowScale = 0 ;

Kind regards,

Jehudi Maes

> -----Original Message-----
> From: geuzaine at aix10.segi.ulg.ac.be
> [mailto:geuzaine at aix10.segi.ulg.ac.be]On Behalf Of Christophe Geuzaine
> Sent: Wednesday, April 25, 2001 7:21 PM
> To: gmsh at geuz.org
> Cc: Jehudi.Maes at rug.ac.be; Dular Patrick
> Subject: Re: [Gmsh] [Fwd: Adaptive mesh refinement with getDP and gmsh]
>
>
> Jehudi Maes wrote:
> >
> > Dear Mr. Dular and Mr. Geuzaine,
> >
> >  I have been working with GetDP and gmsh for the FE calculations of a
> > switched reluctance motor (magnetostatic calculations). For these
> > calculations I have had a lot of help from one of your collegues Johan
> > Gyselinck. From the websites and the documentation I concluded
> that it is
> > possible to use GetDP and gmsh for adaptive mesh generation.
> Could you be as
> > kind as to point out how I have to use the combination of GetDP
> and gmsh for
> > adaptive mesh generation.
>
> For h-type adaptation (i.e. modification of element sizes), you should
> output a post-processing view which contains the target characteristic
> lengths. Thus, you should
>
> 1) generate a first (coarse) mesh
> 2) compute target mesh sizes on this mesh, and output the results as a
>    Gmsh post-processing view
> 3) load this view in Gmsh, and apply it as the current background mesh
>    (with 'View->Apply as Background Mesh'), or load the view on the
>    command line, with the option '-bgm file'
> 4) re-mesh
>
> Step 2) is of course the difficult part, and depends on your problem.
> GetDP can help to generate the target size view if you have a mean to
> compute an error field, i.e. some 'volumic' field on the mesh
> representing (an approximation of) the error. If you can compute such a
> field, then you can use 'Adapt H1' in a GetDP PostOperation on this
> field, and you will obtain a valid background mesh for Gmsh.
>
> WARNING: if you plan to use background meshes, you need the very latest
> version (1.18) of Gmsh. This version fixes a serious bug in the
> generation
> of adapted 1D meshes.
>
> For p-type adaptation (i.e. local modification of interpolation order),
> you should output an adaptation file, and give it to GetDP on the
> command line with the '-adapt file' option. The adaptation file can be
> generated by GetDP by using 'Adapt P1' and by specifying 'Adaptation' in
> the Format of a PostOperation.
>
> >
> > Regarding the gmsh software I have some problems with the post
> processing
> > (generating smooth surface maps), are there any examples
> (besides t8.geo in
> > the tutorial) on how to use gmsh for post processing ?
>
> What do you mean by a 'smooth surface map' ?
>
> The simplest example of post-processing with gmsh is 'gmsh t1
> view1.pos'. All post-processing options in Gmsh are available by
> right-clicking on the view button.
>
> >
> > Kind regards,
> >
> > Jehudi
>
> I have forwarded your mail to the gmsh mailing list. If you reply to
> this message, please reply to the mailing list.
>
>
> Christophe
>
> --
> Christophe Geuzaine
>
> Tel: 32 (0) 4 366 37 10    http://geuz.org
> Fax: 32 (0) 4 366 29 10    mailto:Christophe.Geuzaine at ulg.ac.be
>