source: sasmodels/sasmodels/models/lamellarCaille.py @ d1fe925

gh-pages
Last change on this file since d1fe925 was d1fe925, checked in by ajj, 8 years ago

Creating gh_pages branch for docs

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