Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/stickyhardsphere.py

    r0507e09 r4d00de6  
    11# Note: model title and parameter table are inserted automatically 
    22r""" 
    3 This calculates the interparticle structure factor for a hard sphere fluid 
    4 with a narrow attractive well. A perturbative solution of the Percus-Yevick 
    5 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$ means stronger attraction. 
     3Calculates the interparticle structure factor for a hard sphere fluid 
     4with a narrow, attractive, potential well. Unlike the :ref:`squarewell` 
     5model, here a perturbative solution of the Percus-Yevick closure 
     6relationship is used. The strength of the attractive well is described 
     7in terms of "stickiness" as defined below. 
     8 
     9The perturbation parameter (perturb), $\tau$, should be fixed between 0.01 
     10and 0.1 and the "stickiness", $\epsilon$, allowed to vary to adjust the 
     11interaction strength. The "stickiness" is defined in the equation below and is 
     12a 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)$, 
     14the width of the square well, $\Delta$ (having the same units as $R$\ ), 
     15and the depth of the well, $U_o$, in units of $kT$. From the definition, it 
     16is clear that smaller $\epsilon$ means a stronger attraction. 
    1717 
    1818.. math:: 
    1919 
    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) 
    2222 
    2323where the interaction potential is 
     
    3131        \end{cases} 
    3232 
    33 The Percus-Yevick (PY) closure was used for this calculation, and is an 
    34 adequate closure for an attractive interparticle potential. This solution 
     33The Percus-Yevick (PY) closure is used for this calculation, and is an 
     34adequate closure for an attractive interparticle potential. The solution 
    3535has been compared to Monte Carlo simulations for a square well fluid, with 
    3636good agreement. 
    3737 
    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 
     38The true particle volume fraction, $\phi$, is not equal to $h$ which appears 
     39in most of reference [1]. The two are related in equation (24). Reference 
     40[1] also describes the relationship between this perturbative solution and 
     41the 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 5.0 and higher. 
     59 
     60In SasView the effective radius may be calculated from the parameters 
    5261used in the form factor $P(q)$ that this $S(q)$ is combined with. 
    5362 
     
    6574.. [#] S V G Menon, C Manohar, and K S Rao, *J. Chem. Phys.*, 95(12) (1991) 9186-9190 
    6675 
     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 
    6780Source 
    6881------ 
     
    7386---------------------------- 
    7487 
    75 * **Author:**  
    76 * **Last Modified by:**  
    77 * **Last Reviewed by:**  
     88* **Author:** 
     89* **Last Modified by:** 
     90* **Last Reviewed by:** Steve King **Date:** March 27, 2019 
    7891* **Source added by :** Steve King **Date:** March 25, 2019 
    7992""" 
     
    8598 
    8699name = "stickyhardsphere" 
    87 title = "Sticky hard sphere structure factor, with Percus-Yevick closure" 
     100title = "'Sticky' hard sphere structure factor with Percus-Yevick closure" 
    88101description = """\ 
    89102    [Sticky hard sphere structure factor, with Percus-Yevick closure] 
    90         Interparticle structure factor S(Q)for a hard sphere fluid with 
    91         a narrow attractive well. Fits are prone to deliver non-physical 
    92         parameters, use with care and read the references in the full manual. 
    93         In sasview the effective radius will be calculated from the 
    94         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. 
    95108""" 
    96109category = "structure-factor" 
     
    107120     "volume fraction of hard spheres"], 
    108121    ["perturb", "", 0.05, [0.01, 0.1], "", 
    109      "perturbation parameter, epsilon"], 
     122     "perturbation parameter, tau"], 
    110123    ["stickiness", "", 0.20, [-inf, inf], "", 
    111      "stickiness, tau"], 
     124     "stickiness, epsilon"], 
    112125    ] 
    113126 
Note: See TracChangeset for help on using the changeset viewer.