You can edit almost every page by Creating an account and confirming your email.

Sparselizard

From EverybodyWiki Bios & Wiki



Sparselizard
File:Electromagwaveguide.png
Excitation of a cross shaped perfectly conducting 3D waveguide by imposing an electric field at one end.
Developer(s)Alexandre Halbach
Stable release
Continuous integration
Written inC++
Engine
    Operating systemUnix/Linux, macOS
    LicenseGNU General Public License
    Websitewww.sparselizard.org

    Search Sparselizard on Amazon.Sparselizard (Copyright (C) Alexandre Halbach and Christophe Geuzaine, University of Liege, Belgium) is a rather general, multiphysics, open source C++ finite element library meant to be user friendly, fast and parallel. It can handle a rather general set of problems in 1D, 2D and 3D such as mechanical, acoustic, thermal, electric, magnetic, fluid, electromagnetic, piezoelectric... problems[1] (provided in form of a weak formulation ). Problems with several hundreds of thousands of unknowns in 3D and several millions of unknowns in 2D can be treated on classical laptops. Some built-in geometry definition and meshing tools are also provided.

    The problems can be readily solved in time with a time-stepping resolution or with the natively supported multiharmonic resolution method. In the latter case the steady-state solution of a time-periodic problem can be obtained in a single step, for linear as well as for general nonlinear problems.

    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 geometrical region.

    The built-in geometry definition and mesher can be used for now for rather simple 2D or extruded 3D geometries. For general geometries and advanced meshing the .msh format of the widely-used open-source GMSH meshing software is supported. Points, lines, triangles, quadrangles, tetrahedra, hexahedra, prisms or any combination thereof is accepted in the mesh. The result files output by sparselizard are in .pos format supported by GMSH.

    Download

    For now sparselizard has been successfully tested on Linux and Mac. If you use Windows install a virtual Ubuntu Linux using VirtualBox and then follow the instructions on the website or the online tutorials .

    Alternatively, if you wish to compile yourself the latest version of the sparselizard library, download the source code here and follow the step by step installation as detailed in the documentation .

    Examples, tutorials and documentation

    Sparselizard can be learnt using its documentation, visual tutorials, or examples on the Sparselizard website.

    As an example, to solve an electrostatic problem on a grounded 3D disk with electric volume charges with Sparselizard is very simple and reduces to writing a few lines of code:

    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, 4);               // Interpolation order 4 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.85e-12 * grad(dof(v)) * grad(tf(v)) + 1e-9 * tf(v));
    elec.generate();
    vec solv = solve(elec.A(), elec.b());
    
    v.setdata(vol, solv);             // Transfer data from solution vector to v field
    (-grad(v)).write(vol, "E.pos");   // Write the electric field
    

    References

    1. Halbach, Alexandre (2017-12-23). "Sparselizard - the user friendly finite element c++ library".

    External links


    This article "Sparselizard" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Sparselizard. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.