1 | r""" |
---|
2 | Definition |
---|
3 | ---------- |
---|
4 | |
---|
5 | Calculates the macroscopic scattering intensity for a multi-component |
---|
6 | homogeneous mixture of polymers using the Random Phase Approximation. |
---|
7 | This general formalism contains 10 specific cases |
---|
8 | |
---|
9 | Case 0: C/D binary mixture of homopolymers |
---|
10 | |
---|
11 | Case 1: C-D diblock copolymer |
---|
12 | |
---|
13 | Case 2: B/C/D ternary mixture of homopolymers |
---|
14 | |
---|
15 | Case 3: C/C-D mixture of a homopolymer B and a diblock copolymer C-D |
---|
16 | |
---|
17 | Case 4: B-C-D triblock copolymer |
---|
18 | |
---|
19 | Case 5: A/B/C/D quaternary mixture of homopolymers |
---|
20 | |
---|
21 | Case 6: A/B/C-D mixture of two homopolymers A/B and a diblock C-D |
---|
22 | |
---|
23 | Case 7: A/B-C-D mixture of a homopolymer A and a triblock B-C-D |
---|
24 | |
---|
25 | Case 8: A-B/C-D mixture of two diblock copolymers A-B and C-D |
---|
26 | |
---|
27 | Case 9: A-B-C-D tetra-block copolymer |
---|
28 | |
---|
29 | .. note:: |
---|
30 | These case numbers are different from those in the NIST SANS package! |
---|
31 | |
---|
32 | USAGE NOTES: |
---|
33 | |
---|
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. |
---|
46 | |
---|
47 | |
---|
48 | References |
---|
49 | ---------- |
---|
50 | |
---|
51 | .. [#] A Z Akcasu, R Klein and B Hammouda, *Macromolecules*, 26 (1993) 4136 |
---|
52 | """ |
---|
53 | |
---|
54 | from numpy import inf |
---|
55 | |
---|
56 | name = "rpa" |
---|
57 | title = "Random Phase Approximation" |
---|
58 | description = """ |
---|
59 | This formalism applies to multicomponent polymer mixtures in the |
---|
60 | homogeneous (mixed) phase region only. |
---|
61 | Case 0: C/D binary mixture of homopolymers |
---|
62 | Case 1: C-D diblock copolymer |
---|
63 | Case 2: B/C/D ternary mixture of homopolymers |
---|
64 | Case 3: B/C-D mixture of homopolymer b and diblock copolymer C-D |
---|
65 | Case 4: B-C-D triblock copolymer |
---|
66 | Case 5: A/B/C/D quaternary mixture of homopolymers |
---|
67 | Case 6: A/B/C-D mixture of two homopolymers A/B and a diblock C-D |
---|
68 | Case 7: A/B-C-D mixture of a homopolymer A and a triblock B-C-D |
---|
69 | Case 8: A-B/C-D mixture of two diblock copolymers A-B and C-D |
---|
70 | Case 9: A-B-C-D four-block copolymer |
---|
71 | See details in the model function help |
---|
72 | """ |
---|
73 | category = "shape-independent" |
---|
74 | |
---|
75 | CASES = [ |
---|
76 | "C+D binary mixture", |
---|
77 | "C:D diblock copolymer", |
---|
78 | "B+C+D ternary mixture", |
---|
79 | "B+C:D binary mixture", |
---|
80 | "B:C:D triblock copolymer", |
---|
81 | "A+B+C+D quaternary mixture", |
---|
82 | "A+B+C:D ternary mixture", |
---|
83 | "A+B:C:D binary mixture", |
---|
84 | "A:B+C:D binary mixture", |
---|
85 | "A:B:C:D quadblock copolymer", |
---|
86 | ] |
---|
87 | |
---|
88 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
89 | parameters = [ |
---|
90 | ["case_num", "", 1, [CASES], "", "Component organization"], |
---|
91 | |
---|
92 | ["N[4]", "", 1000.0, [1, inf], "", "Degree of polymerization"], |
---|
93 | ["Phi[4]", "", 0.25, [0, 1], "", "volume fraction"], |
---|
94 | ["v[4]", "mL/mol", 100.0, [0, inf], "", "molar volume"], |
---|
95 | ["L[4]", "fm", 10.0, [-inf, inf], "", "scattering length"], |
---|
96 | ["b[4]", "Ang", 5.0, [0, inf], "", "segment length"], |
---|
97 | |
---|
98 | ["K12", "", -0.0004, [-inf, inf], "", "A:B interaction parameter"], |
---|
99 | ["K13", "", -0.0004, [-inf, inf], "", "A:C interaction parameter"], |
---|
100 | ["K14", "", -0.0004, [-inf, inf], "", "A:D interaction parameter"], |
---|
101 | ["K23", "", -0.0004, [-inf, inf], "", "B:C interaction parameter"], |
---|
102 | ["K24", "", -0.0004, [-inf, inf], "", "B:D interaction parameter"], |
---|
103 | ["K34", "", -0.0004, [-inf, inf], "", "C:D interaction parameter"], |
---|
104 | ] |
---|
105 | |
---|
106 | |
---|
107 | source = ["rpa.c"] |
---|
108 | single = False |
---|
109 | |
---|
110 | control = "case_num" |
---|
111 | HIDE_ALL = set("Phi4".split()) |
---|
112 | HIDE_A = set("N1 Phi1 v1 L1 b1 K12 K13 K14".split()).union(HIDE_ALL) |
---|
113 | HIDE_AB = set("N2 Phi2 v2 L2 b2 K23 K24".split()).union(HIDE_A) |
---|
114 | def hidden(case_num): |
---|
115 | """ |
---|
116 | Return a list of parameters to hide depending on the multiplicity parameter. |
---|
117 | """ |
---|
118 | case_num = int(case_num+0.5) |
---|
119 | if case_num < 2: |
---|
120 | return HIDE_AB |
---|
121 | elif case_num < 5: |
---|
122 | return HIDE_A |
---|
123 | else: |
---|
124 | return HIDE_ALL |
---|
125 | |
---|