Efficient conformal adaptive mesh refinement (
AMR) is provided for 3D, 2D and 1D problems. A
fast algorithm for mesh-to-mesh interpolation and a general implementation of the
mortar finite element method allow to easily work with non-matching meshes and provide general
periodic conditions. FEM simulations can be weakly or strongly
coupled to lumped electric circuits.
Sparselizard can handle a general set of problems in
3D, 2D axisymmetric, 2D and 1D such as
mechanical (anisotropic elasticity, geometric nonlinearity, buckling, contact, crystal orientation), fluid
flow (laminar, creeping, incompressible, compressible), stabilized advection-diffusion, nonlinear acoustic,
thermal, thermoacoustic, fluid-structure interaction, electric, magnetic, electromagnetic, piezoelectric,
superconductor,... problems with a
transient, (multi)harmonic or damped/undamped eigenmode analysis.
A massive amount of data can be stored for
delayed, remote post-processing thanks to the
ultra compact .slz data format. Problems with several
millions of unknowns in 3D and several
tens of millions of unknowns in 2D have been solved
within minutes on up to 32 cores/64
threads (see
report). Some
built-in geometry definition and meshing tools are also provided. A working example that solves an
electrostatic problem on a grounded 3D disk with electric volume charges can be found below:
int vol = 1, sur = 2; // Disk volume and boundary as set in ’disk.geo’
mesh mymesh("disk.msh");
field v("h1"); // Nodal shape functions for the electric potential
v.setorder(vol, 2); // Interpolation order 2 on the whole domain
v.setconstraint(sur, 0); // Force 0 V on the disk boundary
formulation elec; // Electrostatics with 1 nC/m^3 charge density
elec += integral(vol, -8.854e-12 * grad(dof(v)) * grad(tf(v)) + 1e-9 * tf(v));
elec.solve(); // Generate, solve and save solution to field v
(-grad(v)).write(vol, "E.vtk", 2); // Write the electric field to ParaView format
The built-in geometry definition and mesher can be used for now for rather simple 2D or extruded 3D
geometries. Meshes of complex geometries can be imported from the widely-used open-source
GMSH meshing software (.msh format), from Nastran (.nas format) or from
various other
supported mesh formats (see the mesh object in the documentation). Points,
lines, triangles, quadrangles, tetrahedra, hexahedra, prisms or any combination thereof are accepted in the
mesh.
Element curvature for an accurate representation of the geometry is supported. The result files
output by sparselizard are in .vtk / .vtu / .pvd (
ParaView) or .pos (GMSH) format. The library comes
with hierarchical high order shape functions so that high order interpolations can be used with an
interpolation order adapted to every unknown field and mesh element/geometrical region (p-adaptivity).