[82c299f] | 1 | r""" |
---|
[20c856a] | 2 | Definition |
---|
| 3 | ---------- |
---|
| 4 | |
---|
[82c299f] | 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 | |
---|
[20c856a] | 29 | .. note:: |
---|
| 30 | These case numbers are different from those in the NIST SANS package! |
---|
[82c299f] | 31 | |
---|
[4f9e288] | 32 | The models are based on the papers by Akcasu et al. [#Akcasu]_ and by |
---|
| 33 | Hammouda [#Hammouda]_ assuming the polymer follows Gaussian statistics such |
---|
| 34 | that $R_g^2 = n b^2/6$ where $b$ is the statistical segment length and $n$ is |
---|
| 35 | the number of statistical segment lengths. A nice tutorial on how these are |
---|
| 36 | constructed and implemented can be found in chapters 28 and 39 of Boualem |
---|
| 37 | Hammouda's 'SANS Toolbox'[#toolbox]_. |
---|
| 38 | |
---|
| 39 | In brief the macroscopic cross sections are derived from the general forms |
---|
| 40 | for homopolymer scattering and the multiblock cross-terms while the inter |
---|
| 41 | polymer cross terms are described in the usual way by the $\chi$ parameter. |
---|
| 42 | |
---|
[20c856a] | 43 | USAGE NOTES: |
---|
[82c299f] | 44 | |
---|
[20c856a] | 45 | * Only one case can be used at any one time. |
---|
| 46 | * The RPA (mean field) formalism only applies only when the multicomponent |
---|
| 47 | polymer mixture is in the homogeneous mixed-phase region. |
---|
| 48 | * **Component D is assumed to be the "background" component (ie, all contrasts |
---|
| 49 | are calculated with respect to component D).** So the scattering contrast |
---|
| 50 | for a C/D blend = [SLD(component C) - SLD(component D)]\ :sup:`2`. |
---|
| 51 | * Depending on which case is being used, the number of fitting parameters can |
---|
[4f9e288] | 52 | vary. |
---|
| 53 | |
---|
| 54 | .. Note:: |
---|
| 55 | * In general the degrees of polymerization, the volume |
---|
| 56 | fractions, the molar volumes, and the neutron scattering lengths for each |
---|
| 57 | component are obtained from other methods and held fixed while The *scale* |
---|
| 58 | parameter should be held equal to unity. |
---|
| 59 | * The variables are normally the segment lengths (b\ :sub:`a`, b\ :sub:`b`, |
---|
| 60 | etc) and $\chi$ parameters (K\ :sub:`ab`, K\ :sub:`ac`, etc). |
---|
[82c299f] | 61 | |
---|
| 62 | |
---|
| 63 | References |
---|
| 64 | ---------- |
---|
| 65 | |
---|
[4f9e288] | 66 | .. [#Akcasu] A Z Akcasu, R Klein and B Hammouda, *Macromolecules*, 26 (1993) |
---|
| 67 | 4136. |
---|
| 68 | .. [#Hammouda] B. Hammouda, *Advances in Polymer Science* 106 (1993) 87. |
---|
| 69 | .. [#toolbox] https://www.ncnr.nist.gov/staff/hammouda/the_sans_toolbox.pdf |
---|
| 70 | |
---|
| 71 | Authorship and Verification |
---|
| 72 | ---------------------------- |
---|
| 73 | |
---|
| 74 | * **Author:** Boualem Hammouda - NIST IGOR/DANSE **Date:** pre 2010 |
---|
| 75 | * **Converted to sasmodels by:** Paul Kienzle **Date:** July 18, 2016 |
---|
| 76 | * **Last Modified by:** Paul Butler **Date:** March 12, 2017 |
---|
| 77 | * **Last Reviewed by:** Paul Butler **Date:** March 12, 2017 |
---|
[82c299f] | 78 | """ |
---|
| 79 | |
---|
| 80 | from numpy import inf |
---|
| 81 | |
---|
| 82 | name = "rpa" |
---|
[20c856a] | 83 | title = "Random Phase Approximation" |
---|
[82c299f] | 84 | description = """ |
---|
| 85 | This formalism applies to multicomponent polymer mixtures in the |
---|
| 86 | homogeneous (mixed) phase region only. |
---|
| 87 | Case 0: C/D binary mixture of homopolymers |
---|
| 88 | Case 1: C-D diblock copolymer |
---|
| 89 | Case 2: B/C/D ternary mixture of homopolymers |
---|
| 90 | Case 3: B/C-D mixture of homopolymer b and diblock copolymer C-D |
---|
| 91 | Case 4: B-C-D triblock copolymer |
---|
| 92 | Case 5: A/B/C/D quaternary mixture of homopolymers |
---|
| 93 | Case 6: A/B/C-D mixture of two homopolymers A/B and a diblock C-D |
---|
| 94 | Case 7: A/B-C-D mixture of a homopolymer A and a triblock B-C-D |
---|
| 95 | Case 8: A-B/C-D mixture of two diblock copolymers A-B and C-D |
---|
| 96 | Case 9: A-B-C-D four-block copolymer |
---|
| 97 | See details in the model function help |
---|
| 98 | """ |
---|
[51ec7e8] | 99 | category = "shape-independent" |
---|
[82c299f] | 100 | |
---|
| 101 | CASES = [ |
---|
| 102 | "C+D binary mixture", |
---|
| 103 | "C:D diblock copolymer", |
---|
| 104 | "B+C+D ternary mixture", |
---|
| 105 | "B+C:D binary mixture", |
---|
| 106 | "B:C:D triblock copolymer", |
---|
| 107 | "A+B+C+D quaternary mixture", |
---|
| 108 | "A+B+C:D ternary mixture", |
---|
| 109 | "A+B:C:D binary mixture", |
---|
| 110 | "A:B+C:D binary mixture", |
---|
| 111 | "A:B:C:D quadblock copolymer", |
---|
| 112 | ] |
---|
| 113 | |
---|
| 114 | # ["name", "units", default, [lower, upper], "type","description"], |
---|
| 115 | parameters = [ |
---|
[a5b8477] | 116 | ["case_num", "", 1, [CASES], "", "Component organization"], |
---|
[69aa451] | 117 | |
---|
| 118 | ["N[4]", "", 1000.0, [1, inf], "", "Degree of polymerization"], |
---|
| 119 | ["Phi[4]", "", 0.25, [0, 1], "", "volume fraction"], |
---|
[20c856a] | 120 | ["v[4]", "mL/mol", 100.0, [0, inf], "", "molar volume"], |
---|
[69aa451] | 121 | ["L[4]", "fm", 10.0, [-inf, inf], "", "scattering length"], |
---|
| 122 | ["b[4]", "Ang", 5.0, [0, inf], "", "segment length"], |
---|
[82c299f] | 123 | |
---|
[ce176ca] | 124 | ["K12", "", -0.0004, [-inf, inf], "", "A:B interaction parameter"], |
---|
| 125 | ["K13", "", -0.0004, [-inf, inf], "", "A:C interaction parameter"], |
---|
| 126 | ["K14", "", -0.0004, [-inf, inf], "", "A:D interaction parameter"], |
---|
| 127 | ["K23", "", -0.0004, [-inf, inf], "", "B:C interaction parameter"], |
---|
| 128 | ["K24", "", -0.0004, [-inf, inf], "", "B:D interaction parameter"], |
---|
| 129 | ["K34", "", -0.0004, [-inf, inf], "", "C:D interaction parameter"], |
---|
[82c299f] | 130 | ] |
---|
| 131 | |
---|
| 132 | |
---|
| 133 | source = ["rpa.c"] |
---|
[51ec7e8] | 134 | single = False |
---|
[82c299f] | 135 | |
---|
[46ed760] | 136 | control = "case_num" |
---|
[bb73096] | 137 | HIDE_ALL = set("Phi4".split()) |
---|
| 138 | HIDE_A = set("N1 Phi1 v1 L1 b1 K12 K13 K14".split()).union(HIDE_ALL) |
---|
[ce176ca] | 139 | HIDE_AB = set("N2 Phi2 v2 L2 b2 K23 K24".split()).union(HIDE_A) |
---|
| 140 | def hidden(case_num): |
---|
[40a87fa] | 141 | """ |
---|
| 142 | Return a list of parameters to hide depending on the multiplicity parameter. |
---|
| 143 | """ |
---|
[fa4a994] | 144 | case_num = int(case_num+0.5) |
---|
[82c299f] | 145 | if case_num < 2: |
---|
| 146 | return HIDE_AB |
---|
[5cfda00] | 147 | elif case_num < 5: |
---|
| 148 | return HIDE_A |
---|
[82c299f] | 149 | else: |
---|
[bb73096] | 150 | return HIDE_ALL |
---|
[82c299f] | 151 | |
---|