Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magnetoelastic effective field equation is missing a 2*B2 #323

Open
marcrovi opened this issue Mar 22, 2023 · 0 comments
Open

Magnetoelastic effective field equation is missing a 2*B2 #323

marcrovi opened this issue Mar 22, 2023 · 0 comments

Comments

@marcrovi
Copy link
Contributor

marcrovi commented Mar 22, 2023

The magnetoelastic energy is written as:

$$ E_{me} = B_1(E_{xx}m_{x}^2 + E_{yy}m_{y}^2 + E_{zz}m_{z}^2) + 2B_2(E_{xy}m_{x}m_{y}+E_{xz}m_{x}m_{z}+E_{yz}m_{y}m_{z}) $$

And the effective field is: $\mu_0 h_{me} = -\nabla_{m} E_{me}$
Therefore, for example, the effective field in $m_x$ would be:

$$ h_{me}^x = -2B_1 E_{xx}m_x + 2B_2( E_{xy}my + E_{xz} m_z) $$

The article: https://doi.org/10.12688/openreseurope.13302.1 explains how the model is implemented and in this github link you can find the code: https://github.com/Fredericvdv/Magnetoelasticity_MuMax3/blob/eeb112dff216a4ae3267fc27fe67aa0e7ada6423/cuda/magnetoelasticfield.cu

The effective field terms are:

            Bx[I] += -2.0f*(B1*m.x*Exx + B2*(m.y*Exy + m.z*Exz));
	    By[I] += -2.0f*(B1*m.y*Eyy + B2*(m.x*Eyx + m.z*Eyz));
	    Bz[I] += -2.0f*(B1*m.z*Ezz + B2*(m.x*Ezx + m.y*Ezy)); 

Where the 2.0f multiplied both B1 and B2. In the MuMax3 repository I found:

	    Bx[I] += -(2.0f*B1*m.x*Exx + B2*(m.y*Exy + m.z*Exz));
	    By[I] += -(2.0f*B1*m.y*Eyy + B2*(m.x*Eyx + m.z*Eyz));
	    Bz[I] += -(2.0f*B1*m.z*Ezz + B2*(m.x*Ezx + m.y*Ezy));

The parenthesis should be after the 2.0f.

I did a Pull Request to address this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant