1 | # Note: model title and parameter table are inserted automatically |
---|
2 | r""" |
---|
3 | This model provides the scattering intensity, $I(q) = P(q) S(q)$, for a |
---|
4 | lamellar phase where a random distribution in solution are assumed. |
---|
5 | Here a Caille $S(q)$ is used for the lamellar stacks. |
---|
6 | |
---|
7 | Definition |
---|
8 | ---------- |
---|
9 | |
---|
10 | The scattering intensity $I(q)$ is |
---|
11 | |
---|
12 | .. math:: |
---|
13 | |
---|
14 | I(q) = 2\pi \frac{P(q)S(q)}{\delta q^2} |
---|
15 | |
---|
16 | The form factor is |
---|
17 | |
---|
18 | .. math:: |
---|
19 | |
---|
20 | P(q) = \frac{2\Delta\rho^2}{q^2}\left(1-\cos q\delta \right) |
---|
21 | |
---|
22 | and the structure factor is |
---|
23 | |
---|
24 | .. math:: |
---|
25 | |
---|
26 | S(q) = 1 + 2 \sum_1^{N-1}\left(1-\frac{n}{N}\right) |
---|
27 | \cos(qdn)\exp\left(-\frac{2q^2d^2\alpha(n)}{2}\right) |
---|
28 | |
---|
29 | where |
---|
30 | |
---|
31 | .. math:: |
---|
32 | :nowrap: |
---|
33 | |
---|
34 | \begin{align*} |
---|
35 | \alpha(n) &= \frac{\eta_{cp}}{4\pi^2} \left(\ln(\pi n)+\gamma_E\right) |
---|
36 | && \\ |
---|
37 | \gamma_E &= 0.5772156649 |
---|
38 | && \text{Euler's constant} \\ |
---|
39 | \eta_{cp} &= \frac{q_o^2k_B T}{8\pi\sqrt{K\overline{B}}} |
---|
40 | && \text{Caille constant} |
---|
41 | \end{align*} |
---|
42 | |
---|
43 | Here $d$ = (repeat) spacing, $\delta$ = bilayer thickness, |
---|
44 | the contrast $\Delta\rho$ = SLD(headgroup) - SLD(solvent), |
---|
45 | $K$ = smectic bending elasticity, $B$ = compression modulus, and |
---|
46 | $N$ = number of lamellar plates (*n_plates*). |
---|
47 | |
---|
48 | NB: **When the Caille parameter is greater than approximately 0.8 to 1.0, the |
---|
49 | assumptions of the model are incorrect.** And due to a complication of the |
---|
50 | model function, users are responsible for making sure that all the assumptions |
---|
51 | are handled accurately (see the original reference below for more details). |
---|
52 | |
---|
53 | Non-integer numbers of stacks are calculated as a linear combination of |
---|
54 | results for the next lower and higher values. |
---|
55 | |
---|
56 | The 2D scattering intensity is calculated in the same way as 1D, where the |
---|
57 | $q$ vector is defined as |
---|
58 | |
---|
59 | .. math:: |
---|
60 | |
---|
61 | q = \sqrt{q_x^2 + q_y^2} |
---|
62 | |
---|
63 | .. figure:: img/lamellarCaille_1d.jpg |
---|
64 | |
---|
65 | 1D plot using the default values (w/6000 data point). |
---|
66 | |
---|
67 | References |
---|
68 | ---------- |
---|
69 | |
---|
70 | F Nallet, R Laversanne, and D Roux, J. Phys. II France, 3, (1993) 487-502 |
---|
71 | |
---|
72 | also in J. Phys. Chem. B, 105, (2001) 11081-11088 |
---|
73 | """ |
---|
74 | from numpy import inf |
---|
75 | |
---|
76 | name = "lamellarPS" |
---|
77 | title = "Random lamellar sheet with Caille structure factor" |
---|
78 | description = """\ |
---|
79 | [Random lamellar phase with Caille structure factor] |
---|
80 | randomly oriented stacks of infinite sheets |
---|
81 | with Caille S(Q), having polydisperse spacing. |
---|
82 | sld = sheet scattering length density |
---|
83 | sld_solvent = solvent scattering length density |
---|
84 | background = incoherent background |
---|
85 | scale = scale factor |
---|
86 | """ |
---|
87 | category = "shape:lamellae" |
---|
88 | |
---|
89 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
90 | parameters = [["thickness", "Ang", 30.0, [0, inf], "volume", "sheet thickness"], |
---|
91 | ["Nlayers", "", 20, [0, inf], "", "Number of layers"], |
---|
92 | ["spacing", "Ang", 400., [0.0,inf], "volume", "d-spacing of Caille S(Q)"], |
---|
93 | ["Caille_parameter", "1/Ang^2", 0.1, [0.0,0.8], "", "Caille parameter"], |
---|
94 | ["sld", "1e-6/Ang^2", 6.3, [-inf,inf], "", |
---|
95 | "layer scattering length density"], |
---|
96 | ["solvent_sld", "1e-6/Ang^2", 1.0, [-inf,inf], "", |
---|
97 | "Solvent scattering length density"], |
---|
98 | ] |
---|
99 | |
---|
100 | source = ["lamellarCaille_kernel.c"] |
---|
101 | |
---|
102 | # No volume normalization despite having a volume parameter |
---|
103 | # This should perhaps be volume normalized? |
---|
104 | form_volume = """ |
---|
105 | return 1.0; |
---|
106 | """ |
---|
107 | |
---|
108 | Iqxy = """ |
---|
109 | return Iq(sqrt(qx*qx+qy*qy), IQ_PARAMETERS); |
---|
110 | """ |
---|
111 | |
---|
112 | # ER defaults to 0.0 |
---|
113 | # VR defaults to 1.0 |
---|
114 | |
---|
115 | demo = dict(scale=1, background=0, |
---|
116 | thickness=67.,Nlayers=3.75,spacing=200., |
---|
117 | Caille_parameter=0.268,sld=1.0, solvent_sld=6.34, |
---|
118 | thickness_pd= 0.1, thickness_pd_n=100, |
---|
119 | spacing_pd= 0.05, spacing_pd_n=40) |
---|
120 | |
---|
121 | oldname = 'LamellarPSModel' |
---|
122 | oldpars = dict(thickness='delta', Nlayers='N_plates', Caille_parameter='caille', |
---|
123 | sld='sld_bi',solvent_sld='sld_sol') |
---|
124 | # |
---|
125 | tests = [ |
---|
126 | [ {'scale': 1.0, 'background' : 0.0, 'thickness' : 30.,'Nlayers' : 20.0, 'spacing' : 400., |
---|
127 | 'Caille_parameter' : 0.1, 'sld' : 6.3, 'solvent_sld' : 1.0, |
---|
128 | 'thickness_pd' : 0.0, 'spacing_pd' : 0.0 }, [0.001], [28895.13397]] |
---|
129 | ] |
---|