Introduction to Computational Physics - Class Project.

Unstructured Multidomain grid generation and visualization using OpenGL/Mesa and MPI 

Background and motivation:

  Meshing is an important process deriving computational input models from a general geometric model. Continuous physical systems, such as the airflow around an aircraft, the stress concentration in a dam, the electric field in an integrated circuit, or the concentration of reactants in a chemical reactor, or crystal growth furnace, are generally modelled using partial differential equations. To perform simulations of these systems on a computer, these continuum equations need to be discretised, resulting in a finite number of points in space (and time) at which variables such as velocity, density, electric field are calculated. The usual methods of discretisation, finite differences, finite volumes and finite elements, use neighbouring points to calculate derivatives, and so there is the concept of a mesh or grid on which the computation is performed.

  There are two mesh types, characterised by the connectivity of the points. Structured meshes have a regular connectivity, which means that each point has the same number of neighbours. The mesh generated by a structured grid generator is typically all quad or hexahedral. Unstructured meshes have irregular connectivity: each point can have a different number of neighbours. Triangle and Tetrahedral meshes are most commonly thought of when referring to unstructured meshing, although quadrilateral and hexahedral meshes can also be unstructured.Triangles/tetrahedra can fit irregular boundaries and allow a progressive change of element size without excessive distortion, and so are well-suited for mesh generation for FEM. In addition, there are fully-automatic methods for generating triangular/tetrahedral meshes.

  The aim of this project is to build the tool for on-line testing and visualization of subroutines for manipulation of multidomain unstructured 2D grid generated by "TRIANGLE". "TRIANGLE" is the public domain grid generator, it generate quality conforming Delaunay triangulations that can be generated with no small angles, and are thus suitable for finite element analysis.
  The program simulates two conjugated domains meshed separately (this domains introduces solid and melt in the crystal growth system). It has been planned to test the program functioning in multiprocessor  mode (each domain is proceeded on its processor) by using MPI (message passing interface).  This feature has not implemented in project because the multiprocessor cluster was not available in time. Instead of it the program has been compiled with MPI and executed on a single processor using MPI mode emulation.

Obtaining and compilind:

  The program uses the Mesa/Glut libraries. To compile and run the project you should have Mesa-3.0 or later and Glut-3.0 or later  installed on your  machine. Download all files from folder “cpproj”  and type: make “platform name”  (for example in linux  type: make linux).  For more information see Makefile and Make-config.

Getting download files and information:

Makefile:
Make-config:     platform configurations;
meshv.c:             the main project program;
triangle.h:            grid generator header;
triangle.o:            grid generator object file;
readtex.c:            included for image files reading ;
ol.rgb:                 image file.

Running and using

Conclusions and future development:

The output of this project is an effective instrument that may be used in my future research for algorithms and subroutines checking.  The following features will be tested and added  in the near future:
 - interface refinement;
 - data interpolation;
 - finite elements calculations;
 - mesh reading from a file and its saving to another one.