Closed kjafranke closed 5 years ago
Hi,
I would like to have a spatially varying anisotropy strength. at the moment I am trying the following:
def K_value(pos): x, y, z = pos if x < -70e-9: return 1e10 else: return 1e4
system.hamiltonian = oc.Exchange(A=A_FeGe) + oc.Zeeman(H=H) + \ oc.UniaxialAnisotropy(K1=K_value, u=(0, 0, 1))
When I try to run this I get an error message that ends with:
TypeError: Expected <class 'numbers.Real'>
How do I implement this correctly?
Thank you,
Kévin
Please refer to new documentation for this issue: https://github.com/ubermag/oommfc. There is a tutorial about uniaxial anisotropy.
Hi,
I would like to have a spatially varying anisotropy strength. at the moment I am trying the following:
def K_value(pos): x, y, z = pos if x < -70e-9: return 1e10 else: return 1e4
system.hamiltonian = oc.Exchange(A=A_FeGe) + oc.Zeeman(H=H) + \ oc.UniaxialAnisotropy(K1=K_value, u=(0, 0, 1))
When I try to run this I get an error message that ends with:
TypeError: Expected <class 'numbers.Real'>
How do I implement this correctly?
Thank you,
Kévin