Changeset 71b751d in sasmodels for sasmodels/models/vesicle.c
- Timestamp:
- Aug 14, 2018 10:09:34 AM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 86aa992
- Parents:
- 2f8cbb9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/vesicle.c
r925ad6e r71b751d 1 double form_volume(double radius, double thickness); 2 3 double Iq(double q, 4 double sld, double sld_solvent, double volfraction, 5 double radius, double thickness); 6 7 double form_volume(double radius, double thickness) 1 static double 2 form_volume(double radius, double thickness) 8 3 { 9 4 //note that for the vesicle model, the volume is ONLY the shell volume … … 11 6 } 12 7 13 double Iq(double q, 8 9 static void 10 Fq(double q, 11 double *F1, 12 double *F2, 14 13 double sld, 15 14 double sld_solvent, … … 31 30 vol = M_4PI_3*cube(radius); 32 31 f = vol * sas_3j1x_x(q*radius) * contrast; 33 32 34 33 //now the shell. No volume normalization as this is done by the caller 35 34 contrast = sld-sld_solvent; … … 37 36 f += vol * sas_3j1x_x(q*(radius+thickness)) * contrast; 38 37 39 //rescale to [cm-1]. 40 f2 = volfraction * f*f*1.0e-4; 41 42 return f2; 38 //rescale to [cm-1]. 39 // With volume fraction as part of the model in the dilute limit need 40 // to return F2 = Vf <fq^2>. In order for beta approx. to work correctly 41 // need F1^2/F2 equal to <fq>^2 / <fq^2>. By returning F1 = sqrt(Vf) <fq> 42 // and F2 = Vf <fq^2> both conditions are satisfied. 43 // Since Vf is the volume fraction of vesicles of all radii, it is 44 // constant when averaging F1 and F2 over radii and so pops out of the 45 // polydispersity loop, so it is safe to apply it inside the model 46 // (albeit conceptually ugly). 47 *F1 = 1e-2 * sqrt(volfraction) * f; 48 *F2 = 1.0e-4 * volfraction * f * f; 43 49 }
Note: See TracChangeset
for help on using the changeset viewer.