mumax / 3

GPU-accelerated micromagnetic simulator
Other
450 stars 150 forks source link

add openbc #195

Closed JeroenMulkers closed 5 years ago

JeroenMulkers commented 5 years ago

A few notes about the implementation of open boundary conditions:

Conclusion: so far it seems to me that the difference between open and Neumann BC is rather small and, for relaxed magnetizations, becomes even smaller when one decreases the cell size.

(kernels are not yet recompiled)

godsic commented 5 years ago

@JeroenMulkers Travis fails, could you please rebase against master and double check it compiles?

JeroenMulkers commented 5 years ago

Rebuild the kernels. Should be OK now.

JLeliaert commented 5 years ago

Travis succeeds

godsic commented 5 years ago

@JeroenMulkers Are there any tests of openbc in particular?

JeroenMulkers commented 5 years ago

Because the difference between the BC is so small, I don't really know how to create a non-trivial test for the open BC.

It is certainly possible to make the choice of the BC dependent on the axis. However, I do not see the point. If users are convinced that open BC should be used, then they should use them at every boundary.

On Fri, Sep 28, 2018 at 11:57 AM Mykola Dvornik notifications@github.com wrote:

@godsic commented on this pull request.

  • Are there any tests of openbc in particular?
  • Can we make OpenBC optional down to the axis, instead of forcing it everywhere?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mumax/3/pull/195#pullrequestreview-159794324, or mute the thread https://github.com/notifications/unsubscribe-auth/ADa6qU3_vWZbKTyRS4v9b6H-yvHshiP2ks5uffKOgaJpZM4W8zPX .

godsic commented 5 years ago

@JeroenMulkers can we benefit from these tests https://github.com/fangohr/paper-supplement-standard-problem-dmi/tree/master/sims ?

JeroenMulkers commented 5 years ago

I added a test for the open BC based on the '1D' standard problem proposed by Cortés-Ortuño et al. See test/openbc.mx3 for more details.

godsic commented 5 years ago

@JeroenMulkers I am more comfortable with 1e-5 tolerance. Can you achieve it with smaller cells? Then, would you be so kind to make three identical tests, but aligned along x, y and z?

JeroenMulkers commented 5 years ago

I could bring the tolerance down to 1e-3. The analytical result gives the canting at the edge of an infinitely long wire, whereas we of course simulate a finite wire. Therefore, it is hard to let the simulated canting converge to the analytical one.

It is easy to shown that a 1D model can be simulated by using one row of cells (let's say in the x direction) and periodic boundary conditions in the y direction. Hence, we can also compare the case with open and periodic boundary conditions. In this case, a tolerance of 1e-5 can be achieved.

I have added the case where the nano wire is aligned along the y direction. There is no canting at the edges of a nano wire along the z direction, so this case is not tested.