rho<-function (S = 35, T = 25, P = 0)
{
rhow = 999.842594 + 0.06793952 * T - 0.00909529 * T^2 + 0.0001001685 *
T^3 - 1.120083e-06 * T^4 + 6.536332e-09 * T^5
A = 0.824493 - 0.0040899 * T + 7.6438e-05 * T^2 - 8.2467e-07 *
T^3 + 5.3875e-09 * T^4
B = -0.00572466 + 0.00010227 * T - 1.6546e-06 * T^2
C = 0.00048314
rho0 = rhow + A * S + B * S^(3/2) + C * S^2
Ksbmw = 19652.21 + 148.4206 * T - 2.327105 * T^2 + 0.01360477 *
T^3 - 5.155288e-05 * T^4
Ksbm0 = Ksbmw + S * (54.6746 - 0.603459 * T + 0.0109987 *
T^2 - 6.167e-05 * T^3) + S^(3/2) * (0.07944 + 0.016483 *
T - 0.00053009 * T^2)
Ksbm = Ksbm0 + P * (3.239908 + 0.00143713 * T + 0.000116092 *
T^2 - 5.77905e-07 * T^3) + P * S * (0.0022838 - 1.0981e-05 *
T - 1.6078e-06 * T^2) + P * S^(3/2) * 0.000191075 + P *
P * (8.50935e-05 - 6.12293e-06 * T + 5.2787e-08 * T^2) +
P^2 * S * (-9.9348e-07 + 2.0816e-08 * T + 9.1697e-10 *
T^2)
rho = rho0/(1 - P/Ksbm)
return(rho)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.