Fundamentals / Physics / Electrodynamics / Numerical field laboratory

Is a computed screening layer resolved?

Use a measured decay length to select a mesh, derive the exact discrete penetration constant and decide whether a discrepancy belongs to the physical screening law or the numerical grid.

Derive the screened field and state its range

A dilute sample adjacent to an electrode can often be approximated, for small applied potentials, by a relation \(\rho(x)=-\epsilon V(x)/\lambda^2\). It says that an excess positive potential attracts net negative charge. The parameter \(\lambda\) is independently calibrated for the ambient material. Combining this relation with Poisson's equation yields

\[V''=V/\lambda^2.\]

A plus sign is essential: the physical disturbance decays into the sample. Changing the sign would turn a decaying layer into an oscillatory boundary-value problem.

Set \(V(0)=V_s\) and \(V(L)=0\). Scale the voltage by \(V_s\), position by \(L\), and write \(g=L/\lambda\). The dimensionless problem is

\[-u''+g^2u=0,\ u(0)=1,\ u(1)=0.\]

The program solves for unit boundary voltage as a normalisation. For a dilute monovalent electrolyte at room temperature the linearised microscopic model requires the physical \(|V_s|\) to be small compared with \(k_BT/e\), roughly 26 mV. A computed unit-amplitude solution can represent a small physical voltage by multiplication. Applying 1 physical volt to the linearised electrolyte would generally exceed this assumption.

Solve the finite slab before taking the half-space limit

The general solution contains \(e^{gx}\) and \(e^{-gx}\). Impose the right voltage first, using \(\sinh[g(1-x)]\), then divide by \(\sinh g\) to set the left voltage. Thus \(u=\sinh[g(1-x)]/\sinh g\). For \(g=0\) take the limit to get \(u=1-x\). For a thick slab and fixed physical distance from the left, use \(e^{-gx}(1-e^{-2g(1-x)})/(1-e^{-2g})\). Close to the right wall the subtracted exponential is needed to satisfy grounding. In the interior many screening lengths away, even a big relative error can correspond to a negligible physical voltage.

At \(g=4\), the midpoint voltage fraction is \(1/(2\cosh 2)\simeq0.1329\). The half-space estimate is

\[e^{-2}=0.1353.\]

A sample only four screening lengths across is already close to the half-space answer at its middle, though its right edge still has exactly zero voltage rather than \(e^{-4}\). Determine where your instrument can distinguish the profiles before treating one as a better physical model.

Obtain the grid behaviour without running a solver

With grid spacing \(h=1/n\), the interior stencil is

\[-u_{i-1}+(2+g^2h^2)u_i-u_{i+1}=0.\]

Try a geometric progression \(u_i=e^{-\gamma_h i h}\). Divide through by the trial value. The sum of its neighbours gives

\[2\cosh(\gamma_h h)=2+(gh)^2.\]

Since \(\cosh(2z)=1+2\sinh^2z\), the effective decay constant is

\[\gamma_h=\frac{2}{h}\operatorname{asinh}(gh/2)=g-\frac{g^3h^2}{24}+O(g^5h^4).\]

Thus the numerical layer is slightly too broad for a coarse mesh. The relevant resolution is \(gh=h/\lambda\) in consistent units, not the cell count alone. Keeping \(n\) fixed while increasing \(g\) makes a visually unchanged mesh physically coarser. The finite-slab grid reference follows by replacing \(g\) with \(\gamma_h\) in the hyperbolic-sine ratio at the nodes.

Separate the physical and computational experiments

The browser solves the tridiagonal boundary equations by forward elimination and backward substitution. The downloadable OneSimulation model supplies an absorption term \(g^2u\) and the same two Dirichlet values. For \(g=2,\ n=16\), the potential fraction at \(x=0.1875\) is about 0.67311 on the grid and 0.67297 in the continuum. Reverse the grid spacing in the analytical expression for \(\gamma_h\) and independently predict whether doubling the number of cells raises or lowers the estimate there.

A typical measurement infers a length from the logarithmic slope,

\[1/\lambda_{\rm fit}=-d\log V/dx.\]

For two nearby positive voltages use the difference of their logarithms divided by probe separation. As \(V\) approaches the instrument floor, small absolute noise has a large effect on this ratio. At the grounded right wall the logarithm does not exist. Exclude that point and justify the usable region using both boundary physics and noise. Refining the field mesh cannot improve a voltage measurement below its resolution.

Tutorial

A grid has 16 cells and \(g=16\). Predict the fractional error in the effective decay rate, using the exact discrete expression rather than only the expansion.

Work through the solution

Here \(gh=1\), so

\[\gamma_h/g=2\operatorname{asinh}(0.5)\simeq0.9624.\]

The numerical decay is slow by about 3.76%. The quadratic estimate gives 4.17%, reasonable but visibly imperfect at one cell per screening length.

For a desired relative decay-rate error below 0.1%, estimate the largest acceptable \(gh\) in the small-step regime.

Work through the solution

The leading relative error is \((gh)^2/24\). Requiring it below 0.001 gives \(gh<0.155\), approximately 6.5 cells per screening length. This condition concerns the exponential rate. The derivative at the electrode may need a separate boundary stencil and its own check.

A calibration reports a longer decay length as electrode voltage increases, even after mesh refinement. Can the numerical dispersion formula alone explain this trend?

Work through the solution

In the linear model the normalised profile is independent of the voltage amplitude. The discretisation error depends on \(g\) and the mesh. At fixed \(g,n\) it cannot create an amplitude-dependent normalised length. Recheck the linear-response regime, electrode boundary condition and instrument response before fitting a new \(\lambda\).