csv file

635 views
Skip to first unread message

asif md

unread,
May 24, 2024, 3:11:01 AM5/24/24
to mumax2
how to convert table.txt data in csv from out put folder

Josh Lauzier

unread,
May 26, 2024, 11:21:36 PM5/26/24
to mumax2
Hi,

There is no built in way to do this. Mumax3-convert can convert OVF files to csv, but it doesn't work for the table.txt file. You'd have to do it in your own processing software of choice, like python or matlab (or software like Origin).

Cheers,
Josh L.

asif md

unread,
May 27, 2024, 12:42:26 AM5/27/24
to mumax2
Hii Josh Lauzier
Thank you so much sir for your response, I have done above task using jupyternotebook.
Now sir I want to calculate switching time mz for slozwesky stt model.

// geometry
sizeX := 160e-9
sizeY := 80e-9
sizeZ := 5e-9

Nx := 64
Ny := 32
 
setgridsize(Nx, Ny, 1)
setcellsize(sizeX/Nx, sizeY/Ny, sizeZ)
setGeom(ellipse(sizeX, sizeY))

// set up free layer
Msat  = 800e3
Aex   = 13e-12
alpha = 0.01
m     = uniform(1, 0, 0)

// set up fixed layer polarization
angle := 20
px := cos(angle * pi/180)
py := sin(angle * pi/180)
fixedlayer = vector(-px, -py, 0)

// set up fixed and spacer layer parameters
lambda       = 1
Pol          = 0.5669
epsilonprime = 0

// send current
Jtot := 0.008            // total current in A
area := sizeX*sizeY*pi/4
jc   := Jtot / area       // current density in A/m2
J = vector(0, 0, jc)

// schedule output & run
autosave(m, 100e-12)
tableautosave(10e-12)
run(1e-9)

Sir the above code running fine and give good results as expected. But when we increased Ms around 1.5e6, and current value also increased then code was not simulated I could not understand why.?

Josh Lauzier

unread,
May 27, 2024, 6:28:59 AM5/27/24
to mumax2
Hi,

When you say the code is not simulated, do you mean that it is not running, or it is not giving the results you expect? The code should run regardless of the values of Ms and current that you choose, but you may or may not see switching. It will depend on how much you increased the current. I'm not sure how large of a current increase you tested, but for your value of Ms, I was able to get switching using Jtot := 0.015 (it took longer, ~2.5ns, so you would also need to increase run() from 1e-9 to 10e-9 to see it). A current Jtot := 0.02 produced switching in less than 1e-9. I'm not very familiar with STT switching, so I'm not sure what the expression is to calculate what the expected switching current should be, although it looks like in this case it was roughly proportional to the change in Ms. I just slowly increased it from 0.008 until I saw switching.

Best,
Josh L.

asif md

unread,
May 27, 2024, 7:00:59 AM5/27/24
to mum...@googlegroups.com
Thank you so much for your response 
code was run properly, but in output only one row is shown so that I am not able to see the switching. In the below literature expressions of jc are given. j is directly propotional to (alpha, ms, thickness,anisotropy field hk).
In mumax3 season 3 he was given very little   introduction about this.  
Please provide something that resolves my issue. I am new to mumax3.
Apalkov, D., Dieny, B., & Slaughter, J. M. (2016). Magnetoresistive random access
memory. Proceedings of the IEEE, 104(10), 1796-1830. 

--
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/29de9fc3-f3ae-439f-bbc7-08a445665f5dn%40googlegroups.com.

asif md

unread,
May 28, 2024, 11:11:31 AM5/28/24
to mum...@googlegroups.com
Hello sir  Josh Lauzier
Thank you so much for your response
the above problems are resolved 
now sir i want to add anisotropy energy 1e5 in x direction for free layer parameter.
When i simply write ku=(1e5,0,0) it will give the error programm are not simulated in mumax3 please add this energy term so that it will run
Thank you so much

Josh Lauzier

