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

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

fix multiline equation alignment

  • 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    :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
43Here $d$ = (repeat) spacing, $\delta$ = bilayer thickness,
44the 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
48NB: **When the Caille parameter is greater than approximately 0.8 to 1.0, the
49assumptions of the model are incorrect.** And due to a complication of the
50model function, users are responsible for making sure that all the assumptions
51are handled accurately (see the original reference below for more details).
52
53Non-integer numbers of stacks are calculated as a linear combination of
54results for the next lower and higher values.
55
56The 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
67References
68----------
69
70F Nallet, R Laversanne, and D Roux, J. Phys. II France, 3, (1993) 487-502
71
72also in J. Phys. Chem. B, 105, (2001) 11081-11088
73"""
74from numpy import inf
75
76name = "lamellarPS"
77title = "Random lamellar sheet with Caille structure factor"
78description = """\
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"""
87category = "shape:lamellae"
88
89#             ["name", "units", default, [lower, upper], "type","description"],
90parameters = [["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
100source = ["lamellarCaille_kernel.c"]
101
102# No volume normalization despite having a volume parameter
103# This should perhaps be volume normalized?
104form_volume = """
105    return 1.0;
106    """
107
108Iqxy = """
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
115demo = 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
121oldname = 'LamellarPSModel'
122oldpars = dict(thickness='delta', Nlayers='N_plates', Caille_parameter='caille',
123               sld='sld_bi',solvent_sld='sld_sol')
Note: See TracBrowser for help on using the repository browser.