{'fraction_non_alphanumeric': 0.027143070489844684, 'fraction_numerical': 0.007019115890083632, 'mean_word_length': 4.720845792396412, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Atomistic, microstructural and micromagnetic aspects of the multiscale modelling of hysteretic phenomena

We formulated a technique which combines the first-principles, micromagnetic and microstructural calculations and allows us to study the nature of hysteretic phenomena in hard magnets. Two distinct sources of coercivity in polytwinned CoPt type magnets, domain wall pinning at antiphase boundaries and splitting at twin boundaries, are illustrated for a realistic microstructure. Methodology of multiscale modelling of hysteretic phenomena in nanoscale magnets is discussed.


I. INTRODUCTION
It is a well established experimental fact that the hystetic properties of a magnetic material are very sensetive both to its magnetic atomic constituents and to its microstructure. The studies of pure magnetic phenomena on the nanosize scale (domain wall structure, shape of domains and so on) can usually be addressed with appropriate micromagnetic techniques (e.g., the finite element method). Quite extended regions (1-1000 nm and up) can be studied with these techniques, but such important ingredients of the problem as the atomic-scale properties of defects and the microstructure are usually addressed only phenomenologically. The first problem is related to the fact that no first-principle calculations have been used to provide adequate description of interatomic interactions on the atomistic scale, whereas the second one is due to lack of adequate theoretical description of the microstructure. This microstructure plays an especially important role in the properties of hard magnets, because their high coercivity always develops in quite characteristic nanoscale microstructures containing a high density of such microstructural elements as grain boundaries, twins, interphase and antiphase boundaries (APB), etc. Already here it is evident that the theoretical description of the effect of microstructure on the hysteresis loop of a hard magnet presents a rather complex task due to the inherently multiscale nature of the problem and the presence of several entirely different interactions. Interaction of domain walls (DW) with many important defects is determined by variations of the microscopic interaction parameters within the regions of atomistic size (∼1 nm). The DW width (5-10 nm in most hard magnets) is another length scale, while the microstructure itself has one or more additional length scales (typically within the 10-200 nm range). Each of these length scales is physically important, and all of them must be linked together in order to describe the magnetic properties consistently. Therefore, a simultaneous inclusion of magnetic interactions on different scales (from 0.1 nm to 1000 nm) and corresponding elastic interactions (responsible for a given microstructure) seems to be important for the consistent description of the hysteretic phenomena.
Whereas the qualitative considerations above have been around for a long time, to our knowledge, no theoretical methods combining the atomistic, microstructural and micromagnetic parts of the multiscale coercivity problem in real systems have been suggested. Below we show how one can combine the first-principles, micromagnetic and microstructural calculations and apply them to study the rich physics of hysteretic phenomena in hard magnets of CoPt type and demonstrate that coercivity has a natural multiscale character and must be studied using an approach including all the relevant scales and interactions on an equal footing. Below we first discuss the choice of studied CoPt type systems in section II. Microstructure of these materials and its theoretical description is described in section III. In section IV we outline the microscopic mean-field technique replacing the continuous micromagnetic approach for the studies of microscopically defined microstructures. The results on atomistic scale obtained in ab initio calculations will be discussed in section V in connection with APB defects. In section VI we combine the description of all the relevant length scales and interactions and find the structure of a macrodomain wall in a realistic polytwinned microstructure. Section VII concludes the paper.

II. CHOICE OF SYSTEMS
Intermetallic hard magnets CoPt, FePt and FePd develop high coercivities in the tetragonal L1 0 phase. All the accumulated knowledge about this magnet family suggests that it can serve as a prototype for the problem we specified in introduction. First of all, the main microstructural features in these alloys are well established experimentally on the nanoscale level (10-100 nm) which is comparable with δ. Notably, the microstructure is dominated by coherent crystallographic defects (twins and APB's 1 ) and not by grain boundaries, as in other hard magnets. This circumstance provides two major advantages: the microstructure may be consistently simulated theoretically (see section III), while the microscopic properties of defects are tractable in modern first-principles calculations. Indeed, the description of electronic structure of alloys of 3d atoms with Pd and Pt is sufficiently reliable, and the range of perturbation near an APB (1-5 nm) may also be covered. Such parameters as magnetic anisotropy and effective exchange coupling are also routinely computed. With this methodical background, identification of the links between the microstructure and magnetic properties of bulk CoPttype magnets is of interest both for the understanding of their own physics, and for the general theory of hysteretic phenomena. Knowledge of such links may prove useful in the design of future nanofabricated magnets.

III. MICROSTRUCTURE: POLYTWINNING AND ANTIPHASE BOUNDARIES
Typical thermal processing for CoPt type alloys involves high-temperature annealing in the disordered A1 (fcc) phase area of the phase diagram followed by a rapid quench and ageing at a lower temperature in the L1 0 phase area. It is known from transmission electron microscopy (TEM) experiments 1,2 that the microstructural evolution during ageing includes two stages, the 'tweed' stage, and the twinning stage. The 'tweed contrast' corresponds to a uniform pattern formed by small (1-10 nm) ordered domains with a dominant {101} orientation of interfaces and essentially random distribution of the c-axis directions. When the growing ordered domains reach some characteristic size (10-20 nm), a new pattern develops, with the formation of large 'polytwinned' stacks containing ordered 'bands' ('c-domains') with two alternating directions of the c-axis making π/2 angles with each other. The interfaces between the c-domains within a polytwinned stack are all parallel to each other and lie in one of the 101 planes. The main features of microstructure on both these stages stem from the presence of three possible orientations of the c-axis of the ordered phase relative to the cubic disordered phase.
Physically, polytwinning is explained by the fact that such structures eliminate the volume-dependent part of the elastic energy stemming from the coexistence of ordered domains with different c-axis directions 3,4 . Main features of the microstructural evolution at tweed and polytinning stages were reproduced using a phenomenological 2D model 5 . Recently a microscopic model for the description of elastic interactions in alloys undergoing L1 0 type ordering was proposed and used 6 in detailed studies of various aspects of microstructural evolution. In such alloys the elastic interaction turns out to be effectively non-pairwise, but it retains the standard longwavelength 'elastic singularity' of the k −2 type 6 . Therefore, the elastic interaction, as the dipole-dipole interaction, formally has an infinite range. However, due to the fact that the elastic energy of a non-polytwinned array of ordered domains grows faster with the domain size compared to the contribution from the interface tension, there is a characteristic size l 0 at which the elastic interaction begins to affect the microstructural evolution 6 . This size (usually about 10 nm) corresponds to the aver-age size of domains on the tweed stage; the thickness of twins on the polytwinned stage can not be less than l 0 .
As it was shown earlier 7 , the twin boundaries strongly affect the structure of 'macrodomain walls' (MDW) crossing the polytwinned stacks by splitting them in segments that are coupled only magnetostatically. Each segment is pinned individually by pinning centers within the c-domain. This leads us to another generic feature of the polytwinned stage -the c-domains are interspersed with antiphase boundaries (APB) between ordered domains with the same direction of the c-axis and an antiphase shift along this axis. The APB's act as pinning centers for DW's due to a local suppression of MCA (see Section V). Clearly, the efficiency of pinning depends on the pattern formed by APB's. So far, very little is known about the dependence of this pattern on the alloy composition and thermal processing. For example, in Fig. 5 of Ref. 2 the APB's in a CoPt sample appear to be rectilinear, while the available TEM images 1 for FePd alloys reveal quite dense patterns of curved APB's, albeit with some tendency to a preferred alignment. The former case is readily reproduced in microscopic simulations 6 , while the prerequisites for the latter pattern are unclear. It is quite obvious that pinning efficiency should strongly depend on the prevailing APB pattern, and each case should be studied separately. One way to understand the combined effect of MDW splitting and pinning in various microstructures is to take characteristic microstructures obtained in microscopic simulations and add the magnetic degrees of freedom using the method described in section IV. Since magnets operate at relatively low temperatures where diffusion is suppressed, the microstructure may be fixed in magnetic simulations. In this paper we will illustrate this approach by finding an equilibrium structure of MDW's in a polytwinned microstructure taken from a microscopic simulation where APB's are predominantly rectilinear.

IV. MAGNETIC SIMULATIONS: MICROSCOPIC MEAN-FIELD METHOD OR MICROMAGNETISM
The simplest way to add the magnetic degrees of freedom to the microscopically simulated microstructure is to use the atomistic version of the micromagnetic approach which turns out to be convenient in our problem where the relevant length scales are of the order of 5-50 nm.
Consider a binary alloy AB with the classical Hamiltonian where H conf is the configurational part of the Hamiltonian; i and j run over lattice sites; n i = 1 if site i is occupied by a magnetic atom A and n i = 0 otherwise (let B be non-magnetic for simplicity); µ i is the rigid classical magnetic moment of the atom at site i; J ij , the exchange parameters; H 0 , the external magnetic field; ǫ i ( µ i ), the MCA energy equal to −b i (µ → i e i ) 2 for easy-axis anisotropy; and D ij , the magnetic dipole-dipole interaction tensor.
Due to the fact that exchange interaction dominates at small distances, in the vast majority of problems the magnetic moments may be considered to be everywhere close to ferromagnetic alignment, and the angles between µ i 's with non-vanishing J ij are usually relatively small. Therefore, the exchange term in H should be considered as the expansion of the total energy in the angles of deviation from this alignment. The parameters J ij are thus identified with the second derivatives of the total energy in respect to these angles, rather than with the parameters of the Heisenberg model defined to account for arbitrary angles between µ i 's.
The inhomogeneous states of the system may be described by the free energy where T is temperature, and P is the distribution function. For the canonical statistical ensemble ln P 0 = β(F − H), and the system is homogeneous. For inhomogeneous magnetic states with a fixed atomic configuration, let us introduce the "generalized Gibbs distribution" P = exp[β( F − H eff )] as it was done 8 for H conf .
In the theory of second-order phase transitions the effective Hamiltonian H eff is a functional of the macroscopic order parameter field 9 , while in our microscopic case it contains some 'effective parameters' depending on the environment, i.e. on the average values of µ i and, if necessary, of their powers and correlators. In the simplest mean-field approximation (MFA) which will be used in this paper, in equilibrium these parameters are the 'mean fields' H i = H 0 + j (J ij − D ij )c j m j where m j = µ i and c j = n i are the local magnetizations and concentrations. Specifically, in this approximation we have and the free energy after averaging assumes its final form Here E J,DD = c i c j m i (−J ij + D ij )m j is the total exchange and dipole-dipole energy. Equilibrium states for given boundary conditions may be found by solving the 'self-consistency' relations m i = −∂F/∂H i .
Let us emphasize that the above form of P is actually a reduced Gibbs distribution. The effective Hamiltonian contains effective parameters depending on the averages over dynamical variables, while the Gibbs distribution contains the Hamiltonian with actual interaction parameters. In particular, the generalized Gibbs distribution with the effective Hamiltonian and proper boundary conditions may be used to describe inhomonegeous equilibrium states (e.g., the DW's), while the standard Gibbs distribution may not, because it retains the full symmetry of the Hamiltonian.
In cases when MFA is inadequate (e.g. in frustrated systems) one can use more refined statistical methods to calculate F , e.g. the cluster variation method 10 or the cluster field method 11 , although this will considerably complicate the calculations.
The microstructure is defined by the set of c i . For the studies of simple configurations this set may be prepared 'by hand'. More realistic configurations may be obtained in microscopic simulations 6 .
If magnetization M(r) slowly varies in space and is constant in magnitude, Eq. (5) reduces to the micromagnetic free energy 12 . In this case all choices of J ij and b i in the defect-free regions are equivalent if they produce the same macroscopic properties A and K. However, variation of J ij and b i at interatomic distances near defects like APB's must be studied using first-principles techniques. MFA (or more refined) calculations with these parameters may be used to describe DW interaction with the defect at the length scale of δ. At larger, microstructural length scales micromagnetic methods 13,14 may be used with singularities of A and K at the defects. However, as we will see below, in hard magnets the microscopic approach also turns out to be convenient for the studies of regions containing up to ∼ 10 6 atoms; in such calculations some model J ij and b i reproducing the actual defect properties may be used.

V. ATOMISTIC SCALE: PINNING AT ANTIPHASE BOUNDARIES
As it was noted above, the DFT methods are quite reliable for d-systems like Co-Pt. These methods were not used to study the effect of lattice imperfections on the hysteretic phenomena because the extended range required to simulate a DW is certaily inaccessible for any band structure technique. However, for CoPt-type alloys such study is feasible both in a direct ab initio approach (large supercell modelling of DW and defect) and on the model level (calculation of parameters of Hamiltonian). In the present paper we are setting up a technique compatible with microstructural simulations, so we will discuss only the latter approach. Before we proceed with this calculation let us first discuss the physics of hysteretic phenomena on the atomistic level.
As we noted above, polytwinned alloys usually contain a high density of APB's in the c-domains; it was argued that pinning on them may explain high coercivity 15,16 . In this section we will show using first-principles calcu-lations that pinning at APB's (developing on atomistic scale alone) is indeed an important source of coercivity in given alloys.
If pinning is generated by planar faults like APB's, the maximum unpinning threshold H u is achieved when DW segments (DWS) are parallel to the faults. If the planar fault is represented micromagnetically as a slab of thickness w ≪ δ with modified exchange and anisotropy constants A ′ and K ′ , then H u is given by 17 : with α = π/3 3/2 ≃ 0.60 (our definition of δ contains an extra factor π compared to the notation of Ref. 17).
Positive or negative H u corresponds to DW attraction to or repulsion from the fault. One should bear in mind that formula (6) may be used only if the range of exchange interaction (distance at which A converges) is smaller than δ; otherwise, the representation of the planar fault by any variation of A across the fault is meaningless. In fact, this is the case in all hard magnets, because A is proportional to the sum j J ij (r ij n) 2 (n is the unit vector normal to the APB) which converges very slowly 18 . Contrary to the homogeneous case, A(x) can not be conveniently computed using a summation in the reciprocal space (x ≡ rn is the coordinate normal to the APB). Therefore, one should find the 'exchange contribution' to H u directly using the microscopic representation of the defect and the formalism of Section IV. Note that the problem of slow convergence occurs only in the continuous formulation, because the above second-moment sum applies only to the region where the DW profile m(x) may be replaced by its second-order Taylor expansion. The parameters J ij may be calculated using the local spin density functional approach 19 which gives the second derivatives of the total energy over the deviations of a pair of spins from the equilibrium ferromagnetic alignment, in accordance with our definition of J ij . Technically, H u may be found as the maximum field at which an equilibrium state of the DW at the APB is possible.
The modification of K at the defect has a negligible effect on the DW profile m(x) and hence may be accounted for perturbatively. Therefore, we may divide H u in two parts, H u = H ue + H ua , where H ua = αH a (w/δ)(1 − K ′ /K), and H ue must be found microscopically as described above, assuming that MCA is not affected by the defect.
It is convenient to rewrite H ua in a different form more suitable for first-principles calculation. Due to the fact that the MCA modification at the defect may be treated perturbatively, the above formula for H ua does not depend on how MCA behaves close to the defect, as long as the perturbation falls off at distances smaller than δ. In the 'slab' model used to derive (6) the product ∆f a = w(K − K ′ ) may be identified as the 'anisotropy deficit' per unit area of the defect, i.e. the difference in the free energies of the two large samples without and with the defect. Thus, we obtain H ua = αH a ∆f a /Kδ.
The value ∆ǫ a of ∆f a at T = 0 may be directly found using the first-principles calculations. To this end, it is necessary to take a sufficiently large supercell containing the defect, calculate its MCA energy, and subtract the corresponding MCA energy of the pure material. In this context, 'sufficiently large' means that ∆ǫ a is converged with the supercell size. One should bear in mind that symmetry is lowered at the defect, and MCA modification at the defect may lack the easy-axis symmetry of the pure material.
We studied the modification of exchange and MCA at an isolated (101)-oriented APB in CoPt, FePt and FePd using the tight-binding linear-muffin-tin-orbital (TB-LMTO) method. We used elongated supercells of up to 28 atoms with an APB in the middle (the geometry of the (101) APB allows one to introduce a single APB per unit cell of 8n + 4 atoms).
The analysis of the exchange parameters for CoPt in such supercells in conjunction with MFA simulations shows that changes in the local geometry together with the modification of J ij at such APB generates only a weak DW repulsion from the APB with |H ue | < 1 kOe. The total exchange interaction between the pairs of atomic layers parallel to the (101) APB is notably affected only in the close vicinity of the APB, particularly for the next-nearest layers across the APB where extra nearest neighbors appear compared to the pure material.
From the other hand, we found that MCA is strongly suppressed at the (101) APB leading to a considerable DW attraction to it. The values of ∆ǫ a per area of the APB corresponding to one formula unit in each atomic layer are 5.0E a for CoPt, 2.8E a for FePt and 4.8E a for FePd, where E a is the bulk MCA energy per formula unit. Since high MCA is associated with L1 0 ordering, it is natural that local disorder introduced by an APB suppresses MCA; one may expect it to be a generic feature of APB's and other defects.
At low temperatures compared to the ordering transition the order parameters and atomic structure of defects are almost independent on temperature. In this temperature range (going up and beyond the room temperature) it is reasonable to expect that ∆f a and K depend on T in a similar way. Therefore, an accurate estimate of H ua may be obtained using (7) with the zero-temperature values of ∆f a and K and actual values of H a and δ at the given T (the dependence of δ on T is also quite weak, because both A and K decrease with increasing T ). At higher temperatures the disorder at APB's may increase considerably, leading to a different T dependence of ∆f a . Using (7) and the values of H a and δ from Ref. 20 we obtain the threshold fields of 6.8, 3.7 and 1.2 kOe for CoPt, FePt and FePd, respectively; these values are consistent with observed coercivities. Disorder at an APB (which is always present in real alloys with non-nearestneighbour configurational interaction 6 ) notably increases ∆ǫ a , and hence H ua . This effect should also be expected at high temperatures affecting the temperature dependence of the coercive force.

VI. MACRODOMAIN WALLS IN A REALISTIC MICROSTRUCTURE
Although experimental observations are too scarce for reliable conclusions, in actual microstructures the APB's are rarely rectilinear, except for advanced stages of annealing (like the sample shown in Fig. 5 of Ref. 2); at early stages of annealing the c-domains contain a large density of intricately curved APB's 1 . Therefore, H u in real alloys may be significantly lower compared to the values obtained above for the plane-parallel configuration of DW's and APB's. The best coercive properties should be achieved as a result of the competition of a number of factors depending on the annealing time, most notably H u , H s , l d and l m . A complicated interplay of these factors may be studied by direct simulation of MR in realistic microstructures obtained in microscopic simulations. To illustrate this approach, we found a stable configuration of two MDW's in the CoPt model described above with a microstructure similar to the experimental one shown in Fig. 5 of Ref. 2. We took a simulated structure similar to Fig. 5 of Ref. 6 but obtained 21 with a larger tetragonal distortion ε m = 0.2, and augmented it to a 256x256x1 bct simulation box (∼ 70 nm) using the periodic boundary conditions. In order to reproduce DW attraction to APB's in accordance with our band structure calculations, we put b i = 0 in the close vicinity of APB's (defined by a certain combination of local order parameters), and b i = b at all other sites with easy axis e i coinciding with the local tetragonal axis (also found using local order parameters). The exchange parameters J ij were set as it was specified above, making the exchange constant A continuous at (101) APB's. This choice of b i and J ij follows the general prescription given above after Eq. (5); the unpinning threshold for parallel DW and APB was made to be close to its value obtained in Section V for CoPt.
The resulting magnetic structure is shown in Fig. 1 illustrating and extending our conclusions about the properties of MDW. The MDW's are seen to be 'soft'; DWS's in the c-domains have a considerable freedom in their relative displacement, and several of them are pinned at APB's. Notably, the DWS's do not change their shape strongly when partially pinned by APB's (e.g., in the upper-left corner). Strong magnetic fields 'left behind' by displaced DWS's are responsible for the attraction of DWS's in an isolated MDW.
Two separate sources of coercivity in polytwinned CoPt type magnets, domain wall pinning at antiphase boundaries and splitting at twin boundaries 22 , are clearly present in our simulations for a realistic microstructure. Splitting may strongly affect the efficiency of DW pinning, and it is important to account for both these effects simultaneously in order to describe the coercivity.

VII. CONCLUSION
We have described the DW properties in polytwinned CoPt-type systems where two sources of coercivity, domain wall pinning at antiphase boundaries and splitting at twin boundaries, are included simultaneously using a realistic microstructure. Pinning is related to MCA lowering at the planar defect (APB) whereas splitting comes from the competition between the long-range dipoledipole and short-range exchange interactions.
From the applied point of view, it is usually assumed that polytwinning is detrimental for high coercivity. However, splitting may increase the efficiency of DW pinning by allowing the DWS's to 'find' pinning sites independently. It seems that the application potential of polytwinned microstructures has not been exhausted, and better properties may be achieved on the basis of this new theoretical understanding.
From the methodical point of view, we have shown that the coercivity is an intrinsic multiscale property in hard magnets and to describe this property one has to use a theory which necessary combines a synergy of different length scales in a presence of physical interactions of entirely different nature. Whereas the different aspect of the problem of magnetization reversal can be studied using one level approach, the problem as a whole requires more complicated description. We believe that such synergistic type of approach represent a generic feature for any theory to be succesful in area of nanoscale type of magnets: bulk systems, multilayers, clusters and nanowires.
We thank H. Kronmüller, R. Skomski and V.G. Vaks for useful discussions, and members of the DOE Nanomagnets CSP Group for their support and interest to this work. This work was carried out at Ames Laboratory, which is operated for the U.S. Department of Energy by Iowa State University under Contract No. W-7405-82. This work was supported by the Director for Energy Research, Office of Basic Energy Sciences of the U.S. Department of Energy.