Skip to content

carlonluca/isogeometric-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Isogeometric Analysis and Finite Element Method with Octave and TypeScript

More Details on the Project

NOTE: typescript demos are not optimised for speed. It may require some time for your browser to complete the computation of the result before you can see the result.

Intro

The repo contains code to show how to implement FEM/IGA, coming from my dissertation (link below). The scripts include functions that implement the algorithms (typically with the "compute" prefix) and scripts that show how to use the functions and the result on real examples (typically with the "draw" prefix). Main topic is Isogeometric Analysis (IGA), but some code is there also for the Finite Element Method (FEM). The code was mostly written in 2009 for Matlab. In 2021 I improved it a bit and patched it to work with Octave, which seems to work very well. The repo contains:

  • 2.3: code showing how to solve 1D problems using the Finite Element Method (FEM);
  • 3.1: examples on how to draw curves and surfaces with implicit and parametric equations;
  • 3.3: implementation of Bezier curves and surfaces with examples;
  • 3.4: implementation of B-spline basis functions, curves and surfaces with examples;
  • 3.5: implementation of NURBS basis functions, curves and surfaces with examples;
  • 4.5: implementation of IGA on 1D problems with B-splines and NURBS, including h-refinement via knot insertion and degree elevation;
  • 4.6: Gauss points and weights to speed up numerical quadrature for IGA;
  • 4.7: implementation of IGA on 2D problems with numerical examples.

Note that the implementation is in no way optimized for speed. Computation of IGA solutions may take hours to complete and show the final result.

FEM is the main method used to numerically solve differential equations. The dissertation includes examples of solutions of 1D and 2D problems using this technique, but the 2D implementation uses Matlab/SimuLink, so it would need a specific implementation in Octave. 1D problems are showed instead in 2.3:

eq

results in:

example1

Lagrande polynomials can be useful for the definition of nodal shape functions:

example2

See this blog post for more info.

Examples for drawing implicit and parametric equations:

eq

sphere_implicit

Implementation of Bezier curves and surfaces:

eq

eq

eq

surf

See this blog post for more info.

Implementation of B-spline curves and surfaces:

eq

eq

eq

eq

eq

surf

surf

Implementation of NURBS curves and surfaces:

plate

plate

plate

plate

plate

Isogeometric Analysis with Knot Insertion

Chapter 4.5 includes algorithms for knot insertion, to refine the approximation:

eq

eq

example5

example6

In chapter 4.6 I created weights and Gauss points to speed up numerical quadrature during the IGA process.

In chapter 4.7 there are more examples of solving 2D problems with IGA, (e.g.):

eq

solution

TypeScript Implementation

Directory ts includes a complete TypeScript implementation of many of the algorithms used in IGA.

toroid

Rust Implementation

The Rust implementation is a work in progress. Go into the rust dir for more info.

teapot

Links

The code was tested on GNU Octave version 6.2.0.