[55b283e8] | 1 | r""" |
---|
| 2 | Calculates the scattering from fractal-like aggregates based on |
---|
| 3 | the Mildner reference. This model is also known as the Benoit Star model. |
---|
| 4 | |
---|
| 5 | Definition |
---|
| 6 | ---------- |
---|
| 7 | |
---|
| 8 | For a star with $f$ arms the scattering intensity $I(q)$ is calculated as |
---|
| 9 | |
---|
| 10 | .. math:: |
---|
| 11 | |
---|
| 12 | I(q) = \frac{2}{fv^2}\left[ v-1+exp(-v)+\frac{f-1}{2} |
---|
| 13 | \left[ 1-exp(-v)\right]^2\right] |
---|
| 14 | |
---|
| 15 | where |
---|
| 16 | |
---|
| 17 | .. math:: |
---|
| 18 | |
---|
| 19 | v=\frac{u^2f}{(3f-2)} |
---|
| 20 | |
---|
| 21 | and |
---|
| 22 | |
---|
| 23 | .. math:: |
---|
| 24 | |
---|
| 25 | u = \left\langle R_{g}^2\right\rangle q^2 |
---|
| 26 | |
---|
| 27 | is the square of the ensemble average radius-of-gyration of an arm. |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | Reference |
---|
| 31 | --------- |
---|
| 32 | |
---|
| 33 | H Benoit *J. Polymer Science*, 11, 596-599 (1953) |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | """ |
---|
| 37 | |
---|
| 38 | from numpy import inf |
---|
| 39 | |
---|
| 40 | name = "star_polymer" |
---|
| 41 | title = "Star polymer model with Gaussian statistics" |
---|
| 42 | description = """ |
---|
| 43 | Scattering model class for 'Star polymer with Gaussian statistics' |
---|
| 44 | with |
---|
| 45 | P(q) = 2/{fv^2} * (v - (1-exp(-v)) + {f-1}/2 * (1-exp(-v))^2) |
---|
| 46 | where |
---|
| 47 | - v = u^2f/(3f-2) |
---|
| 48 | - u = <R_g^2>q^2, where <R_g^2> is the ensemble average radius of |
---|
| 49 | giration squared of an arm |
---|
| 50 | - f is the number of arms on the star |
---|
| 51 | """ |
---|
| 52 | category = "shape-independent" |
---|
[13ed84c] | 53 | single = False |
---|
[168052c] | 54 | # pylint: disable=bad-whitespace, line-too-long |
---|
[55b283e8] | 55 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
| 56 | parameters = [["radius2", "Ang", 100.0, [0.0, inf], "", "Ensemble radius of gyration squared of an arm"], |
---|
| 57 | ["arms", "", 3, [1.0, 6.0], "", "Number of arms in the model"], |
---|
[168052c] | 58 | ] |
---|
| 59 | # pylint: enable=bad-whitespace, line-too-long |
---|
[55b283e8] | 60 | |
---|
| 61 | source = ["star_polymer.c"] |
---|
| 62 | |
---|
| 63 | demo = dict(scale=1, background=0, |
---|
| 64 | radius2=100.0, |
---|
| 65 | arms=3.0) |
---|
| 66 | |
---|
| 67 | oldname = 'StarPolymer' |
---|
| 68 | |
---|
| 69 | oldpars = dict(radius2='R2', |
---|
| 70 | arms='arms') |
---|
| 71 | |
---|
| 72 | tests = [[{'radius2': 2.0, |
---|
| 73 | 'arms': 3.3, |
---|
[6dd90c1] | 74 | }, 0.5, 0.851646091108], |
---|
[55b283e8] | 75 | |
---|
| 76 | [{'radius2': 1.0, |
---|
| 77 | 'arms': 2.0, |
---|
| 78 | 'background': 1.8, |
---|
[168052c] | 79 | }, 1.0, 2.53575888234], |
---|
| 80 | ] |
---|