ElmerGUI A new preprocessor for Elmer - PowerPoint PPT Presentation

1 / 46
About This Presentation
Title:

ElmerGUI A new preprocessor for Elmer

Description:

... compilation instruction in README.txt: $ qmake project $ qmake ... less README. Mesh generation. ElmerGrid. Built-in mesh generator and mesh manipulation tool ... – PowerPoint PPT presentation

Number of Views:704
Avg rating:3.0/5.0
Slides: 47
Provided by: userA
Category:

less

Transcript and Presenter's Notes

Title: ElmerGUI A new preprocessor for Elmer


1
ElmerGUI A new pre-processor for Elmer
  • Mikko Lyly
  • CSC, Finnish IT Center for Science
  • Elmer User meeting, 29th May 2008, CSC, Espoo

2
Outline
  • Backgound
  • Workflow
  • Practical example
  • On input file formats
  • Excercise
  • Custom menus

3
Background
  • Intended to replace ElmerFront
  • Enhanced mesh generation and mesh manipulation
    tools
  • Enhanced visualization routines (based on OpenGL
    and extensions)
  • Better compatibility with latest Solver
  • Programmable/customizable GUI
  • Less dependencies on external libraries
  • Portability (Linux, Windows, Mac)?
  • ElmerGUI is not
  • A CAD program complicated 3D-geometries should
    be modelled by separate tools and imported into
    ElmerGUI in an appropriate format
  • A stand-alone-program it needs ElmerSolver and
    ElmerPost (the elmer-suite) in path to solve
    the problem and visualize the results

4
Prequisites
  • Libraries
  • Qt Cross-Platform Application Framework (version
    4.2 or higher)?
  • Qwt - Qt Widgets for Technical Applications
    (version 5 or higher)?
  • Qt4 http//trolltech.com/products/qt/
  • Qwt5 http//qwt.sourceforge.net/
  • Licence GPL
  • Qt4 is pre-installed on most Linux distributions
  • Binary installation packages available for
    Windows and Mac

5
Compilation
  • Getting the sources
  • svn co https//elmerfem.svn.sourceforge.net/svnr
    oot/elmerfem elmefem
  • ElmerGUI is located in elmerfem/trunk/misc/Mesh3D
  • cd elmerfem/trunk/misc/Mesh3D
  • less LICENCES.txt
  • Follow the compilation instruction in README.txt
  • qmake project
  • qmake
  • make

6
Mesh generation
  • Possibility to use the following mesh generators
  • Tetgen (libtet compiled as a shared library)?
  • Netgen (libng compiled as a shared library)?
  • ElmerGrid (built-in)?
  • No hard-coded dependencies on external generators
  • For more information and documentation, see
  • http//tetgen.berlios.de/
  • http//www.hpfem.jku.at/netgen/
  • http//www.csc.fi/elmer

7
Mesh generation
  • Tetgen (libtet)?
  • Developed by Hang Si et al. at the Weierstrass
    Institute for Applied Analysis and Stochastics
  • Fast and efficient unstructured tetrahedral mesh
    generator
  • Licenced under the MIT-licence
  • Not free, but for private, research, and
    educational purposes it can be used at no
    cost and without further arrangements
  • Due to the commercial restrictions, libtet is not
    included in the binary distribution packages of
    Elmer.
  • The user has to make sure that he has a valid
    licence, or right to use the genarator otherwise,
    and download /compile the shared library from
    source
  • cd elmerfem/trunk/misc/tetgen_patches
  • patch lt patch_tetgen.h
  • g -fPIC -c predicates.cxx
  • g -fPIC -O -DTETLIBRARY -c tetgen.cxx
  • g -fPIC -c ElmerAPI.cpp
  • g -shared predicates.o tetgen.o ElmerAPI.o -o
    libtet.so

8
Mesh generation
  • Netgen (libng)?
  • NETGEN was developed mainly by Joachim Schöberl
    within project grants from the Austrian Science
    Fund FWF ( Special Research Project "Numerical
    and Symbolic Scientific Computing", Start Project
    "hp-FEM) at the Johannes Kepler University Linz.
    Significant contributions were made by Johannes
    Gerstmayr (STL geometry) Robert Gaisbauer
    (OpenCascade interface).
  • Powerful triangular and tetrahedral mesh
    generator
  • Licenced under LGPL included in the binary
    distribution packages of Elmer
  • Instructions for compiling libng from source can
    be found from
  • cd elmerfem/trunk/misc/netgen_patches
  • less README

9
Mesh generation
  • ElmerGrid
  • Built-in mesh generator and mesh manipulation
    tool
  • Very fast structured 1D/2D/3D-mesh generation
  • Able to import mesh files in several external
    formats

10
Mesh generation
  • Mesh generator chosen automatically by
    input-file-format
  • STL (stereolitography format) libtet or libng
  • SMESH (piecewise linear complex) libtet
  • POLY (like SMESH but less restrictions) - libtet
  • OFF (Geomview's polyhedral file format) - libtet
  • PLY (polyhedral file format) - libtet
  • MESH (Medit's surface mesh file format) - libtet
  • GRD (elmergrid's native input file) - ElmerGrid
  • FDNET (Fidap's mesh file format) - ElmerGrid
  • MSH (Gmesh's file format) - ElmerGrid
  • MPHTXT (Comsol Multiphysic's mesh file format) -
    ElmerGrid
  • UNV (Ideas' universal file format) ElmerGrid
  • Elmer's native mesh file format

11
Workflow

ElmerGUI ElmerSolver ElmerPost
ElmerGrid
12
Workflow
  • Open your input file (example samples/grd/angle3d
    .grd)

13
Workflow
  • Optionally configure mesh generator and remesh

14
Workflow
  • The values in the config dialog are inherited
    from cmd line tools

15
Workflow
  • Remeshing is perfomed in a separate thread

16
Workflow
  • Manipulate boundaries Select a boundary by
    double clicking and choose divide surface to
    split it by sharp edges

17
Workflow
  • Manipulate boundaries Select boundaries by
    holding down the CTRL-key while double clicking.
    Choose unify surface to join

18
Workflow
  • Turn on/off boundary index numbering for
    verification

19
Workflow
  • Define an equation (PDE-system) to solve

20
Workflow
  • Let us define the heat equation as an example

21
Workflow
  • The equation can later be activated for
    modification from menu

22
Workflow
  • Similarly, we can next define material properties
    and parameters

23
Workflow
  • Data is given in the General and Heat
    equation tabs

24
Workflow
  • Add body force

25
Workflow
  • Add boundary conditions

26
Workflow
  • Generate solver input file (sif)

27
Workflow
  • Edit the solver input file (if needed)

28
Workflow
  • Save the model

29
Workflow
  • Run solver

30
Workflow
  • Convergence monitor reveals possible problems

31
Workflow
  • Invoke post processor

32
Workflow
  • Visualize the results by Elmerpost

33
Workflow
  • You can alternatively define/edit body properties
    by holding down the SHIFT-key and by double
    clicking any surface of the body

34
Workflow
  • Similarly, boundary conditions may be (re)defined
    by holding down the ALT-key while double clicking
    a boundary

35
Workflow
  • The SHIFT / ALT functionality may also be
    activated from menu

36
Workflow
  • There are some useful functions available from
    menu
  • View -gt Surface mesh (toggles the visibility of
    surface mesh)
  • View -gt Sharp edges (show the sharp edges
    separating boundaries)
  • View -gt Compass (show coordinates)
  • View -gt Hide/show selected (toggle the visibility
    of current selection)
  • View -gt Numbering (useful for debugging and
    verification of the model)
  • View -gt Reset model view (clear view)
  • Model -gt Summary (get an overview of the model)
  • File -gt Save picture as (save the image in
    several formats)
  • Mesh -gt Terminate (kills the meshing thread, if
    blocked)
  • Run -gt Show convergence (toggles the visibility
    of convergece monitor)
  • Run -gt Kill solver (kills the solver process, if
    necessary)
  • Run -gt Kill postprocessor (kills ElmerPost, if
    necessary)

37
Input file formats
  • SMESH
  • Part 1 - node list
  • First line lt of pointsgt ltdimension (must be 3)gt
    lt of attributesgt lt of boundary markers (0 or
    1)gt
  • Remaining lines list of pointsltpoint gt ltxgt
    ltygt ltzgtattributes boundary marker...
  • Part 2 - facet list
  • One line lt of facetsgt ltboundary markers (0 or
    1)gt
  • Following lines list of facets lt of cornersgt
    ltcorner 1gt ltcorner 2gt ... ltcorner gt boundary
    marker...
  • Part 3 - hole list
  • One line lt of holesgt
  • Following lines list of holeslthole gt ltxgt ltygt
    ltzgt...
  • Part 4 - region attributes list
  • One line lt of regiongt
  • Following lines list of region
    attributesltregion gt ltxgt ltygt ltzgtltregion
    numbergtltregion attributegt...

38
Input file formats
  • Example (L.smesh)
  • 12 3 0 1
  • 1 0 0 0 1
  • 2 4 0 0 1
  • 3 4 2 0 1
  • 4 2 2 0 1
  • 5 2 6 0 1
  • 6 0 6 0 1
  • 7 0 0 2 1
  • 8 4 0 2 1
  • 9 4 2 2 1
  • 10 2 2 2 1
  • 11 2 6 2 1
  • 12 0 6 2 1
  • 8 1
  • 6 1 2 3 4 5 6 1
  • 6 7 8 9 10 11 12 1
  • 4 1 2 8 7 1
  • 4 2 3 9 8 2

39
Input file formats
  • The previous smesh-file should produce the
    following output

40
Input file formats
  • Mesh density control by volume constaints (see
    tetgens manuals for more details about command
    relevant line arguments)

41
Input file formats
  • It is possible to control the density locally by
    mtr-files
  • Example (L.mtr)
  • 12 1
  • 0.25
  • 0.25
  • 0.25
  • 0.025
  • 0.25
  • 0.25
  • 0.25
  • 0.25
  • 0.25
  • 0.025
  • 0.25
  • 0.25

42
Input file formats
  • Activate local mesh density control by
    introducing argument m

43
Input file formats
44
Input file formats
  • Examples can be found from
  • Tetgens site at
  • http//tetgen.berlios.de/
  • INRIAs mesh database at
  • http//www-c.inria.fr/gamma/download/disclaimer.p
    hp

45
Customizing the GUI
  • The menus of ElmerGUI are constructed dynamically
    when the process is initiated
  • Menus are described by edf-files
    (elmer-definition-file) which are written in XML
    containing problem specific information about
    dialog styles and dependencies on model data
  • The files are located in directory edf (with
    respect to ElmerGUI)
  • An example of customizing the menus can be found
    from the course material and from Elmers web site

46
Finally
  • ElmerGUI will be evolving in the near future
  • Tutoirials available from Elmers web site
  • User feedback is more than welcome
Write a Comment
User Comments (0)
About PowerShow.com