1 | double form_volume(double radius_lg); |
---|
2 | |
---|
3 | double Iq(double q, |
---|
4 | double sld_lg, double sld_sm, double sld_solvent, |
---|
5 | double volfraction_lg, double volfraction_sm, double surf_fraction, |
---|
6 | double radius_lg, double radius_sm, double penetration); |
---|
7 | |
---|
8 | double Iqxy(double qx, double qy, |
---|
9 | double sld_lg, double sld_sm, double sld_solvent, |
---|
10 | double volfraction_lg, double volfraction_sm, double surf_fraction, |
---|
11 | double radius_lg, double radius_sm, double penetration); |
---|
12 | |
---|
13 | double form_volume(double radius_lg) |
---|
14 | { |
---|
15 | //Because of the complex structure, volume normalization must |
---|
16 | //happen in the Iq code below. Thus the form volume is set to 1.0 here |
---|
17 | double volume=1.0; |
---|
18 | return volume; |
---|
19 | } |
---|
20 | |
---|
21 | double Iq(double q, |
---|
22 | double sld_lg, double sld_sm, double sld_solvent, |
---|
23 | double volfraction_lg, double volfraction_sm, double surface_fraction, |
---|
24 | double radius_lg, double radius_sm, double penetration) |
---|
25 | { |
---|
26 | // Ref: J. coll. inter. sci. (2010) vol. 343 (1) pp. 36-41. |
---|
27 | |
---|
28 | |
---|
29 | double vfL, rL, sldL, vfS, rS, sldS, deltaS, delrhoL, delrhoS, sldSolv, aSs; |
---|
30 | double VL, VS, Np, f2, fSs; |
---|
31 | double psiL,psiS; |
---|
32 | double sfLS,sfSS,Np2,fSs2; |
---|
33 | double slT; |
---|
34 | |
---|
35 | vfL = volfraction_lg; |
---|
36 | rL = radius_lg; |
---|
37 | sldL = sld_lg; |
---|
38 | vfS = volfraction_sm; |
---|
39 | fSs = surface_fraction; |
---|
40 | rS = radius_sm; |
---|
41 | sldS = sld_sm; |
---|
42 | deltaS = penetration; |
---|
43 | sldSolv = sld_solvent; |
---|
44 | |
---|
45 | delrhoL = fabs(sldL - sldSolv); |
---|
46 | delrhoS = fabs(sldS - sldSolv); |
---|
47 | |
---|
48 | VL = M_4PI_3*rL*rL*rL; |
---|
49 | VS = M_4PI_3*rS*rS*rS; |
---|
50 | |
---|
51 | Np = vfS*fSs*VL/vfL/VS; |
---|
52 | |
---|
53 | slT = delrhoL*VL + Np*delrhoS*VS; |
---|
54 | |
---|
55 | sfLS = sph_j1c(q*rL)*sph_j1c(q*rS)*sinc(q*(rL+deltaS*rS)); |
---|
56 | sfSS = sph_j1c(q*rS)*sph_j1c(q*rS)*sinc(q*(rL+deltaS*rS))*sinc(q*(rL+deltaS*rS)); |
---|
57 | |
---|
58 | f2 = delrhoL*delrhoL*VL*VL*sph_j1c(q*rL)*sph_j1c(q*rL); |
---|
59 | f2 += Np*delrhoS*delrhoS*VS*VS*sph_j1c(q*rS)*sph_j1c(q*rS); |
---|
60 | f2 += Np*(Np-1)*delrhoS*delrhoS*VS*VS*sfSS; |
---|
61 | f2 += 2*Np*delrhoL*delrhoS*VL*VS*sfLS; |
---|
62 | if (f2 != 0.0){ |
---|
63 | f2 = f2/slT/slT; |
---|
64 | } |
---|
65 | |
---|
66 | f2 = f2*(vfL*delrhoL*delrhoL*VL + vfS*fSs*Np*delrhoS*delrhoS*VS); |
---|
67 | |
---|
68 | f2+= vfS*(1.0-fSs)*pow(delrhoS, 2)*VS*sph_j1c(q*rS)*sph_j1c(q*rS); |
---|
69 | |
---|
70 | // normalize to single particle volume and convert to 1/cm |
---|
71 | f2 *= 1.0e8; // [=] 1/cm |
---|
72 | f2 *= 1.0e-12; // convert for (1/A^-6)^2 to (1/A)^2 |
---|
73 | |
---|
74 | return f2; |
---|
75 | } |
---|
76 | |
---|
77 | |
---|
78 | |
---|
79 | double Iqxy(double qx, double qy, |
---|
80 | double sld_lg, double sld_sm, double sld_solvent, |
---|
81 | double volfraction_lg, double volfraction_sm, double surf_fraction, |
---|
82 | double radius_lg, double radius_sm, double penetration) |
---|
83 | |
---|
84 | { |
---|
85 | double q = sqrt(qx*qx + qy*qy); |
---|
86 | return Iq(q, |
---|
87 | sld_lg, sld_sm, sld_solvent, |
---|
88 | volfraction_lg, volfraction_sm, surf_fraction, |
---|
89 | radius_lg, radius_sm, penetration); |
---|
90 | |
---|
91 | } |
---|