Changeset 5f3c534 in sasmodels for sasmodels/models/stickyhardsphere.py
- Timestamp:
- Mar 27, 2019 10:11:45 AM (5 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 9947865
- Parents:
- 055ec4f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/stickyhardsphere.py
r0507e09 r5f3c534 1 1 # Note: model title and parameter table are inserted automatically 2 2 r""" 3 This calculates the interparticle structure factor for a hard sphere fluid 4 with a narrow attractive well. A perturbative solution of the Percus-Yevick5 closure is used. The strength of the attractive well is described in terms 6 of "stickiness" as defined below. 7 8 The perturb (perturbation parameter), $\epsilon$, should be held between 0.01 9 and 0.1. It is best to hold the perturbation parameter fixed and let 10 the "stickiness" vary to adjust the interaction strength. The stickiness, 11 $\tau$, is defined in the equation below and is a function of both the 12 perturbation parameter and the interaction strength. $\tau$ and $\epsilon$ 13 are defined in terms of the hard sphere diameter $(\sigma = 2 R)$, the 14 width of the square well, $\Delta$ (same units as $R$\ ), and the depth of 15 the well, $U_o$, in units of $kT$. From the definition, it is clear that 16 smaller $\tau$ meansstronger attraction.3 Calculates the interparticle structure factor for a hard sphere fluid 4 with a narrow, attractive, potential well. Unlike the :ref:`squarewell` 5 model, here a perturbative solution of the Percus-Yevick closure 6 relationship is used. The strength of the attractive well is described 7 in terms of "stickiness" as defined below. 8 9 The perturbation parameter (perturb), $\tau$, should be fixed between 0.01 10 and 0.1 and the "stickiness", $\epsilon$, allowed to vary to adjust the 11 interaction strength. The "stickiness" is defined in the equation below and is 12 a function of both the perturbation parameter and the interaction strength. 13 $\epsilon$ and $\tau$ are defined in terms of the hard sphere diameter $(\sigma = 2 R)$, 14 the width of the square well, $\Delta$ (having the same units as $R$\ ), 15 and the depth of the well, $U_o$, in units of $kT$. From the definition, it 16 is clear that smaller $\epsilon$ means a stronger attraction. 17 17 18 18 .. math:: 19 19 20 \ tau &= \frac{1}{12\epsilon} \exp(u_o / kT) \\21 \ epsilon&= \Delta / (\sigma + \Delta)20 \epsilon &= \frac{1}{12\tau} \exp(u_o / kT) \\ 21 \tau &= \Delta / (\sigma + \Delta) 22 22 23 23 where the interaction potential is … … 31 31 \end{cases} 32 32 33 The Percus-Yevick (PY) closure was used for this calculation, and is an34 adequate closure for an attractive interparticle potential. Th issolution33 The Percus-Yevick (PY) closure is used for this calculation, and is an 34 adequate closure for an attractive interparticle potential. The solution 35 35 has been compared to Monte Carlo simulations for a square well fluid, with 36 36 good agreement. 37 37 38 The true particle volume fraction, $\phi$, is not equal to $h$, which appears 39 in most of the reference. The two are related in equation (24) of the 40 reference. The reference also describes the relationship between this 41 perturbation solution and the original sticky hard sphere (or adhesive 42 sphere) model by Baxter. 43 44 **NB**: The calculation can go haywire for certain combinations of the input 45 parameters, producing unphysical solutions - in this case errors are 46 reported to the command window and the $S(q)$ is set to -1 (so it will 47 disappear on a log-log plot). Use tight bounds to keep the parameters to 48 values that you know are physical (test them) and keep nudging them until 49 the optimization does not hit the constraints. 50 51 In sasview the effective radius may be calculated from the parameters 38 The true particle volume fraction, $\phi$, is not equal to $h$ which appears 39 in most of reference [1]. The two are related in equation (24). Reference 40 [1] also describes the relationship between this perturbative solution and 41 the original sticky hard sphere (or "adhesive sphere") model of Baxter [2]. 42 43 .. note:: 44 45 The calculation can go haywire for certain combinations of the input 46 parameters, producing unphysical solutions. In this case errors are 47 reported to the command window and $S(q)$ is set to -1 (so it will 48 disappear on a log-log plot!). 49 50 Use tight bounds to keep the parameters to values that you know are 51 physical (test them), and keep nudging them until the optimization 52 does not hit the constraints. 53 54 .. note:: 55 56 Earlier versions of SasView did not incorporate the so-called 57 $\beta(q)$ ("beta") correction [3] for polydispersity and non-sphericity. 58 This is only available in SasView versions 4.2.2 and higher. 59 60 In SasView the effective radius may be calculated from the parameters 52 61 used in the form factor $P(q)$ that this $S(q)$ is combined with. 53 62 … … 65 74 .. [#] S V G Menon, C Manohar, and K S Rao, *J. Chem. Phys.*, 95(12) (1991) 9186-9190 66 75 76 .. [#] R J Baxter, *J. Chem. Phys.*, 49 (1968), 2770-2774 77 78 .. [#] M Kotlarchyk and S-H Chen, *J. Chem. Phys.*, 79 (1983) 2461-2469 79 67 80 Source 68 81 ------ … … 75 88 * **Author:** 76 89 * **Last Modified by:** 77 * **Last Reviewed by:** 90 * **Last Reviewed by:** Steve King **Date:** March 27, 2019 78 91 * **Source added by :** Steve King **Date:** March 25, 2019 79 92 """ … … 85 98 86 99 name = "stickyhardsphere" 87 title = " Sticky hard sphere structure factor,with Percus-Yevick closure"100 title = "'Sticky' hard sphere structure factor with Percus-Yevick closure" 88 101 description = """\ 89 102 [Sticky hard sphere structure factor, with Percus-Yevick closure] 90 Interparticle structure factor S(Q) for a hard sphere fluid with91 a narrow attractive well. Fits are prone to deliver non-physical92 parameters, use with care and read the references in the full manual.93 In sasview the effective radius will be calculated from the94 parameters used in P(Q).103 Interparticle structure factor S(Q) for a hard sphere fluid 104 with a narrow attractive well. Fits are prone to deliver non- 105 physical parameters; use with care and read the references in 106 the model documentation.The "beta(q)" correction is available 107 in versions 4.2.2 and higher. 95 108 """ 96 109 category = "structure-factor" … … 107 120 "volume fraction of hard spheres"], 108 121 ["perturb", "", 0.05, [0.01, 0.1], "", 109 "perturbation parameter, epsilon"],122 "perturbation parameter, tau"], 110 123 ["stickiness", "", 0.20, [-inf, inf], "", 111 "stickiness, tau"],124 "stickiness, epsilon"], 112 125 ] 113 126
Note: See TracChangeset
for help on using the changeset viewer.