Validation/Electrostatics
Electrostatic plates
The product’s own staged Electrostatics case, measured against the parallel-plate closed form — and the demonstration that the potential field cannot see the permittivity at all.
Why this case
The electrostatics family that runs on OpenFOAM had no reference of any kind behind it. Its solver-reference entry lists one solver, electrostaticFoam, with three outputs marked as built and nothing standing behind them.
This page is not the parallel-plate capacitor again, and the distinction matters enough to state it before any number. That case runs on Elmer, through StatElecSolve. This one runs on OpenFOAM, through electrostaticFoam. The deck writer, the mesher, the solver and the field reader are four separate pieces of code in the two cases, and they share none of themselves. Agreement in one says nothing about the other.
The second difference is what is being measured. The Elmer case is a bar meshed for the benchmark. This one is the case the product itself stages, taken exactly as --analysis=Electrostatics --dump-case writes it, with two output-control tokens changed for the reason set out below and nothing else touched. Every number in the reference is arithmetic on that deck’s own inputs, read back out of the staged dictionaries rather than typed into the harness.
| Physics | Electrostatic, no free charge — Laplace’s equation in φ |
|---|---|
| Solver | OpenFOAM electrostaticFoam, on the product’s own staged case |
| Domain | A hex block 1 × 0.8 × 0.4 m at 40 × 32 × 16 cells — 20 480 cells |
| Applied | anode at x = 0 held at 1000 V, cathode at x = 1 m held at 0 V |
| Sides | Every other face zero-gradient in φ; ρ = 0 everywhere |
| Permittivity | ε₀ = 8.85418782 × 10⁻¹² F/m, as the deck writes it |
| Reference | Parallel-plate electrostatics: a linear potential, a uniform field V/d, and the closed-form capacitance |
| Agreement | Capacitance 2.8333401068 pF against ε₀A/d = 2.8333401001 pF, +2.4 × 10⁻⁷ % |
| Last run | 2026-08-28 |
The closed form, and what the deck makes of it
Two whole opposite faces of a block held at fixed potentials, every other face zero-gradient, and no free charge anywhere. That is a parallel-plate capacitor with the gap entirely filled, so:
phi(x) = V (1 - x/d) E = V/d C = epsilon0 A / d
with V = 1000 V, d = 1 m and A = 0.8 × 0.4 = 0.32 m². The solver-reference table cites the charged-wire tutorial as this family’s OpenFOAM example. The charged wire is not what the product stages, and a reference has to match what is run, so it is not the reference here.
| Quantity | Value |
|---|---|
| E = V/d | 1000 V/m exactly |
| Plate area A | 0.32 m² |
| Gap d | 1.0 m |
| C = ε₀A/d | 2.8333401000960 × 10⁻¹² F |
| ε₀ used for the reference | 8.8541878128 × 10⁻¹² F/m (CODATA) |
| ε₀ in the staged deck | 8.85418782 × 10⁻¹² F/m |
Two defects in the staged case, found by running it
Neither is judged as a measurement, and neither can change an answer. They are recorded because they are why the harness has to touch the deck at all, and because they are product findings rather than harness ones.
- The staged case writes no solution. Its
controlDictcarries an end time of 1 with a write interval of 100. The first write time is a hundred times the end of the run.electrostaticFoamexecutes all 1000 iterations, converges, prints End, and leaves behind exactly one time directory — the initial condition. There is nothing to post-process and nothing to look at. - All three probes are outside the mesh. The probe function object samples z = −1.8, −4.05 and −6.3 in a domain whose z runs from 0 to 0.4 m. Every one is skipped and the function object produces nothing at all.
So the harness edits exactly two tokens of the control dictionary — the write interval from 100 to 1, and the write format from binary to ascii — and records both edits in the JSON it writes. Both are output controls, read after the equations are solved, and neither is capable of moving a number below.
Result
| Quantity | Measured | Closed form | Difference |
|---|---|---|---|
| E along the gap | 1000.0000016 V/m | 1000 V/m | +1.6 × 10⁻⁷ % |
| Capacitance | 2.8333401068 × 10⁻¹² F | 2.8333401001 × 10⁻¹² F | +2.4 × 10⁻⁷ % |
| φ against V(1 − x/d) | 1.53 × 10⁻⁵ % RMS of V | — | — |
| E spread, plane to plane | 6.47 × 10⁻⁷ | 0 | — |
| φ spread across a plane | 1.01 × 10⁻⁶ of V | 0 | — |
| Interior range of φ | 0.975 of V | — | — |
| Largest free charge density | 0.0 | 0 | — |
The interior range is in that table because the initial condition is a uniform zero and a solve that never moved off it would still print End and exit cleanly. Spanning 0.975 of the applied voltage is what forty cells can span between two plates; a run whose field never moved would read 0.
The potential cannot see the permittivity
The agreement in the first row of that table is nearly free, and this page would be overclaiming if it led with it.
Something similar, for a different reason, is true of φ’s agreement with V(1 − x/d). The exact answer here is linear, and a linear function sits inside the finite-volume space exactly, at any mesh density. Eight figures is what any consistent scheme returns on this problem however coarse the mesh. So the φ RMS is reported last on this page, and its band in the judge is set five orders of magnitude looser than the measurement, deliberately.
The shape checks, and the fixture that breaks them
Because the field strength is weak evidence, the case is built on whether the field is the shape the reference describes: uniform along the gap, and constant across it. Both are independent of the value of E, so they survive a wrong voltage or a wrong gap and they fail on a field that is not parallel-plate at all.
The grounded-walls fixture is that failure, and it is a one-token change to the potential field’s boundary file: the side walls held at 0 V instead of zero-gradient. That turns the problem into a three-dimensional grounded box, for which E = V/d is simply not the answer.
| Quantity | Healthy | Walls grounded |
|---|---|---|
| φ spread across a plane | 1.01 × 10⁻⁶ of V | 0.723 of V |
| E | 1000.0000016 V/m | 822.536 V/m — −17.75 % |
| E spread, plane to plane | 6.47 × 10⁻⁷ | 10.518 |
| Capacitance vs ε₀A/d | +2.4 × 10⁻⁷ % | −17.75 % |
| φ RMS vs V(1 − x/d) | 1.53 × 10⁻⁵ % | 46.86 % |
| φ checksum | 98ede686… | d31aa94c… |
What this page does not establish
- There is one mesh. Everything on this page is 20 480 cells. There is no refinement study, and on this problem there could not usefully be one: the answer is linear, so it is represented exactly at every density and there is nothing for refinement to improve. That is a statement about the problem, not a result about the solver.
- The zero-charge check has never been demonstrated to fire. The largest free charge density is exactly 0.0 on every fixture in this case, so the band around it can only be pushed negative. That shows the comparison is wired to the right quantity and shows nothing whatever about its sensitivity. It is not counted as coverage.
- No fringing is measured. Two entire opposite faces are held at potential and the gap is filled, which makes this a one-dimensional problem with no edge for a field to bulge around — not an approximation to a pair of finite plates in space. Reading the agreement as “fringing is negligible” would be crediting the right answer to the wrong cause.
- Nothing here is a statement about the Elmer electrostatics path. The two cases share no code. The parallel-plate capacitor covers that one, and arrives at the same conclusion about permittivity by an entirely separate route.
Repeat this yourself
Every case here is set up from the worked examples in the product, with no hand-editing of solver files — so you can run it, and get the same numbers. The free tier runs real cases up to 250,000 cells of fluids, or 100,000 nodes of solid, with no account needed to download and no time limit.
Other cases
- Parallel-plate capacitorA closed form with no experimental uncertainty in it, so the agreement is either exact or it is a defect.
- DC conduction through a barThe potential in this problem does not depend on the conductivity at all, so a deck that lost it entirely would still give a perfect voltage field. The derived fields are the measurement.
- Uniformly magnetised sphereA uniform field inside and an exact point dipole outside, over four meshes and two box sizes — and two magnetic defects, neither of them fixed, that bound what the case can claim.
All validation cases · Written by the team building SHD Sim.