I am attempting to numerically solve a BVP for a solid core solenoid field. I am starting with:
$\vec{\nabla{}^2}\vec{A_r}=0$
$\vec{\nabla{}^2}\vec{A_\phi}=\frac{\mu}{\mu_0}\vec{J_\phi}$
$\vec{\nabla{}^2}\vec{A_z}=0$
in cylindrical coordinates where the current $J$ is traveling along a cylindrical surface in the $\phi$ direction. I am assuming that the current has been turned on for a time $t>>t_0$ so we ignore any hysteresis affects of ferromagnetic materials that produce non-linearity. So focusing on just the $\phi$ component, the $\mu$ is a function of space since we assume that the solid core of the solenoid is a cylinder of radius $R$ and length $L$. I can imagine then that $\mu(r,z)$ can be written in one of two ways:
$\mu(r,z) = \mu_sH(L-|z|)H(R-r) + \mu_0H(|z|-L)H(r-R)$
$\mu(r,z) = \left\{ \begin{array}{lr} \mu_s, & \text{if } r < R \text{ or } |z|<L\\ \mu_0, & \text{if } r > R \text{ or } |z|>L \end{array} \right\}$
Regardless of the way this can be written, although I would prefer to use the first method as that would be easier to implement within code, I notice that there is a discontinuity occurring. We know the magnetic field lines must be continuous across the boundary that describes the metal core and the vacuum around it. I saw on the wiki article for Heaviside that at $H(0)$ it looks like it's value becomes $0.5$. However, this still doesn't suffice continuity. Neither would implementing an extra parameter in the piecewise for $r = R \text{ or } |z|=L $. The only idea I had was using the analytic approximation for the Heaviside since that is continuous while taking $k\rightarrow\infty$. However, it still changes value over a finite domain and so it doesn't represent the reality of the system in which essentially the material's surface and vacuum are creating. How then can I create a $\mu$ function that forces continuity and is properly describing physical reality?
Your magnetic ``constant" $\mu$ is specified wrongly. And your cylinder is length $2L$ if you have been using $|z|<L$ as the condition. I would suggest that you have $\mu = \mu_0 + (\mu_s-\mu_0)H(R-r)H(L-|z|)$ instead, because the specification of the conditions becomes much easier for you.
– naturallyInconsistent Apr 13 '23 at 06:56