core_shell_microgelscostrafo411magnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change
on this file since 925ad6e was
925ad6e,
checked in by wojciech, 7 years ago
|
sph_j1c translated to sas_3j1x_x
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[321736f] | 1 | double form_volume(double radius, double thickness); |
---|
| 2 | |
---|
| 3 | double Iq(double q, |
---|
[062db5a] | 4 | double sld, double sld_solvent, double volfraction, |
---|
[321736f] | 5 | double radius, double thickness); |
---|
| 6 | |
---|
| 7 | double form_volume(double radius, double thickness) |
---|
| 8 | { |
---|
| 9 | //note that for the vesicle model, the volume is ONLY the shell volume |
---|
[3a48772] | 10 | return M_4PI_3*(cube(radius+thickness) - cube(radius)); |
---|
[321736f] | 11 | } |
---|
| 12 | |
---|
| 13 | double Iq(double q, |
---|
| 14 | double sld, |
---|
[062db5a] | 15 | double sld_solvent, |
---|
| 16 | double volfraction, |
---|
[321736f] | 17 | double radius, |
---|
| 18 | double thickness) |
---|
| 19 | |
---|
| 20 | /* |
---|
| 21 | scattering from a unilamellar vesicle. |
---|
| 22 | same functional form as the core-shell sphere, but more intuitive for |
---|
| 23 | a vesicle |
---|
| 24 | */ |
---|
| 25 | |
---|
| 26 | { |
---|
[062db5a] | 27 | double vol,contrast,f,f2; |
---|
[321736f] | 28 | |
---|
| 29 | // core first, then add in shell |
---|
[062db5a] | 30 | contrast = sld_solvent-sld; |
---|
[3a48772] | 31 | vol = M_4PI_3*cube(radius); |
---|
[925ad6e] | 32 | f = vol * sas_3j1x_x(q*radius) * contrast; |
---|
[321736f] | 33 | |
---|
[062db5a] | 34 | //now the shell. No volume normalization as this is done by the caller |
---|
| 35 | contrast = sld-sld_solvent; |
---|
[3a48772] | 36 | vol = M_4PI_3*cube(radius+thickness); |
---|
[925ad6e] | 37 | f += vol * sas_3j1x_x(q*(radius+thickness)) * contrast; |
---|
[321736f] | 38 | |
---|
[062db5a] | 39 | //rescale to [cm-1]. |
---|
[3a48772] | 40 | f2 = volfraction * f*f*1.0e-4; |
---|
[321736f] | 41 | |
---|
[3a48772] | 42 | return f2; |
---|
[321736f] | 43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.