[1369fe6] | 1 | #adsorbed_layer model |
---|
| 2 | #conversion of Core2ndMomentModel.py |
---|
| 3 | #converted by Steve King, Mar 2016 |
---|
| 4 | |
---|
| 5 | r""" |
---|
[62cf915] | 6 | This model describes the scattering from a layer of surfactant or polymer |
---|
| 7 | adsorbed on large, smooth, notionally spherical particles under the conditions |
---|
| 8 | that (i) the particles (cores) are contrast-matched to the dispersion medium, |
---|
| 9 | (ii) $S(Q) \sim 1$ (ie, the particle volume fraction is dilute), (iii) the |
---|
| 10 | particle radius is >> layer thickness (ie, the interface is locally flat), |
---|
| 11 | and (iv) scattering from excess unadsorbed adsorbate in the bulk medium is |
---|
| 12 | absent or has been corrected for. |
---|
| 13 | |
---|
| 14 | Unlike many other core-shell models, this model does not assume any form |
---|
| 15 | for the density distribution of the adsorbed species normal to the interface |
---|
| 16 | (cf, a core-shell model normally assumes the density distribution to be a |
---|
| 17 | homogeneous step-function). For comparison, if the thickness of a (traditional |
---|
| 18 | core-shell like) step function distribution is $t$, the second moment about |
---|
| 19 | the mean of the density distribution (ie, the distance of the centre-of-mass |
---|
| 20 | of the distribution from the interface), $\sigma = \sqrt{t^2/12}$. |
---|
[1369fe6] | 21 | |
---|
| 22 | Definition |
---|
| 23 | ---------- |
---|
| 24 | |
---|
| 25 | .. math:: |
---|
| 26 | |
---|
[62cf915] | 27 | I(q) = \text{scale} \cdot (\rho_\text{poly}-\rho_\text{solvent})^2 |
---|
| 28 | \left[ |
---|
| 29 | \frac{6\pi\phi_\text{core}}{Q^2} |
---|
| 30 | \frac{\Gamma^2}{\delta_\text{poly}^2R_\text{core}} |
---|
| 31 | \exp(-Q^2\sigma^2) |
---|
| 32 | \right] + \text{background} |
---|
| 33 | |
---|
| 34 | where *scale* is a scale factor, $\rho_\text{poly}$ is the sld of the |
---|
| 35 | polymer (or surfactant) layer, $\rho_\text{solv}$ is the sld of the |
---|
| 36 | solvent/medium and cores, $\phi_\text{core}$ is the volume fraction of |
---|
| 37 | the core particles, $\delta_\text{poly}$ is the bulk density of the |
---|
| 38 | polymer, $\Gamma$ is the adsorbed amount, and $\sigma$ is the second |
---|
| 39 | moment of the thickness distribution. |
---|
| 40 | |
---|
| 41 | Note that all parameters except $\sigma$ are correlated so fitting more |
---|
| 42 | than one of these parameters will generally fail. Also note that unlike |
---|
| 43 | other shape models, no volume normalization is applied to this model (the |
---|
| 44 | calculation is exact). |
---|
[1369fe6] | 45 | |
---|
| 46 | References |
---|
| 47 | ---------- |
---|
| 48 | |
---|
[62cf915] | 49 | S King, P Griffiths, J Hone, and T Cosgrove, |
---|
| 50 | *SANS from Adsorbed Polymer Layers*, *Macromol. Symp.*, 190 (2002) 33-42. |
---|
[1369fe6] | 51 | """ |
---|
| 52 | |
---|
[2c74c11] | 53 | from numpy import inf, pi, exp, errstate |
---|
[1369fe6] | 54 | |
---|
[62cf915] | 55 | name = "adsorbed_layer" |
---|
| 56 | title = "Scattering from an adsorbed layer on particles" |
---|
[1369fe6] | 57 | |
---|
[62cf915] | 58 | description = """ |
---|
[4f4e0d5] | 59 | Evaluates the scattering from large particles |
---|
[1369fe6] | 60 | with an adsorbed layer of surfactant or |
---|
| 61 | polymer, independent of the form of the |
---|
| 62 | density distribution. |
---|
| 63 | """ |
---|
[62cf915] | 64 | category = "shape:sphere" |
---|
[1369fe6] | 65 | |
---|
[62cf915] | 66 | # pylint: disable=bad-whitespace, line-too-long |
---|
[7abcc59] | 67 | # ["name", "units", default, [lower, upper], "type", "description"], |
---|
[62cf915] | 68 | parameters = [ |
---|
| 69 | ["second_moment", "Ang", 23.0, [0.0, inf], "", "Second moment of polymer distribution"], |
---|
| 70 | ["adsorbed_amount", "mg/m2", 1.9, [0.0, inf], "", "Adsorbed amount of polymer"], |
---|
| 71 | ["density_shell", "g/cm3", 0.7, [0.0, inf], "", "Bulk density of polymer in the shell"], |
---|
| 72 | ["radius", "Ang", 500.0, [0.0, inf], "", "Core particle radius"], |
---|
| 73 | ["volfraction", "None", 0.14, [0.0, inf], "", "Core particle volume fraction"], |
---|
| 74 | ["sld_shell", "1e-6/Ang^2", 1.5, [-inf, inf], "sld", "Polymer shell SLD"], |
---|
| 75 | ["sld_solvent", "1e-6/Ang^2", 6.3, [-inf, inf], "sld", "Solvent SLD"], |
---|
| 76 | ] |
---|
[7abcc59] | 77 | # pylint: enable=bad-whitespace, line-too-long |
---|
[1369fe6] | 78 | |
---|
| 79 | # NB: Scale and Background are implicit parameters on every model |
---|
[62cf915] | 80 | def Iq(q, second_moment, adsorbed_amount, density_shell, radius, |
---|
| 81 | volfraction, sld_shell, sld_solvent): |
---|
[41c7e68] | 82 | # pylint: disable = missing-docstring |
---|
[62cf915] | 83 | #deltarhosqrd = (sld_shell - sld_solvent) * (sld_shell - sld_solvent) |
---|
| 84 | #numerator = 6.0 * pi * volfraction * (adsorbed_amount * adsorbed_amount) |
---|
| 85 | #denominator = (q * q) * (density_shell * density_shell) * radius |
---|
| 86 | #eterm = exp(-1.0 * (q * q) * (second_moment * second_moment)) |
---|
| 87 | ##scale by 10^-2 for units conversion to cm^-1 |
---|
| 88 | #inten = 1.0e-02 * deltarhosqrd * ((numerator / denominator) * eterm) |
---|
[2c74c11] | 89 | with errstate(divide='ignore'): |
---|
| 90 | aa = ((sld_shell - sld_solvent)/density_shell * adsorbed_amount) / q |
---|
[4f4e0d5] | 91 | bb = q * second_moment |
---|
| 92 | #scale by 10^-2 for units conversion to cm^-1 |
---|
[2c74c11] | 93 | inten = 6.0e-02 * pi * volfraction * aa**2 * exp(-bb**2) / radius |
---|
[b135dc0] | 94 | return inten |
---|
[40a87fa] | 95 | Iq.vectorized = True # Iq accepts an array of q values |
---|
[1369fe6] | 96 | |
---|
[62cf915] | 97 | # unit test values taken from SasView 3.1.2 |
---|
[40a87fa] | 98 | tests = [ |
---|
[62cf915] | 99 | [{'scale': 1.0, 'second_moment': 23.0, 'adsorbed_amount': 1.9, |
---|
| 100 | 'density_shell': 0.7, 'radius': 500.0, 'volfraction': 0.14, |
---|
| 101 | 'sld_shell': 1.5, 'sld_solvent': 6.3, 'background': 0.0}, |
---|
[1d4d409] | 102 | [0.0106939, 0.1], [73.741, 4.51684e-3]], |
---|
[62cf915] | 103 | ] |
---|
| 104 | |
---|
| 105 | # 2016-03-16 SMK converted from sasview, checked vs SANDRA |
---|
| 106 | # 2016-03-18 RKH some edits & renaming |
---|
| 107 | # 2016-04-14 PAK reformatting |
---|