Opened 4 years ago
Last modified 9 months ago
#560 new enhancement
extend core multi-shell model to support spline functions.
Reported by: | pkienzle | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | SasView Next Release +1 |
Component: | SasView | Keywords: | |
Cc: | Work Package: | SasModels Model Issues |
Description
Add a polynomial order parameter to the core multi-shell model to support spline functions
sld_core radius sld_solvent form=['shells','ramp','quadratic spline','cubic spline'] n_shells thickness[n_shells] sld_surface[n_shells]
Form=0 is a series of shells, like the core multi-shell model, otherwise the SLDs match at the interfaces, with form=1,2,3 as linear, quadratic and cubic splines. Use a monotone cubic spline for easier control (available in bumps.mono).
Using a generic polynomial spline,
rho_i(r) = A_i r^p + B_i r^(p-1) + …
the integral from 0 to r_max is
f = f_core - f_solvent + Sum [h(rho_i, r_(i+1)) - h(rho_i, r_i)]
with
h(rho,r) = (4 pi)/q^2 Sum_(k=0)^p d^k[-cos(q r)]/dr^k d^k[r rho(r)]/dr^k / (q r)^k
For cubic polynomials, this works out to
h(r) = (4 pi) / q^6 [ - cos(qr) (Ar^4 + Br^3 + Cr^2 + Dr) q^4 + sin(qr) (4Ar^3 + 3Br^2 + 2Cr + D) q^3 + cos(qr) (12Ar^2 + 6Br + 2C) q^2 - sin(qr) (24Ar + 6B) q - cos(qr) (24A) ]
The terms can be rearranged using the difference in coefficients between layers Delta A, Delta B, … so we only need one evaluation of h for each shell.
Change History (1)
comment:1 Changed 9 months ago by butler
- Work Package changed from SasModels New Model to SasModels Model Issues