[nmag-users] Re: Remove Edge Magnetic Charge

88 views
Skip to first unread message

Fangohr H.

unread,
Mar 25, 2015, 3:17:39 AM3/25/15
to Shengda Wang, Fangohr H., nmag-users
Dear Shengda,

the macro-geometry approach allows to do this: use a large number of ‘image cells’ and the behaviour approximates the infinite large system (see http://nmag.soton.ac.uk/nmag/0.2/manual/html/example_1Dperiodicity/doc.html for an example how increasing the number of image cells - called ‘copies’ in the two figures at the bottom - approximates the infinite size behaviour).

The same works in 2d, see for example: http://nmag.soton.ac.uk/nmag/0.2/manual/html/example_2Dperiodicity/doc.html
You may want to distribute the image cells in a disk to make the macro-geometry demag field isotropic in the plane.

You find the macro geometry introduced in http://scitation.aip.org/content/aip/journal/jap/105/7/10.1063/1.3068637

Regards,

Hans


On 25 Mar 2015, at 03:24, Shengda Wang <shengda...@gmail.com<mailto:shengda...@gmail.com>> wrote:

Dear all,

I intend to simulate 2D Magnonic Crystal using Nmag. The idea is to simulate only one/several unite cell(s) with 'Periodic Boundary Condition'. This 'PBC' is different from the PBC in Nmag. Because the structure's in-plane dimensions are assumed to be infinitely large so that zero in-plane demagnetizing field is desired. Is there an easy method to achieve zero in-plane demagnetizing field?

Best regards,
Shengda


Shengda Wang

unread,
Mar 25, 2015, 9:22:14 PM3/25/15
to Fangohr H., nmag-users
Dear Hans, 

thanks a lot for the reply and the suggestions.
I have considered about your approach. Putting many copies increases the BEM setup time. It would be a shortcut if Nmag had the 'infinite' PBC feature as other simulation tools.

Meanwhile I would like to confirm some doubts in Nmag with you.
1. Quasi-PBC
    is there any exchange interactions if cell-cell spacing has no gap?
    what if the spacing is negative and makes the primary cell overlaps with image cells? 
2. nmeshmirror
    In the Example: Spin-waves in periodic system, a mirrored mesh is generated first containing the periodic nodes at the two edges. Then the Quasi-PBC is also implemented with zero cell-cell spacing. 
    Here is three questions: a. what is the purpose of mirrored mesh. b. why use both mirrored mesh+Quasi-PBC. c. if using mirrored mesh alone, what kind of periodic condition is achieved.

The above are the confusions currently in my mind. By the way, if you know any Magnonic Crystal simulation examples using Nmag, it would be very kind of you to tell me.

Best regards,
Shengda

Fangohr H.

unread,
Apr 4, 2015, 4:12:37 PM4/4/15
to Shengda Wang, Fangohr H., nmag-users
Dear Shengda,

On 26 Mar 2015, at 01:21, Shengda Wang <shengda...@gmail.com<mailto:shengda...@gmail.com>> wrote:

Dear Hans,

thanks a lot for the reply and the suggestions.
I have considered about your approach. Putting many copies increases the BEM setup time.
Have you tried it? It is not a lot.
It would be a shortcut if Nmag had the 'infinite' PBC feature as other simulation tools.

Mumax has copied the Macro geometry model, and OOMMF uses a similar technique of adding contributions to the demag tensor. So it should all be quite similar performance wise, and certainly fast relative to typical runtimes of micro magnetic simulations.

Meanwhile I would like to confirm some doubts in Nmag with you.
1. Quasi-PBC
is there any exchange interactions if cell-cell spacing has no gap?
Yes.
what if the spacing is negative and makes the primary cell overlaps with image cells?
This is undefined (and you should avoid it).

2. nmeshmirror
In the Example: Spin-waves in periodic system, a mirrored mesh is generated first containing the periodic nodes at the two edges. Then the Quasi-PBC is also implemented with zero cell-cell spacing.
Here is three questions: a. what is the purpose of mirrored mesh. b. why use both mirrored mesh+Quasi-PBC. c. if using mirrored mesh alone, what kind of periodic condition is achieved.

The exchange interaction is only periodic if mesh nodes of image cells are (very nearly) in the same position. To achieve this, you need to use nmeshmirror (or some other trick to get a mesh with nodes in the same positions on both sides).

If you use nmeshmirror without the macro geometry (or if the image cells have gaps), then there is no periodic exchange.


The above are the confusions currently in my mind. By the way, if you know any Magnonic Crystal simulation examples using Nmag, it would be very kind of you to tell me.

Try these:

- http://scitation.aip.org/content/aip/journal/jap/114/2/10.1063/1.4813228;
- http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=6228538; http://www.ee.iitm.ac.in/exporedmine/projects/mag-public/wiki/Spin_wave_standard_problem
- http://journals.aps.org/prb/abstract/10.1103/PhysRevB.86.104405

but there must be more. Also check out http://nmag.soton.ac.uk/nmag/0.2/manual/html/example_nmagprobe/doc.html in the tutorial of Nmag.

Best wishes,

Hans




Best regards,
Shengda

On Wed, Mar 25, 2015 at 8:17 AM, Fangohr H. <H.FA...@soton.ac.uk<mailto:H.FA...@soton.ac.uk>> wrote:
Dear Shengda,

the macro-geometry approach allows to do this: use a large number of ‘image cells’ and the behaviour approximates the infinite large system (see http://nmag.soton.ac.uk/nmag/0.2/manual/html/example_1Dperiodicity/doc.html for an example how increasing the number of image cells - called ‘copies’ in the two figures at the bottom - approximates the infinite size behaviour).

The same works in 2d, see for example: http://nmag.soton.ac.uk/nmag/0.2/manual/html/example_2Dperiodicity/doc.html
You may want to distribute the image cells in a disk to make the macro-geometry demag field isotropic in the plane.

You find the macro geometry introduced in http://scitation.aip.org/content/aip/journal/jap/105/7/10.1063/1.3068637

Regards,

Hans


Ilya Dubitskiy

unread,
Apr 5, 2015, 2:02:16 PM4/5/15
to Fangohr H., nmag-...@lists.soton.ac.uk, shengda...@gmail.com, sl...@cam.ac.uk
Dear Hans,

I am a bit confused by your last statement that "If you use nmeshmirror without the macro geometry (or if the image cells have gaps), then there is no periodic exchange." So what will happen if one makes new mesh from ordinary one using nmeshmirror command (say: nmeshmirror orig.nmesh 1e-6 1e-6 1,0,-1 periodic.nmesh) and starts simulation with no image cells (periodic_bc=None) ? Will this new mesh (periodic.nmesh) be treated as ordinary one (i.e. information about periodic nodes will be ignored)? 

In my opinion if so then it contradicts this post https://groups.google.com/forum/#!topic/nmag-users/E2pOBk1wtF4 . For example this statement "Therefore, the actual shape of the mesh or spacing of the periodic copies does not matter in the way the exchange energy is computed. " should be wrong should not it? Furthermore Shin-liang Chin suggests that  "If you space the primary cell by L + dL with dL > 0, you can circumvent the problem: exchange will work as before..." .

Is there a way to take periodicity of exchange interaction into account without regard for demagnetization field produced by sample shape (i. e. using no image cells)?  

Finally what will happen if one writes script like this:
lattice_points = []
lattice_points.append([0.0,0.0,0.0])
pbc = nmag.SetLatticePoints(vectorlist=lattice_points, scalefactor=SI(1e-9,'m'))
sim = nmag.Simulation(periodic_bc=pbc.structure)
Here periodic_bc != None but there are no image cells (if primary cell is centred).

Sincerely,

Ilya Dubitskiy

Department of Nuclear Physics Methods of Research
Faculty of Physics
Saint-Petersburg State University
Address: Petrodvorets, Ulyanovskaya str., 1,
Saint-Petersburg, Russia, 198504
site: http://nsp.phys.spbu.ru/index.php/en/

Fangohr H.

unread,
Apr 7, 2015, 11:49:32 AM4/7/15
to Ilya Dubitskiy, Fangohr H., nmag-...@lists.soton.ac.uk, shengda...@gmail.com, sl...@cam.ac.uk
Dear Ilya,

thank you for picking up on this. The information was indeed inconsistent (to say the least).

On 5 Apr 2015, at 19:00, Ilya Dubitskiy <i.dub...@phys.spbu.ru<mailto:i.dub...@phys.spbu.ru>> wrote:

Dear Hans,

I am a bit confused by your last statement that "If you use nmeshmirror without the macro geometry (or if the image cells have gaps), then there is no periodic exchange.”

Let me start by saying that the whole statement above was wrong (or at least based on memories of a previous design of the macro geometry interface). So it is best not to try to understand what I was trying to say ;). I will address your queries below as well as possible, though.

So what will happen if one makes new mesh from ordinary one using nmeshmirror command (say: nmeshmirror orig.nmesh 1e-6 1e-6 1,0,-1 periodic.nmesh) and starts simulation with no image cells (periodic_bc=None) ? Will this new mesh (periodic.nmesh) be treated as ordinary one (i.e. information about periodic nodes will be ignored)?
Interesting question. I would have thought that it should ignore the periodic nodes, but a quick test I ran just this morning suggests that the periodic points in the mesh are sufficient to create a periodic exchange interaction. I didn’t have time to explore further, but the one dataset I had to look at suggests that the above is true. So we learn: if we don’t want periodic exchange, it is best not to have periodic points in the mesh. (If you want to use nmeshmirror for some reason and don’t like the periodic points, you can manually edit the text-based mesh file and remove the last data set which encodes the periodic points.)

If others have more information on this, please do report it.


In my opinion if so then it contradicts this post https://groups.google.com/forum/#!topic/nmag-users/E2pOBk1wtF4 . For example this statement "Therefore, the actual shape of the mesh or spacing of the periodic copies does not matter in the way the exchange energy is computed. " should be wrong should not it? Furthermore Shin-liang Chin suggests that "If you space the primary cell by L + dL with dL > 0, you can circumvent the problem: exchange will work as before..." .


Thanks for checking this. I was wrong: it is not the closeness of the points that matters. (This was the case in an earlier design.)

I have put some examples together for those that are deeply interested (at https://bitbucket.org/fangohr/nmag-example-macrogeometry), with a summary document most easily viewed at http://nbviewer.ipython.org/urls/bitbucket.org/fangohr/nmag-example-macrogeometry/raw/tip/manual-example/summary.ipynb

I’ll believe this addresses your questions below. I also insert brief comments below:

Is there a way to take periodicity of exchange interaction into account without regard for demagnetization field produced by sample shape (i. e. using no image cells)?

If you keep lattice_points = [] (i.e. empty list), or include only [0.0, 0.0, 0.0.], then the demag field of the primary simulation cell is computed (but no image cells). Both lead to the same behaviour, as the [0,0,0] entry is added automatically if the list is empty.

If you do not want to consider the demag field, you need to add the do_demag=False switch in the simulation constructor (see example https://bitbucket.org/fangohr/nmag-example-macrogeometry/src/tip/manual-example/probe_demag-no-demag.py).

Finally what will happen if one writes script like this:

lattice_points = []
lattice_points.append([0.0,0.0,0.0])
pbc = nmag.SetLatticePoints(vectorlist=lattice_points, scalefactor=SI(1e-9,'m'))
sim = nmag.Simulation(periodic_bc=pbc.structure)

Here periodic_bc != None but there are no image cells (if primary cell is centred).

As you say, periodic exchange and ‘normal’ demag.


The new case study at https://bitbucket.org/fangohr/nmag-example-macrogeometry may still leave some questions open - if people want to contribute with further examples and documentation, this would of course be welcome (ideally via pull requests).

Best wishes,

Hans



Sincerely,

Ilya Dubitskiy

Department of Nuclear Physics Methods of Research
Faculty of Physics
Saint-Petersburg State University
Address: Petrodvorets, Ulyanovskaya str., 1,
Saint-Petersburg, Russia, 198504
site: http://nsp.phys.spbu.ru/index.php/en/

2015-04-04 23:12 GMT+03:00 Fangohr H. <H.FA...@soton.ac.uk<mailto:H.FA...@soton.ac.uk>>:
Dear Shengda,
On Wed, Mar 25, 2015 at 8:17 AM, Fangohr H. <H.FA...@soton.ac.uk<mailto:H.FA...@soton.ac.uk><mailto:H.FA...@soton.ac.uk<mailto:H.FA...@soton.ac.uk>>> wrote:
Dear Shengda,

the macro-geometry approach allows to do this: use a large number of ‘image cells’ and the behaviour approximates the infinite large system (see http://nmag.soton.ac.uk/nmag/0.2/manual/html/example_1Dperiodicity/doc.html for an example how increasing the number of image cells - called ‘copies’ in the two figures at the bottom - approximates the infinite size behaviour).

The same works in 2d, see for example: http://nmag.soton.ac.uk/nmag/0.2/manual/html/example_2Dperiodicity/doc.html
You may want to distribute the image cells in a disk to make the macro-geometry demag field isotropic in the plane.

You find the macro geometry introduced in http://scitation.aip.org/content/aip/journal/jap/105/7/10.1063/1.3068637

Regards,

Hans


Reply all
Reply to author
Forward
0 new messages