1 | r""" |
---|
2 | This model calculates the scattering from fractal-like aggregates based |
---|
3 | on the Mildner reference. |
---|
4 | |
---|
5 | Definition |
---|
6 | ---------- |
---|
7 | |
---|
8 | The scattering intensity $I(q)$ is calculated as |
---|
9 | |
---|
10 | .. math:: |
---|
11 | |
---|
12 | I(q) &= \text{scale} \times P(q)S(q) + \text{background} \\ |
---|
13 | P(q) &= F(qR)^2 \\ |
---|
14 | F(x) &= \frac{3\left[\sin(x)-x\cos(x)\right]}{x^3} \\ |
---|
15 | S(q) &= \Gamma(5-D_S)\xi^{\,5-D_S}\left[1+(q\xi)^2 \right]^{-(5-D_S)/2} |
---|
16 | \sin\left[-(5-D_S) \tan^{-1}(q\xi) \right] q^{-1} \\ |
---|
17 | \text{scale} &= \text{scale_factor}\, N V^2(\rho_\text{particle} - \rho_\text{solvent})^2 \\ |
---|
18 | V &= \frac{4}{3}\pi R^3 |
---|
19 | |
---|
20 | where $R$ is the radius of the building block, $D_S$ is the **surface** fractal |
---|
21 | dimension, $\xi$ is the cut-off length, $\rho_\text{solvent}$ is the scattering |
---|
22 | length density of the solvent and $\rho_\text{particle}$ is the scattering |
---|
23 | length density of particles. |
---|
24 | |
---|
25 | .. note:: |
---|
26 | |
---|
27 | The surface fractal dimension is only valid if $1<D_S<3$. The result is |
---|
28 | only valid over a limited $q$ range, $\tfrac{5}{3-D_S}\xi^{\,-1} < q < R^{-1}$. |
---|
29 | See the reference for details. |
---|
30 | |
---|
31 | |
---|
32 | References |
---|
33 | ---------- |
---|
34 | |
---|
35 | D Mildner and P Hall, *J. Phys. D: Appl. Phys.*, 19 (1986) 1535-1545 |
---|
36 | |
---|
37 | """ |
---|
38 | |
---|
39 | from numpy import inf |
---|
40 | |
---|
41 | name = "surface_fractal" |
---|
42 | title = "Fractal-like aggregates based on the Mildner reference" |
---|
43 | description = """\ |
---|
44 | [The scattering intensity I(x) = scale*P(x)*S(x) + background, where |
---|
45 | scale = scale_factor * V * delta^(2) |
---|
46 | p(x) = F(x*radius)^(2) |
---|
47 | F(x) = 3*[sin(x)-x cos(x)]/x**3 |
---|
48 | S(x) = [(gamma(5-Ds)*colength^(5-Ds)*[1+(x^2*colength^2)]^((Ds-5)/2) |
---|
49 | * sin[(Ds-5)*arctan(x*colength)])/x] |
---|
50 | where |
---|
51 | delta = sldParticle -sldSolv. |
---|
52 | radius = Particle radius |
---|
53 | fractal_dim_surf = Surface fractal dimension (Ds) |
---|
54 | co_length = Cut-off length |
---|
55 | background = background |
---|
56 | |
---|
57 | Ref. :Mildner, Hall,J Phys D Appl Phys(1986), 19, 1535-1545 |
---|
58 | Note I : This model is valid for 1<fractal_dim_surf<3 with limited q range. |
---|
59 | Note II: This model is not in absolute scale. |
---|
60 | """ |
---|
61 | category = "shape-independent" |
---|
62 | |
---|
63 | # pylint: disable=bad-whitespace, line-too-long |
---|
64 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
65 | parameters = [["radius", "Ang", 10.0, [0, inf], "", |
---|
66 | "Particle radius"], |
---|
67 | ["fractal_dim_surf", "", 2.0, [1, 3], "", |
---|
68 | "Surface fractal dimension"], |
---|
69 | ["cutoff_length", "Ang", 500., [0.0, inf], "", |
---|
70 | "Cut-off Length"], |
---|
71 | ] |
---|
72 | # pylint: enable=bad-whitespace, line-too-long |
---|
73 | |
---|
74 | source = ["lib/sph_j1c.c", "lib/sas_gamma.c", "surface_fractal.c"] |
---|
75 | |
---|
76 | demo = dict(scale=1, background=1e-5, |
---|
77 | radius=10, fractal_dim_surf=2.0, cutoff_length=500) |
---|
78 | |
---|
79 | tests = [ |
---|
80 | # Accuracy tests based on content in test/utest_other_models.py |
---|
81 | [{'radius': 10.0, |
---|
82 | 'fractal_dim_surf': 2.0, |
---|
83 | 'cutoff_length': 500.0, |
---|
84 | }, 0.05, 301428.66016], |
---|
85 | |
---|
86 | # Additional tests with larger range of parameters |
---|
87 | [{'radius': 1.0, |
---|
88 | 'fractal_dim_surf': 1.0, |
---|
89 | 'cutoff_length': 10.0, |
---|
90 | }, 0.332070182643, 1125.00421004], |
---|
91 | |
---|
92 | [{'radius': 3.5, |
---|
93 | 'fractal_dim_surf': 0.1, |
---|
94 | 'cutoff_length': 30.0, |
---|
95 | 'background': 0.01, |
---|
96 | }, 5.0, 0.00999998891322], |
---|
97 | |
---|
98 | [{'radius': 3.0, |
---|
99 | 'fractal_dim_surf': 1.0, |
---|
100 | 'cutoff_length': 33.0, |
---|
101 | 'scale': 0.1, |
---|
102 | }, 0.51, 2.50120147004], |
---|
103 | ] |
---|