Home

Awesome

EllipticFEM.jl — a FEM Solver for Elliptic, Parabolic and Hyperbolic PDEs Written in Julia


Build Status

This package provides an implementation of a 2D finite element method for solving elliptic, parabolic or hyperbolic partial differential equations in Julia. In particular, one can solve

$ (\partial_{t(t)} u) - \nabla (A*\nabla u) + b*\nabla u + c*u = f $  in $\Omega$,

														   $ u = g\_D $ on $\Gamma\_D$,

											  $ (A*\nabla u)*n = g\_N $ on $\Gamma\_N$,

      	    											   $ u = u $ on $\Gamma\_P$,

where $\Omega$ is the domain and $\Gamma_D$, $\Gamma_N$ and $\Gamma_P$ denote Dirichlet, Neumann and periodic boundary, respectively. The term $(\partial_{t(t)} u)$ can be either absent (elliptic equation), or one of $\partial_t u$ (parabolic equation) or $\partial_{tt}$ u (hyperbolic equation).

It is possible to prescribe

Comparison to MATLAB


An important feature of this implementation in Julia is that the core matrix assembly is faster than in MATLAB (see Figure).

Comparison of MATLAB and JULIA speed.

Requirements


You need:

How to get started


The folder Run contains the subfolders Elliptic, Homogenization, Parabolic and Hyperbolic, each of which contains a runner file runElliptic.jl, runHomogenization.jl, runParabolic.jl or runHyperbolic.jl, respectively. Simply set your working directory to the respective path, start Julia and enter include("runElliptic.jl") in the Julia REPL.

The output images/videos are stored in the Saved images folder.

Important data types


An example (Elliptic equation)


The file runElliptic.jl essentially contains the following Julia code:

equationData = equationDataAssemble("./ellipticEquationDataLPipe.jl")

geoData = equationDataToGeoData(equationData)
geoDataPlot(geoData)

intendedMeshsize = 0.02
meshData = geoDataToMeshData(geoData,intendedMeshsize)
meshDataPlot(meshData)

deltaT = 0.0
lseData = lseDataAssemble(equationData,meshData,deltaT)

lseDataSolve(equationData,meshData,lseData)

lseDataPlot(meshData,lseData)

GeoData MeshData Solution

Authors