[d60b433] | 1 | # Note: model title and parameter table are inserted automatically |
---|
| 2 | r""" |
---|
[eb69cce] | 3 | This calculates the structure factor (the Fourier transform of the pair |
---|
| 4 | correlation function $g(r)$) for a system of charged, spheroidal objects |
---|
| 5 | in a dielectric medium. When combined with an appropriate form factor |
---|
| 6 | (such as sphere, core+shell, ellipsoid, etc), this allows for inclusion |
---|
| 7 | of the interparticle interference effects due to screened coulomb repulsion |
---|
| 8 | between charged particles. |
---|
[d60b433] | 9 | |
---|
[eb69cce] | 10 | **This routine only works for charged particles**. If the charge is set to |
---|
| 11 | zero the routine will self-destruct! For non-charged particles use a hard |
---|
| 12 | sphere potential. |
---|
[d60b433] | 13 | |
---|
[eb69cce] | 14 | The salt concentration is used to compute the ionic strength of the solution |
---|
| 15 | which in turn is used to compute the Debye screening length. At present |
---|
| 16 | there is no provision for entering the ionic strength directly nor for use |
---|
| 17 | of any multivalent salts. The counterions are also assumed to be monovalent. |
---|
[d60b433] | 18 | |
---|
[eb69cce] | 19 | For 2D data, the scattering intensity is calculated in the same way as 1D, |
---|
| 20 | where the $q$ vector is defined as |
---|
[d60b433] | 21 | |
---|
| 22 | .. math:: |
---|
| 23 | |
---|
[eb69cce] | 24 | q = \sqrt{q_x^2 + q_y^2} |
---|
[d60b433] | 25 | |
---|
[eb69cce] | 26 | .. figure:: img/HayterMSAsq_227.jpg |
---|
[d60b433] | 27 | |
---|
[eb69cce] | 28 | 1D plot using the default values (in linear scale). |
---|
[d60b433] | 29 | |
---|
[eb69cce] | 30 | References |
---|
| 31 | ---------- |
---|
[d60b433] | 32 | |
---|
| 33 | J B Hayter and J Penfold, *Molecular Physics*, 42 (1981) 109-118 |
---|
| 34 | |
---|
| 35 | J P Hansen and J B Hayter, *Molecular Physics*, 46 (1982) 651-656 |
---|
| 36 | """ |
---|
| 37 | |
---|
| 38 | # dp[0] = 2.0*effect_radius(); |
---|
| 39 | # dp[1] = fabs(charge()); |
---|
| 40 | # dp[2] = volfraction(); |
---|
| 41 | # dp[3] = temperature(); |
---|
| 42 | # dp[4] = saltconc(); |
---|
| 43 | # dp[5] = dielectconst(); |
---|
| 44 | |
---|
[63b32bb] | 45 | from numpy import inf |
---|
[d60b433] | 46 | |
---|
[b7d432f] | 47 | source = ["HayterMSAsq_kernel.c"] |
---|
[d60b433] | 48 | |
---|
| 49 | name = "HayterMSAsq" |
---|
| 50 | title = "Hayter-Penfold MSA charged sphere interparticle S(Q) structure factor" |
---|
| 51 | description = """\ |
---|
[b7d432f] | 52 | [Hayter-Penfold MSA charged sphere interparticle S(Q) structure factor] |
---|
[d60b433] | 53 | Interparticle structure factor S(Q)for a charged hard spheres. |
---|
[b7d432f] | 54 | Routine takes absolute value of charge, use HardSphere if charge goes to zero. |
---|
| 55 | In sasview the effective radius will be calculated from the |
---|
| 56 | parameters used in P(Q). |
---|
[d60b433] | 57 | """ |
---|
[b7d432f] | 58 | # [ "name", "units", default, [lower, upper], "type", "description" ], |
---|
| 59 | parameters = [["effect_radius", "Ang", 20.75, [0, inf], "volume", |
---|
| 60 | "effective radius of hard sphere"], |
---|
| 61 | ["charge", "e", 19.0, [0, inf], "", |
---|
| 62 | "charge on sphere (in electrons)"], |
---|
| 63 | ["volfraction", "", 0.0192, [0, 0.74], "", |
---|
| 64 | "volume fraction of spheres"], |
---|
| 65 | ["temperature", "K", 318.16, [0, inf], "", |
---|
| 66 | "temperature, in Kelvin, for Debye length calculation"], |
---|
| 67 | ["saltconc", "M", 0.0, [-inf, inf], "", |
---|
| 68 | "conc of salt, 1:1 electolyte, for Debye length"], |
---|
| 69 | ["dielectconst", "", 71.08, [-inf, inf], "", |
---|
| 70 | "dielectric constant of solvent (default water), for Debye length"], |
---|
| 71 | ] |
---|
[cd3dba0] | 72 | category = "structure-factor" |
---|
[d60b433] | 73 | |
---|
| 74 | # No volume normalization despite having a volume parameter |
---|
| 75 | # This should perhaps be volume normalized? |
---|
| 76 | form_volume = """ |
---|
| 77 | return 1.0; |
---|
| 78 | """ |
---|
| 79 | Iqxy = """ |
---|
| 80 | // never called since no orientation or magnetic parameters. |
---|
[9f6f2f8] | 81 | return Iq(sqrt(qx*qx+qy*qy), IQ_PARAMETERS); |
---|
[d60b433] | 82 | """ |
---|
| 83 | # ER defaults to 0.0 |
---|
| 84 | # VR defaults to 1.0 |
---|
| 85 | |
---|
| 86 | oldname = 'HayterMSAStructure' |
---|
| 87 | oldpars = dict() |
---|
[ab87a12] | 88 | # default parameter set, use compare.sh -midQ -linear |
---|
| 89 | # note the calculation varies in different limiting cases so a wide range of parameters will be required for a thorough test! |
---|
| 90 | # odd that the default st has saltconc zero |
---|
| 91 | demo = dict(effect_radius = 20.75,charge=19.0,volfraction = 0.0192,temperature=318.16,saltconc=0.05,dielectconst=71.08,effect_radius_pd = 0.1,effect_radius_pd_n = 40) |
---|
[d60b433] | 92 | |
---|