ubermag / discretisedfield

Python package for the analysis and visualisation of finite-difference fields.
http://ubermag.github.io
BSD 3-Clause "New" or "Revised" License
19 stars 13 forks source link

On the value of discretisedfield #74

Closed code-whale closed 4 years ago

code-whale commented 4 years ago

Dear Ubermag team, I encountered a problem in simulating a multilayer structure. I don't know what it means to define a three-dimensional value in field. I don't know if I rely on this value and norm=Ms to determine the initial magnetic moment distribution of this material. There is a non-magnetic layer in the multilayer structure that I simulate. How should I define its value for this non-magnetic region? I define the value of field through the following figure function, but when I am creating field, the program reports an error. How can I solve this problem to achieve the desired results? image image

marijanbeg commented 4 years ago

Hi @code-whale, if the value of a vector field is (0, 0, 0), it cannot be normalised. Mathematically, it does not make sense to set up the length of a zero-vector. The regions of the mesh you want to set the norm to be 0, you need to do that using norm and not value.

code-whale commented 4 years ago

Another question I would like to ask is whether the definition of filed defines the initial state of the simulated material without any energy or dynamics, using the vector direction of value to represent the magnetic moment distribution and norm to represent the saturation magnetization.

marijanbeg commented 4 years ago

That is correct. In micromagnetics, we are basically solving an initial value problem. As the name says, we must have an initial state defined, from which we start the time-integration.

code-whale commented 4 years ago

I think my problem has been solved. Thank you for your patient and detailed answer.

code-whale commented 4 years ago

I'm sorry. I have one more question to ask you. When I set the spatial variation A, the material I simulated has a negative interlayer exchange constant was set as −10 pJ/m But when I use the example syntax to define the energy item, the program saves that An is not allowed to be negative. How to deal with this situation?

marijanbeg commented 4 years ago

I think we addressed this issue in the last session and tutorial is available on this topic in workshop repository.

(Please make sure you reopen issue when you have further questions, so we know we need to address it.)

code-whale commented 4 years ago

Thank you for your help. I learned the tutorial, and now I know how to set it up.

marijanbeg commented 4 years ago

Great!