source: sasmodels/sasmodels/models/mass_surface_fractal.py @ 9c461c7

core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 9c461c7 was 9c461c7, checked in by piotr, 8 years ago
  1. Code review from PK: renamed J1c to sph_j1c
  2. Fixed mass_fractal
  • Property mode set to 100644
File size: 4.3 KB
Line 
1r"""
2
3A number of natural and commercial processes form high-surface area materials
4as a result of the vapour-phase aggregation of primary particles.
5Examples of such materials include soots, aerosols, and fume or pyrogenic
6silicas. These are all characterised by cluster mass distributions (sometimes
7also cluster size distributions) and internal surfaces that are fractal in
8nature. The scattering from such materials displays two distinct breaks in
9log-log representation, corresponding to the radius-of-gyration of the primary
10particles, $rg$, and the radius-of-gyration of the clusters (aggregates),
11$Rg$. Between these boundaries the scattering follows a power law related to
12the mass fractal dimension, $Dm$, whilst above the high-Q boundary the
13scattering follows a power law related to the surface fractal dimension of
14the primary particles, $Ds$.
15
16Definition
17----------
18
19The scattered intensity I(q) is calculated using a modified
20Ornstein-Zernicke equation
21
22.. math::
23
24    I(q) = scale \times P(q) + background
25
26    P(q) = \left\{ \left[ 1+(q^2a)\right]^{D_m/2} \times
27                   \left[ 1+(q^2b)\right]^{(6-D_s-D_m)/2}
28           \right\}^{-1}
29
30    a = R_{g}^2/(3D_m/2)
31
32    b = r_{g}^2/[-3(D_s+D_m-6)/2]
33
34    scale = scale\_factor \times NV^2 (\rho_{particle} - \rho_{solvent})^2
35
36where $R_g$ is the size of the cluster, $r_g$ is the size of the primary
37particle, $D_s$ is the surface fractal dimension, $D_m$ is the mass fractal
38dimension, $\rho_{solvent}$ is the scattering length density of the solvent,
39and $\rho_{particle}$ is the scattering length density of particles.
40
41.. note::
42
43    The surface ( $D_s$ ) and mass ( $D_m$ ) fractal dimensions are only
44    valid if $0 < surface_dim < 6$ , $0 < mass_dim < 6$ , and
45    $(surface_dim + mass_dim ) < 6$ .
46
47.. figure:: img/mass_surface_fractal_1d.jpg
48
49    1D plot using the default values.
50
51Reference
52---------
53
54P Schmidt, *J Appl. Cryst.*, 24 (1991) 414-435 Equation(19)
55
56A J Hurd, D W Schaefer, J E Martin, *Phys. Rev. A*, 35 (1987) 2361-2364 Equation(2)
57
58"""
59
60from numpy import inf
61
62name = "mass_surface_fractal"
63title = "Mass Surface Fractal model"
64description = """
65        The scattering intensity  I(x) = scale*P(x)*S(x) + background, where
66        p(x)= {[1+(x^2*a)]^(Dm/2) * [1+(x^2*b)]^(6-Ds-Dm)/2}^(-1)
67        a = Rg^2/(3*Dm/2)
68        b = rg^2/(3*(6-Ds-Dm)/2)
69        scale        =  scale factor * N*Volume^2*contrast^2
70        mass_dim       =  Dm (mass fractal dimension)
71        surface_dim  =  Ds
72        cluster_rg  =  Rg
73        primary_rg    =  rg
74        background   =  background
75        Ref: Schmidt, J Appl Cryst, eq(19), (1991), 24, 414-435
76        Hurd, Schaefer, Martin, Phys Rev A, eq(2),(1987),35, 2361-2364
77        Note that 0 < Ds< 6 and 0 < Dm < 6.
78        """
79category = "shape-independent"
80
81#             ["name", "units", default, [lower, upper], "type","description"],
82parameters = [["mass_dim",      "",    1.8, [1e-16, 6.0], "",
83               "Mass fractal dimension"],
84              ["surface_dim",   "",    2.3, [1e-16, 6.0], "",
85               "Surface fractal dimension"],
86              ["cluster_rg", "Ang",   86.7, [0.0, inf], "",
87               "Cluster radius of gyration"],
88              ["primary_rg", "Ang", 4000.,  [0.0, inf], "",
89               "Primary particle radius of gyration"],
90              ]
91
92
93source = ["mass_surface_fractal.c"]
94
95demo = dict(scale=1, background=0,
96            mass_dim=1.8,
97            surface_dim=2.3,
98            cluster_rg=86.7,
99            primary_rg=4000.0)
100
101oldname = 'MassSurfaceFractal'
102oldpars = dict(radius='radius',
103               mass_dim='mass_dim',
104               surface_dim='surface_dim',
105               cluster_rg='cluster_rg',
106               primary_rg='primary_rg')
107
108tests = [[{'radius':        2.0,
109           'mass_dim':      3.3,
110           'surface_dim':   1.0,
111           'cluster_rg':   90.0,
112           'primary_rg': 4000.0,
113           }, 0.001, 0.18462699016],
114
115         [{'radius':        1.0,
116           'mass_dim':      1.3,
117           'surface_dim':   1.0,
118           'cluster_rg':   90.0,
119           'primary_rg': 2000.0,
120           'background':    0.8,
121           }, 0.001, 1.16539753641],
122
123         [{'radius':        1.0,
124           'mass_dim':      2.3,
125           'surface_dim':   1.0,
126           'cluster_rg':   90.0,
127           'primary_rg': 1000.0,
128           'scale':        10.0,
129           }, 0.051, 0.000169548800377],
130         ]
Note: See TracBrowser for help on using the repository browser.