1 | r""" |
---|
2 | Definition |
---|
3 | ---------- |
---|
4 | |
---|
5 | This model calculates the SAS signal of a phase separating solution under spinodal decomposition. |
---|
6 | The scattering intensity $I(q)$ is calculated as |
---|
7 | .. math:: I(q) = I_{max}\frac{(1+\gamma/2)x^2}{\gamma/2+x^{2+\gamma}}+B |
---|
8 | where $x=q/q_0$ and $B$ is a flat background. The characteristic structure length |
---|
9 | scales with the correlation peak at $q_0$. The exponent $\gamma$ is equal to |
---|
10 | $d+1$ with d the dimensionality of the off-critical concentration mixtures. |
---|
11 | A transition to $\gamma=2 d$is seen near the percolation treshold into the |
---|
12 | critical concentration regime. |
---|
13 | |
---|
14 | References |
---|
15 | ---------- |
---|
16 | |
---|
17 | H. Furukawa. Dynamics-scaling theory for phase-separating unmixing mixtures: |
---|
18 | Growth rates of droplets and scaling properties of autocorrelation functions. Physica A 123,497 (1984). |
---|
19 | |
---|
20 | Authorship and Verification |
---|
21 | ---------------------------- |
---|
22 | |
---|
23 | * **Author:** Dirk Honecker **Date:** Oct 7, 2016 |
---|
24 | * **Last Modified by:** |
---|
25 | * **Last Reviewed by:** |
---|
26 | """ |
---|
27 | |
---|
28 | from numpy import inf, errstate |
---|
29 | |
---|
30 | name = "spinodal" |
---|
31 | title = "Spinodal decomposition model" |
---|
32 | description = """\ |
---|
33 | I(q) = scale ((1+gamma/2)x^2)/(gamma/2+x^(2+gamma))+background |
---|
34 | |
---|
35 | List of default parameters: |
---|
36 | scale = scaling |
---|
37 | gamma = exponent |
---|
38 | x = q/q_0 |
---|
39 | q_0 = correlation peak position [1/A] |
---|
40 | background = Incoherent background""" |
---|
41 | category = "shape-independent" |
---|
42 | |
---|
43 | # pylint: disable=bad-whitespace, line-too-long |
---|
44 | # ["name", "units", default, [lower, upper], "type", "description"], |
---|
45 | parameters = [["scale", "", 1.0, [-inf, inf], "", "Scale factor"], |
---|
46 | ["gamma", "", 3.0, [-inf, inf], "", "Exponent"], |
---|
47 | ["q_0", "1/Ang", 0.1, [-inf, inf], "", "Correlation peak position"] |
---|
48 | ] |
---|
49 | # pylint: enable=bad-whitespace, line-too-long |
---|
50 | |
---|
51 | def Iq(q, |
---|
52 | scale=1.0, |
---|
53 | gamma=3.0, |
---|
54 | q_0=0.1): |
---|
55 | """ |
---|
56 | :param q: Input q-value |
---|
57 | :param scale: Scale factor |
---|
58 | :param gamma: Exponent |
---|
59 | :param q_0: Correlation peak position |
---|
60 | :return: Calculated intensity |
---|
61 | """ |
---|
62 | |
---|
63 | with errstate(divide='ignore'): |
---|
64 | x = q/q_0 |
---|
65 | inten = scale * ((1 + gamma / 2) * x ** 2) / (gamma / 2 + x ** (2 + gamma)) |
---|
66 | return inten |
---|
67 | Iq.vectorized = True # Iq accepts an array of q values |
---|
68 | |
---|
69 | demo = dict(scale=1, background=0, |
---|
70 | gamma=1, q_0=0.1) |
---|