unread,
Jun 1, 2024, 5:43:14 PM6/1/24
to mumax2
Hi,

To apply an anisotropy, you need to assign Ku1 and anisu1 separately, as so:

Ku1=1e5
anisu= vector(1e5,0,0)

If you're new to mumax and don't know all the syntax, I would recommend checking out the examples page: https://mumax.github.io/examples.html as well as the mumax workshop here: https://mumax.ugent.be/mumax3-workshop/ . It will introduce you to the syntax for things like this.

Best,
Josh L.

asif md

unread,
Jun 6, 2024, 7:40:32 AM6/6/24
to mum...@googlegroups.com
Thank you so much sir  Josh Lauzier
Anisotropy field added and working as expected.

Dear sir
I want to see the change in STT switching behavior of the free layer using the same programm. How can I add temperature terms in this program like  temperature= 27, 200, 300, 400°C. 
THANK YOU SO MUCH SIR


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

unread,
Jun 7, 2024, 2:58:56 AM6/7/24
to mumax2
According to the API (https://mumax.github.io/api.html), you can set temperature with Temp variable (it is in Kelvin).

asif md

unread,
Nov 6, 2024, 6:30:41 AM11/6/24
to mumax2
Respected sir 
Thank you for your response,
Sir, i want to see the effect of temperature on switching time so how can i include temp. term at free layer of MTJ in this bellow code.  
and also suggest me how to change the shape of this layered structured eg. in above code it is in eliptical shape. so how can we convert it into circular and rectangular shape.
I will be very gratefull to you all group member.
Thanks in advance. 

asif md

unread,
Jan 16, 2025, 2:48:42 AM1/16/25
to mumax2
Respected sir, 
AHTOH and Josh Lauzier,
Thanks for your kind response. 
In this code, the current is constant (DC) and applied for the full 1-nanosecond simulation duration.
1. Can we change the form of the current pulse shape lake gradient, step, etc., and its duration? 
2. How can I add a total energy term in the output?
For more detail, please find the attachment below. 
thank you so much to all of you.
jap stt mumax.pdf

asif md

unread,
Jan 16, 2025, 6:39:37 AM1/16/25
to mumax2
Dear sir 
Jonathan Leliaert
I am trying many ways to add a step pulse with a particular duration, but the code is not running. 
Please suggest how I can add the step current pulse and gradient current pulse with some finite width.

Thank you so much  
1.txt
3.txt
2.txt

Josh Lauzier

unread,
Jan 17, 2025, 12:38:09 AM1/17/25
to mumax2
Hi,

For a step pulse, the easiest way is to simply have multiple run statements. Something like:
J=vector(0, 0, jc)
run(1e-9)
J=vector(0,0,0) run(1e-9) 
J=vector(0, 0, jc)
run(1e-9)

etc. For other shapes, J can be a function of time. So something like:

J=vector(0,0,jc*t) This will increase linearly. For other functions, you need to check the API. You're trying to use functions like "step", but those are not valid functions in mumax- there is a heaviside step function in the API under 'heaviside'. You can also check the examples page, or the mumax tutorial. You need to match the proper syntax. To add the total energy to the table, you can use:
TableAdd(Edens_total) Best, Josh L.

Message has been deleted

asif md

unread,
Jul 15, 2025, 9:10:41 AM7/15/25
to mumax2
Respected sir 

Josh Lauzier

Sir, I run code properly with your kind help. I am in the last stage to conclude this issue, but the last problem that I have been facing now in the below script is how to include the following property in the below code.
1. How can I change the shape of geometry? In the below code, I think it is an elliptical shape. and differentiate the thickness of of each three layer?
2. Is the amplitude of the applied current .008 ampere in the below code? 
3. How can we vary the pulse width of applied current, like 20 ns or 30 ns? 

// geometry
sizeX := 160e-9
sizeY := 80e-9
sizeZ := 5e-9

Nx := 64
Ny := 32
 
setgridsize(Nx, Ny, 1)
setcellsize(sizeX/Nx, sizeY/Ny, sizeZ)
setGeom(ellipse(sizeX, sizeY))

// set up free layer
Msat  = 800e3
Aex   = 13e-12
alpha = 0.01
m     = uniform(1, 0, 0)
ku1=1e5
anisu=vector (1e5,0,0)


// set up fixed layer polarization
angle := 20
px := cos(angle * pi/180)
py := sin(angle * pi/180)
fixedlayer = vector(-px, -py, 0)

// set up fixed and spacer layer parameters
lambda       = 1
Pol          = 0.5669
epsilonprime = 0

// send current
Jtot := 0.008            // total current in A
area := sizeX*sizeY*pi/4
jc   := Jtot / area       // current density in A/m2
J = vector(0, 0, jc)

// schedule output & run
autosave(m, 100e-12)
tableautosave(10e-12)
run(1e-9)

thanks in advance 

Josh Lauzier

unread,
Jul 20, 2025, 11:08:16 PM7/20/25
to mumax2
Hi,

1. You can use other shapes. To see the shapes that mumax has predefined, please check the examples page or API.

2. Yes

3.  Please refer to the previous comment, or this one. In the linked comment, that is a 20ns pulse width. You can change the number to whatever width.

Best,
Josh L.
Message has been deleted

asif md

unread,
Aug 6, 2025, 10:42:08 AM8/6/25
to mumax2
Respected sir 

Josh Lauzier
I am running the below code with a 20 ns step pulse, but switching in mx, my, and mz could not be seen; it continuously oscillates back and forth. Even if I increase jc, there is still no effect. What specific issue exists in the code?
I want to reproduce this paper result; the link is given below.
Sun, Lin, et al. "A high-speed and power-efficient gradient-pulse injection method for spin-transfer torque magnetic random-access memory." Applied Physics Letters 123.3 (2023).
// geometry
sizeX := 160e-9
sizeY := 80e-9
sizeZ := 5e-9

Nx := 64
Ny := 32
 
setgridsize(Nx, Ny, 1)
setcellsize(sizeX/Nx, sizeY/Ny, sizeZ)
setGeom(ellipse(sizeX, sizeY))

// set up free layer
Msat  = 1000e3
Aex   = 1.5e-11
alpha = 0.007

m     = uniform(1, 0, 0)
Ku1 = 0.6e6
anisu = vector( 0, 0, 0.6e6,)


// set up fixed layer polarization
angle := 20
px := cos(angle * pi/180)
py := sin(angle * pi/180)
fixedlayer = vector(-px, -py, 0)

// set up fixed and spacer layer parameters
lambda       = 1
Pol          = 0.5669
epsilonprime = 0

// send current
Jtot := 0.02           // total current in A

area := sizeX*sizeY*pi/4
jc   := Jtot / area       // current density in A/m2
J= vector(0,0,0)
run(1e-9)
J=vector(0,0,jc)
run(20e-9)
J= vector(0,0,0)
run(1e-9)


// schedule output & run
autosave(m, 10000e-12)
tableautosave(10e-12)
tableadd(E_Total)
tableAdd(E_anis)
tableAdd(E_demag)
tableAdd(E_Zeeman)
run(30e-9)

asif md

unread,
Aug 7, 2025, 9:50:33 AM8/7/25
to mumax2
Respected sir 

Josh Lauzier
Jonathan Leliaert

If I remove the initial and past excitation source Jc, the switching is observed properly in the output.

area := sizeX*sizeY*pi/4
jc   := Jtot / area       // current density in A/m2
//J= vector(0,0,0)  removed 
//run(1e-9) removed 
J=vector(0,0,jc)
//run(20e-9) removed 
//J= vector(0,0,0) removed 
//run(1e-9)    removed
Please suggest what the problem is when applying only a 20 ns pulse width as an excitation in the above code. For more details about my problem, please see the paper whose link is provided in the above message.

thanks 
MD ASIF
Reply all
Reply to author
Forward
0 new messages