source: sasmodels/sasmodels/models/vesicle.c @ 2d81cfe

core_shell_microgelsmagnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 2d81cfe 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
Line 
1double form_volume(double radius, double thickness);
2
3double Iq(double q, 
4          double sld, double sld_solvent, double volfraction,
5          double radius, double thickness);
6
7double form_volume(double radius, double thickness)
8{
9    //note that for the vesicle model, the volume is ONLY the shell volume
10    return M_4PI_3*(cube(radius+thickness) - cube(radius));
11}
12
13double Iq(double q,
14    double sld,
15    double sld_solvent,
16    double volfraction,
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{
27    double vol,contrast,f,f2;
28
29    // core first, then add in shell
30    contrast = sld_solvent-sld;
31    vol = M_4PI_3*cube(radius);
32    f = vol * sas_3j1x_x(q*radius) * contrast;
33 
34    //now the shell. No volume normalization as this is done by the caller
35    contrast = sld-sld_solvent;
36    vol = M_4PI_3*cube(radius+thickness);
37    f += vol * sas_3j1x_x(q*(radius+thickness)) * contrast;
38
39    //rescale to [cm-1].
40    f2 = volfraction * f*f*1.0e-4;
41   
42    return f2;
43}
Note: See TracBrowser for help on using the repository browser.