Changeset 99658f6 in sasmodels for sasmodels/models/core_shell_bicelle_elliptical_belt_rough.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_belt_rough.c
rd42dd4a r99658f6 9 9 return M_PI*( (r_minor + thick_rim)*(r_minor*x_core + thick_rim)* length + 10 10 square(r_minor)*x_core*2.0*thick_face ); 11 } 12 13 static double 14 radius_from_excluded_volume(double r_minor, double x_core, double thick_rim, double thick_face, double length) 15 { 16 const double r_equiv = sqrt((r_minor + thick_rim)*(r_minor*x_core + thick_rim)); 17 const double length_tot = length + 2.0*thick_face; 18 return 0.5*cbrt(0.75*r_equiv*(2.0*r_equiv*length_tot + (r_equiv + length_tot)*(M_PI*r_equiv + length_tot))); 11 19 } 12 20 … … 32 40 switch (mode) { 33 41 default: 34 case 1: // equivalent sphere 42 case 1: // equivalent cylinder excluded volume 43 return radius_from_excluded_volume(r_minor, x_core, thick_rim, thick_face, length); 44 case 2: // equivalent sphere 35 45 return radius_from_volume(r_minor, x_core, thick_rim, thick_face, length); 36 case 2: // outer rim average radius46 case 3: // outer rim average radius 37 47 return 0.5*r_minor*(1.0 + x_core) + thick_rim; 38 case 3: // outer rim min radius48 case 4: // outer rim min radius 39 49 return (x_core < 1.0 ? x_core*r_minor+thick_rim : r_minor+thick_rim); 40 case 4: // outer max radius50 case 5: // outer max radius 41 51 return (x_core > 1.0 ? x_core*r_minor+thick_rim : r_minor+thick_rim); 42 case 5: // half outer thickness52 case 6: // half outer thickness 43 53 return 0.5*length + thick_face; 44 case 6: // half diagonal (this ignores the missing "corners", so may give unexpected answer if thick_face54 case 7: // half diagonal (this ignores the missing "corners", so may give unexpected answer if thick_face 45 55 // or thick_rim is extremely large) 46 56 return radius_from_diagonal(r_minor,x_core,thick_rim,thick_face,length);
Note: See TracChangeset
for help on using the changeset viewer.