2. The Basics#
We learn the basic concepts to program in NGSolve, we start with an easy example and we explore the single steps to solve a PDE problem. Then we apply the same steps and concepts to a more complex problem.
basic topics
apply what we have learned Modelling a capacitor in 2D.
2.1. Finite Element Method in a Nutshell#
Problem: (Strong)
Let \(\Omega\) be a domain in \(\mathbb{R}^n\) .
Find \(u\) such that
With \(\Gamma_D \sqcup \Gamma_N = \partial \Omega\)
Multiply the equation by a test function \(v\) and integrate by parts we get the weak formulation:
Problem: (Weak)
Find \(u \in H^1(\Omega)\) such that \(u = u_D\) on \(\Gamma_D\) and
Let \(\mathcal{T}\) ba a triangulation of the space \(\Omega\) the discrete weak formulation is given by:
Problem: (Discrete-Weak)
Find \(u_h \in V_{h}\) such that \(u_h = u_D\) on \(\Gamma_D\) and
Applying the Galerkin method: Suppose that on the triangulation \(\mathcal{T}\) we the finite dimensional function space \(V_{h}(\mathcal{T})\) has a basis \(\{\phi^i\}_{i=1}^{N}\), and let
Then, by substituting \(v_h\) and \(u_h\) in the discrete weak formulation we obtain the following linear system:
Then the problem reduces to solve the linear system \(A u = f\).