# Representation of the magnetic field in 2D magnetostatics

Consider a magnetostatics problem in $$\mathbb{R}^3$$. The problem is governed by the following equations \begin{aligned}\text{Maxwell's equations}\quad &\begin{cases}\nabla\times H(x)=J(x)\\\nabla\cdot B(x)=0\end{cases}\\[3pt] \text{Constitutive relation}\quad &\begin{cases}B(x)=\mu(x)H(x)\end{cases}\\[3pt] \text{Boundary conditions}\quad &\begin{cases}\nu(x)\cdot(B(x^+)-B(x^-))=0\\\nu(x)\times (H(x^+)-H(x^-))=J_s(x)\end{cases}\end{aligned} where quantities like $$B(x^+)$$ and $$B(x^-)$$ denote one-sided limits at a boundary point $$x$$ and $$\nu(x)$$ is the normal at $$x$$.

Consider now an index set $$\mathcal{K}$$ and bounded Lipschitz domains $$\Omega_k\subset\mathbb{R}^2$$ with $$k\in\mathcal{K}$$. Let's assume that $$\mu(x)=\mu_k$$ and $$J(x)=J_k$$ for $$x\in\Omega_k\times\mathbb{R}$$ and $$\mu(x)=0$$ and $$J(x)=0$$ for $$x\in(\mathcal{A}\triangleq\overline{\bigcup_{k\in\mathcal{K}}\Omega_k}^c)\times\mathbb{R}$$. It's not hard to see that boundedness of the domains $$\Omega_k$$ implies that the magnetic field has finite energy per unit length in the last dimension (which I'll refer to as the z direction from now on). Using Maxwell's equations it can be shown that the z component of the magnetic field will be zero and considering the problem setup, the magnetic flux density can be written as $$B(x)=B_x(x_x,x_y)\,e_x+B_y(x_x,x_y)\,e_y$$, where $$e_x$$ and $$e_y$$ are unit vectors in x and y direction, respectively. Omitting the z component of $$B$$ it can now be seen that $$B(x_x,x_y)\in L(\mathbb{R}^2)^2$$.

Assuming sane surface currents $$J_s$$ (which are further assumed to have a z component only), it follows now from results about Hodge decompositions in [1] that $$B(x_x,x_y)=\nabla B_{\nabla}(x_x,x_y)+\text{Curl} B_{\times}(x_x,x_y),$$ where $$\text{Curl}\triangleq[\partial_y,-\partial_x]^T$$. Furthermore, the derivatives are strictly speaking only considered in a weak sense as the above result resorts to the use of Sobolev spaces. Also, in the equation above $$B$$ is assumed to be the restriction to either one of the $$\Omega_k$$ or $$\mathcal{A}$$ and the entire magnetic field is given by combination of all of these restrictions.

Next, note that assuming $$B_{\nabla}=0$$ is equivalent to writing $$B=\nabla\times A$$ with $$A=B_{\times}\,e_z$$. My experience with electromagnetism is very limited, but I realize that the magnetic flux density is often written in exactly this form, which leads me to my actual question:
Given the problem setup, is it fine to assume $$B_{\nabla}=0$$, meaning that there exists a function $$B_{\times}$$ (or a distribution for the sake of mathematical correctness) such that Maxwell's equations and the boundary conditions can still be satisfied?

[1] Dautray, 1990, Mathematical Analysis and Numerical Methods for Science and Technology: Volume 3 Spectral Theory and Applications

• I don't understand the full problem, but are you aware of the following fact: If a smooth vector field $B$ on a simply connected domain $\Omega\subset \mathbb{R}^3$ is divergence free, then it is always of the form $B=\nabla \times A$ for another smooth vector field $A$. This is just a reformulation of the fact the the $1$st deRham cohomology of such a domain $\Omega$ vanishes. Aug 19, 2021 at 14:18
• @JanBohr I'm not aware of this fact, but I'll look into that result. Sounds very promising. Aug 19, 2021 at 21:05
• Doesn't this question belong to the Physics forum? Aug 21, 2021 at 19:10
• @HandeBruijn indeed, I first posted this question at physics.stackexchange, but moved it then here. The reason for doing so is that even though the background of this question is very much related to physics, the actual question is - imho - not. My question boils down to how large we must choose a function/distribution space in order to ensure the existence of an element in that space which satisfies a set of partial differential equations and boundary conditions. Aug 22, 2021 at 13:54
• You can also try the physicsforums (it is another site not SE) Aug 23, 2021 at 14:09

If you take the divergence of the expression: $$B(x_x,x_y)=\nabla B_{\nabla}(x_x,x_y)+\text{Curl} B_{\times}(x_x,x_y),$$ You get $$\nabla \cdot B(x_x,x_y)=\nabla \cdot \nabla B_{\nabla}(x_x,x_y)+\nabla \cdot \text{Curl} B_{\times}(x_x,x_y),$$ where $$\nabla \cdot \text{Curl} B_{\times}(x_x,x_y)=0$$ by identity, unless we got a pathological case.

In order for Maxwell's equations to be fulfilled you need: $$\nabla \cdot B(x_x,x_y)=0$$ which, due to said identitiy, boils down to $$\nabla \cdot \nabla B_{\nabla}(x_x,x_y)=0$$ So, you still have the freedom to select any field $$B_{\nabla}(x_x,x_y)$$ as long as $$\nabla \cdot \nabla B_{\nabla}(x_x,x_y)=0$$ is fulfilled. For example $$\nabla B_{\nabla}(x_x,x_y)=(ax_y,bx_x,0)$$ would be such a field.

Any field such that $$\nabla \cdot \nabla B_{\nabla}(x_x,x_y)=0$$ would satisfy Maxwell's equations and also the required boundary conditions.

According to the Weak formulation section of:

https://en.wikipedia.org/wiki/Helmholtz_decomposition

we have that for a square-integrable vector field, if $$\Omega$$ is a bounded, simply-connected, Lipschitz domain, then

$$\nabla B_{\nabla}(x_x,x_y)=\nabla \varphi$$ where $$\varphi$$ is in the Sobolev space $$H^1(\Omega)$$ of square-integrable functions on $$\Omega$$ whose partial derivatives defined in the distribution sense are square integrable. (The convention here is to use a negative sign for $$\nabla \varphi$$ but it doesn't really matter.)

Roughly speaking the function spaces of the interior is related to the boundary conditions through various versions of Stokes' theorem depending on which formulation one uses. Such derivations become quite lengthy and tedious.

More Details:

Here I am changing to more common notation:

$$\nabla \times$$ instead of $$\text{Curl}$$

$$\mathbf{A}$$ instead of $$B_{\times}(x_x,x_y)$$

$$\varphi$$ instead or $$B_{\nabla}(x_x,x_y)$$.

A magnetostatics equation in 3D can be written as: $$\nabla \times (\mu^{-1}\nabla \times \mathbf{A} )=\mathbf{J}$$ where $$\mathbf{A}$$ is the magnetic vector potential.

(The 2D case is just the same with z-components zeroed out.)

To see this, start from $$\nabla \cdot \mathbf{B}=0$$ and use $$\mathbf{B}=\nabla \times \mathbf{A}$$ and $$\mathbf{H}=\mu^{-1} \mathbf{B}$$ as well as $$\nabla \times \mathbf{H}=\mathbf{J}$$

You can now cast this in the form of a variational, or rather, weak, equation by multiplying with a test function vector field $$\mathbf{G}$$ and integrate over space: $$\int_V \mathbf{G} \cdot \nabla \times (\mu^{-1}\nabla \times \mathbf{A} )dV=\int_V \mathbf{G} \cdot \mathbf{J} dV$$

Let's now focus on the trickier left-hand side and partially integrate (this is also how we get to the boundary conditions):

$$\int_V \mathbf{G} \cdot \nabla \times (\mu^{-1}\nabla \times \mathbf{A} )dV=$$ $$=\int_S \mathbf{G} \cdot \mathbf{n} \times (\mu^{-1}\nabla \times \mathbf{A} )dS-\int_V (\nabla \times \mathbf{G}) \cdot (\mu^{-1} \nabla \times \mathbf{A})dV=$$ $$=\int_S \mathbf{n} \cdot \mathbf{A} \times (\mu^{-1}\nabla \times \mathbf{G} )dS-\int_V (\nabla \times \mathbf{G}) \cdot (\mu^{-1} \nabla \times \mathbf{A})dV$$ where the last surface integral was cyclic-permuted to get the surface normal "on the outside".

This type of integral is used to link the function spaces in the volume to those on the surface for fields that are "smooth-enough" for practical applications.

Notice that the boundary condition relating the tangential surface current jump in $$\mathbf{H}=\mu^{-1}\nabla \times \mathbf{A}$$ occurs naturally in the first surface integral.

The normal continuity of $$\mathbf{B}$$ follows indirectly from the fact that we have assumed $$\mathbf{B}=\nabla \times \mathbf{A}$$, which means $$\nabla \cdot \mathbf{B}=0$$ in the domain, which means $$\mathbf{n} \cdot \mathbf{B}$$ on the boundary.

You then look at the integrability of $$\mathbf{A}$$, $$\mathbf{G}$$, $$\nabla \times \mathbf{G}$$, $$\nabla \times \mathbf{A}$$, and $$\mathbf{n} \times \nabla \times \mathbf{A}$$ and so on, which leads to the necessary Sobolev spaces. If $$\mu$$ is not constant then one needs to include conditions on that as well.

Note: The fact that we need integrability of the curls of the fields leads to different Sobolev spaces than, for example, in the case of Laplace's equation. The magnetostatics equation is quite different than Laplace's equation.

Now, notice that if we substitute:

$$\nabla \times \mathbf{A}+\nabla \varphi$$

in the strong form of the equation where we currently have

$$\nabla \times \mathbf{A}$$

the equation and the natural boundary conditions don't change due to

$$\nabla \times \nabla \varphi=0$$

Things are more subtle in the weak form since the gradient doesn't necessarily vanish due to the partial integration.

One needs to introduce quite a few different function spaces to handle all this. As far as I know the best references for theory related to this is for finite element theory. For some fundamental (and heavier) theory, with regards to this see: http://www.sam.math.ethz.ch/~hiptmair/Courses/CEM/HIP02.pdf

In particular, function spaces are covered in section 2.4 and each section has quite extensive "Bibliographical notes" which list work by many of the most reputable scientists in this area.

Also this one: https://arxiv.org/pdf/0809.0826.pdf which specific deals with Hodge decomposition of the trace space for 1-forms.

You might also find these interesting, on cohomology in electromagnetics: https://central.bac-lac.gc.ca/.item?id=TC-QMM-71965&op=pdf&app=Library&oclc_number=896881258 and https://www.maths.ed.ac.uk/~v1ranick/papers/grosskotiuga.pdf

• Thank you for your answer! Some comments: 1.) On multiple occasions you forgot to put a $\nabla$ in front of $B_{\nabla}$. You'll arrive at $\Delta B_{\nabla}=0$, but even so, I don't see how any of this is related to the boundary conditions. 2.) I don't consider Wikipedia as a credible source. The short section that you mention provides no proof or reference to a source. I spent hours to find a source (the textbook referred to in my question) which provides a rigorous result about the decomposition of the L2. Imo, there seems to be a myriad of references to the "well-known" Helmholtz... Aug 23, 2021 at 11:24
• ...decomposition and almost no proofs of the theorem which are both rigorous and don't make extremely strong assumptions on the boundary/functions. Aug 23, 2021 at 11:26
• @FelixCrazzolara Oops. I fixed the typos. I might be able to find some credible sources. Stay tuned. Aug 23, 2021 at 13:55
• @FelixCrazzolara Do you have any intuition for how flexible would you like the assumption on the boundary conditions to be? There is a tradeoff on applicability of such flexible assumption and level of abstraction. In general, you will see that the boundary conditions are fulfilled due to the type of partial integration performed when deriving the weak form of the equations. Aug 23, 2021 at 13:56
• @FelixCrazzolara this reference is very rigorous: sam.math.ethz.ch/~hiptmair/Courses/CEM/HIP02.pdf but I agree that it is very difficult to find good sources on this topic. I updated the answer accordingly. Aug 23, 2021 at 18:06