<jupyter_start><jupyter_text>Simulation at finite temperature `Xf_ThermHeunEvolver`tutorial comming soon `Xf_ThermSpinXferEvolver`tutorial comming soon `UHH_ThetaEvolver`This tutorial demonstrates the use of the `UHH_ThetaEvolver` for simulations at finite temperature (based on the example mif file published as part of the relevant OOMMF extension).<jupyter_code>import discretisedfield as df
import micromagneticmodel as mm
import oommfc as mc<jupyter_output><empty_output><jupyter_text>We define the system object and specify the temperature 60K.<jupyter_code>system = mm.System(name='thetaevolve', T=60)<jupyter_output><empty_output><jupyter_text>The simulation is done on a square geometry. The magnetisation is initialised uniformly pointing in x direction.<jupyter_code>mesh = df.Mesh(p1=(0,0,0), p2=(1e-7,1e-7,1e-9), cell=(1e-9,1e-9,1e-9))
system.m = df.Field(mesh, dim=3, value=(1,0,0), norm=1700e3)
system.m.plane('z', n=(20,20)).mpl()
system.dynamics = mm.Damping(alpha=0.1) + mm.Precession(gamma0=mm.consts.gamma0)
system.dynamics<jupyter_output><empty_output><jupyter_text>We must explicitely specify the correct evolver and specify the timestep. For more details on how to specify this timestep as well as other available options please refer to the official documentation of the OOMMF extension available at http://www.nanoscience.de/group_r/stm-spstm/projects/temperature/download.shtml.<jupyter_code>evolver = mc.UHH_ThetaEvolver(fixed_timestep=2e-13)<jupyter_output><empty_output><jupyter_text>We can now use the previously defined evolver as input for the time driver.<jupyter_code>td = mc.TimeDriver(evolver=evolver)<jupyter_output><empty_output><jupyter_text>We drive the system for 0.5 ns and store the output in 50 steps.<jupyter_code>td.drive(system, t=5e-10, n=50)<jupyter_output>Running OOMMF (ExeOOMMFRunner)[2022/02/25 18:08]... (4.1 s)<jupyter_text>We can now plot the magnetisation after time driving.<jupyter_code>system.m.plane('z', n=(20, 20)).mpl()<jupyter_output><empty_output><jupyter_text>Information about the individual steps is available from the table object.<jupyter_code>system.table.data.head()<jupyter_output><empty_output><jupyter_text>We can plot the average magnetisation as a function of time.<jupyter_code>system.table.data.plot(x='t', y=['mx', 'my', 'mz'], grid=True);<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11063829787234042, 'fraction_numerical': 0.02893617021276596, 'mean_word_length': 7.838345864661654, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 36, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '70901', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 856, 'n_tokens_neox': 814, 'n_words': 196, 'path': 'examples/finite-temperature.ipynb', 'repo_name': 'ubermag/tutorials', 'size': '2350'}