Bilayer Geometry

33 views
Skip to first unread message

Manjushree Maity Res. Scholar, Physics, IIT(BHU)

unread,
Aug 25, 2025, 9:34:28 AMAug 25
to mumax2
Hello Sir, 
I want to build a three-layer structure in MuMax3 with the following stack along the z-direction:Region 1: 100 nm (Material 1) Region 2: 5 nm (Material 2) and Region 3: 40 nm (Material 3).The overall dimensions are40 µm(x)* 100 nm(y)* 145 nm(z)
I set my grid and geometry like this:

SetGridSize(400, 20, 29)
SetCellSize(10e-9, 10e-9, 5e-9)

a := cuboid(40e-6, 100e-9, 100e-9).transl(0, 0, -100e-9)
b := cuboid(40e-6, 100e-9, 100e-9).transl(0, 0, 5e-9)
c := cuboid(40e-6, 100e-9, 100e-9).transl(0, 0, 45e-9)

setgeom(a.add(b).add(c))
DefRegion(1, a)
DefRegion(2, b)
DefRegion(3, c)
Msat.setRegion(1, 140e3)
Aex.setRegion(1, 3.5e-12)
alpha.setRegion(1, 2e-4)
Msat.setRegion(2, 0)
Aex.setRegion(2, 0)
alpha.setRegion(2, 1)
Msat.setRegion(3, 1250e3)
Aex.setRegion(3, 15e-12)
alpha.setRegion(3, 4e-3)
H_ext_val := 50e-3 
B_ext = vector(0, 50e-3, 0)
m = uniform(0, 1, 0)
relax()
snapshot(m)
run(15e-9)  
  Is this the correct way to define a layered 3-region structure with different thicknesses and materials in MuMax3?   How can you coonfirm it that three layer is formed perfectly

Best Regards,
Manju


WhatsApp Image 2025-08-25 at 6.44.40 PM.jpeg

Felipe Garcia

unread,
Aug 26, 2025, 11:54:11 AMAug 26
to mum...@googlegroups.com
Hello,

I don't think this is the easiest way. One can use the command layers.I don't think you need to include or define the spacer, so one can remove it from the geometry. Moreover, you have lateral space, not used by  the layers, which is not necessary. Then one can reduce the grid size to 10 in y.

SetGridSize(400, 10, 29)
SetCellSize(10e-9, 10e-9, 5e-9)

a := Layers(0,20)   // 20 layers for the first material
b :=  Layers(21,29)  //Skip one for the spacer, then 8 layers for the next material

setgeom(a.add(b))
DefRegion(1, a) 
DefRegion(2, b) // Now region two is the second material, not the spacer. You can define directly DefRegion(3, b) if you prefer to avoid redefining region 3 properties from your script.

Please check that this is what you want.

To check it one can use mumax3-convert and gplot format. For this save one of the variables that are different. For example, add save(regions) to a script to use that.
That will save an ovf file which is difficult to work with
To inspect it one can convert it to the gplot format with  mumax3-convert -gplot. 
This creates a file with the position x,y,z and the magnitude. x, y, z are in meters and starting from 0,0,0 in one of the corners. This is not very useful but one can probe an exact position using the options of mumax3-convert. xrange filters a number of cells. It is integers like the index in mumax and the second argument is exclusive. Then to select only one point in your geometry one can combine xrange and yrange.

mumax3-convert -gplot -xrange 199:200 -yrange 5:6 regions000000.ovf

This yields only a line along z, because only z is allowed varying, because all the points in the plane xy are exactly the same. With that you will be able to check if everything is ok by simple inspection or using some representation software.

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 visit https://groups.google.com/d/msgid/mumax2/9f73a8d9-4c18-4232-8f27-c51fa3fe70cdn%40googlegroups.com.

Manjushree Maity Res. Scholar, Physics, IIT(BHU)

unread,
Aug 27, 2025, 5:53:40 AMAug 27
to mum...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages