Skip to content

Tutorials

Every tutorial is one complete script that ends by checking its own answer against a reference: an exact solution, a published benchmark or a conserved quantity. The page explains the idea; the script is shown in full at the bottom and can be downloaded.

New to jNO? Start with First steps: the same Poisson problem solved by finite elements, finite differences, finite volumes and a PINN, plus one problem each for RCWA and PEEC.

First steps

  • Laplace 1-D · PINN

    The smallest complete example: a network with a hard boundary ansatz.

  • Poisson 2-D, four ways · FEM · FDM · FVM · spectral

    One problem by finite elements, differences, volumes and a spectral method: second order against geometric.

  • Transient heat · FDM

    A time derivative in the term list turns the solve into a march.

  • Mixed boundary conditions · FDM

    Dirichlet, Neumann and Robin conditions on one problem.

  • Binary grating · RCWA

    Where the diffraction orders go, from the Helmholtz term list.

  • Two-wire loop · PEEC

    Resistance and inductance of a conductor, with no air meshed.

Fluids

  • Lid-driven cavity · FEM

    Transient, nonlinear Navier–Stokes from rest to steady recirculation.

  • Cylinder, DFG 2D-1 · FEM

    Drag and lift against the published benchmark values.

  • Vortex shedding, DFG 2D-2 · FEM

    A von Kármán street at Re = 100 and its Strouhal number.

  • Stabilised P1/P1 flow · FEM

    Equal-order velocity and pressure with SUPG and PSPG as two terms.

  • Cavity to Re = 5000 · FEM

    Continuation in the Reynolds number, checked against Ghia et al.

  • Equal-order flow in 3-D · FEM

    Where the stabilised pair pays for itself.

  • Stokes past a sphere · FEM

    Creeping flow in a CSG duct; the drag as a reaction.

  • Channel at a prescribed flow rate · FEM

    The inlet pressure that delivers a set flow rate, as a constant unknown.

  • LES subgrid models · FEM

    An eddy viscosity inside a real 3-D solve.

  • Rayleigh–Bénard convection · FEM

    A layer heated from below rolls into convection cells.

  • Advection–diffusion · FVM

    Numerical fluxes and limiters on a boundary layer.

  • Burgers shock · FVM

    An inviscid shock marched with an SSP Runge–Kutta scheme.

  • Sod shock tube · FVM

    The Euler equations as the flux of a vector unknown.

  • Lid-driven cavity · FVM

    Incompressible flow by finite volumes, against Ghia et al.

  • 2-D turbulence · spectral

    Decaying turbulence at 384²: filaments cascade to small scales while vortices merge into large ones.

  • Kelvin–Helmholtz in a channel · spectral

    A shear layer rolls up into two vortices that pair, on Fourier × Chebyshev modes between two walls.

  • Mach 3 step · FVM

    A bow shock forms in front of a step, reflects and grows a Mach stem, from the Euler equations.

  • Leapfrogging vortex rings · spectral

    Two vortex rings pass through each other twice: 3-D Navier–Stokes, checked against Saffman's ring speed.

  • Taylor–Green vortex · spectral

    A smooth 3-D vortex array rolls up into tangled vortex tubes at Re 400; the energy budget closes to 3e-7.

  • Blood flow in an aneurysm · FEM

    Pulsatile flow through an artery with a saccular aneurysm: the vortex in the sac and the wall shear on the dome.

  • Rayleigh–Taylor in 3-D · spectral

    Heavy fluid over light: falling columns roll up into mushroom caps; checked against the linear growth rate.

  • A buoyant plume in 3-D · spectral

    A heated disc in still air launches a plume that rises, necks and rolls up into a mushroom head.

Solids and fracture

  • Crane hook · FEM

    A 3-D hook loaded in its bend: von Mises stress against curved-beam theory.

  • Ringing bridge · FEM

    An arch bridge meshed in gmsh and imported: its modes, and its ringing after a release.

  • Brittle fracture · FEM

    A notched plate with holes, pulled until the crack crosses it (fourth-order phase field).

  • Phase-field fracture, SENT · FEM

    A notched specimen pulled until the crack has crossed it; the whole study as a term list.

  • Plate with a hole past yield · FEM

    J2 plasticity: plastic bands grow from the hole, residual stress after unloading, Kirsch check.

  • Inflating a rubber balloon · FEM

    A Neo-Hookean balloon inflated through its pressure maximum, against the exact thick sphere.

  • A tuning fork · FEM

    A steel fork's modes from a 3-D eigenproblem: the 440 Hz fundamental against beam theory.

Waves and electromagnetics

  • Vibrating membrane · FEM

    The wave equation, second order in time.

  • Helmholtz with a PML · FEM

    A radiating source and an absorbing layer, in complex arithmetic.

  • Time-harmonic Maxwell · FEM

    A complex vector electric field in the plane.

  • Busbar pair at frequency · PEEC

    Skin and proximity effect across a frequency sweep.

  • Cored transformer · PEEC

    An open secondary and a lossy magnetic core.

  • Halbach magnets · FEM

    A ring of permanent magnets: its field lines, and the bore field against the ideal Halbach cylinder.

  • Schrödinger double slit · spectral

    A wave packet through two slits: phase as hue, fringes spaced by λL/d.

  • Sound pulse in a two-layer room · spectral elements

    A 3-D pulse on Q5 hexahedra with GLL quadrature: reflection and refraction at a layer, against the exact spherical wave.

  • The hydrogen atom · FEM

    Orbitals from a 3-D finite-element eigenproblem, energies against −1/(2n²).

  • Radar waves and an aircraft · FEM

    Radar waves scatter off a jet; a coating designed through the FEM solve cuts the nose-on echo by about 20 dB.

  • A radar absorber cell · RCWA

    The Salisbury absorber as an RCWA problem, and a patterned sheet optimised over a band and angles.

Multiphysics and coupling

  • Thermal barrier coating · FEM

    A thin coating and a thick substrate on two meshes, tied in one solve.

  • Droplets merging · FEM

    Diffuse-interface flow: Cahn–Hilliard coupled to Navier–Stokes.

  • Droplets coalescing · FEM

    A sharp interface on a moving mesh that changes topology.

  • Laser melt pool · FEM

    Melting, thermal stress and the distortion left behind.

  • Rocket nozzle wall · FVM + FEM

    Axisymmetric gas flow heating and loading a solid wall.

  • Hot gas in a vessel · FVM + FEM

    A gas cooling into a thick wall through three interface conditions.

  • Bimetallic strip · FEM

    Two bonded metals expand unequally: a heated strip curls, its tip within 0.6 % of Timoshenko.

  • Conjugate heat sink · FEM

    Air past a heated finned sink: Navier–Stokes in the air, conduction in the metal, one temperature.

  • Joule-heated fuse · FEM

    A copper strip heats itself with its own current until the neck melts.

  • Footing consolidation · FEM

    A footing presses wet soil: the pore pressure jumps, then drains while the ground settles (Terzaghi).

  • Piezoelectric bimorph · FEM

    Two oppositely poled ceramic layers bend a cantilever as the voltage swings.

  • Electro-osmosis · FEM

    Charged walls drive a flow through a 5 % Debye layer; opposite patches turn it back in recirculation cells.

  • A ship in ocean waves · FEM · coupling

    A free-floating ship in oblique waves on a 500 m sea: its reflection, shadow and radiated rings, and the deck stress.

  • Thermal-shock cracking · FEM

    A quenched slab: many short cracks stop, a few run deep (phase field and heat).

  • Microwave oven · FEM

    A 2.45 GHz field heats a lossy load; a hot spot runs away and detunes the field.

  • Melting gallium · FEM

    An enthalpy model of melting, checked against the exact two-phase Stefan solution.

  • Heated shaft on a bolted flange · FEM · CAD

    A NIST CAD part from a STEP file: the shaft heats, the bolted flange holds it, the thermal stress follows.

  • Induction heating · FEM

    A 10 kHz coil heats a steel billet from the surface inward; checked against the exact Bessel skin effect.

Inverse problems and design

Machine learning

  • Variable-coefficient Poisson · PINN

    A conductivity that jumps fivefold along a diagonal, a second scale and a ridge in the solution.

  • Allen–Cahn · PINN

    A DeepONet learns a shrinking front three hundredths wide.

  • Viscous Burgers · PINN

    The shock on the x–t plane: fixed, RAD, RAR-D and R3 collocation points compared as they gather at the shock.

  • Fredholm integral equation · PINN

    The unknown inside and outside an integral.

  • Fokker–Planck · PINN

    A stationary density under drift and diffusion.

  • Gradient and sensitivity analysis · PINN

    Gradient conflict, alignment and the NTK spectrum, read from jNO's training callbacks.

  • Optimizer comparison · PINN

    Adam, SOAP, SS-ESOAP and SSBroyden on one hard PINN, same start and budget: error and time.

  • Variational PINN · PINN + FEM

    A network trial against the finite-element test space.

  • An H⁻¹ residual loss · PINN

    One changed line: the residual measured in a weaker norm.

  • Deep Ritz · PINN

    Solve by minimising an energy functional.

  • Operator learning · overview

    Learning a solution operator from physics or from data.

  • DeepONet · operator

    A parametric Poisson family from the residual alone.

  • FNO · operator

    A Fourier neural operator supervised on solution data.

  • A learned time-stepper · operator

    An FNO that advances Burgers by one step, rolled out 160 steps against the solver.

  • A neural material law · FEM

    An input-convex network learns a rubber's strain energy from one stretched plate, then replaces the true law in new solves.

  • Bayesian PINNs · overview

    Posterior sampling for PINNs, and how to read a chain.

  • Bayesian inverse coefficient · Bayesian

    A coefficient with its uncertainty.

  • Bayesian PINN in 2-D · Bayesian

    Noisy sensors on half the square: where the posterior is sure and where it is not, with a calibration check.

  • Flow matching · generative

    Gaussian noise flows into a two-arm spiral galaxy along a learned velocity field.

  • Flow matching of turbulence · generative

    A U-Net trained on jno.spectral vorticity fields turns noise into turbulence.

Meshes and solvers