Every time a ship rolls in heavy seas, an aircraft banks into a turn, or a rocket accelerates toward orbit, the liquid fuel inside its tanks does something violent and unpredictable. Engineers call it sloshing: the restless motion of a confined fluid that can slam against tank walls with enough force to compromise a structure, or trigger pressure fluctuations and unwanted phase changes in cryogenic propellants. Now a team of researchers has released an open-source software tool that promises to make this notoriously difficult problem far easier to tackle, allowing engineers to compute the natural sloshing frequencies of tanks of virtually any geometry on an ordinary workstation.
The tool, named LeClapotis, was developed by Bastien Lestang and Leo González and described in the journal SoftwareX. It is a MATLAB-based package that calculates the entire spectrum of natural frequencies at which liquid oscillates inside a tank, along with the corresponding mode shapes that describe how the free surface deforms. The name is a nod to the clapotis, the standing wave that forms when waves reflect off a vertical surface, and the software’s purpose is precisely to find those standing-wave patterns that a tank’s liquid wants to adopt when disturbed.
Why does this matter? Because resonance is the enemy of tank designers. When a vehicle’s acceleration profile excites the fluid far from its natural sloshing frequencies, simple linear approximations of the fluid behavior remain valid and designs can proceed with confidence. But when excitation frequencies approach resonance, nonlinear effects take over, including the formation of hydraulic jumps at low filling levels, and the consequences can be dramatic. Knowing where those natural frequencies lie is therefore the first and most important step in designing a tank that will not shake itself apart, and it is a question that spans the naval, aeronautical, and aerospace sectors alike.
Historically, engineers could only calculate sloshing frequencies analytically for the simplest tank shapes, and even then only by assuming the flow is inviscid and irrotational. For a vertical cylinder or a rectangular basin, closed-form solutions exist. For horizontal cylindrical tanks, the workhorse geometry of road tankers and many aerospace applications, the first antisymmetric mode was established decades ago using linear potential flow theory and later confirmed experimentally with water in cylindrical tanks across a wide range of aspect ratios and filling levels. But for anything more complex, analytical solutions become intractable, and engineers have had to fall back on expensive experimental campaigns or bespoke numerical simulations for each new geometry.
LeClapotis changes that equation. Its input is a finite element mesh, generated with the widely used open-source meshing tool Gmsh, representing the volume occupied by the liquid at rest. From there, the software solves the generalized eigenvalue problem that governs linear sloshing. The underlying physics is classical potential flow theory: the fluid velocity is expressed as the gradient of a scalar potential, incompressibility reduces this to the Laplace equation, and the free surface is subject to linearized kinematic and dynamic conditions that tie surface elevation to the pressure at the interface. Assuming harmonic solutions transforms the problem into an eigenvalue problem in which the eigenvalues yield the squared natural frequencies divided by gravity, and the eigenvectors describe the sloshing mode shapes.
The mathematical machinery is elegant in its economy. The researchers derive a weak variational formulation of the governing equations, prove that it is well posed using the Lax–Milgram theorem, and then discretize it with linear tetrahedral finite elements. The result is a matrix equation of the form KΦ equals ω² over g times MΦ, where K is a stiffness matrix assembled over the whole fluid volume and M is a mass matrix defined only on the free-surface triangles. That restriction of the mass matrix to the free surface is the source of a subtle computational difficulty: the global mass matrix is non-invertible, so standard eigenvalue solvers cannot be applied directly.
The developers solved this problem with a technique called static condensation. The system is partitioned into free-surface nodes and interior nodes, and the interior degrees of freedom are eliminated analytically by expressing the interior potential in terms of the surface potential. This produces a condensed stiffness matrix defined only on the free-surface nodes, restoring invertibility and allowing MATLAB’s sparse eigenvalue solver eigs to compute the modes of interest efficiently. Because the number of eigenvalues an engineer actually needs is tiny compared with the matrix dimension, which can exceed a thousand nodes for realistic meshes, this approach keeps the computation fast and memory-friendly.
The validation campaign is thorough. For a horizontal cylindrical tank, a configuration with no analytical solution, the computed frequencies for the first and third antisymmetric modes were compared against two independent semi-analytical methods from the literature across filling levels ranging from 11 to 95 percent. The maximum discrepancy was under two percent, with many cases agreeing to within one percent or better. Two separate experimental comparisons followed: one drawing on a doctoral campaign that measured the first transverse sloshing mode in a flat-capped cylinder, and another conducted at the Sloshing Lab of the Universidad Politécnica de Madrid during the European HASTA project on hydrogen aircraft, using a rounded-cap methacrylate cylinder. In both cases the numerical results tracked the measurements closely across the tested filling levels.
Beyond validation, the software demonstrates a capability of direct industrial value: quantifying how baffles shift a tank’s natural frequencies. Baffles are the primary weapon engineers use to suppress sloshing, because moving the natural frequencies away from a vehicle’s typical excitation frequencies avoids resonance altogether. The researchers tested a single baffle perpendicular to the tank axis and found that the longitudinal sloshing frequency drops noticeably, with the effect growing as the baffle height approaches the water level. They also tested multiple equally spaced disk baffles with an inner diameter of 90 percent of the tank bore and found that even two disks reduce the first mode’s frequency, though adding more disks beyond that yields diminishing returns.
LeClapotis is released under the Creative Commons Zero license, requires MATLAB R2025b or later, and ships with a ready-to-run example: a 14,471-node mesh of water in a vertical cylindrical tank two meters high and one meter in diameter. Computing the first eight sloshing frequencies and mode shapes for that case took just over twenty seconds on a mid-range laptop processor with 16 gigabytes of RAM, and the resulting frequencies are published as a benchmark so that users can verify their own installations. Compared with existing tools such as SLOSH-ML, which is limited to axisymmetric tanks under lateral excitation, LeClapotis handles arbitrary three-dimensional geometries and vertical excitation modes as well. For an industry racing to design hydrogen-powered aircraft and ever-larger liquefied gas carriers, a free tool that turns sloshing frequency prediction from a specialist bottleneck into a routine calculation may prove quietly revolutionary.
Subject of Research: A finite element software tool for computing natural sloshing frequencies in arbitrarily shaped liquid tanks
Article Title: LeClapotis : A numerical toolbox for calculating natural sloshing frequencies using the finite element method
Article References: LeClapotis : A numerical toolbox for calculating natural sloshing frequencies using the finite element method. (n.d.). https://doi.org/10.1016/j.softx.2026.103128
Image Credits: AI Generated
DOI: 10.1016/j.softx.2026.103128
Keywords: sloshing, finite element method, fuel tanks, natural frequencies, potential flow, eigenvalue problem, MATLAB, open-source software, aerospace engineering, naval engineering, baffles, hydrogen aircraft
News Source: Denise Maddox. (October 14, 2026). New Open-Source Toolbox Predicts Sloshing Frequencies in Fuel Tanks of Any Shape. Scienmag.



