Changeset 99658f6 in sasmodels for sasmodels/models/core_shell_bicelle_elliptical.c
- Timestamp:
- Nov 6, 2018 2:10:43 PM (5 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- cf3d0ce
- Parents:
- 5024a56
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_bicelle_elliptical.c
rd42dd4a r99658f6 8 8 { 9 9 return M_PI*(r_minor+thick_rim)*(r_minor*x_core+thick_rim)*(length+2.0*thick_face); 10 } 11 12 static double 13 radius_from_excluded_volume(double r_minor, double x_core, double thick_rim, double thick_face, double length) 14 { 15 const double r_equiv = sqrt((r_minor + thick_rim)*(r_minor*x_core + thick_rim)); 16 const double length_tot = length + 2.0*thick_face; 17 return 0.5*cbrt(0.75*r_equiv*(2.0*r_equiv*length_tot + (r_equiv + length_tot)*(M_PI*r_equiv + length_tot))); 10 18 } 11 19 … … 31 39 switch (mode) { 32 40 default: 33 case 1: // equivalent sphere 41 case 1: // equivalent cylinder excluded volume 42 return radius_from_excluded_volume(r_minor, x_core, thick_rim, thick_face, length); 43 case 2: // equivalent volume sphere 34 44 return radius_from_volume(r_minor, x_core, thick_rim, thick_face, length); 35 case 2: // outer rim average radius45 case 3: // outer rim average radius 36 46 return 0.5*r_minor*(1.0 + x_core) + thick_rim; 37 case 3: // outer rim min radius47 case 4: // outer rim min radius 38 48 return (x_core < 1.0 ? x_core*r_minor+thick_rim : r_minor+thick_rim); 39 case 4: // outer max radius49 case 5: // outer max radius 40 50 return (x_core > 1.0 ? x_core*r_minor+thick_rim : r_minor+thick_rim); 41 case 5: // half outer thickness51 case 6: // half outer thickness 42 52 return 0.5*length + thick_face; 43 case 6: // half diagonal53 case 7: // half diagonal 44 54 return radius_from_diagonal(r_minor,x_core,thick_rim,thick_face,length); 45 55 }
Note: See TracChangeset
for help on using the changeset viewer.