source: sasmodels/sasmodels/models/raspberry.py @ 5745f0b

core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 5745f0b was 5745f0b, checked in by ajj, 8 years ago

raspberry documentation

  • Property mode set to 100644
File size: 6.3 KB
Line 
1r"""
2Definition
3----------
4
5The figure below shows a schematic of a large droplet surrounded by several smaller particles
6forming a structure similar to that of Pickering emulsions.
7
8.. figure:: img/raspberry_geometry.jpg
9
10    Schematic of the raspberry model
11
12In order to calculate the form factor of the entire complex, the self-correlation of the large droplet,
13the self-correlation of the particles, the correlation terms between different particles
14and the cross terms between large droplet and small particles all need to be calculated.
15
16Consider two infinitely thin shells of radii R2 and R2 separated by distance r. The general
17structure of the equation is then the form factor of the two shells multiplied by the phase
18factor that accounts for the separation of their centers.
19
20.. math::
21
22    S(q) = \frac{sin(qR_1)}{qR_1}\frac{sin(qR_2)}{qR_2}\frac{sin(qr)}{qr}
23
24In this case, the large droplet and small particles are solid spheres rather than thin shells. Thus
25the two terms must be integrated over $R_L$ and $R_S$ respectively using the weighting function of
26a sphere. We then obtain the functions for the form of the two spheres:
27
28.. math::
29
30    \Psi_L = \int_0^{R_L}(4\pi R^2_L)\frac{sin(qR_L)}{qR_L}dR_L = \frac{3[sin(qR_L)-qR_Lcos(qR_L)]}{(qR_L)^2}
31
32.. math::
33
34    \Psi_S = \int_0^{R_S}(4\pi R^2_S)\frac{sin(qR_S)}{qR_S}dR_S = \frac{3[sin(qR_S)-qR_Lcos(qR_S)]}{(qR_S)^2}
35
36The cross term between the large droplet and small particles is given by:
37
38.. math::
39    S_{LS} = \Psi_L\Psi_S\frac{sin(q(R_L+\delta R_S))}{q(R_L+\delta\ R_S)}
40
41and the self term between small particles is given by:
42
43.. math::
44    S_{SS} = \Psi_S^2\bigl[\frac{sin(q(R_L+\delta R_S))}{q(R_L+\delta\ R_S)}\bigr]^2
45
46The number of small particles per large droplet, $N_p$, is given by:
47
48.. math::
49
50    N_p = \frac{\phi_S\phi_{surface}V_L}{\phi_L V_S}
51
52where $\phi_S$ is the volume fraction of small particles in the sample, $\phi_{surface}$ is the
53fraction of the small particles that are adsorbed to the large droplets, $\phi_L$ is the volume fraction
54of large droplets in the sample, and $V_S$ and $V_L$ are the volumes of individual small particles and
55large droplets respectively.
56
57The form factor of the entire complex can now be calculated including the excess scattering length
58densities of the components $\Delta\rho_L$ and $\Delta\rho_S$, where $\Delta\rho_x = |\rho_x-\rho_{solvent}|$ :
59
60.. math::
61
62    P_{LS} = \frac{1}{M^2}\bigl[(\Delta\rho_L)^2V_L^2\Psi_L^2+N_p(\Delta\rho_S)^2V_S^2\Psi_S^2
63                + N_p(1-N_p)(\Delta\rho_S)^2V_S^2S_{SS} + 2N_p\Delta\rho_L\Delta\rho_SV_LV_SS_{LS}
64
65where M is the total scattering length of the whole complex :
66
67.. math::
68    M = \Delta\rho_LV_L + N_p\Delta\rho_SV_S
69
70In a real system, there will ususally be an excess of small particles such that some fraction remain unbound.
71Therefore the overall scattering intensity is given by:
72
73.. math::
74    I(Q) = I_{LS}(Q) + I_S(Q) = (\phi_L(\Delta\rho_L)^2V_L + \phi_S\phi_{surface}N_p(\Delta\rho_S)^2V_S)P_{LS}
75            + \phi_S(1-\phi_{surface})(\Delta\rho_S)^2V_S\Psi_S^2
76
77A useful parameter to extract is the fraction of the surface area of the large droplets that is covered by small
78particles. This can be calculated from the model parameters as:
79
80.. math::
81    \chi = \frac{4\phi_L\phi_{surface}(R_L+\delta R_S)}{\phi_LR_S}
82
83
84References
85----------
86
87K Larson-Smith, A Jackson, and D C Pozzo, *Small angle scattering model for Pickering emulsions and raspberry*
88*particles*, *Journal of Colloid and Interface Science*, 343(1) (2010) 36-41
89
90**Author:** Andrew Jackson **on:** 2008
91
92**Modified by:** Andrew Jackson **on:** March 20, 2016
93
94**Reviewed by:** Andrew Jackson **on:** March 20, 2016
95"""
96
97from numpy import pi, inf
98
99name = "raspberry"
100title = "Calculates the form factor, *P(q)*, for a 'Raspberry-like' structure \
101where there are smaller spheres at the surface of a larger sphere, such as the \
102structure of a Pickering emulsion."
103description = """
104                RaspBerryModel:
105                volfraction_lg = volume fraction large spheres
106                radius_lg = radius large sphere (A)
107                sld_lg = sld large sphere (A-2)
108                volfraction_sm = volume fraction small spheres
109                radius_sm = radius small sphere (A)
110                surface_fraction = fraction of small spheres at surface
111                sld_sm = sld small sphere
112                penetration = small sphere penetration (A)
113                sld_solvent   = sld solvent
114                background = background (cm-1)
115            Ref: J. coll. inter. sci. (2010) vol. 343 (1) pp. 36-41."""
116category = "shape:sphere"
117
118#             [ "name", "units", default, [lower, upper], "type", "description"],
119parameters = [["sld_lg", "1e-6/Ang^2", -0.4, [-inf, inf], "",
120               "large particle scattering length density"],
121              ["sld_sm", "1e-6/Ang^2", 3.5, [-inf, inf], "",
122               "small particle scattering length density"],
123              ["sld_solvent", "1e-6/Ang^2", 6.36, [-inf, inf], "",
124               "solvent scattering length density"],
125              ["volfraction_lg", "", 0.05, [-inf, inf], "",
126               "volume fraction of large spheres"],
127              ["volfraction_sm", "", 0.005, [-inf, inf], "",
128               "volume fraction of small spheres"],
129              ["surface_fraction", "", 0.4, [-inf, inf], "",
130               "fraction of small spheres at surface"],
131              ["radius_lg", "Ang", 5000, [0, inf], "volume",
132               "radius of large spheres"],
133              ["radius_sm", "Ang", 100, [0, inf], "",
134               "radius of small spheres"],
135              ["penetration", "Ang", 0, [-1, 1], "",
136               "fractional penetration depth of small spheres into large sphere"],
137             ]
138
139source = ["lib/sph_j1c.c", "raspberry.c"]
140
141# parameters for demo
142demo = dict(scale=1, background=0.001,
143            sld_lg=-0.4, sld_sm=3.5, sld_solvent=6.36,
144            volfraction_lg=0.05, volfraction_sm=0.005, surface_fraction=0.4,
145            radius_lg=5000, radius_sm=100, penetration=0.0,
146            radius_lg_pd=.2, radius_lg_pd_n=10)
147
148# For testing against the old sasview models, include the converted parameter
149# names and the target sasview model name.
150
151# NOTE: test results taken from values returned by SasView 3.1.2, with
152# 0.001 added for a non-zero default background.
153tests = [[{}, 0.0412755102041, 0.286669115234],
154         [{}, 0.5, 0.00103818393658],
155        ]
Note: See TracBrowser for help on using the repository browser.