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

core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since eb69cce was eb69cce, checked in by Paul Kienzle <pkienzle@…>, 8 years ago

make model docs more consistent; build pdf docs

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