I wrote simple physics mass-spring engine, and I want to add the magnetism. Each body consists of tiny connected spheres with some mass.
The only input values to calculate magnetic interactions I have is magnetic susceptibility $\chi$, and external magnetic field strength $\vec{H}$.
Earlier I found very similar question, where the force on a magnet can be found:
$$U=-\int \vec{m}(x) \times \vec{B}(x)dV\space\tiny{(1)}$$ $$\tiny{\vec{m}\space -\space magnetic\space moment,\space dV\space-\space general\space volume}$$ $$\vec{F}=-\nabla U \space\tiny{(2)}$$
I can express magnetic moment from susceptibility:
$$\vec {m} = \vec{M} V=\chi H_{ext}V\space \tiny{(3)}$$ $$\tiny{\vec{M}\space-\space magnetization, \space V\space-\space volume}$$
My questions:
- Should I just set the magnetic moment value same(if the external field is same) to each particle of the body, or one half of particles - one value, another - I don’t know, perhaps the same value but with minus?
- What to do with the second factor of the equation (1), considering I have only external magnetic strength, not induction at each point?
My try.
Obviously(yes?), the task is to find magnetic field, created by permanent magnet. We also know that magnet does create magnetic field only after magnetization by another magnet.
The most similar equation for finding magnetic field value is Bio-Savart-Laplas law, but it is for current loop. Which actually is permanent magnet - array of tiny electrical loops with two unpaired electrons(for iron). I actually seen in this site guy, trying to find magnetic field, created by the iron atom, in classical way, assuming that electron moves around hydrogen atom, but it is absolutely senseless, because nuclear also creates magnetic field, that cancels electron’s magnetic field, and at all, it as a hydrogen atom where there is only 1 electron. We are talking about iron, for instance.
What if to just replace $\vec{B}$ with $\vec{H}$ in formula (1)? And make magnetic moment same for same $\vec{H}$, i.e. not depending on position(I mean will there still be poles🤔)?