source: sasmodels/sasmodels/models/lamellarCailleHG.py @ dc02af0

core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since dc02af0 was dc02af0, checked in by richardh, 9 years ago

adding Lamellar models, polydisp needs checking

  • Property mode set to 100644
File size: 4.4 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 lamellar phase where a random
4distribution in solution are assumed. Here a Caille S(Q) is used for the lamellar stacks.
5
6The scattering intensity *I(q)* is
7
8.. image:: img/lamellarCailleHG_139.PNG
9
10The form factor is
11
12.. image:: img/lamellarCailleHG_143.PNG
13
14and the structure factor is
15
16.. image:: img/lamellarCailleHG_140.PNG
17
18where
19
20.. image:: img/lamellarCailleHG_141.PNG
21
22where |delta|\ T = tail length (or *tail_length*), |delta|\ H = head thickness (or *h_thickness*),
23|drho|\ H = SLD(headgroup) - SLD(solvent), and |drho|\ T = SLD(tail) - SLD(headgroup).
24Here *d* = (repeat) spacing, *K* = smectic bending elasticity, *B* = compression modulus, and N = number of lamellar
25plates (*n_plates*).
26
27NB: **When the Caille parameter is greater than approximately 0.8 to 1.0, the assumptions of the model are incorrect.**
28And due to a complication of the model function, users are responsible for making sure that all the assumptions are
29handled accurately (see the original reference below for more details).
30
31Non-integer numbers of stacks are calculated as a linear combination of results for the next lower and higher values.
32
33The 2D scattering intensity is calculated in the same way as 1D, where the *q* vector is defined as
34
35.. math::
36
37    Q = \sqrt{Q_x^2 + Q_y^2}
38
39The returned value is in units of |cm^-1|, on absolute scale.
40
41==============  ========  =============
42Parameter name  Units     Default value
43==============  ========  =============
44background      |cm^-1|   0.001
45sld_head        |Ang^-2|  2e-06
46scale           None      1
47sld_solvent     |Ang^-2|  6e-06
48deltaH          |Ang|     2
49deltaT          |Ang|     10
50sld_tail        |Ang^-2|  0
51n_plates        None      30
52spacing         |Ang|     40
53caille          |Ang^-2|  0.001
54==============  ========  =============
55
56.. image:: img/lamellarCailleHG_142.jpg
57
58*Figure. 1D plot using the default values (w/6000 data point).*
59
60Our model uses the form factor calculations implemented in a c-library provided by the NIST Center for Neutron Research
61(Kline, 2006).
62
63REFERENCE
64
65F Nallet, R Laversanne, and D Roux, J. Phys. II France, 3, (1993) 487-502
66
67also in J. Phys. Chem. B, 105, (2001) 11081-11088
68"""
69from numpy import pi, inf
70
71name = "lamellarCailleHG"
72title = "Random lamellar sheet with Caille structure factor"
73description = """\
74        [Random lamellar phase with Caille  structure factor]
75        randomly oriented stacks of infinite sheets
76                with Caille S(Q), having polydisperse spacing.
77                layer thickness =(H+T+T+H) = 2(Head+Tail)
78                sld = Tail scattering length density
79                sld_head = Head scattering length density
80                sld_solvent = solvent scattering length density
81                background = incoherent background
82                scale = scale factor
83"""
84
85parameters = [
86#   [ "name", "units", default, [lower, upper], "type",
87#     "description" ],
88    [ "tail_length", "Ang",  10, [0, inf], "volume",
89      "Tail thickness" ],
90    [ "head_length", "Ang",  2, [0, inf], "volume",
91      "head thickness" ],
92    [ "Nlayers", "",  30, [0, inf], "",
93      "Number of layers" ],
94    [ "spacing", "Ang", 40., [0.0,inf], "volume",
95      "d-spacing of Caille S(Q)" ],
96    [ "Caille_parameter", "", 0.001, [0.0,0.8], "",
97      "Caille parameter" ],
98    [ "sld", "1e-6/Ang^2", 0.4, [-inf,inf], "",
99      "Tail scattering length density" ],
100    [ "head_sld", "1e-6/Ang^2", 2.0, [-inf,inf], "",
101      "Head scattering length density" ],
102    [ "solvent_sld", "1e-6/Ang^2", 6, [-inf,inf], "",
103      "Solvent scattering length density" ],
104    ]
105
106source = [ "lamellarCailleHG_kernel.c"]
107
108# No volume normalization despite having a volume parameter
109# This should perhaps be volume normalized?
110form_volume = """
111    return 1.0;
112    """
113
114Iqxy = """
115    // never called since no orientation or magnetic parameters.
116    return -1.0;
117    """
118
119# ER defaults to 0.0
120# VR defaults to 1.0
121
122demo = dict(
123        scale=1, background=0,
124                Nlayers=20,spacing=200.,
125        Caille_parameter=0.05,
126                tail_length=15,head_length=10,
127        sld=-1, head_sld=4.0, solvent_sld=6.0,
128                tail_length_pd= 0.1, tail_length_pd_n=20,
129                head_length_pd= 0.05, head_length_pd_n=30,
130                spacing_pd= 0, spacing_pd_n=40
131         )
132
133oldname = 'LamellarPSHGModel'
134oldpars = dict(tail_length='deltaT',head_length='deltaH',Nlayers='n_plates',Caille_parameter='caille', sld='sld_tail', head_sld='sld_head',solvent_sld='sld_solvent')
Note: See TracBrowser for help on using the repository browser.