Simualting time varying magnetic field

167 views
Skip to first unread message

Peela baradwaj naidu

unread,
Sep 22, 2024, 10:54:44 PM9/22/24
to vampir...@googlegroups.com
Hello vampire users ,
I am trying to simulate spin dynamics in CGT with a temperature pulse and under a magnetic pulse. Is there any way I can specify a time-varying magnetic pulse that starts at t = 5 ps and rises to 10 T and stays constant until the end of the simulation.

gabo...@gmail.com

unread,
Sep 23, 2024, 2:22:19 PM9/23/24
to Vampire Users
If the temperature pulse and magnetic pulse can be simulated sequentially for your case, it might be possible using "sim:program = temperature-pulse", "sim:program = time-series", and "sim:program = field-pulse".

However, if the temperature and magnetic pulse need to be simulated simultaneously, then it might not be possible unless say you write your own "sim:program" module code for doing it.

Though, maybe someone else in the list knows a way to do it that I'm not aware of.

Regarding a time-varying magnetic pulse that rises to 10 T and stays constant until the end of the simulation, the VAMPIRE develop version [1] has "sim:program = field-pulse".  If that is used and a checkpoint is saved at the end of the simulation, then the checkpoint can be loaded to continue the simulation using the "sim:program = time-series".  With that, a resulting pulse can be seen in a plot of the output file:

TimeField.png

All the steps used to obtain the plot with the attached files is given below:

username@computername:~/Desktop/Fe$ ls -l
total 16
-rw-r--r-- 1 username username  674 Sep 23 03:49 Fe.mat
-rw-r--r-- 1 username username 1488 Sep 23 11:14 input1
-rw-r--r-- 1 username username 1458 Sep 23 11:15 input2
-rw-r--r-- 1 username username   77 Sep 23 11:16 plotTimeField
username@computername:~/Desktop/Fe$
mv input1 input
username@computername:~/Desktop/Fe$ vampire-serial
                                                _          
                                               (_)        
                    __   ____ _ _ __ ___  _ __  _ _ __ ___
                    \ \ / / _` | '_ ` _ \| '_ \| | '__/ _ \
                     \ V / (_| | | | | | | |_) | | | |  __/
                      \_/ \__,_|_| |_| |_| .__/|_|_|  \___|
                                         | |              
                                         |_|              

                      Version 7.0.0 Dec 27 2023 21:29:33

             Git commit: fd9de813cab95bc2b2837122bd03f0238a5d2d76

  Licensed under the GNU Public License(v2). See licence file for details.

  Developers:   Richard F L Evans, Sarah Jenkins, Andrea Meo,
                Daniel Meilak, Andrew Naden, Matthew Ellis,
                Oscar Arbelaez, Sam Morris, Rory Pond, Weijia Fan,
                Phanwadee Chureemart, Pawel Sobieszczyk, Joe Barker,
                Thomas Ostler, Andreas Biternas, Roy W Chantrell,
                Wu Hong-Ye, Razvan Ababei, Sam Westmoreland,
                Milton Persson
 
                Compiled with:  GNU C++ Compiler
                Compiler Flags:

  Vampire includes a copy of the qhull library from C.B. Barber and The
  Geometry Center and may be obtained via http from www.qhull.org.

================================================================================
Mon Sep 23 11:30:30 2024
================================================================================
Initialising system variables
Creating system
Generating neighbour list..........done!
Copying system data to optimised data structures.
Using generic/normalised form of exchange interaction with 16 total interactions.
Number of atoms generated: 5488
Starting Simulation with Program
field-pulse...
Simulation run time [s]: 0.413078
Simulation ended gracefully.

username@computername:~/Desktop/Fe$ mv input input1
username@computername:~/Desktop/Fe$ mv input2 input
username@computername:~/Desktop/Fe$ vampire-serial
...
Initialising system variables
Creating system
Generating neighbour list..........done!
Copying system data to optimised data structures.
Using generic/normalised form of exchange interaction with 16 total interactions.
Number of atoms generated: 5488
Starting Simulation with Program
Time-Series...
Simulation run time [s]: 2.181
Simulation ended gracefully.

username@computername:~/Desktop/Fe$ gnuplot --persist plotTimeField


Kind Regards,
Gavin
VAMPIRE user
plotTimeField
Fe.mat
input1
input2

Christopher Johnson

unread,
Jul 1, 2025, 10:35:13 AMJul 1
to Vampire Users
Hello, I am conducting a magnetic pulse simulation using the input file you provided and have downloaded Vampire 7.0 for this purpose. However, I encountered an error message stating: "Error - Unknown control statement 'sim:field-pulse-time' on line 35 of input file." Has this command been removed in version 7.0?

Kind Regards,
Christopher Johnson
VAMPIRE user

Peela baradwaj naidu

unread,
Jul 1, 2025, 10:40:48 AMJul 1
to Christopher Johnson, Vampire Users

Have you tried using the develop branch ? The field pulse routine might not have been added to the main branch yet.


--
You received this message because you are subscribed to the Google Groups "Vampire Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vampire-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vampire-users/3f6ed856-7a9e-4517-829a-ca040192e0een%40googlegroups.com.
Message has been deleted
Message has been deleted

Christopher Johnson

unread,
Jul 4, 2025, 2:33:11 AMJul 4
to Vampire Users
Thank you for your guidance. Following the adoption of the develop branch, I successfully executed the simulation.

Kind Regards,
Christopher Johnson
VAMPIRE user

Christopher Johnson

unread,
Jul 4, 2025, 2:33:17 AMJul 4
to Vampire Users
I have successfully reproduced the example provided above. Now, I aim to simulate a scenario where a 10 T magnetic field is applied for a period, then reduced to 0 T, mirroring the process of increasing the field from 0 T to 10 T. I attempted to modify the input file but was unable to achieve this. How should I adjust the input file to accomplish this simulation?

Kind Regards,
Christopher Johnson
VAMPIRE user

在2025年7月1日星期二 UTC+8 22:40:48<baradwa...@gmail.com> 写道:

gabo...@gmail.com

unread,
Jul 4, 2025, 1:41:37 PMJul 4
to Vampire Users
I'm thinking that might not be possible with only changes to the input file.

Probably, you would have to write or modify the source code for being able to do that.

I believe it would be field_pulse.cpp that you would have to make a modified version of along with possibly modifying some of the other files (e.g.,  interface.cpp) in the program folder [1] 


Kind Regards,
Gavin
VAMPIRE user

Reply all
Reply to author
Forward
0 new messages