Changeset f4f85b3 in sasmodels


Ignore:
Timestamp:
Mar 22, 2017 9:31:01 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
d605080
Parents:
b260926
Message:

core shell bicelle elliptical: adapt to new orientation parameters; adjust effective shell radius in 2D model so it matches core shell bicelle when axis ratio is 1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/core_shell_bicelle_elliptical.c

    r592343f rf4f85b3  
    3232} 
    3333 
    34 double  
    35                 Iq(double qq, 
    36                    double rad, 
    37                    double x_core, 
    38                    double radthick, 
    39                    double facthick, 
    40                    double length, 
    41                    double rhoc, 
    42                    double rhoh, 
    43                    double rhor, 
    44                    double rhosolv) 
     34double Iq(double q, 
     35          double rad, 
     36          double x_core, 
     37          double radthick, 
     38          double facthick, 
     39          double length, 
     40          double rhoc, 
     41          double rhoh, 
     42          double rhor, 
     43          double rhosolv) 
    4544{ 
    4645    double si1,si2,be1,be2; 
     
    7473        const double sin_alpha = sqrt(1.0 - cos_alpha*cos_alpha); 
    7574        double inner_sum=0; 
    76         double sinarg1 = qq*halfheight*cos_alpha; 
    77         double sinarg2 = qq*(halfheight+facthick)*cos_alpha; 
     75        double sinarg1 = q*halfheight*cos_alpha; 
     76        double sinarg2 = q*(halfheight+facthick)*cos_alpha; 
    7877        si1 = sas_sinx_x(sinarg1); 
    7978        si2 = sas_sinx_x(sinarg2); 
     
    8382            const double beta = ( Gauss76Z[j] +1.0)*M_PI_2; 
    8483            const double rr = sqrt(rA - rB*cos(beta)); 
    85             double besarg1 = qq*rr*sin_alpha; 
    86             double besarg2 = qq*(rr+radthick)*sin_alpha; 
     84            double besarg1 = q*rr*sin_alpha; 
     85            double besarg2 = q*(rr+radthick)*sin_alpha; 
    8786            be1 = sas_2J1x_x(besarg1); 
    8887            be2 = sas_2J1x_x(besarg2); 
     
    114113{ 
    115114       // THIS NEEDS TESTING 
    116     double qq, cos_val, cos_mu, cos_nu; 
    117     ORIENT_ASYMMETRIC(qx, qy, theta, phi, psi, qq, cos_val, cos_mu, cos_nu); 
     115    double q, xhat, yhat, zhat; 
     116    ORIENT_ASYMMETRIC(qx, qy, theta, phi, psi, q, xhat, yhat, zhat); 
    118117    const double dr1 = rhoc-rhoh; 
    119118    const double dr2 = rhor-rhosolv; 
     
    125124    const double vol3 = M_PI*rad*radius_major*2.0*(halfheight+facthick); 
    126125 
    127     // Compute:  r = sqrt((radius_major*cos_nu)^2 + (radius_minor*cos_mu)^2) 
     126    // Compute:  r = sqrt((radius_major*zhat)^2 + (radius_minor*yhat)^2) 
    128127    // Given:    radius_major = r_ratio * radius_minor   
    129128    // ASSUME the sin_alpha is included in the separate integration over orientation of rod angle 
    130     const double r = rad*sqrt(square(x_core*cos_nu) + cos_mu*cos_mu); 
    131     const double be1 = sas_2J1x_x( qq*r ); 
    132     const double be2 = sas_2J1x_x( qq*(r + radthick ) ); 
    133     const double si1 = sas_sinx_x( qq*halfheight*cos_val ); 
    134     const double si2 = sas_sinx_x( qq*(halfheight + facthick)*cos_val ); 
     129    const double rad_minor = rad; 
     130    const double rad_major = rad*x_core; 
     131    const double r_hat = sqrt(square(rad_major*xhat) + square(rad_minor*yhat)); 
     132    const double rshell_hat = sqrt(square((rad_major+radthick)*xhat) 
     133                                   + square((rad_minor+radthick)*yhat)); 
     134    const double be1 = sas_2J1x_x( q*r_hat ); 
     135    const double be2 = sas_2J1x_x( q*rshell_hat ); 
     136    const double si1 = sas_sinx_x( q*halfheight*zhat ); 
     137    const double si2 = sas_sinx_x( q*(halfheight + facthick)*zhat ); 
    135138    const double Aq = square( vol1*dr1*si1*be1 + vol2*dr2*si2*be2 +  vol3*dr3*si2*be1); 
    136139    //const double vol = form_volume(radius_minor, r_ratio, length); 
Note: See TracChangeset for help on using the changeset viewer.