Skip to content

A MATLAB implementation of the Boundary Element Method (BEM) for solving the Laplace equation on generic 2D meshes. The code supports both linear and quadratic elements with a structured and modular approach for simplicity and precision.

Notifications You must be signed in to change notification settings

galbiatidavide/Boundary-Element-Method-3D

Repository files navigation

Boundary-Element-Method-3D

This repository contains a MATLAB implementation of the Boundary Element Method (BEM) designed to solve the Laplace equation on generic 2D meshes. It supports constant, linear and quadratic elements for boundary discretization, allowing flexibility in computational complexity. The implementation is structured to ensure clarity and modularity, making it easy to understand, use, and extend for various applications. Currently, the code supports two kinds of meshes. For linear and constant elements a simple .stl surface mesh file has to be provided. Instead, for quadratic elements a .mat file has to be produced and provided as input. The reason for this resides in MATLAB completely lacking a second-order-surface mesh reader. A simple jupiter notebook has been created to simply manage such inconvenience where a .msh file can be converted into a .mat file. Clearly any conversion to *.mat file is in principle possible. SInce .gmsh API is needed, createing a conda-env is advisable.

A simple example of a result provided by the code. Test case 3 (cfr. /results fd) is shown here below:

Example Surface Mesh Figure 1: normal derivative of u (solution) toroidal surf. R = 2.

Example Surface Mesh Figure 2: assigned Dirichlet condition toroidal surf. R = 2.

Example Surface Mesh Figure 3: inside domain implementation (not fully implemented for non-connected surfaces) toroidal surf. R = 6.

Another example: test case 2 solving an oscillating problem with mixed bc's on a cubic domain with quadratic elements.

Example Surface Mesh Figure 4: normal derivative of u (solution).

Example Surface Mesh Figure 5: u (solution).

Implemented by Davide Galbiati and Giovanni Maria Bonvini

About

A MATLAB implementation of the Boundary Element Method (BEM) for solving the Laplace equation on generic 2D meshes. The code supports both linear and quadratic elements with a structured and modular approach for simplicity and precision.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published