ubermag / help

Repository for raising issues and requesting help on Ubermag
BSD 2-Clause "Simplified" License
11 stars 3 forks source link

Spatially varying anisotropy strength #8

Closed kjafranke closed 5 years ago

kjafranke commented 7 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

marijanbeg commented 5 years ago

Please refer to new documentation for this issue: https://github.com/ubermag/oommfc. There is a tutorial about uniaxial anisotropy.