Changeset eb63414 in sasmodels for sasmodels/models/rpa.py
- Timestamp:
- Mar 7, 2017 12:04:48 PM (7 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/rpa.py
rfa4a994 reb63414 1 1 r""" 2 Definition 3 ---------- 4 2 5 Calculates the macroscopic scattering intensity for a multi-component 3 6 homogeneous mixture of polymers using the Random Phase Approximation. … … 24 27 Case 9: A-B-C-D tetra-block copolymer 25 28 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! 27 31 28 Only one case can be used at any one time. 32 USAGE NOTES: 29 33 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. 44 46 45 47 … … 47 49 ---------- 48 50 49 A Z Akcasu, R Klein and B Hammouda, *Macromolecules*, 26 (1993) 413651 .. [#] A Z Akcasu, R Klein and B Hammouda, *Macromolecules*, 26 (1993) 4136 50 52 """ 51 53 … … 53 55 54 56 name = "rpa" 55 title = "Random Phase Approximation - unfinished work in progress"57 title = "Random Phase Approximation" 56 58 description = """ 57 59 This formalism applies to multicomponent polymer mixtures in the … … 90 92 ["N[4]", "", 1000.0, [1, inf], "", "Degree of polymerization"], 91 93 ["Phi[4]", "", 0.25, [0, 1], "", "volume fraction"], 92 ["v[4]", "mL/mol", 100.0, [0, inf], "", " specificvolume"],94 ["v[4]", "mL/mol", 100.0, [0, inf], "", "molar volume"], 93 95 ["L[4]", "fm", 10.0, [-inf, inf], "", "scattering length"], 94 96 ["b[4]", "Ang", 5.0, [0, inf], "", "segment length"], … … 107 109 108 110 control = "case_num" 109 HIDE_ NONE = set()110 HIDE_A = set("N1 Phi1 v1 L1 b1 K12 K13 K14".split()) 111 HIDE_ALL = set("Phi4".split()) 112 HIDE_A = set("N1 Phi1 v1 L1 b1 K12 K13 K14".split()).union(HIDE_ALL) 111 113 HIDE_AB = set("N2 Phi2 v2 L2 b2 K23 K24".split()).union(HIDE_A) 112 114 def hidden(case_num): … … 120 122 return HIDE_A 121 123 else: 122 return HIDE_ NONE124 return HIDE_ALL 123 125
Note: See TracChangeset
for help on using the changeset viewer.