core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Rev | Line | |
---|
[7ed702f] | 1 | double form_volume(double radius); |
---|
| 2 | |
---|
| 3 | double Iq(double q, |
---|
| 4 | double mass_dim, |
---|
| 5 | double surface_dim, |
---|
| 6 | double cluster_rg, |
---|
| 7 | double primary_rg); |
---|
| 8 | |
---|
| 9 | double Iqxy(double qx, double qy, |
---|
| 10 | double mass_dim, |
---|
| 11 | double surface_dim, |
---|
| 12 | double cluster_rg, |
---|
| 13 | double primary_rg); |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | static double _mass_surface_fractal_kernel(double q, |
---|
| 17 | double mass_dim, |
---|
| 18 | double surface_dim, |
---|
| 19 | double cluster_rg, |
---|
| 20 | double primary_rg) |
---|
| 21 | { |
---|
| 22 | //computation |
---|
| 23 | double tot_dim = 6.0 - surface_dim - mass_dim; |
---|
| 24 | mass_dim /= 2.0; |
---|
| 25 | tot_dim /= 2.0; |
---|
| 26 | |
---|
| 27 | double rc_norm = cluster_rg * cluster_rg / (3.0 * mass_dim); |
---|
| 28 | double rp_norm = primary_rg * primary_rg / (3.0 * tot_dim); |
---|
| 29 | |
---|
| 30 | //x for P |
---|
| 31 | double x_val1 = 1.0 + q * q * rc_norm; |
---|
| 32 | double x_val2 = 1.0 + q * q * rp_norm; |
---|
| 33 | |
---|
| 34 | double inv_form = pow(x_val1, mass_dim) * pow(x_val2, tot_dim); |
---|
| 35 | |
---|
| 36 | //another singular |
---|
| 37 | if (inv_form == 0.0) return 0.0; |
---|
| 38 | |
---|
| 39 | double form_factor = 1.0; |
---|
| 40 | form_factor /= inv_form; |
---|
| 41 | |
---|
| 42 | return (form_factor); |
---|
| 43 | } |
---|
| 44 | double form_volume(double radius){ |
---|
| 45 | |
---|
| 46 | return 1.333333333333333*M_PI*radius*radius*radius; |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | double Iq(double q, |
---|
| 50 | double mass_dim, |
---|
| 51 | double surface_dim, |
---|
| 52 | double cluster_rg, |
---|
| 53 | double primary_rg) |
---|
| 54 | { |
---|
| 55 | return _mass_surface_fractal_kernel(q, |
---|
| 56 | mass_dim, |
---|
| 57 | surface_dim, |
---|
| 58 | cluster_rg, |
---|
| 59 | primary_rg); |
---|
| 60 | } |
---|
| 61 | |
---|
| 62 | // Iqxy is never called since no orientation or magnetic parameters. |
---|
| 63 | double Iqxy(double qx, double qy, |
---|
| 64 | double mass_dim, |
---|
| 65 | double surface_dim, |
---|
| 66 | double cluster_rg, |
---|
| 67 | double primary_rg) |
---|
| 68 | { |
---|
| 69 | double q = sqrt(qx*qx + qy*qy); |
---|
| 70 | return _mass_surface_fractal_kernel(q, |
---|
| 71 | mass_dim, |
---|
| 72 | surface_dim, |
---|
| 73 | cluster_rg, |
---|
| 74 | primary_rg); |
---|
| 75 | } |
---|
| 76 | |
---|
Note: See
TracBrowser
for help on using the repository browser.