[71b751d] | 1 | static double |
---|
| 2 | form_volume(double radius, double thickness) |
---|
[321736f] | 3 | { |
---|
| 4 | //note that for the vesicle model, the volume is ONLY the shell volume |
---|
[3a48772] | 5 | return M_4PI_3*(cube(radius+thickness) - cube(radius)); |
---|
[321736f] | 6 | } |
---|
| 7 | |
---|
[d277229] | 8 | static double |
---|
| 9 | effective_radius(int mode, double radius, double thickness) |
---|
| 10 | { |
---|
| 11 | return radius + thickness; |
---|
| 12 | } |
---|
[71b751d] | 13 | |
---|
| 14 | static void |
---|
| 15 | Fq(double q, |
---|
| 16 | double *F1, |
---|
| 17 | double *F2, |
---|
[321736f] | 18 | double sld, |
---|
[062db5a] | 19 | double sld_solvent, |
---|
| 20 | double volfraction, |
---|
[321736f] | 21 | double radius, |
---|
| 22 | double thickness) |
---|
| 23 | |
---|
| 24 | /* |
---|
| 25 | scattering from a unilamellar vesicle. |
---|
| 26 | same functional form as the core-shell sphere, but more intuitive for |
---|
| 27 | a vesicle |
---|
| 28 | */ |
---|
| 29 | |
---|
| 30 | { |
---|
[062db5a] | 31 | double vol,contrast,f,f2; |
---|
[321736f] | 32 | |
---|
| 33 | // core first, then add in shell |
---|
[062db5a] | 34 | contrast = sld_solvent-sld; |
---|
[3a48772] | 35 | vol = M_4PI_3*cube(radius); |
---|
[925ad6e] | 36 | f = vol * sas_3j1x_x(q*radius) * contrast; |
---|
[71b751d] | 37 | |
---|
[062db5a] | 38 | //now the shell. No volume normalization as this is done by the caller |
---|
| 39 | contrast = sld-sld_solvent; |
---|
[3a48772] | 40 | vol = M_4PI_3*cube(radius+thickness); |
---|
[925ad6e] | 41 | f += vol * sas_3j1x_x(q*(radius+thickness)) * contrast; |
---|
[321736f] | 42 | |
---|
[71b751d] | 43 | //rescale to [cm-1]. |
---|
| 44 | // With volume fraction as part of the model in the dilute limit need |
---|
| 45 | // to return F2 = Vf <fq^2>. In order for beta approx. to work correctly |
---|
| 46 | // need F1^2/F2 equal to <fq>^2 / <fq^2>. By returning F1 = sqrt(Vf) <fq> |
---|
| 47 | // and F2 = Vf <fq^2> both conditions are satisfied. |
---|
| 48 | // Since Vf is the volume fraction of vesicles of all radii, it is |
---|
| 49 | // constant when averaging F1 and F2 over radii and so pops out of the |
---|
| 50 | // polydispersity loop, so it is safe to apply it inside the model |
---|
| 51 | // (albeit conceptually ugly). |
---|
| 52 | *F1 = 1e-2 * sqrt(volfraction) * f; |
---|
| 53 | *F2 = 1.0e-4 * volfraction * f * f; |
---|
[321736f] | 54 | } |
---|