Ignore:
Timestamp:
Sep 7, 2018 5:29:38 AM (6 years ago)
Author:
grethevj
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3c60146
Parents:
2a12351b
Message:

Models updated to include choices for effective interaction radii

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/hollow_rectangular_prism.c

    r71b751d rd277229  
    1111    double vol_shell = vol_total - vol_core; 
    1212    return vol_shell; 
     13} 
     14 
     15static double 
     16effective_radius(int mode, double length_a, double b2a_ratio, double c2a_ratio, double thickness) 
     17{ 
     18    if (mode == 1) { 
     19        return cbrt(0.75*cube(length_a)*b2a_ratio*c2a_ratio/M_PI); 
     20    } else if (mode == 2) { 
     21        return 0.5 * length_a; 
     22    } else if (mode == 3) { 
     23        return 0.5 * length_a*b2a_ratio; 
     24    } else if (mode == 4) { 
     25        return 0.5 * length_a*c2a_ratio; 
     26    } else if (mode == 5) { 
     27        return length_a*sqrt(b2a_ratio/M_PI); 
     28    } else if (mode == 6) { 
     29        return 0.5*sqrt(square(length_a) * (1.0 + square(b2a_ratio))); 
     30    } else { 
     31        return 0.5*sqrt(square(length_a) * (1.0 + square(b2a_ratio) + square(c2a_ratio))); 
     32    } 
    1333} 
    1434 
Note: See TracChangeset for help on using the changeset viewer.