Stray field in air above nanodisk

1,933 views
Skip to first unread message

Gerald

unread,
Nov 3, 2020, 5:26:39 AM11/3/20
to mumax2
Hi Mumax community, 

Long time mumax user here. I am currently trying to simulate the stray fields in the air above a nanodisk, but don't seem to be getting the right results. I have a 30nm thick nanodisk and want to find the stray field 50nm above the disk. I've been relaxing the magnetization first and then running it with time evolution. But since it is just a static field I think it does not matter much. 

1. What parameter values should I use for air? So far I have been setting Msat = 0 and Aex = 0. But perhaps this is incorrect? Should I just leave the parameters blank instead?

2. Is there something else I may be missing? I just want the stray field in the layer 50nm above the disk... but my results are not coming out correct.

Thank you very much for any insight.  

--------------------------------------------------------------------------------------------------------------------------------------------

setgridsize(1200,1200,9) //
setcellsize(5e-9,5e-9,10e-9)
EdgeSmooth = 0

setgeom(cylinder(6e-6,30e-9).transl(0,0,-30e-9))

DefRegion(1,cylinder(6e-6,30e-9).transl(0,0,-30e-9)) //disk
DefRegion(2,layer(8)) // layer want stray field in
DefRegion(3,layers(3,8)) //air

///// Run/Load initial magnetization

//m.SetRegion(1,randomMag())
//save(m)
m.LoadFile("m000001.ovf")

///// Defining disk properties

Msat.SetRegion(1, 8e5)
Aex.SetRegion(1, 10e-11)
alpha.SetRegion(1, 0.95)
Ku1.SetRegion(1,0)
anisU.SetRegion(1,vector(0,0,1))

///// Defining air properties

Msat.SetRegion(2, 0)
Aex.SetRegion(2, 0)
Msat.SetRegion(3, 0)
Aex.SetRegion(3, 0)

////// Field output

bstatic := 0.07

Bx := 0
By := 0.587785*bstatic //cos(54deg)
Bz := 0.80901*bstatic //sin(54deg)
B_ext = vector(Bx,By,Bz)

/////// Run/Save data

OutputFormat = OVF2_TEXT

//relax()

Run(5e-9)

save(B_demag.Region(1)) //demag inside the disk

save(m)

Felipe Garcia

unread,
Nov 3, 2020, 1:20:05 PM11/3/20
to mumax2
Hi Gerald,

Maybe, I can not answer but, why do you consider the results wrong? This could help to solve the problem I think.

Best regards,
Felipe

--
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 on the web visit https://groups.google.com/d/msgid/mumax2/8a35bc9d-6428-42c6-922a-350b02f0acb0n%40googlegroups.com.

Gerald Yan

unread,
Nov 4, 2020, 4:27:30 AM11/4/20
to mum...@googlegroups.com
Hi Felipe, 

I am comparing it to the results of a scientific paper, but this simulation should be quite straightforward which is why I am lost.

Thank you for your help,
Gerald

Eric Xu

unread,
Apr 28, 2021, 1:51:41 AM4/28/21
to mumax2
Hi Gerald,

I am  simulating a similar structure ,want see the field above nanodisk too.  Did you solve this problem?
Could you share your scripts?

Thanks,
Eric

Victor Gonzalez

unread,
May 19, 2021, 8:08:21 AM5/19/21
to mumax2
There is a way using Ubermag (CPU-based, so try to keep the cell count low): https://oommfc.readthedocs.io/en/latest/ipynb/12-tutorial-stray-field.html

Apparently, in the static range, one can calculate the effective demag field outside the magnetized material. I'm too new to mumax to translate it myself, but that's an idea

Art

unread,
May 19, 2021, 9:57:39 AM5/19/21
to mumax2
I have tried a somewhat simpler example and I think it worked well. I think that mumax3 assumes as air, space where there is no magnetic material:


setgridsize (50, 50, 300)
setcellsize (2e-9, 2e-9, 2e-9)

c2: = cylinder (50e-9,200e-9)

