Ignore:
Timestamp:
Sep 10, 2018 2:16:46 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
d299327
Parents:
3f818b2
Message:

clean up effective radius functions; improve mono_gauss_coil accuracy; start moving VR into C

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/hollow_rectangular_prism.py

    rc44b611 ree60aa7  
    149149source = ["lib/gauss76.c", "hollow_rectangular_prism.c"] 
    150150have_Fq = True 
    151 effective_radius_type = ["equivalent sphere","half length_a", "half length_b", "half length_c", 
    152                          "equivalent outer circular cross-section","half ab diagonal","half diagonal"] 
    153  
    154 #def ER(length_a, b2a_ratio, c2a_ratio, thickness): 
    155 #    """ 
    156 #    Return equivalent radius (ER) 
    157 #    thickness parameter not used 
    158 #    """ 
    159 #    b_side = length_a * b2a_ratio 
    160 #    c_side = length_a * c2a_ratio 
    161 # 
    162 #    # surface average radius (rough approximation) 
    163 #    surf_rad = sqrt(length_a * b_side / pi) 
    164 # 
    165 #    ddd = 0.75 * surf_rad * (2 * surf_rad * c_side + (c_side + surf_rad) * (c_side + pi * surf_rad)) 
    166 #    return 0.5 * (ddd) ** (1. / 3.) 
    167  
    168 def VR(length_a, b2a_ratio, c2a_ratio, thickness): 
    169     """ 
    170     Return shell volume and total volume 
    171     """ 
    172     b_side = length_a * b2a_ratio 
    173     c_side = length_a * c2a_ratio 
    174     a_core = length_a - 2.0*thickness 
    175     b_core = b_side - 2.0*thickness 
    176     c_core = c_side - 2.0*thickness 
    177     vol_core = a_core * b_core * c_core 
    178     vol_total = length_a * b_side * c_side 
    179     vol_shell = vol_total - vol_core 
    180     return vol_total, vol_shell 
    181  
     151effective_radius_type = [ 
     152    "equivalent sphere", "half length_a", "half length_b", "half length_c", 
     153    "equivalent outer circular cross-section", 
     154    "half ab diagonal", "half diagonal", 
     155    ] 
    182156 
    183157def random(): 
Note: See TracChangeset for help on using the changeset viewer.