[754c454] | 1 | #bcc paracrystal model |
---|
| 2 | #note model title and parameter table are automatically inserted |
---|
[c95dc908] | 3 | #note - calculation requires double precision |
---|
[6272968] | 4 | r""" |
---|
[a5d0d00] | 5 | Calculates the scattering from a **body-centered cubic lattice** with |
---|
| 6 | paracrystalline distortion. Thermal vibrations are considered to be negligible, |
---|
| 7 | and the size of the paracrystal is infinitely large. Paracrystalline distortion |
---|
| 8 | is assumed to be isotropic and characterized by a Gaussian distribution. |
---|
[754c454] | 9 | |
---|
| 10 | The returned value is scaled to units of |cm^-1|\ |sr^-1|, absolute scale. |
---|
| 11 | |
---|
| 12 | Definition |
---|
| 13 | ---------- |
---|
| 14 | |
---|
[a5d0d00] | 15 | The scattering intensity $I(q)$ is calculated as |
---|
[754c454] | 16 | |
---|
[a5d0d00] | 17 | .. math: |
---|
[754c454] | 18 | |
---|
[a5d0d00] | 19 | I(q) = \frac{\text{scale}}{V_P} V_\text{lattice} P(q) Z(q) |
---|
[754c454] | 20 | |
---|
| 21 | |
---|
[a5d0d00] | 22 | where *scale* is the volume fraction of spheres, *Vp* is the volume of the |
---|
| 23 | primary particle, *V(lattice)* is a volume correction for the crystal |
---|
| 24 | structure, $P(q)$ is the form factor of the sphere (normalized), and $Z(q)$ |
---|
| 25 | is the paracrystalline structure factor for a body-centered cubic structure. |
---|
[754c454] | 26 | |
---|
[a5d0d00] | 27 | Equation (1) of the 1990 reference is used to calculate $Z(q)$, using |
---|
| 28 | equations (29)-(31) from the 1987 paper for *Z1*\ , *Z2*\ , and *Z3*\ . |
---|
[754c454] | 29 | |
---|
[a5d0d00] | 30 | The lattice correction (the occupied volume of the lattice) for a |
---|
| 31 | body-centered cubic structure of particles of radius $R$ and nearest neighbor |
---|
| 32 | separation $D$ is |
---|
[754c454] | 33 | |
---|
[a5d0d00] | 34 | .. math: |
---|
[754c454] | 35 | |
---|
[a5d0d00] | 36 | V_\text{lattice} = \frac{16\pi}{3} \frac{R^3}{\left(D\sqrt{2}\right)^3} |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | The distortion factor (one standard deviation) of the paracrystal is included |
---|
| 40 | in the calculation of $Z(q)$ |
---|
| 41 | |
---|
| 42 | .. math: |
---|
| 43 | |
---|
| 44 | \Delta a = g D |
---|
| 45 | |
---|
| 46 | where $g$ is a fractional distortion based on the nearest neighbor distance. |
---|
[754c454] | 47 | |
---|
| 48 | The body-centered cubic lattice is |
---|
| 49 | |
---|
[a5d0d00] | 50 | .. image:: img/bcc_lattice.jpg |
---|
[754c454] | 51 | |
---|
| 52 | For a crystal, diffraction peaks appear at reduced q-values given by |
---|
| 53 | |
---|
[a5d0d00] | 54 | .. math: |
---|
| 55 | |
---|
| 56 | \frac{qD}{2\pi} = \sqrt{h^2 + k^2 + l^2} |
---|
| 57 | |
---|
| 58 | where for a body-centered cubic lattice, only reflections where |
---|
| 59 | $(h + k + l) = \text{even}$ are allowed and reflections where |
---|
| 60 | $(h + k + l) = \text{odd}$ are forbidden. Thus the peak positions |
---|
| 61 | correspond to (just the first 5) |
---|
[754c454] | 62 | |
---|
[a5d0d00] | 63 | .. math: |
---|
[754c454] | 64 | |
---|
[a5d0d00] | 65 | \begin{eqnarray} |
---|
| 66 | &q/q_o&&\quad 1&& \ \sqrt{2} && \ \sqrt{3} && \ \sqrt{4} && \ \sqrt{5} \\ |
---|
| 67 | &\text{Indices}&& (110) && (200) && (211) && (220) && (310) |
---|
| 68 | \end{eqnarray} |
---|
[754c454] | 69 | |
---|
[a5d0d00] | 70 | **NB: The calculation of $Z(q)$ is a double numerical integral that must |
---|
| 71 | be carried out with a high density of points to properly capture the sharp |
---|
| 72 | peaks of the paracrystalline scattering.** So be warned that the calculation |
---|
| 73 | is SLOW. Go get some coffee. Fitting of any experimental data must be |
---|
| 74 | resolution smeared for any meaningful fit. This makes a triple integral. |
---|
| 75 | Very, very slow. Go get lunch! |
---|
[754c454] | 76 | |
---|
[a5d0d00] | 77 | This example dataset is produced using 200 data points, |
---|
| 78 | *qmin* = 0.001 |Ang^-1|, *qmax* = 0.1 |Ang^-1| and the above default values. |
---|
[754c454] | 79 | |
---|
[a5d0d00] | 80 | .. image:: img/bcc_1d.jpg |
---|
[754c454] | 81 | |
---|
[3c56da87] | 82 | *Figure. 1D plot in the linear scale using the default values |
---|
| 83 | (w/200 data point).* |
---|
[754c454] | 84 | |
---|
[a5d0d00] | 85 | The 2D (Anisotropic model) is based on the reference below where $I(q)$ is |
---|
| 86 | approximated for 1d scattering. Thus the scattering pattern for 2D may not |
---|
| 87 | be accurate. Note that we are not responsible for any incorrectness of the 2D |
---|
| 88 | model computation. |
---|
[754c454] | 89 | |
---|
[a5d0d00] | 90 | .. image:: img/bcc_orientation.gif |
---|
[754c454] | 91 | |
---|
[a5d0d00] | 92 | .. image:: img/bcc_2d.jpg |
---|
[754c454] | 93 | |
---|
| 94 | *Figure. 2D plot using the default values (w/200X200 pixels).* |
---|
| 95 | |
---|
| 96 | REFERENCE |
---|
[a5d0d00] | 97 | --------- |
---|
[754c454] | 98 | |
---|
| 99 | Hideki Matsuoka et. al. *Physical Review B*, 36 (1987) 1754-1765 |
---|
| 100 | (Original Paper) |
---|
| 101 | |
---|
| 102 | Hideki Matsuoka et. al. *Physical Review B*, 41 (1990) 3854 -3856 |
---|
| 103 | (Corrections to FCC and BCC lattice structure calculation) |
---|
| 104 | """ |
---|
| 105 | |
---|
[3c56da87] | 106 | from numpy import inf |
---|
[754c454] | 107 | |
---|
[e166cb9] | 108 | name = "bcc_paracrystal" |
---|
[754c454] | 109 | title = "Body-centred cubic lattic with paracrystalline distortion" |
---|
| 110 | description = """ |
---|
| 111 | Calculates the scattering from a **body-centered cubic lattice** with paracrystalline distortion. Thermal vibrations |
---|
| 112 | are considered to be negligible, and the size of the paracrystal is infinitely large. Paracrystalline distortion is |
---|
| 113 | assumed to be isotropic and characterized by a Gaussian distribution. |
---|
| 114 | """ |
---|
[485aee2] | 115 | category = "shape:paracrystal" |
---|
| 116 | |
---|
| 117 | # ["name", "units", default, [lower, upper], "type","description" ], |
---|
| 118 | parameters = [["dnn", "Ang", 220, [-inf, inf], "", "Nearest neighbour distance"], |
---|
| 119 | ["d_factor", "", 0.06, [-inf, inf], "", "Paracrystal distortion factor"], |
---|
| 120 | ["radius", "Ang", 40, [0, inf], "volume", "Particle radius"], |
---|
| 121 | ["sld", "1e-6/Ang^2", 4, [-inf, inf], "", "Particle scattering length density"], |
---|
| 122 | ["solvent_sld", "1e-6/Ang^2", 1, [-inf, inf], "", "Solvent scattering length density"], |
---|
| 123 | ["theta", "degrees", 60, [-inf, inf], "orientation", "In plane angle"], |
---|
| 124 | ["phi", "degrees", 60, [-inf, inf], "orientation", "Out of plane angle"], |
---|
| 125 | ["psi", "degrees", 60, [-inf, inf], "orientation", "Out of plane angle"] |
---|
| 126 | ] |
---|
| 127 | |
---|
| 128 | source = ["lib/J1.c", "lib/gauss150.c", "bcc.c"] |
---|
[754c454] | 129 | |
---|
| 130 | # parameters for demo |
---|
| 131 | demo = dict( |
---|
| 132 | scale=1, background=0, |
---|
[c95dc908] | 133 | dnn=220, d_factor=0.06, sld=4, solvent_sld=1, |
---|
| 134 | radius=40, |
---|
[754c454] | 135 | theta=60, phi=60, psi=60, |
---|
[cd3dba0] | 136 | radius_pd=.2, radius_pd_n=2, |
---|
[754c454] | 137 | theta_pd=15, theta_pd_n=0, |
---|
| 138 | phi_pd=15, phi_pd_n=0, |
---|
| 139 | psi_pd=15, psi_pd_n=0, |
---|
| 140 | ) |
---|
| 141 | |
---|
| 142 | # For testing against the old sasview models, include the converted parameter |
---|
| 143 | # names and the target sasview model name. |
---|
[485aee2] | 144 | oldname = 'BCCrystalModel' |
---|
| 145 | oldpars = dict(sld='sldSph', solvent_sld='sldSolv') |
---|