Question on the implementation of temperature-dependent magnetic parameters in Mumax3

39 views
Skip to first unread message

Enlong Liu

unread,
Apr 2, 2026, 1:49:53 AMApr 2
to mum...@googlegroups.com

Dear Mumax3 Community,

 

Recently, I planned to implement temperature-dependent magnetic parameters, like Ms, Ku and Aex into Mumax3 code. I checked previous work and found that there seems to be different methods to do so. But I still have some questions on this topic.

 

The basic inclusion of temperature in mumax3 is ‘Temp = 300K’, for example. In my case, however, I need temp to change during simulations, following a function of simulation time t Temp = T(t). So the first method is just to change the above code to ‘Temp = T(t)’. My first question is that if by changing the Temp code only, Ms, Ku, and Aex change correspondingly. I tried to print the above parameters to the output txt, they didn’t change with respect to simulation time (or temperature). But I was told by someone that this should work.

 

The next method I tried is to add analytical equations of Ms etc. to let the code calculate those parameters for each step. The psudo-code is like below:

Temp = T(t)

Msat = Ms(T(t))

Ku1 = Ku(T(t))

Aex = Aex(T(t)).

 

The complete code is attached to this email. In this way, What I suppose is that both the stochastic thermal field and the magnetic parameters are changing with simulation time (with temperature). And the output file indeed recorded the change of magnetic parameters.

 

The above case is actually based on a PhD thesis, where the author used similar code, but disabled Temp definition, only used the psudo-code below:

Msat = Ms(T(t))

Ku1 = Ku(T(t))

Aex = Aex(T(t)).

What I can understand is that in this way, magnetic parameters change with simulation time, but the thermal fluctuation field does not.

 

I wonder if any of you could clarify the 3 cases above. I really appreciate your time and help!

 

Best regards,


--
Mobile Phone: +86-13362132808
Mailing Address: #2-2001, Xinghui Huayuan (Eastern area), Qingshanhu, Lin'an District, Hangzhou, Zhengjiang, China, 311305
SOT-J-with-Temp-dep-v0.4_AP2P.txt

Josh Lauzier

unread,
Apr 18, 2026, 6:05:59 AM (12 days ago) Apr 18
to mumax2
Hi,

Changing temperature Temp does not directly change material parameters like M_sat,Aex, etc. In mumax3, the temperature module applies a thermal magnetic field, which essentially randomly "kicks" the spins. For more details in how exactly it is implemented (as well as limitations), you can see the paper "Adaptively time stepping the stochastic Landau-Lifshitz-Gilbert equation at nonzero temperature: implementation and validation in MuMax3".

Seperately from this, you can make temperature, as well as material parameters like M_sat, etc, functions of time. So under the hood, it is not Msat=Ms(T(t)), but rather Msat=Ms(f(t)), and T=T(f(t)), where the function of time f(t) happens to be the same. Effectively this is like Msat=Ms(T(t)), but indirectly.

In general, I would consider them as two different ways to capture the effects of temperature, which each have different benefits and limitations. Basically, what you are trying to mimic in a real physical system are thermal fluctuations, which essentially are like random kicks. The temperature setting models this directly, via an effective field term. The net effect of these thermal kicks is the material will act as if parameters like A_ex are lower (you can think of it as, exchange likes to align spins, but the thermal field makes it harder to align the spins if they are constantly being kicked. Similar for other parameters, thermal kicks will kick spins away from aligning along anisotropy Ku1, etc). Instead of implementing kicks directly, it is also common to do things like simply scale the material parameters as a way to indirectly capture the influence of temperature.

Best,
Josh L.

Enlong Liu

unread,
Apr 18, 2026, 8:01:25 AM (12 days ago) Apr 18
to mum...@googlegroups.com
Dear Josh,

Thanks a lot for your clarification. I will also check the paper you mentioned. 

And I may use magnetic parameters as a function of time to mimic the temperature effect, but not directly change temperature itself.

Best regards,
Enlong

Josh Lauzier <joshl...@gmail.com> 于2026年4月18日周六 18:06写道:
--
You received this message because you are subscribed to the Google Groups "mumax2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mumax2+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mumax2/aec513c3-1057-49b2-8c08-3c4992f748c1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages