mammos_mumag.parameters#
Parameters class.
Classes
Class storing simulation parameters. |
- class mammos_mumag.parameters.Parameters[source]#
Class storing simulation parameters.
- Parameters:
size – Size of the mesh. This factor usually indicates the magnitude of the geometry, i.e., 1e-9 for nanometer meshes, 1e-9 for micrometer, etc.
scale – Scale of the mesh. This factor can include other scaling, so that the total scale of the mesh is size * scale.
state – Name of the initial magnetization state. Scripts recognize the strings flower, vortex, twisted, and random. Other strings are interpreted as the default case. The default case is a uniformly magnetized state.
h_mag_on – Whether the external field is on (True) or off (False).
h_start – Strength of the external field that the hysteresis loop starts from.
h_final – Strength of the external field that the hysteresis loop finishes at.
h_step – Difference in field strength between two hysteresis loop measurements.
h_vect – External field vector \(\mathbf{h}\) as a list of floats or a Vector entity. This vector is not necessarily normal. The property h will be the normalized field. If not defined, the external field is zero.
m_step – Threshold at which the magnetization is saved. If in the hysteresis calculation the difference between two consecutive values of magnetization along the external field vector is bigger than this value, a new configuration index will appear on the output csv table. Different configurations mean that the magnetization is behaving differently, possibly changing states.
m_final – Value of magnetization (along the external field direction) at which the hysteresis calculation will stop.
m_vect – Magnetization field \(\mathbf{m}\) as a list of floats or a Vector entity.
precond_iter – Conjugate gradient iterations for inverse Hessian approximation.
tol_fun – Total energy tolerance to obtain the equilibrium configuration.
tol_h_mag_factor – Factor defining the tolerance for the magnetostatic scalar potential according to the formula tol_u = tol_fun * tol_h_mag_factor.
filepath – Path of parameter file to read at initialization. In this case all other parameters will be overwritten (if specified in the parameter file).
- __init__(*args, **kwargs)#
- Parameters:
__dataclass_self__ (PydanticDataclass)
args (Any)
kwargs (Any)
- Return type:
None
- read(fname)[source]#
Read parameter file.
- Parameters:
- Raises:
NotImplementedError – Wrong file format.
- Return type:
None
- read_p2(fpath)[source]#
Read parameter file in p2 format.
The speciality of this file format is that magnetization values are stored in Tesla for readability. Hence, they need to be converted to A/m first. Furthermore, in this format some of the names have a special formatting.
- read_yaml(fpath)[source]#
Read parameter file in yaml format.
We expect the parameters to be saved using the module
mammos_entity.ioand use the functionmammos_entity.io.entities_from_file().