[82c299f] | 1 | r""" |
---|
| 2 | Calculates the macroscopic scattering intensity for a multi-component |
---|
| 3 | homogeneous mixture of polymers using the Random Phase Approximation. |
---|
| 4 | This general formalism contains 10 specific cases |
---|
| 5 | |
---|
| 6 | Case 0: C/D binary mixture of homopolymers |
---|
| 7 | |
---|
| 8 | Case 1: C-D diblock copolymer |
---|
| 9 | |
---|
| 10 | Case 2: B/C/D ternary mixture of homopolymers |
---|
| 11 | |
---|
| 12 | Case 3: C/C-D mixture of a homopolymer B and a diblock copolymer C-D |
---|
| 13 | |
---|
| 14 | Case 4: B-C-D triblock copolymer |
---|
| 15 | |
---|
| 16 | Case 5: A/B/C/D quaternary mixture of homopolymers |
---|
| 17 | |
---|
| 18 | Case 6: A/B/C-D mixture of two homopolymers A/B and a diblock C-D |
---|
| 19 | |
---|
| 20 | Case 7: A/B-C-D mixture of a homopolymer A and a triblock B-C-D |
---|
| 21 | |
---|
| 22 | Case 8: A-B/C-D mixture of two diblock copolymers A-B and C-D |
---|
| 23 | |
---|
| 24 | Case 9: A-B-C-D tetra-block copolymer |
---|
| 25 | |
---|
| 26 | **NB: these case numbers are different from those in the NIST SANS package!** |
---|
| 27 | |
---|
| 28 | Only one case can be used at any one time. |
---|
| 29 | |
---|
| 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. |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | References |
---|
| 47 | ---------- |
---|
| 48 | |
---|
| 49 | A Z Akcasu, R Klein and B Hammouda, *Macromolecules*, 26 (1993) 4136 |
---|
| 50 | """ |
---|
| 51 | |
---|
| 52 | from numpy import inf |
---|
| 53 | |
---|
| 54 | name = "rpa" |
---|
[aad336c] | 55 | title = "Random Phase Approximation - unfinished work in progress" |
---|
[82c299f] | 56 | description = """ |
---|
| 57 | This formalism applies to multicomponent polymer mixtures in the |
---|
| 58 | homogeneous (mixed) phase region only. |
---|
| 59 | Case 0: C/D binary mixture of homopolymers |
---|
| 60 | Case 1: C-D diblock copolymer |
---|
| 61 | Case 2: B/C/D ternary mixture of homopolymers |
---|
| 62 | Case 3: B/C-D mixture of homopolymer b and diblock copolymer C-D |
---|
| 63 | Case 4: B-C-D triblock copolymer |
---|
| 64 | Case 5: A/B/C/D quaternary mixture of homopolymers |
---|
| 65 | Case 6: A/B/C-D mixture of two homopolymers A/B and a diblock C-D |
---|
| 66 | Case 7: A/B-C-D mixture of a homopolymer A and a triblock B-C-D |
---|
| 67 | Case 8: A-B/C-D mixture of two diblock copolymers A-B and C-D |
---|
| 68 | Case 9: A-B-C-D four-block copolymer |
---|
| 69 | See details in the model function help |
---|
| 70 | """ |
---|
| 71 | category = "" |
---|
| 72 | |
---|
| 73 | CASES = [ |
---|
| 74 | "C+D binary mixture", |
---|
| 75 | "C:D diblock copolymer", |
---|
| 76 | "B+C+D ternary mixture", |
---|
| 77 | "B+C:D binary mixture", |
---|
| 78 | "B:C:D triblock copolymer", |
---|
| 79 | "A+B+C+D quaternary mixture", |
---|
| 80 | "A+B+C:D ternary mixture", |
---|
| 81 | "A+B:C:D binary mixture", |
---|
| 82 | "A:B+C:D binary mixture", |
---|
| 83 | "A:B:C:D quadblock copolymer", |
---|
| 84 | ] |
---|
| 85 | |
---|
| 86 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
| 87 | parameters = [ |
---|
[a5b8477] | 88 | ["case_num", "", 1, [CASES], "", "Component organization"], |
---|
[69aa451] | 89 | |
---|
| 90 | ["N[4]", "", 1000.0, [1, inf], "", "Degree of polymerization"], |
---|
| 91 | ["Phi[4]", "", 0.25, [0, 1], "", "volume fraction"], |
---|
| 92 | ["v[4]", "mL/mol", 100.0, [0, inf], "", "specific volume"], |
---|
| 93 | ["L[4]", "fm", 10.0, [-inf, inf], "", "scattering length"], |
---|
| 94 | ["b[4]", "Ang", 5.0, [0, inf], "", "segment length"], |
---|
[82c299f] | 95 | |
---|
| 96 | ["Kab", "", -0.0004, [-inf, inf], "", "Interaction parameter"], |
---|
| 97 | ["Kac", "", -0.0004, [-inf, inf], "", "Interaction parameter"], |
---|
| 98 | ["Kad", "", -0.0004, [-inf, inf], "", "Interaction parameter"], |
---|
| 99 | ["Kbc", "", -0.0004, [-inf, inf], "", "Interaction parameter"], |
---|
| 100 | ["Kbd", "", -0.0004, [-inf, inf], "", "Interaction parameter"], |
---|
| 101 | ["Kcd", "", -0.0004, [-inf, inf], "", "Interaction parameter"], |
---|
| 102 | ] |
---|
| 103 | |
---|
| 104 | category = "shape-independent" |
---|
| 105 | |
---|
| 106 | source = ["rpa.c"] |
---|
| 107 | |
---|
| 108 | HIDE_NONE = set() |
---|
| 109 | HIDE_A = set("Na Phia va La Kab Kac Kad".split()) |
---|
| 110 | HIDE_AB = set("Nb Phib vb Lb Kbc Kbd".split()).union(HIDE_A) |
---|
| 111 | def hidden(pars): |
---|
| 112 | case_num = pars.get("case_num", parameters[0][2]) |
---|
| 113 | if case_num < 2: |
---|
| 114 | return HIDE_AB |
---|
[5cfda00] | 115 | elif case_num < 5: |
---|
| 116 | return HIDE_A |
---|
[82c299f] | 117 | else: |
---|
| 118 | return HIDE_NONE |
---|
| 119 | |
---|