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

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

doc fixups: add doc category to model def, convert equations to latex for barbell and bcc

  • 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 pi, 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
87parameters = [
88#   [ "name", "units", default, [lower, upper], "type",
89#     "description" ],
90    [ "thickness", "Ang",  30.0, [0, inf], "volume",
91      "sheet thickness" ],
92    [ "Nlayers", "",  20, [0, inf], "",
93      "Number of layers" ],
94    [ "spacing", "Ang", 400., [0.0,inf], "volume",
95      "d-spacing of Caille S(Q)" ],
96    [ "Caille_parameter", "1/Ang^2", 0.1, [0.0,0.8], "",
97      "Caille parameter" ],
98    [ "sld", "1e-6/Ang^2", 6.3, [-inf,inf], "",
99      "layer scattering length density" ],
100    [ "solvent_sld", "1e-6/Ang^2", 1.0, [-inf,inf], "",
101      "Solvent scattering length density" ],
102    ]
103
104source = [ "lamellarCaille_kernel.c"]
105
106# No volume normalization despite having a volume parameter
107# This should perhaps be volume normalized?
108form_volume = """
109    return 1.0;
110    """
111
112Iqxy = """
113    // never called since no orientation or magnetic parameters.
114    return -1.0;
115    """
116
117# ER defaults to 0.0
118# VR defaults to 1.0
119
120demo = dict(
121        scale=1, background=0,
122                thickness=67.,Nlayers=3.75,spacing=200.,
123        Caille_parameter=0.268,sld=1.0, solvent_sld=6.34,
124                thickness_pd= 0.1, thickness_pd_n=100,
125                spacing_pd= 0.05, spacing_pd_n=40
126         )
127
128oldname = 'LamellarPSModel'
129oldpars = dict(thickness='delta',Nlayers='N_plates',Caille_parameter='caille', sld='sld_bi',solvent_sld='sld_sol')
Note: See TracBrowser for help on using the repository browser.