## Archive pour 8 octobre 2009

### FEM, finite element method, PDE, partial differential equation;mathematica

http://library.wolfram.com/infocenter/MathSource/4478/
This package allows to solve second order elliptic differential equations in two variables:

div(a*grad u) – b*u = f in the domain domain u = gD Dirichlet boundary conditions on first part of boundary a*du/dn = gN Neumann condition on the other part of the boundary

If the functions a, b f, gD and gN are given, then a numerical approximation is computed, using the method of finite elements. To generate meshes the programm EasyMesh can be used.

### a general finite element environment;mathematica

http://library.wolfram.com/infocenter/TechNotes/6635/

The Mathematica application package AceFEM is a general finite element environment designed to solve multi-physics and multi-field problems. Using Mathematica, the program provides both extensive symbolic capabilities and the numeric efficiency of a commercial finite element environment.

AceFEM consists of two components. The main module performs tasks such as processing user-input data, mesh generation, control of solution procedures, and graphic post-processing of results. A fully integrated second module handles numerically intensive operations such as evaluation and assembly of finite element quantities, solution of linear systems of equations, contact search procedures, and more.

### MESH GENERATION;mathematica

http://library.wolfram.com/infocenter/Conferences/5771/

The upcoming release of Mathematica (2005) establishes the next level of sophistication in scientific function and data visualization. All the plotting functions have been rewritten to incorporate state-of-the-art algorithms in numeric and algebraic analysis, mesh generation, and computational geometry. Arbitrary-precision function evaluation, region, mesh overlays, piecewise functions, and singularities handling are just part of the new functionality. All of this makes Mathematica a unique system for function and data visualization with features not found in any other algebraic computational system. In this presentation we will give a general description and present several examples of the new capabilities.

### mesh generation, literate programming, matlab; mathematica; persson

http://library.wolfram.com/infocenter/MathSource/5475/

This Mathematica notebook is an effort to transcribe the MATLAB code of a 2-D mesh generation algorithm as described explicitly in Persson and Strang’s paper . The goal is to make the algorithm executable in Mathematica so that its users can also experiment with the algorithm.

Since the algorithm was expressed very clearly from their original paper  including the MATLAB code, which is a perfect example of literate programming in MATLAB, it is pretty easy to translate the MATLAB code « literally » into Mathematica. Such translation is virtually always possible in either direction even without human interference. And such a Rosetta Stone kind of translation might be useful if one species of people coding in either MATLAB or Mathematica were to disappear, future generations would still be able to rediscover one programming language by reading its interpretation in the other one.

However, it is so tempting to present the literate programming capability of Mathematica by following its general principles; that is, (a) documentation mingles with code and both get pretty-printed; (b) shuffle code pieces for human readability. I decided to transcribe the code manually.

The original MATLAB code was documented as 8 steps (sections) in sequential order, which is easy to follow because the ideas behind the code were explained beforehand in early parts of the paper. So it is recommended that you read part 1 and 2 of the original paper. Instead of following the MATLAB code literally in 8 steps, this notebook breaks the code pieces apart and examines each of them separately.

### finite element; matlab

Kwon, Y. W. and Bang, H. The Finite Element Method Using MATLAB. Boca Raton, FL: CRC Press, 1996

### finite volume method

http://mathworld.wolfram.com/FiniteVolumeMethod.html

The finite volume method is a numerical method for solving partial differential equations that calculates the values of the conserved variables averaged across the volume. One advantage of the finite volume method over finite difference methods is that it does not require a structured mesh (although a structured mesh can also be used). Furthermore, the finite volume method is preferable to other methods as a result of the fact that boundary conditions can be applied noninvasively. This is true because the values of the conserved variables are located within the volume element, and not at nodes or surfaces. Finite volume methods are especially powerful on coarse nonuniform grids and in calculations where the mesh moves to track interfaces or shocks.

Hyman et al. (1992) have derived local, accurate, reliable, and efficient finite volume methods that mimic symmetry, conservation, stability, and the duality relationships between the gradient, curl, and divergence operators on nonuniform rectangular and cuboid grids. REFERENCES:

Hyman, J. M.; Knapp, R.; and Scovel, J. C. « High Order Finite Volume Approximations of Differential Operators on Nonuniform Grids. » Physica D 60, 112-138, 1992.

Rübenkönig, O. « The Finite Volume Method (FVM). » http://www.imtek.uni-freiburg.de/simulation/mathematica/imsReferencePointers/FVM_introDocu.htm.

Versteeg, H. K. and Malalasekera, W. An Introduction to Computational Fluid Dynamics: The Finite Volume Method. Reading, MA: Addison-Wesley, 1995.

### Mesh Generation using Matlab ; mesh generator, 2D and 3D;

Mesh Generation using Matlab

These days most of the research in the field of fluids, structures, porous media, brain computer interfacing you name it, uses numerical simulations. Reason: It is much cheaper and many times faster compared to experiments. Mesh Generation forms an integral part of numerical analysis/simulation.
Although, there are plenty of commercial softwares based on Finite Element Methods and Finite Volume Methods like COMSOL, FLEUNT, ANSYS, NUMECA and many more with exceptional Mesh/Grid Generation features (amira).
But many times its difficult to use the meshes generated by these softwares which suits to your particular simulation need.
Reason: Many of the exsiting software don’t have this feature where you can create a mesh and use it some which have such features requires you to do some complicated modifications in your code to import these meshes. There are although loads of mesh generator available some of which open source and free to download.
But, then again problem comes does these free source code suits your purpose. I encountred this problem over the last couple of months.
I am doing research in the field of Petroleum Reservoir Simulation and I need to test a lot of numerical examples on different sorts of meshes/grids in 2 and 3D. I do most of my simulation work in MATLAB, some people might argue that MATLAB is slow and all sorts of reason about other programming languages are faster like C++ and Fortran. I don’t deny that fact but on the other hand the library of existing function which matlab has is amazing and its Array handling feature and sparse code it amazing too. The only and important reason I use MATLAB is its capability to handle array operations.
{In my simulation code I have to solve at times 9 simulatneous equations in 2D and 27 equations in 3D, which maximizes use of array operations. I also frequently use MAPLE to do my algebra and other good thing about MATLAB is that I can directly import the MAPLE algebra in Array Format into MATLAB which suits my purpose}

Now comming to the meshes in MATLAB, try doing a google on ‘meshes in MATLAB’ or ‘grid generation in 2 and 3D in MATLAB’, a invested a lot of time to find some unseful source code in matlab searching on google groups etc the only useful package I found was by Per-Olof Persson titled ‘DistMesh – A Simple Mesh Generator in MATLAB’.

YES!

No doubt its an amazing piece of work but again it didnt realy suits my purpose. The reason being I needed unstructured meshes of different element types in 3D like prisms, hex, tetra and pyramids. In 2D also I needed meshes which are boundary aligned to control volume and are matching to the underlying medium.

So, What next ? I started from scratch and now I have come up with stand alone code in MATLAB which has functionality to create different kind of meshes in 2D and 3D. These are structured and Unstructured meshes, perturbed and bondary aligned too. If any one is in need of such meshes in 2 and 3D please have a look at:

Then you can drop me an email and I will get back to you and will help you and if required will also provide you with the source code if it suits your purpose.

I MOVED THIS BLOG FROM WORDPRESS TO BLOGGER. Ce blog est à  • 221 476 hits