Build the problem from what is continuous
Two very large parallel plates are separated by \(L=1\) m. Set their potentials to 0 and 1 V. Edge effects are negligible in the observation region. The relative permittivity of the material varies as \(\epsilon_r(x)=1+g x/L\), where \(g\ge0\). There is no free volume charge. A common first guess is a linear potential between the plates, because the boundary voltages impose an average field. Test that guess using the local field law.
For a thin pillbox whose faces are perpendicular to \(x\), zero enclosed free charge means equal normal displacement at both faces. Let \(D_*>0\) denote the magnitude of the constant displacement. Since potential increases with \(x\), the electric field points towards negative \(x\) and \(D_x=-D_*\). Hence \(V'=D_*/[\epsilon_0(1+g x/L)]\). Regions of low permittivity must sustain a larger electric field and account for a larger voltage drop per metre. We have a local constraint before solving a single matrix equation.
Obtain the voltage and both expressions for capacitance
Integrate \(V'\) from left to right and impose \(V(L)-V(0)=\Delta V\). For \(g>0\) this gives
As \(g\) approaches zero, both expressions have removable singularities. Since \(\log(1+g)=g-g^2/2+O(g^3)\), the effective relative permittivity approaches \(1+g/2+O(g^2)\). An arithmetic average can therefore look convincing at very small gradients despite having the wrong general derivation. For computation near zero, use a logarithm specifically evaluated as \(\log(1+g)\) with a small-argument routine such as log1p.
Check the result through stored energy. Each volume element contributes \(\epsilon E^2/2\), so
Substituting the voltage relation gives
The same capacitance follows from \(C/A=2U/(A\Delta V^2)\). This equality requires a linear, lossless dielectric and a reversible charging path. A material whose permittivity changes with field needs the corresponding integral over the constitutive curve.
Work one case numerically before assembling the grid
At \(g=3\), the material goes from relative permittivity 1 to 4. The effective value is \(3/\log4\simeq2.1640\), smaller than the arithmetic mean 2.5. The midplane voltage is \(\log2.5/\log4\simeq0.6610\) V, not 0.5 V. The electric field at the left is four times as large as at the right. A measurement of the midpoint voltage alone is enough to reject a uniform-field model if the plates and material are well characterised.
As a dimensional check, \(C/A\simeq19.16\) pF/m² for \(L=1\) m. For a geometrically similar layer one millimetre thick the same effective permittivity gives \(19.16\) nF/m². The voltage profile versus \(x/L\) stays fixed when \(g\) and the plate voltages stay fixed, while the field and free surface charge increase in inverse proportion to separation.
Assemble by balancing fluxes before dividing by a coefficient
Divide the gap into \(n\) cells. Across cell \(i\) approximate the displacement magnitude by \(D_i=\epsilon_{i+1/2}(V_{i+1}-V_i)/h\). Enforcing \(D_i=D_{i-1}\) at each internal node gives a tridiagonal linear system. An independent route views each cell as a capacitor with inverse capacitance per area \(h/\epsilon_{i+1/2}\). These series contributions add, giving \(D_*^{(h)}=\Delta V/\sum h/\epsilon_{i+1/2}\). Cumulative sums of the same drops then recover the entire grid potential. Both routes implement identical physics and the same discrete constitutive assumption.
The browser uses this cumulative series construction. The OneSimulation input instead supplies the spatial coefficient \(1+gx/L\), zero source and the two exterior potential values to the coefficient-form PDE solver. Their agreement checks assembly against a distinct algorithm. In this example the integral of inverse permittivity also tells us what the midpoint discretisation approximates. Since \(1/(1+gx/L)\) is convex, midpoint quadrature underestimates its integral and therefore overestimates capacitance. This predicts the bias before looking at a convergence table.
Compare a local field measurement with an integral quantity
In the experiment, plot \(V\) across the dielectric and record the effective relative permittivity. At \(g=2\), \(n=16\), the computed potential at \(x=0.1875\) m is about 0.28974 V; the analytical reference is about 0.28987 V. The potential there is low while the computed capacitance is high. A voltage error at an arbitrary coordinate need not share the sign of the error in an integral quantity.
Now estimate the left electric field from the first-cell drop and from the analytical derivative at \(x=0\). The first-cell drop divided by \(h\) is an average across that cell, representing its midpoint to second order for a smooth field. Interpreting it as a value exactly at the wall introduces an \(O(h)\) offset. Label sample positions when comparing a derivative against an analytic curve. The grid solution can converge quadratically in voltage while a carelessly placed flux diagnostic appears first order.
Tutorial
The gradient is reversed so \(\epsilon_r=1+g(1-x/L)\), but the plates remain at the same voltages. Which earlier observations change?
Work through the solution
The integral of inverse permittivity is invariant under \(x\mapsto L-x\), so the capacitance and stored energy stay the same. The new potential obeys \(V_{\rm rev}(x)=\Delta V-V(L-x)\). The largest field is now at the right wall, and the midpoint voltage at \(g=3\) falls from about 0.661 to 0.339 V.
A sensor measures an apparently linear voltage profile and \(C/A\) greater than the vacuum value. Is the inferred dielectric necessarily uniform?
Work through the solution
Under the one-dimensional, source-free and linear assumptions, exactly constant nonzero field and constant normal displacement require constant permittivity. A sparse set of voltage probes may simply undersample a graded profile. Lateral variation, free volume charge or uncertain boundary voltages would break the inference.
Derive bounds on the effective permittivity if only its material range \(\epsilon_{\min}\) to \(\epsilon_{\max}\) is trusted.
Work through the solution
Integrate \(1/\epsilon_{\max}\le1/\epsilon(x)\le1/\epsilon_{\min}\), multiply by \(1/L\), and invert the positive quantities. The effective value lies between these two limits. A simulation reporting an effective permittivity outside that interval in this passive one-dimensional model fails this check regardless of mesh resolution.