We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Sparselizard: a general purpose multiphysics FEM c++ library

00:00

Formal Metadata

Title
Sparselizard: a general purpose multiphysics FEM c++ library
Subtitle
Mechanics, fluids, electricity, magnetics, EM and more
Title of Series
Number of Parts
490
Author
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
This presentation describes sparselizard: a fast, general, robust and user-friendly finite element c++ library with high potential for low-maintenance integration to open-source simulation tools. It is demonstrated with a large range of validated examples that the library has the ability to simulate heavily nonlinear multiphysics problems involving at least mechanic, fluid, electric, magnetic and electromagnetic physics. Its robustness, speed and user-friendliness are also demonstrated.
FluidAuto mechanicLibrary (computing)Finite element methodCodeCollaborationismRule of inferenceParticle systemElement (mathematics)Reflection (mathematics)Computer fileContext awarenessSoftware bugMoment <Mathematik>Sparse matrixMultiplication signTerm (mathematics)Image resolutionLibrary (computing)PredictabilityPhysicalismIntegrated development environmentComputer simulationSoftwarePhysical systemCodeDampingRange (statistics)Goodness of fitFunction (mathematics)Finite element methodPoint (geometry)Different (Kate Ryan album)Focus (optics)Software developerCollaborationismView (database)MultiplicationWater vaporSet (mathematics)Computer-aided designTelecommunicationUniverse (mathematics)Computer-assisted translationDisk read-and-write headSimulationVirtual machineWärmestrahlungCodeMechanism designForcing (mathematics)Computer animation
FluidPhysicsHarmonic analysisRight angleDifferent (Kate Ryan album)Numbering schemePressurePolygon meshGreatest elementMechanism designCore dumpFluidWärmestrahlungCodeSimulationSoftwareLine (geometry)Domain nameStability theoryPhysicalismQuicksortComputer simulationForm (programming)TwitterChemical equationElement (mathematics)Source code
Library (computing)Finite element methodMathematical analysisInterpolationPolygon meshCompact spaceFile formatFunction (mathematics)outputElement (mathematics)Slide ruleFinite element methodAlgorithmScaling (geometry)Polygon meshHarmonic analysisChemical equationTheory of relativityMoment (mathematics)Level (video gaming)Computer animation
WärmestrahlungFluidLibrary (computing)State of matterLimit (category theory)TowerInterface (computing)Constraint (mathematics)Polygon meshComputer animation
Finite element methodMathematical analysisoutputInterpolationPolygon meshCompact spaceFile formatFunction (mathematics)View (database)Field (computer science)Order (biology)Line (geometry)SoftwareAdaptive behaviorInductive reasoningVideoconferencingElement (mathematics)SimulationInterpolationDegrees of freedom (physics and chemistry)CodeNeuroinformatikPolygon meshRight angleFluxConnected spaceInterpreter (computing)VotingCASE <Informatik>Dependent and independent variablesInfinityMultiplication signFile formatConcentricComputer animation
Mathematical analysisFinite element methodPolygon meshInterpolationUnstrukturiertes GitterFile formatCompact spaceFunction (mathematics)Multiplication signStructural loadComputer simulationPolygon meshFile formatSimulationoutputAverageView (database)DataflowLine (geometry)Position operatorMaxima and minimaCASE <Informatik>Raw image formatSinc functionAugmented realityFluidFunction (mathematics)InfinityElement (mathematics)CodeFunctional (mathematics)Radio-frequency identificationKey (cryptography)MeasurementRevision controlCurveData storage deviceInformationComputer animation
Grand Unified TheoryFunction (mathematics)Inclusion mapHeat transferLine (geometry)Revision controlOrder (biology)Limit (category theory)Computer programmingAverageMultiplication signSystem callCore dumpNP-hardVirtual machineOrientation (vector space)Thermal radiationThermal conductivityVector potentialFluidDataflowBridging (networking)TopologieoptimierungPolynomialStiff equationMechanism designTopostheorieCodeSparse matrixTerm (mathematics)Matrix (mathematics)Degrees of freedom (physics and chemistry)SimulationFinite element methodINTEGRALParticle systemSemiconductor memoryFunctional (mathematics)Hacker (term)Pointer (computer programming)Open setCASE <Informatik>DistanceEndliche ModelltheorieGradientConnectivity (graph theory)Moment (mathematics)Normal (geometry)NumberShape (magazine)Product (business)Set (mathematics)ExpressionDifferent (Kate Ryan album)Vector spaceOnline helpComputer-aided designInteractive televisionNichtlineares GleichungssystemCartesian coordinate systemFreewareNatural numberStability theoryTurbulenceGame theoryFitness functionWärmestrahlungSurfaceDependent and independent variablesForm (programming)Condition numberSoftwareDescriptive statisticsMassMathematical optimizationObject (grammar)Data compressionAssembly languageGreen's functionWorkstation <Musikinstrument>AlgebraComputer-assisted translationUsabilityOpen sourceSupercomputerBuildingComputer animation
Point cloudOpen setFacebook
Transcript: English(auto-generated)
Thanks for being there, so What is finite elements? It's a it's the thing when you have your CAD file And you want to see the mechanical deflection of whatever CAD thing you design or a motor you just design you want to see the torque that is created by this motor or
A pipe where you want to see the the water throughput in it You want to simulate this with finite elements? And this is basically if you have access to a library you could just connect it to Whatever CAD software it would compute the well the physics and Output data that you could again show in the CAD environments
And so it would solve physics problem and predict what's going to happen like Motor torque for example, and this is exactly what sparse lizard does So some history it's quite a young finite element library in terms of
Usual finite elements library are like 20 30 years old commercial software Ansys is probably 40 or more years old And so they have a lot of history, and it's it's good or bad depends, but sparse lizard is quite young Which doesn't make it's not robust or not mature
So it all started at University of Liège not so far from here during my PhD I wrote a MATLAB finite element code Which had already a lot of all the features that sparse lizard now has and this was like you can see it as a draft and from this on 2017 I rewrote everything from scratch and C++ and so everything is really nicely integrated together
It's not something that was doing just a few things and then it was patched and patched and hacked around to add things more and more Over time it's really a lot of feature that are there from the very beginning and which make it actually quite nice and monolithic and Where there is no need to to hack code around and then from 2018 to 2019
I worked at IMIC, a nanoelectronics research center some colleagues are here And I used it basically I used the software to design micro electromechanical systems quite a wide range of them And they were fabricated so there's actually some
industrial Background in the in the way it was written because it was written on the side of this work And then for the coming four years, there is a grant Thanks to the Academy of Finland And thanks for Academy of Finland to bringing me here. It will be developed for four years at Tampere University
With a slight different focus on particle accelerator magnet design in collaboration with CERN so four years of basically full-time development already paid and guaranteed So there are lots of finite element softwares and
You could think of why there would be another one to add. Well, they from my point of view. There are lots of things that Just are specific to every software and everything well I didn't find what I expected in finite element softwares because they're always missing something and they tend to be
Usually not easy to use now here we provide a very large set of Proven capabilities of a lot of different physics which you can Very easily combine because this is the purpose of it from the very beginning to work with highly multi physics simulations
You can you have also a lot of extra finite elements things like mortar finite elements Which works very nicely for electric motors and all that is very concise and user-friendly. We'll see that even Although that it's a C++ library. We'll see that again later and it's carefully validated and debugged
I spent a lot of time on validating and So far as far as I know there is no bug that I'm aware of that is still there If you want to find some I will it doesn't mean there are no bugs But if I know of a bug I will remove it. It's also clearly documented and
quite efficient You can run it on 32 cores and get a nice speed up and it's very rapidly Expanding all the examples that I will show half of them have been added last year So let's first start about what it's able to do. So this is half of the examples So you have fluids, magnetics, electricity, mechanics, rotating machines, acoustics, thermal
Simulation they all have a Demonstrated example online and I'm not hiding anything. You can just click on this button and you will see the example and it will always fit in 10, 20 or at most 50 lines of code which are actually extremely readable
You can simulate Well, you see highly highly multi-physics things like the thermo-acoustic simulation in a deformable cavity. This includes pressure Thermal Pressure thermal, mechanics and Acoustics all that combined in one simulation or the fluid couple piezo-activated MEMS. This was actually fabricated at IMEC and
this includes pressure piezo and Mechanics all this combined very nicely So all these examples are validated and there are some more You have additional features like on the top left where you can work with non-matching meshes just very easily
and What you can simulate is of course transient simulations, harmonic simulations, eigenmodes but also something specific to sparse lizards you can simulate a Harmonic and in harmonic domain things that are nonlinear which commercial softwares cannot do at all as far as I know
So if you have a nonlinear problem you want to know how all the harmonics will appear This is very very straightforward in sparse lizard because it was very really at the core of the initial MATLAB FIM code that I started with There are lots of predefined physics as well, for example on the bottom right
advection diffusion is very well known that if you have Advection dominated advection diffusion problems you start having instabilities and for that there are five different schemes of Stabilization that are predefined and checked that you can readily use in just one line
Now advanced things that are available So as I said, there is native support of the so-called harmonic balance finite element Which allows to do nonlinear harmonic analysis There is also a fast 3d very general unstructured mesh to mesh interpolation algorithm. It scales very nicely linearly to up to 100 million of
Elements you have general 3d mortar finite elements. So on the previous slides Here you have an example of an electric motor in the rotor in state you really want to Link them with mortar. This is how it's done commercially because otherwise You don't have the freedom to choose the mesh at the interface. You have some constraints here
You're totally free to do it. It works in 3d. No limitation You Have since Well, basically I started writing this a month ago and it will be available next week through P adaptivity So you can change the interpolation order on every element in the in the mesh
Which means only on the elements that actually require to have more computations on Will you perform more computation? So as an example, I have a short video That's not gonna show There so you have the electric motor
simulation and so you have The induction field magnetic induction field on the left and then on the right you have the interpolation order That is the best to actually solve this as accurately as possible with as few degrees of freedom as possible and you see red the red is the the place where you have the highest interpolation order which is for here and this
Actually need to to be accurately solved for and so as you rotate the rotor it will automatically adapt This is just two lines of code to change. There is really nothing difficult to that Well, probably in other softwares you might Get in trouble if you actually want to use it
Now you also have extra things that you expect to have an infinite element codes Maybe a file formats which in this case happens to be Compared to VTK para view format if you run a fluid flow simulation in time, you need to store 500 time steps You might need 300 gigabytes of data here. You will just need 30 gigabytes of data
It's like 10 times more compact than VTK for example and I don't believe it's possible to make it more compact because it just stores raw data and you can just easily reload it and That's the nice thing about it. It's not just dumping data and loading again it you can easily reload it later
Even if you have no idea of how the simulation was done You have one line or probe So if you want to know the value and one specific position you have the interpolate function You have maxes averages integrals, whatever. This is very straightforward to use you have para view output format because Para view to me is the best way to visualize
simulation data And then you have G mesh and Nastran mesh input format and lots of more input formats via via pet C that allows to load other Other mesh format and G mesh as well, which you probably know a lot You can also have curved meshes. So quite a lot of extra features and it's very growing
So probably you will see H So mesh refinements coming in the next month because this is currently what I need for the superconducting magnet simulations Now it's concise and user-friendly You don't need advanced knowledge of C++. It is C++ so you can easily link it
But all the pointers and stuff are hidden. You don't have to work with a memory There is no hack. It's highly readable So as an example, you don't need to know the equations, but if you want to run a 3d electrostatic simulation This is what you would need. This is a working example nine lines of code two-third of it, which is just commands
Hard to beat I think It's object oriented programming Yeah, just have a look at the examples online basically They might be just three times longer But with 20 lines of code you can run a full 3d fluid flow simulation, for example Now it's documented and not just like automatically documented. It's really I spent a lot of time to document it
So every function you you're supposed to use Comes with as detailed description as possible and also a working example Like this one where you can just copy paste it and then work Play around with a function to see what it actually does and what the specific things are about it
This is valid for every function. And whenever I add a function I add it immediately to the documentation and It's available on on github for free. It's a JPL open source, of course And if there's anyone who develops a CAD engine who would be definitely happy to have some interaction to include it
Thanks
Can I do finite elements on 2d or 1d equations? Yeah, so 3d 2d axis symmetric 2d and 1d Yeah, yeah
Integral an integral Oh, you want to have like an average value for a thermal problem you want to know the average temperature or something Yeah Agree, so if you want to integrate the heat flow through a surface, it's one line
So you have access to the normal you multiply by the heat flow you dot integrate you see on which region? What integration order and you're done you have a double value out?
So topology, I don't myself but I do I support topology optimization I don't myself but a former colleague Managed to do topo mechanical topology optimizations There is an example online but no example button to click on because it's it's his software But yeah, you definitely can because he did a 2d
bridge topology optimization in mechanics Yeah, he did it so I can confirm it's possible I can
So if for the what I heard Am I limited to like conduction or and can I do other things of thermal analysis like other problems like? convection radiation and heat
There's an example online for what conduction you can also have there is also an example for Natural convection so that works as well quite easily especially now with the stabilization methods added and Radiation I haven't tried it so of course you can probably find out the equations that
Correspond to how much you lose, but you cannot take into account the fact that you radiate on another face for the moment Although maybe but particle tracing is being added Maybe it can somehow do that, but radiation would be the only thing that is missing
so you're interested in including turbulence and in the simulation for the thermal convection General fluid so I actually that's funny because one one month ago
I thought what am I gonna do next and I thought I'm gonna add a Turbulence model for a fluid flow model with a spell art almaros And everything is ready to to add it. It's just that I thought It's too specific. I don't want to write something that is just for compressive incompressible fluids in this specific case I think for the moment the user will have to write it in himself, but
spell art almaros at least is It's easy to add and the only thing you need it in this case is to know the distance to the wall And this if you need help for that. I know how to do
If you want to add its different set of shape functions yourself I Think it's quite easy So we have like a fuller with all the h-girl shape functions all the h1 shape functions you could just create another one and it also it also this all is quite readable because it's called a
polynomial function where you can just make products of polynom's when you first define and Based on what is already there. I think it's really doable for a user
it's It's generated What didn't fully understand is my stiffness matrix explicitly or? Build up
Over the way, it's built. I call a function that that creates a Matt's objects, which includes all the terms of the stiffness matrix and this is created in basically the core of sparse lizard a function that Calls everything that needs to be called and just assembles very efficiently all the terms in the stiffness equation
What yeah, yeah, you can I try it with up to 50 million degrees of freedom in 2d and 5 million degrees of freedom for fluid flow in 3d
Of course on bigger machines, but not like supercomputers, but more 32 core machine with a 700 gigabytes of RAM and Yeah, definitely this this is doable. The only limit for now is that I called pet C to call
Mumps because mumps is efficient and solving algebraic problem and for now pet C Doesn't call the new version of months and so it's limited To a number of non zeros in the matrix that is less than about one or two billion Which limits 2d problems to 50 million unknowns?
But so what we find that this is not in the documentation that it will be released on Wednesday But it will be up to the user to choose So for example, you can because that gives you the most flexible thing for example, you will be able to
in the motor example You have a vector potential and then you could just say that you check on the norm of the gradient of the z component of The vector potential basically to see where things are sharper and where it's sharper you have like corners and stuff in there That's where you want to refine more So but it's up to you to choose with whatever expression because you can build any expression easily in sparse lizard to choose it