[43fe34b] | 1 | r""" |
---|
| 2 | Definition |
---|
| 3 | ---------- |
---|
| 4 | |
---|
[475ff58] | 5 | This model calculates the SAS signal of a phase separating system |
---|
| 6 | undergoing spinodal decomposition. The scattering intensity $I(q)$ is calculated |
---|
| 7 | as |
---|
[bba9361] | 8 | |
---|
[48462b0] | 9 | .. math:: |
---|
[bba9361] | 10 | I(q) = I_{max}\frac{(1+\gamma/2)x^2}{\gamma/2+x^{2+\gamma}}+B |
---|
| 11 | |
---|
[475ff58] | 12 | where $x=q/q_0$, $q_0$ is the peak position, $I_{max}$ is the intensity |
---|
| 13 | at $q_0$ (parameterised as the $scale$ parameter), and $B$ is a flat |
---|
[93fe8a1] | 14 | background. The spinodal wavelength, $\Lambda$, is given by $2\pi/q_0$. |
---|
| 15 | |
---|
| 16 | The definition of $I_{max}$ in the literature varies. Hashimoto *et al* (1991) |
---|
| 17 | define it as |
---|
| 18 | |
---|
| 19 | .. math:: |
---|
| 20 | I_{max} = \Lambda^3\Delta\rho^2 |
---|
| 21 | |
---|
| 22 | whereas Meier & Strobl (1987) give |
---|
| 23 | |
---|
| 24 | .. math:: |
---|
| 25 | I_{max} = V_z\Delta\rho^2 |
---|
| 26 | |
---|
| 27 | where $V_z$ is the volume per monomer unit. |
---|
[475ff58] | 28 | |
---|
| 29 | The exponent $\gamma$ is equal to $d+1$ for off-critical concentration |
---|
| 30 | mixtures (smooth interfaces) and $2d$ for critical concentration mixtures |
---|
| 31 | (entangled interfaces), where $d$ is the dimensionality (ie, 1, 2, 3) of the |
---|
| 32 | system. Thus 2 <= $\gamma$ <= 6. A transition from $\gamma=d+1$ to $\gamma=2d$ |
---|
| 33 | is expected near the percolation threshold. |
---|
| 34 | |
---|
| 35 | As this function tends to zero as $q$ tends to zero, in practice it may be |
---|
| 36 | necessary to combine it with another function describing the low-angle |
---|
| 37 | scattering, or to simply omit the low-angle scattering from the fit. |
---|
[43fe34b] | 38 | |
---|
| 39 | References |
---|
| 40 | ---------- |
---|
| 41 | |
---|
[48462b0] | 42 | H. Furukawa. Dynamics-scaling theory for phase-separating unmixing mixtures: |
---|
[93fe8a1] | 43 | Growth rates of droplets and scaling properties of autocorrelation functions. |
---|
| 44 | Physica A 123, 497 (1984). |
---|
| 45 | |
---|
| 46 | H. Meier & G. Strobl. Small-Angle X-ray Scattering Study of Spinodal |
---|
| 47 | Decomposition in Polystyrene/Poly(styrene-co-bromostyrene) Blends. |
---|
| 48 | Macromolecules 20, 649-654 (1987). |
---|
| 49 | |
---|
| 50 | T. Hashimoto, M. Takenaka & H. Jinnai. Scattering Studies of Self-Assembling |
---|
| 51 | Processes of Polymer Blends in Spinodal Decomposition. |
---|
| 52 | J. Appl. Cryst. 24, 457-466 (1991). |
---|
[43fe34b] | 53 | |
---|
[475ff58] | 54 | Revision History |
---|
| 55 | ---------------- |
---|
[43fe34b] | 56 | |
---|
[475ff58] | 57 | * **Author:** Dirk Honecker **Date:** Oct 7, 2016 |
---|
[93fe8a1] | 58 | * **Revised:** Steve King **Date:** Oct 25, 2018 |
---|
[43fe34b] | 59 | """ |
---|
| 60 | |
---|
[2d81cfe] | 61 | import numpy as np |
---|
[43fe34b] | 62 | from numpy import inf, errstate |
---|
| 63 | |
---|
| 64 | name = "spinodal" |
---|
| 65 | title = "Spinodal decomposition model" |
---|
| 66 | description = """\ |
---|
[475ff58] | 67 | I(q) = Imax ((1+gamma/2)x^2)/(gamma/2+x^(2+gamma)) + background |
---|
[43fe34b] | 68 | |
---|
| 69 | List of default parameters: |
---|
[475ff58] | 70 | |
---|
| 71 | Imax = correlation peak intensity at q_0 |
---|
| 72 | background = incoherent background |
---|
| 73 | gamma = exponent (see model documentation) |
---|
[43fe34b] | 74 | q_0 = correlation peak position [1/A] |
---|
[475ff58] | 75 | x = q/q_0""" |
---|
| 76 | |
---|
[43fe34b] | 77 | category = "shape-independent" |
---|
| 78 | |
---|
| 79 | # pylint: disable=bad-whitespace, line-too-long |
---|
| 80 | # ["name", "units", default, [lower, upper], "type", "description"], |
---|
[48462b0] | 81 | parameters = [["gamma", "", 3.0, [-inf, inf], "", "Exponent"], |
---|
[43fe34b] | 82 | ["q_0", "1/Ang", 0.1, [-inf, inf], "", "Correlation peak position"] |
---|
| 83 | ] |
---|
| 84 | # pylint: enable=bad-whitespace, line-too-long |
---|
| 85 | |
---|
| 86 | def Iq(q, |
---|
| 87 | gamma=3.0, |
---|
| 88 | q_0=0.1): |
---|
| 89 | """ |
---|
| 90 | :param q: Input q-value |
---|
| 91 | :param gamma: Exponent |
---|
| 92 | :param q_0: Correlation peak position |
---|
| 93 | :return: Calculated intensity |
---|
| 94 | """ |
---|
[48462b0] | 95 | |
---|
[43fe34b] | 96 | with errstate(divide='ignore'): |
---|
| 97 | x = q/q_0 |
---|
[48462b0] | 98 | inten = ((1 + gamma / 2) * x ** 2) / (gamma / 2 + x ** (2 + gamma)) |
---|
[43fe34b] | 99 | return inten |
---|
| 100 | Iq.vectorized = True # Iq accepts an array of q values |
---|
| 101 | |
---|
[48462b0] | 102 | def random(): |
---|
| 103 | pars = dict( |
---|
| 104 | scale=10**np.random.uniform(1, 3), |
---|
| 105 | gamma=np.random.uniform(0, 6), |
---|
| 106 | q_0=10**np.random.uniform(-3, -1), |
---|
| 107 | ) |
---|
| 108 | return pars |
---|
| 109 | |
---|
[43fe34b] | 110 | demo = dict(scale=1, background=0, |
---|
| 111 | gamma=1, q_0=0.1) |
---|