Closed xiaoxin7721 closed 4 months ago
def Ms_fun(pos): x, y, z = pos if ((x - 80)2 + (y - 80)2)**0.5 < 60e-9: return 8.6e5 else: return 0
Ms = {'Nife': Ms_fun, 'cocrpt': 3.98e5}
def minit(pos): x, y, z = pos if 0 < x < 160e-9 and 0 < y < 160e-9: return [2 * random.random() - 1 for in range(3)] else: return [0, 0, 1]
m = {'Nife': m_init,'cocrpt':m_init }
system.m = df.Field(mesh, nvdim=3, value=m, norm=Ms) system.m.sel('z').mpl()
I have encountered a new problem. I want to define the Ms for a bilayer material. The Ms for the CoCrPt layer is correct, but for the NiFe layer, the Ms is not correct. Is there something wrong with my code, and how can I fix it?
def Ms_fun(pos): x, y, z = pos if ((x - 80)2 + (y - 80)2)**0.5 < 60e-9: return 8.6e5 else: return 0
Ms = {'Nife': Ms_fun, 'cocrpt': 3.98e5}
def minit(pos): x, y, z = pos if 0 < x < 160e-9 and 0 < y < 160e-9: return [2 * random.random() - 1 for in range(3)] else: return [0, 0, 1]
m = {'Nife': m_init,'cocrpt':m_init }
system.m = df.Field(mesh, nvdim=3, value=m, norm=Ms) system.m.sel('z').mpl()
I have encountered a new problem. I want to define the Ms for a bilayer material. The Ms for the CoCrPt layer is correct, but for the NiFe layer, the Ms is not correct. Is there something wrong with my code, and how can I fix it?