defregion (2, c2)
defregion (3, c2.inverse ())

setgeom (c2)

Msat = 800e3
Aex = 1.3e-11
Ku1 = 2e5
anisU = vector (0, 0, 1)

m = uniform (0,0,1)
alpha = 0.5

relax ()

save (B_demag.Region (3))

Attached is a picture of the demagnetizing field outside the cylinder

demag.png

Subham Senapati

unread,
Apr 21, 2022, 2:40:20 PM4/21/22
to mumax2
Hi
The picture you attached here for demag field outside a cylinder, how did you obtain it? Is it a mumax output? I tried your code and I am not getting the same results when I converted the ovf file. Also the picture seems 3D, is it possible to view 3D image of fields in mumax?

Art

unread,
Apr 21, 2022, 10:51:53 PM4/21/22
to mumax2
Hi,

The OVF file saves the three components of the vector field that you choose and also the mesh information. So from these files, you can generate a 3D image of any vector field.

After converting the ovf file to VTK, I used Paraview to view the demagnetizing field.

Subham Senapati

unread,
May 3, 2022, 10:08:31 AM5/3/22
to mumax2
Hi
Thank you for your response. It seems like my mesh size is too big with data to able to visualized in Paraview by my old laptop. Nevertheless I am interested in single planes. Do you know how can I the get the demag field of just a plane above my geometry instead of the whole 3D space around. I tried defining a rectangular plane and saved demag field for that particular region but it seems my ovf file stored for the field values for whole mesh. When I view the ovf in notepad I see 3 columns with field components but no space coordinates mentioned, which is why I am not able to extract the data for a particular plane.

Eduardo Saavedra

unread,
Sep 11, 2022, 9:03:57 PM9/11/22
to mumax2
Hi, I converting the ovf file to VTK, I used Paraview to view the demagnetizing field however it does not appear as you show in your figure. What process did you use?

Thank you

fig1.png

Gaureesh K

unread,
Oct 22, 2022, 4:17:56 AM10/22/22
to mumax2
Was your problem resolved? I have a similar issue. I need to visualize the field only in a curved thin film, but the output file saves the magnetic field of all points in the mesh. I tried to define region 1  as the film and use  "autosave(m.Region(1),1e-12)" but even this stores field values for the full mesh when visualized in paraview.
Could someone pls help me!
Thanks in advance 
Regards 
Gaureesh K

K Subham Senapati

unread,
Oct 22, 2022, 5:17:44 AM10/22/22
to mum...@googlegroups.com
After the ovf file is created for the full mesh, you can use mumax3-convert to trim your file to the desired layers, choosing range in x, y and z directions. 

You received this message because you are subscribed to a topic in the Google Groups "mumax2" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mumax2/kSUetz99L9U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mumax2+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mumax2/1f614c14-a6ea-4dea-9e4a-eac37cb36c76n%40googlegroups.com.

mario castro

unread,
Oct 24, 2022, 4:36:27 PM10/24/22
to mumax2
Hi

In ParaView, you can use "Threshold" or "Find Data" to select the cells that have a magnetization greater than 0 (or the magnitude of some field). The same for the demagnetizing field, running the code above I have obtained:

Mario 

demag.PNG

Chirag Kalouni

unread,
Dec 8, 2023, 6:39:25 AM12/8/23
to mumax2
Hi all 
I have the m.ovf files and also converted them to vtk to visualise them using glpyh in paraview. My question is how i can extract the stray field(b_demag) map or image from m.ovf. 


Thanks
Chirag

Антон Луценко

unread,
Dec 8, 2023, 7:06:35 AM12/8/23
to mumax2
Hi, m.ovf only has magnetization data, and not any other like fields. You would need to recompute them in mumax and save(B_demag). 

Chirag Kalouni

unread,
Dec 9, 2023, 2:59:09 AM12/9/23
to mum...@googlegroups.com
so do i need to restart whole program or just load m.ovf and save b_demag. Thanks 

Reply all
Reply to author
Forward
0 new messages