From 69651f42950aee64e013915170a5a82e7fe70284 Mon Sep 17 00:00:00 2001 From: perebalazs Date: Tue, 10 Dec 2024 22:49:30 +0100 Subject: [PATCH 1/3] Create solid mechanics.md --- .../comparisons/simulation/solid mechanics.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docs/comparisons/simulation/solid mechanics.md diff --git a/docs/comparisons/simulation/solid mechanics.md b/docs/comparisons/simulation/solid mechanics.md new file mode 100644 index 00000000..10f6d954 --- /dev/null +++ b/docs/comparisons/simulation/solid mechanics.md @@ -0,0 +1,33 @@ ++++ +title = "Solid mechanics" ++++ + +# Solid mechanics + +\toc + +## Introduction +xxx + +## Packages +xxx + +### LowLevelFEM.jl +{{badge LowLevelFEM}} +From the README: +> Solution of a problem in linear elasticity using Finite Element Method consists of solution of the stiffness matrix K and load vector f, modifying them according to the boundary conditions (getting K' and f'), solving the displacement field q' as the result of the system of equations K'q=f', solving the stress field from q and visualize them. The above described steps can be easily performed using the LowLevelFEM package. Each step means a function with the appropriate parameters, while at any step it is possible to perform an arbitrary operation with the quantities calculated in the meantime. For example the strain energy can be solved as U=1/2q^T^Kq, for which the code is simply U=q'*K*q/2.(see Examples) +> LowLevelFEM.jl is developed by Balazs Pere. + + + +## References + +* Discourse + * x +* YouTube + * x +* arXiv + * x + +## Star History +{{star_history LowLevelFEM}} From cb377f17d92e7da36b54ca46734cd6bf7d74db9d Mon Sep 17 00:00:00 2001 From: perebalazs Date: Wed, 23 Jul 2025 01:11:53 +0200 Subject: [PATCH 2/3] Update solid mechanics.md --- docs/comparisons/simulation/solid mechanics.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/comparisons/simulation/solid mechanics.md b/docs/comparisons/simulation/solid mechanics.md index 10f6d954..1f164132 100644 --- a/docs/comparisons/simulation/solid mechanics.md +++ b/docs/comparisons/simulation/solid mechanics.md @@ -7,18 +7,18 @@ title = "Solid mechanics" \toc ## Introduction -xxx + +Finite element method (FEM) is widespreadly used in engineering to simulate linear or non-linear elastisity, plasticity, dynamic problems, sbtability or modal analysis problems. There are many Julia packages uses FEM, but these packages differs from the commercial finite element softwares (like Ansys or Abaqus). ## Packages -xxx + +x ### LowLevelFEM.jl -{{badge LowLevelFEM}} -From the README: -> Solution of a problem in linear elasticity using Finite Element Method consists of solution of the stiffness matrix K and load vector f, modifying them according to the boundary conditions (getting K' and f'), solving the displacement field q' as the result of the system of equations K'q=f', solving the stress field from q and visualize them. The above described steps can be easily performed using the LowLevelFEM package. Each step means a function with the appropriate parameters, while at any step it is possible to perform an arbitrary operation with the quantities calculated in the meantime. For example the strain energy can be solved as U=1/2q^T^Kq, for which the code is simply U=q'*K*q/2.(see Examples) -> LowLevelFEM.jl is developed by Balazs Pere. +{{badge LowLevelFEM}} +Solve linear-elasticity finite element problems with fine-grained, low-level control over mesh, assembly, boundary conditions, and visualization. It uses engineering approach, no need to know what is the** ** *weak form* . ## References @@ -30,4 +30,5 @@ From the README: * x ## Star History + {{star_history LowLevelFEM}} From 8f2af7722d8a54ad716b9d5260920f6ae367b103 Mon Sep 17 00:00:00 2001 From: perebalazs Date: Sun, 7 Sep 2025 00:09:36 +0200 Subject: [PATCH 3/3] add finite_element_method.md --- .../simulation/finite_element_method.md | 93 +++++++++++++++++++ .../comparisons/simulation/solid mechanics.md | 34 ------- docs/utils.jl | 1 + 3 files changed, 94 insertions(+), 34 deletions(-) create mode 100644 docs/comparisons/simulation/finite_element_method.md delete mode 100644 docs/comparisons/simulation/solid mechanics.md diff --git a/docs/comparisons/simulation/finite_element_method.md b/docs/comparisons/simulation/finite_element_method.md new file mode 100644 index 00000000..a4cd7651 --- /dev/null +++ b/docs/comparisons/simulation/finite_element_method.md @@ -0,0 +1,93 @@ ++++ +title = "Finite Element Method" ++++ + +# Finite Element Method + +\toc + +## Introduction + +In order to simulate the behavior of solid materials and structures under loads, one often relies on the [Finite Element Method (FEM)](https://en.wikipedia.org/wiki/Finite_element_method). FEM reformulates the governing equations of continuum mechanics (such as elasticity or structural dynamics) into a discretized system that can be solved numerically. While it is possible to implement FEM “by hand” using general-purpose linear algebra and differential equation tools in Julia, there are specialized packages that provide higher-level abstractions for FEM workflows. These dedicated packages make it easier to define meshes, boundary conditions, and material models, and are generally recommended when the goal is efficient and accurate structural analysis (as opposed to e.g. re-implementing the method for teaching or prototyping). + +## Packages + +Currently, this section contains only a single package. While it provides a transparent, low-level approach to finite element analysis that is useful for both education and research, there are other FEM-related Julia packages (such as Ferrite.jl or JuAFEM.jl) that could also be listed here. If you have experience with using any of these packages, please consider contributing a short comparison. A guide to help you through the process can be found [here](https://github.com/JuliaPackageComparisons/JuliaPackageComparisons.github.io/blob/main/docs/contributing.md#modify-existing-content). + +### LowLevelFEM.jl + +{{badge LowLevelFEM}} + +- **GitHub:** [github.com/perebalazs/LowLevelFEM.jl](https://github.com/perebalazs/LowLevelFEM.jl) +- **JuliaHub:** [LowLevelFEM](https://juliahub.com/ui/Packages/General/LowLevelFEM) +- **Documentation:** [perebalazs.github.io/LowLevelFEM.jl](https://perebalazs.github.io/LowLevelFEM.jl) + +#### Overview + +**LowLevelFEM.jl** is a finite element framework for **solid mechanics and heat conduction problems** written entirely in Julia. +It emphasizes a *transparent, low-level implementation* of the FEM, where mathematical details such as steps of the solution, operations with matrices, scalar, vector and tensor fields are explicitly visible. + +The package is well suited for: + +- **Education** — teaching FEM fundamentals in a clear, step-by-step way +- **Research** — prototyping new FEM formulations or numerical schemes +- **Applications** — solving small to moderately complex structural problems where full control and customizability are important + +#### Example + +```julia +using LowLevelFEM + +# `gmsh` is exported by LowLevelFEM +gmsh.initialize() +gmsh.open("your_model.geo") + +mat = material("body", E=2e5, ν=0.3) +prob = Problem([mat], type=:PlaneStress) # :Solid, :PlaneStrain, :AxiSymmetric, :HeatConduction, ... + +bc = displacementConstraint("supp", ux=0, uy=0) +force = load("load", fy=-1) + +q = solveDisplacement(prob, [force], [bc]) +S = solveStress(q) + +showDoFResults(q, :uvec) +showStressResults(S, :s) + +openPostProcessor() +gmsh.finalize() +``` + +Note: physical group names in your geometry (created in Gmsh) must match the strings used above (e.g., `"body"`, `"supp"`, `"load"`). + +An alternative solution (instead of `q = ...`, `S = ...`) + +```julia +K = stiffnessMatrix(prob) +f = loadVector(prob, [force]) +applyBoundaryConditions!(K, f, [bc]) +q = K \ f + +E = mat.E +ν = mat.ν + +A = (u ∘ ∇ + ∇ ∘ u) / 2 +I = unitTensor(A) +S = E / (1 + ν) * (A + ν / (1 - 2ν) * trace(A) * I) +``` + +A more detailed description of goals, features, and design principles can be found on the [JuliaHub package page](https://juliahub.com/ui/Packages/General/LowLevelFEM). + +## References + +* Discourse + * +* YouTube + * +* arXiv + * + +## Star History + +{{star_history LowLevelFEM}} + diff --git a/docs/comparisons/simulation/solid mechanics.md b/docs/comparisons/simulation/solid mechanics.md deleted file mode 100644 index 1f164132..00000000 --- a/docs/comparisons/simulation/solid mechanics.md +++ /dev/null @@ -1,34 +0,0 @@ -+++ -title = "Solid mechanics" -+++ - -# Solid mechanics - -\toc - -## Introduction - -Finite element method (FEM) is widespreadly used in engineering to simulate linear or non-linear elastisity, plasticity, dynamic problems, sbtability or modal analysis problems. There are many Julia packages uses FEM, but these packages differs from the commercial finite element softwares (like Ansys or Abaqus). - -## Packages - -x - -### LowLevelFEM.jl - -{{badge LowLevelFEM}} - -Solve linear-elasticity finite element problems with fine-grained, low-level control over mesh, assembly, boundary conditions, and visualization. It uses engineering approach, no need to know what is the** ** *weak form* . - -## References - -* Discourse - * x -* YouTube - * x -* arXiv - * x - -## Star History - -{{star_history LowLevelFEM}} diff --git a/docs/utils.jl b/docs/utils.jl index 58186d59..6de97446 100644 --- a/docs/utils.jl +++ b/docs/utils.jl @@ -147,6 +147,7 @@ const PKGINFOS = [ PkgInfo(pkgname="JLSO", username="invenia", branch="master", ), PkgInfo(pkgname="JDF", username="xiaodaigh", docslink=nothing), PkgInfo(pkgname="Serde", username="bhftbootcamp", branch="master"), + PkgInfo(pkgname="LowLevelFEM", username="perebalazs", branch="master", docslink="https://perebalazs.github.io/LowLevelFEM.jl/stable/", repolink="https://github.com/perebalazs/LowLevelFEM.jl"), # PkgInfo(pkgname="LopShelve", username="machkouroke", docslink="https://lopuniverse.me/LopShelve.jl/"), ]