source: sasmodels/sasmodels/models/raspberry_surface_coverage.py @ 0433203

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

Updating raspberry model to more stable formulation

  • Property mode set to 100644
File size: 4.4 KB
Line 
1r"""
2Definition
3----------
4
5The large and small spheres have their own SLD, as well as the solvent. The
6surface coverage term is a fractional coverage (maximum of approximately 0.9
7for hexagonally-packed spheres on a surface). Since not all of the small
8spheres are necessarily attached to the surface, the excess free (small)
9spheres scattering is also included in the calculation. The function calculate
10follows equations (8)-(12) of the reference below, and the equations are not
11reproduced here.
12
13No inter-particle scattering is included in this model.
14
15
16.. figure:: img/raspberry_geometry.jpg
17
18    Schematic of the raspberry model
19   
20where *Ro* is the radius of the large sphere, *Rp* the radius of the smaller
21spheres on the surface and |delta| = the fractional penetration depth.
22
23For 2D data: The 2D scattering intensity is calculated in the same way as 1D,
24where the *q* vector is defined as
25
26.. math::
27
28    q = \sqrt{q_x^2 + q_y^2}
29
30
31References
32----------
33
34K Larson-Smith, A Jackson, and D C Pozzo, *Small angle scattering model for Pickering emulsions and raspberry*
35*particles*, *Journal of Colloid and Interface Science*, 343(1) (2010) 36-41
36
37**Author:** Andrew jackson **on:** 2008
38
39**Modified by:** Paul Butler **on:** March 18, 2016
40
41**Reviewed by:** Paul Butler **on:** March 18, 2016
42"""
43
44from numpy import pi, inf
45
46name = "raspberry_surface_coverage"
47title = "Calculates the form factor, *P(q)*, for a 'Raspberry-like' structure \
48where there are smaller spheres at the surface of a larger sphere, such as the \
49structure of a Pickering emulsion. This version takes the suface coverage \
50of small spheres as a parameter."
51description = """
52                RaspBerryModel:
53                volfraction_lg = volume fraction large spheres
54                radius_lg = radius large sphere (A)
55                sld_lg = sld large sphere (A-2)
56                volfraction_sm = volume fraction small spheres
57                radius_sm = radius small sphere (A)
58                surface_coverage = fraction of small spheres at surface
59                sld_sm = sld small sphere
60                penetration = small sphere penetration (A)
61                sld_solvent   = sld solvent
62                background = background (cm-1)
63            Ref: J. coll. inter. sci. (2010) vol. 343 (1) pp. 36-41."""
64category = "shape:sphere"
65
66#             [ "name", "units", default, [lower, upper], "type", "description"],
67parameters = [["sld_lg", "1e-6/Ang^2", -0.4, [-inf, inf], "",
68               "large particle scattering length density"],
69              ["sld_sm", "1e-6/Ang^2", 3.5, [-inf, inf], "",
70               "small particle scattering length density"],
71              ["sld_solvent", "1e-6/Ang^2", 6.36, [-inf, inf], "",
72               "solvent scattering length density"],
73              ["volfraction_lg", "", 0.05, [-inf, inf], "",
74               "volume fraction of large spheres"],
75              ["volfraction_sm", "", 0.005, [-inf, inf], "",
76               "volume fraction of small spheres"],
77              ["surface_coverage", "", 0.4, [-inf, inf], "",
78               "surface coverage fraction of small spheres"],
79              ["radius_lg", "Ang", 5000, [0, inf], "volume",
80               "radius of large spheres"],
81              ["radius_sm", "Ang", 100, [0, inf], "",
82               "radius of small spheres"],
83              ["penetration", "Ang", 0.0, [0, inf], "",
84               "penetration depth of small spheres into large sphere"],
85             ]
86
87source = ["lib/sph_j1c.c", "raspberry_surface_coverage.c"]
88
89# parameters for demo
90demo = dict(scale=1, background=0.001,
91            sld_lg=-0.4, sld_sm=3.5, sld_solvent=6.36,
92            volfraction_lg=0.05, volfraction_sm=0.005, surf_fraction=0.4,
93            radius_lg=5000, radius_sm=100, penetration=0.0,
94            radius_lg_pd=.2, radius_lg_pd_n=10)
95
96# For testing against the old sasview models, include the converted parameter
97# names and the target sasview model name.
98oldname = 'RaspBerryModel'
99oldpars = dict(sld_lg='sld_Lsph', sld_sm='sld_Ssph', sld_solvent='sld_solv',
100               volfraction_lg='volf_Lsph', volfraction_sm='volf_Ssph',
101               surf_fraction='surfrac_Ssph',
102               radius_lg='radius_Lsph', radius_sm='radius_Ssph',
103               penetration='delta_Ssph')
104
105
106# NOTE: test results taken from values returned by SasView 3.1.2, with
107# 0.001 added for a non-zero default background.
108tests = [[{}, 0.0412755102041, 0.286669115234],
109         [{}, 0.5, 0.00103818393658],
110        ]
Note: See TracBrowser for help on using the repository browser.