Here, we employ Arcane to solve the Laplace equation, which stands as one of the fundamental partial differential equations (PDEs). The provided code presents a straightforward implementation of a 2D unstructured mesh Galerkin finite element method (FEM) solver.
The Laplace equation, also known as the harmonic equation, appears in various scientific and engineering applications. It plays a crucial role in fields such as physics, engineering, and mathematics. By solving the Laplace equation, we can gain insights into phenomena such as steady-state heat conduction, electrostatics, fluid flow, potential fields, and more. The code showcased here provides a foundation for tackling problems governed by this fundamental equation.
The 2D Laplace equation is solved for a closed meshed domain
or in a more compact forms
To complete the problem description, three first type (Dirichlet) boundary conditions are applied to this problem:
We work with approximation,
search FEM trial function
given
The mesh plancher.msh
is provided in the Test.ring.arc
file
<meshes>
<mesh>
<filename>ring.msh</filename>
</mesh>
</meshes>
Please not that use version 4.1 .msh
file from Gmsh
.
The Dirichlet (constant Test.ring.arc
file
<dirichlet-boundary-condition>
<surface>inner</surface>
<value>50.0</value>
</dirichlet-boundary-condition>
<dirichlet-boundary-condition>
<surface>outer</surface>
<value>20.0</value>
</dirichlet-boundary-condition>
So in the snippet above, three Dirichlet conditions are applied (ring.msh
.
The Neumann boundary conditions are absent but could be provided in such a way
<neumann-boundary-condition>
<surface>outer</surface>
<value>16.0</value>
</neumann-boundary-condition>
For post processing the Mesh0.hdf
file is outputted (in output/depouillement/vtkhdfv2
folder), which can be read by PARAVIS. The output is of the
The tests are present in the form of .arc
files with a prefix Test.
:
Name | Dimension | Boundary Condition | Solver | Comment |
---|---|---|---|---|
L-shape | 3D | Dirichlet + Null flux | Default (PETSc) | - Serves as validation test |
ring | 2D | Dirichlet only | Default (PETSc) | |
PointDirichlet | 2D | Point Dirichlet + Null flux | Sequential Direct LU | - Serves as validation test |
PointDirichlet-refined | 2D | Point Dirichlet + Null flux | Default (PETSc) | - Refined version of test |