Skip to content

Short tutorials: Poisson, dielectric plate and cantilever vibration - #9

Merged
jmartfrut merged 3 commits into
mainfrom
short-tutorials-2
Dec 4, 2026
Merged

jmartfrut merged 3 commits into
mainfrom
short-tutorials-2

Conversation

@jmartfrut

Copy link
Copy Markdown
Member

Three more short tutorials, in learning order around the hyperelastic bar of #8:

  1. Poisson equation (from E01): mesh, tags, boundary conditions, spaces, StaticLinearModel, VTK output;
    checked against the exact solution (relative L2 error 3e-3).
  2. Stretching a hyperelastic bar (Short tutorials for learning HyperFEM: structure and the hyperelastic bar #8).
  3. Bending a dielectric plate with a voltage (from E04): two fields, a coupled model, a voltage that grows with
    the load; the deflection follows the V² law at small voltages (ratio 4.01 when the voltage doubles). Cartesian
    mesh instead of the Gmsh one (same final deflection as E04 to 5 digits).
  4. Free vibration of a cantilever (from E15): TransientModel, Newmark, TimeStepping; the period is within
    0.4 % of beam theory.

All four write their weak forms as integrals in the code, each matching a formula of the text (the bar
tutorial is changed to do so too): the energy model only gives Ψ and its derivatives. The results are identical
to those with HyperFEM's residual/jacobian, and the compiled backend compiles the same kernels.

Each has a sketch and a result figure (SVG, white background) and one final check; 100–129 lines, 30–49 of code,
17–40 s each including compilation. The figures, the README and the docs list the four in order.

Checks: Pkg.test of the tutorials group with --depwarn=error; each tutorial and each "Try it yourself"
variant run once; docs build OK. Light review: fixed the figures on the dark theme, a double assembly in Poisson
(Assembly=false, as in E01), names of the voltage and of the initial velocity, and wording.

Three more short tutorials, in learning order around the hyperelastic bar: the Poisson equation (first), a
dielectric plate bent by a voltage and the free vibration of a cantilever, each with a sketch and a result
figure (SVG) and one check. The tables of the README and the docs list the four in order.
White background in the figures (readable on the dark theme); Poisson solves with the factorisation of the
model (Assembly=false); consistent names for the voltage and the initial velocity; clearer figure of the
cantilever and wording of the plate curve.
The bar, the plate and the cantilever write their residual and tangent as integrals of the derivatives of the
energy, each integral matching a formula of "The problem", instead of the residual and jacobian helpers of
HyperFEM. The results are the same to the last bit, and the compiled backend compiles the same kernels.
@jmartfrut
jmartfrut merged commit e3cefd4 into main Dec 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant