Changeset 20c856a in sasmodels
 Timestamp:
 Mar 7, 2017 1:19:23 AM (2 years ago)
 Branches:
 master, core_shell_microgels, costrafo411, magnetic_model, ticket1257vesicleproduct, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
 Children:
 9ae85f0, 3a45c2c
 Parents:
 f4b36fa
 Location:
 sasmodels/models
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

sasmodels/models/rpa.c
racfb094 r20c856a 309 309 310 310 //calculate contrast where L[i] is the scattering length of i and D is the matrix 311 //need to verify why the sqrt of Nav rather than just Nav (assuming v is molar volume) 311 //Note that should multiply by Nav to get units of SLD which will become 312 // Nav*2 in the next line (SLD^2) but then normalization in that line would 313 //need to divide by Nav leaving only Nav or sqrt(Nav) before squaring. 312 314 Nav=6.022045e+23; 313 315 Lad=(L[0]/v[0]L[3]/v[3])*sqrt(Nav); … … 317 319 Intg=Lad*Lad*S11+Lbd*Lbd*S22+Lcd*Lcd*S33+2.0*Lad*Lbd*S12+2.0*Lbd*Lcd*S23+2.0*Lad*Lcd*S13; 318 320 319 //rescale for units of Lij^2 ( in 10e12 m^2 to m^2 ?)320 Intg *= 1.0e2 4;321 //rescale for units of Lij^2 (fm^2 to cm^2) 322 Intg *= 1.0e26; 321 323 322 324 return Intg; 
sasmodels/models/rpa.py
rbb73096 r20c856a 1 1 r""" 2 Definition 3  4 2 5 Calculates the macroscopic scattering intensity for a multicomponent 3 6 homogeneous mixture of polymers using the Random Phase Approximation. … … 24 27 Case 9: ABCD tetrablock 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 mixedphase 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 mixedphase 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"],
Note: See TracChangeset
for help on using the changeset viewer.