Consider a thin film with a perpendicular applied magnetic field Ha in z-axis. The nonlocal relation between Ha, the self-field Hself (generated by the eddy current J) and the local magnetic flux density Bz is given by :$$B_z = \mu(H_\text{self} + H_a)\quad (1)\\H_\text{self} = \frac{1}{4\pi} \int \frac{J(r')(r-r)}{(r-r')^2} dr$$that is Biot-Savarts law in 2D with $r=(x,y)$.One defines the local magnetization $m$ as : $J = \nabla\times m$.As the Biot-Savart's law becomes highly singular when $r = r'$, one uses the Fourier transform. In fact, by inverting (1), one obtains$$m = 2\mathcal{F}^{-1}[ k^{-1} \mathcal{F}(\mu B_z  H_a)]\quad (2)$$where $\mathcal{F}$ and $\mathcal{F}^{-1}$ are the Fourier and inverse Fourier transforms and $k$ is the wave vector.By increasing the applied magnetic field $H_a$, one can write the time evolution of the local magnetization as$$\frac{dm}{dt} = 2\mathcal{F}^{-1}\left[ k^{-1} \mathcal{F} \left(\mu  \frac{dBz}{dt}  \frac{dHa}{dt}\right)\right]\\\frac{dBz}{dt} = \nabla\times E \enspace ,$$the Farady's law.I think one can solve this diffusion equation using the weak form PDE interface in Comsol but I dont know how to do it. However, I have no idea how to solve this in Matlab.Any type of suggestions or comments will be very appreciated!Nonlinear diffusion equation
How to solve a nonlinear diffusion equation?
matlab;nonlinear equations;comsol