Changeset eb63414 in sasmodels for sasmodels/models/rpa.py


Ignore:
Timestamp:
Mar 7, 2017 12:04:48 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3a45c2c
Parents:
a57b31d (diff), 20c856a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into ticket-815

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/rpa.py

    rfa4a994 reb63414  
    11r""" 
     2Definition 
     3---------- 
     4 
    25Calculates the macroscopic scattering intensity for a multi-component 
    36homogeneous mixture of polymers using the Random Phase Approximation. 
     
    2427Case 9: A-B-C-D tetra-block copolymer 
    2528 
    26 **NB: these case numbers are different from those in the NIST SANS package!** 
     29.. note:: 
     30    These case numbers are different from those in the NIST SANS package! 
    2731 
    28 Only one case can be used at any one time. 
     32USAGE NOTES: 
    2933 
    30 The RPA (mean field) formalism only applies only when the multicomponent 
    31 polymer mixture is in the homogeneous mixed-phase region. 
    32  
    33 **Component D is assumed to be the "background" component (ie, all contrasts 
    34 are calculated with respect to component D).** So the scattering contrast 
    35 for a C/D blend = [SLD(component C) - SLD(component D)]\ :sup:`2`. 
    36  
    37 Depending on which case is being used, the number of fitting parameters - the 
    38 segment lengths (ba, bb, etc) and $\chi$ parameters (Kab, Kac, etc) - vary. 
    39 The *scale* parameter should be held equal to unity. 
    40  
    41 The input parameters are the degrees of polymerization, the volume fractions, 
    42 the specific volumes, and the neutron scattering length densities for each 
    43 component. 
     34* Only one case can be used at any one time. 
     35* The RPA (mean field) formalism only applies only when the multicomponent 
     36  polymer mixture is in the homogeneous mixed-phase region. 
     37* **Component D is assumed to be the "background" component (ie, all contrasts 
     38  are calculated with respect to component D).** So the scattering contrast 
     39  for a C/D blend = [SLD(component C) - SLD(component D)]\ :sup:`2`. 
     40* Depending on which case is being used, the number of fitting parameters can  
     41  vary.  Note that in general the degrees of polymerization, the volume 
     42  fractions, the molar volumes, and the neutron scattering lengths for each 
     43  component are obtained from other methods and held fixed while the segment 
     44  lengths (b\ :sub:`a`, b\ :sub:`b`, etc) and $\chi$ parameters (K\ :sub:`ab`, 
     45  K\ :sub:`ac`, etc). The *scale* parameter should be held equal to unity. 
    4446 
    4547 
     
    4749---------- 
    4850 
    49 A Z Akcasu, R Klein and B Hammouda, *Macromolecules*, 26 (1993) 4136 
     51.. [#] A Z Akcasu, R Klein and B Hammouda, *Macromolecules*, 26 (1993) 4136 
    5052""" 
    5153 
     
    5355 
    5456name = "rpa" 
    55 title = "Random Phase Approximation - unfinished work in progress" 
     57title = "Random Phase Approximation" 
    5658description = """ 
    5759This formalism applies to multicomponent polymer mixtures in the 
     
    9092    ["N[4]", "", 1000.0, [1, inf], "", "Degree of polymerization"], 
    9193    ["Phi[4]", "", 0.25, [0, 1], "", "volume fraction"], 
    92     ["v[4]", "mL/mol", 100.0, [0, inf], "", "specific volume"], 
     94    ["v[4]", "mL/mol", 100.0, [0, inf], "", "molar volume"], 
    9395    ["L[4]", "fm", 10.0, [-inf, inf], "", "scattering length"], 
    9496    ["b[4]", "Ang", 5.0, [0, inf], "", "segment length"], 
     
    107109 
    108110control = "case_num" 
    109 HIDE_NONE = set() 
    110 HIDE_A = set("N1 Phi1 v1 L1 b1 K12 K13 K14".split()) 
     111HIDE_ALL = set("Phi4".split()) 
     112HIDE_A = set("N1 Phi1 v1 L1 b1 K12 K13 K14".split()).union(HIDE_ALL) 
    111113HIDE_AB = set("N2 Phi2 v2 L2 b2 K23 K24".split()).union(HIDE_A) 
    112114def hidden(case_num): 
     
    120122        return HIDE_A 
    121123    else: 
    122         return HIDE_NONE 
     124        return HIDE_ALL 
    123125 
Note: See TracChangeset for help on using the changeset viewer.