Magnetic moment of an iron-core solenoid I'm currently developing a Simulink model for the attitude control system (ACS) of an undergrad-developed CubeSat. The ACS uses magnetorquers for attitude actuation.
The magnetorquers are iron-nickel core solenoids, single-wound. Given the core permeability, number of turns, and current, how do I calculate the magnetic moment? From Wikipedia, I know that for an air-core solenoid the magnetic moment is just:
$$
\boldsymbol{\mu}=N I \mathbf{S}
$$
Where $\boldsymbol{\mu}$ is the magnetic moment, N is the number of turns, I is the current, and $\mathbf{S}$ is the vector cross-sectional area of the solenoid. From that, the torque is simply $\boldsymbol{\mu}\times \boldsymbol{B}$ for my Simulink simulation (I already have the World Magnetic Map in Simulink which gives me the local magnetic field vector for any point in the orbit). This only needs to be an order-of-magnitude estimate for simulation purposes - I can measure the exact moment from the physical coils on a torsion balance later on.
 A: Edit: For those venturing here long after this was written in whatever state of mind I was, the equations below used an air-core magnetic field for calculating a magnetic core magnetization...doesn't make sense, right?! I would delete this were I able to, but as the accepted answer, I cannot. Instead, I'll happily leave my stupidity and this embarrassment up for posterity, adding the note that Abanoub's answer is correct.
The magnetization, $\mathbf{M}$, is related to the magnetic moment, $\mathbf{m}$, via
$$
\mathbf{m}=\int\mathbf{M}dV
$$
For a uniform, linear material with magnetic permeability $\mu$, we have
$$
\mathbf{B}=\mu_0\left(\mathbf{H}+\mathbf{M}\right)=\mu_0\left(\frac{\mathbf{B}}{\mu}+\mathbf{M}\right)
$$
or
$$
\mathbf{M}=\left(\frac{1}{\mu_0}-\frac{1}{\mu}\right)\mathbf{B}.
$$
Inserting the magnetic field of your solenoid,
$$
\require{enclose}
     \enclose{horizontalstrike}{
\int\mathbf{M}dV=NI\left(1-\frac{\mu_0}{\mu}\right)\mathbf{S},}
$$
Note from edit: I applied $\mathbf{B}=\frac{\mu_0NI}{L}$, but of course this is the air-core field. Should have been $\mathbf{B}=\frac{\mu NI}{L}$
$$
\int\mathbf{M}dV=NI\left(\frac{\mu}{\mu_0} - 1\right)\mathbf{S},
$$
where $\mathbf{S}$ is as you defined it. This is the contribution from just the core which must be added to the moment you calculated above which is due to the current in the wires.
Note that this neglects fringe fields, variation of $\mathbf{B}$ within the solenoid, nonlinear material behavior, and changes to the magnetization due to time dependence of the fields in which you are working.  note that if $\mu_0/\mu\ll1$, much of these points won't matter much. Note also that if the material is subject to hysteresis (i.e. ferromagnetic materials), $\mathbf{B}\neq\mu\mathbf{H}$, or rather, $\mathbf{M}$ cannot in general be calculated a priori.  You'd have to measure it, which I suggest you do anyway to account for what these calculations may miss.  Put it in a Helmholtz coil and measure the torque in different orientations and hope it doesn't change much from here to space.
A: Thanks a lot  for the post. I'm an undergrad working on ADCS systems for Cubsats as well. I've been browsing the internet for the past 2 days and just couldn't find those equations. 
However, I've got a tiny amendment for your derivation. That is after inserting the magnetic field of the solenoid giving:
$$\textbf{M}=\Big(\frac{1}{\mu_0}-\frac{1}{\mu}\Big)\textbf{B}=\Big(\frac{1}{\mu_0}-\frac{1}{\mu}\Big)\frac{\mu NI}{L}$$
$$\textbf{M}=\Big(\frac{\mu}{\mu_0}-1\Big)\frac{ NI}{L}$$
Integrating with respect to volume:
$$\int_{}^{} \textbf{M}dV=NI\Big(\frac{\mu}{\mu_0}-1\Big)\textbf{S}$$
Where all symbols have the same meanings used above.
