// NOTE that "length" here is the full height of the core! static double form_volume(double r_minor, double x_core, double thick_rim, double thick_face, double length) { return M_PI*( (r_minor + thick_rim)*(r_minor*x_core + thick_rim)* length + square(r_minor)*x_core*2.0*thick_face ); } static double Iq(double q, double r_minor, double x_core, double thick_rim, double thick_face, double length, double rhoc, double rhoh, double rhor, double rhosolv, double sigma) { double si1,si2,be1,be2; // core_shell_bicelle_elliptical_belt, RKH 5th Oct 2017, core_shell_bicelle_elliptical // tested briefly against limiting cases of cylinder, hollow cylinder & elliptical cylinder models // const double uplim = M_PI_4; const double halfheight = 0.5*length; //const double va = 0.0; //const double vb = 1.0; // inner integral limits //const double vaj=0.0; //const double vbj=M_PI; const double r_major = r_minor * x_core; const double r2A = 0.5*(square(r_major) + square(r_minor)); const double r2B = 0.5*(square(r_major) - square(r_minor)); // dr1,2,3 are now for Vcore, Vcore+rim, Vcore+face, const double dr1 = (-rhor - rhoh + rhoc + rhosolv) *M_PI*r_minor*r_major* 2.0*halfheight; const double dr2 = (rhor-rhosolv) *M_PI*(r_minor+thick_rim)*( r_major+thick_rim)* 2.0*halfheight; const double dr3 = (rhoh-rhosolv) *M_PI*r_minor*r_major* 2.0*(halfheight+thick_face); //initialize integral double outer_sum = 0.0; for(int i=0;i