Jpp  16.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JPhysicsSupportkit.hh
Go to the documentation of this file.
1 #ifndef __JPHYSICS_JPHYSICSSUPPORTKIT__
2 #define __JPHYSICS_JPHYSICSSUPPORTKIT__
3 
4 #include <cmath>
5 
7 
8 #include "JPhysics/JConstants.hh"
9 
10 
11 /**
12  * \author mdejong
13  */
14 
15 namespace JPHYSICS {}
16 namespace JPP { using namespace JPHYSICS; }
17 
18 /**
19  * Auxiliary methods for light properties of deep-sea water.
20  */
21 namespace JPHYSICS {
22 
24 
25 
26  /**
27  * Auxiliary method to describe light scattering in water (Henyey-Greenstein).
28  *
29  * \param g angular dependence parameter
30  * \param x cosine scattering angle
31  * \return probability
32  */
33  inline double henyey_greenstein(const double g,
34  const double x)
35 
36  {
37  const double a0 = (1.0 - g*g) / (4*PI);
38  const double y = 1.0 + g*g - 2.0*g*x;
39 
40  return a0 / (y*sqrt(y));
41  }
42 
43 
44  /**
45  * Auxiliary method to describe light scattering in water (Heneyey-Greenstein).
46  *
47  * \param x cosine scattering angle
48  * \return probability
49  */
50  inline double henyey_greenstein(const double x)
51  {
52  static const double g = 0.924;
53 
54  return henyey_greenstein(g, x);
55  }
56 
57 
58  /**
59  * Auxiliary method to describe light scattering in water (Rayleigh).
60  *
61  * \param a angular dependence parameter
62  * \param x cosine scattering angle
63  * \return probability
64  */
65  inline double rayleigh(const double a,
66  const double x)
67 
68  {
69  const double a0 = 1.0 / (1.0 + a/3.0) / (4*PI);
70 
71  return a0 * (1.0 + a*x*x);
72  }
73 
74 
75  /**
76  * Auxiliary method to describe light scattering in water (Rayleigh).
77  *
78  * \param x cosine scattering angle
79  * \return probability
80  */
81  inline double rayleigh(const double x)
82  {
83  return rayleigh(0.853, x);
84  }
85 
86 
87  /**
88  * Model specific function to describe light scattering in water (f4).
89  *
90  * \param x cosine scattering angle
91  * \return probability
92  */
93  inline double f4(const double x)
94  {
95  static const double g1 = 0.77;
96  static const double g2 = 0.00;
97  static const double f = 1.00;
98 
99  return f * henyey_greenstein(g1,x) + (1.0 - f) * henyey_greenstein(g2,x);
100  }
101 
102 
103  /**
104  * Model specific function to describe light scattering in water (p00075).
105  *
106  * \param x cosine scattering angle
107  * \return probability
108  */
109  inline double p00075(const double x)
110  {
111  static const double g = 0.924;
112  static const double f = 0.17;
113 
114  return f * rayleigh(x) + (1.0 - f) * henyey_greenstein(g,x);
115  }
116 
117 
118  /**
119  * Measurement of light scattering in water.
120  *
121  * Values are taken from reference C.D. Mobley "Light and Water", ISBN 0-12-502750-8, pag. 111, Table 3.10 (right column).
122  *
123  * \param x cosine scattering angle
124  * \return probability
125  */
126  inline double petzhold(const double x)
127  {
128  using namespace JPP;
129 
130  static JPolint1Function1D_t f1;
131 
132  if (f1.empty()) {
133 
134  f1[ 0.100] = 1.767e+03;
135  f1[ 0.126] = 1.296e+03;
136  f1[ 0.158] = 9.502e+02;
137  f1[ 0.200] = 6.991e+02;
138  f1[ 0.251] = 5.140e+02;
139  f1[ 0.316] = 3.764e+02;
140  f1[ 0.398] = 2.763e+02;
141  f1[ 0.501] = 2.188e+02;
142  f1[ 0.631] = 1.444e+02;
143  f1[ 0.794] = 1.022e+02;
144  f1[ 1.000] = 7.161e+01;
145  f1[ 1.259] = 4.958e+01;
146  f1[ 1.585] = 3.395e+01;
147  f1[ 1.995] = 2.281e+01;
148  f1[ 2.512] = 1.516e+01;
149  f1[ 3.162] = 1.002e+01;
150  f1[ 3.981] = 6.580e+00;
151  f1[ 5.012] = 4.295e+00;
152  f1[ 6.310] = 2.807e+00;
153  f1[ 7.943] = 1.819e+00;
154  f1[ 10.000] = 1.153e+00;
155  f1[ 15.000] = 4.893e-01;
156  f1[ 20.000] = 2.444e-01;
157  f1[ 25.000] = 1.472e-01;
158  f1[ 30.000] = 8.609e-02;
159  f1[ 35.000] = 5.931e-02;
160  f1[ 40.000] = 4.210e-02;
161  f1[ 45.000] = 3.067e-02;
162  f1[ 50.000] = 2.275e-02;
163  f1[ 55.000] = 1.699e-02;
164  f1[ 60.000] = 1.313e-02;
165  f1[ 65.000] = 1.046e-02;
166  f1[ 70.000] = 8.488e-03;
167  f1[ 75.000] = 6.976e-03;
168  f1[ 80.000] = 5.842e-03;
169  f1[ 85.000] = 4.953e-03;
170  f1[ 90.000] = 4.292e-03;
171  f1[ 95.000] = 3.782e-03;
172  f1[100.000] = 3.404e-03;
173  f1[105.000] = 3.116e-03;
174  f1[110.000] = 2.912e-03;
175  f1[115.000] = 2.797e-03;
176  f1[120.000] = 2.686e-03;
177  f1[125.000] = 2.571e-03;
178  f1[130.000] = 2.476e-03;
179  f1[135.000] = 2.377e-03;
180  f1[140.000] = 2.329e-03;
181  f1[145.000] = 2.313e-03;
182  f1[150.000] = 2.365e-03;
183  f1[155.000] = 2.506e-03;
184  f1[160.000] = 2.662e-03;
185  f1[165.000] = 2.835e-03;
186  f1[170.000] = 3.031e-03;
187  f1[175.000] = 3.092e-03;
188  f1[180.000] = 3.154e-03;
189 
190  f1.mul(1.166); // normalisation
191  f1.compile();
192  }
193 
194  const double a = acos(x) * 180.0 / PI;
195 
196  if (a >= f1.getXmax())
197  return f1.rbegin()->getY();
198  if (a <= f1.getXmin())
199  return f1. begin()->getY();
200  else
201  return f1(a);
202  }
203 
204 
205  /**
206  * Absorption length of pure water.
207  *
208  * CITATION:
209  * Jonasz M. 2007. Absorption coefficient of water: Data sources (www.tpdsci.com/Tpc/AbsCfOfWaterDat.php).
210  * In: Top. Part. Disp. Sci. (www.tpdsci.com).
211  *
212  * DATA FROM:
213  * Wozniak B., Wozniak S. B., Tyszka K., Ostrowska M., Majchrowski R., Ficek D., Dera J. 2005.
214  * Modelling the light absorption properties of particulate matter forming organic particles suspended in seawater. Part 2.
215  * Modelling results. Oceanologia 47, 621-662.
216  * see also
217  * Wozniak B., Dera J. 2007.
218  * Light absorption in sea water. Springer, Berlin, 456 pp. (see p. 62)
219  *
220  * NOTES:
221  * As stated by the data authors, the data are based on measurement results obtained by various authors
222  * (interpolated by a linear approximation where applicable):
223  * Wavelength Reference
224  * - 200-335 nm Smith R.C., Baker K.S. 1981. Optical properties of the clearest natural waters (200-800 nm). Appl. Opt. 20, 177-184.
225  * - 340-370 nm Sogandares F.M., Fry, E.S. 1997. Absorption spectrum (340 -640 nm) of pure water. I. Photothermal measurements Appl. Opt. 36, 8699-8709.
226  * - 380-700 nm Pope R.M., Fry E.S. 1997. Absorption spectrum (380 -700 nm) of pure water. II. Integrating cavity measurements. Appl. Opt. 36, 8710-8723
227  */
230  {
231  public:
233  {
234  // wave- absorption
235  // length coefficient
236  // [um] [1/m]
237  (*this)[0.200e3] = 3.07;
238  (*this)[0.205e3] = 2.53;
239  (*this)[0.210e3] = 1.99;
240  (*this)[0.215e3] = 1.65;
241  (*this)[0.220e3] = 1.31;
242  (*this)[0.225e3] = 1.1185;
243  (*this)[0.230e3] = 0.927;
244  (*this)[0.235e3] = 0.8235;
245  (*this)[0.240e3] = 0.72;
246  (*this)[0.245e3] = 0.6395;
247  (*this)[0.250e3] = 0.559;
248  (*this)[0.255e3] = 0.508;
249  (*this)[0.260e3] = 0.457;
250  (*this)[0.265e3] = 0.415;
251  (*this)[0.270e3] = 0.373;
252  (*this)[0.275e3] = 0.3305;
253  (*this)[0.280e3] = 0.288;
254  (*this)[0.285e3] = 0.2515;
255  (*this)[0.290e3] = 0.215;
256  (*this)[0.295e3] = 0.178;
257  (*this)[0.300e3] = 0.141;
258  (*this)[0.305e3] = 0.123;
259  (*this)[0.310e3] = 0.105;
260  (*this)[0.315e3] = 0.0947;
261  (*this)[0.320e3] = 0.0844;
262  (*this)[0.325e3] = 0.0761;
263  (*this)[0.330e3] = 0.0678;
264  (*this)[0.335e3] = 0.06195;
265  (*this)[0.340e3] = 0.0325;
266  (*this)[0.345e3] = 0.02645;
267  (*this)[0.350e3] = 0.0204;
268  (*this)[0.355e3] = 0.018;
269  (*this)[0.360e3] = 0.0156;
270  (*this)[0.365e3] = 0.0135;
271  (*this)[0.370e3] = 0.0114;
272  (*this)[0.375e3] = 0.011385;
273  (*this)[0.380e3] = 0.01137;
274  (*this)[0.385e3] = 0.00941;
275  (*this)[0.390e3] = 0.00851;
276  (*this)[0.395e3] = 0.00813;
277  (*this)[0.400e3] = 0.00663;
278  (*this)[0.405e3] = 0.0053;
279  (*this)[0.410e3] = 0.00473;
280  (*this)[0.415e3] = 0.00444;
281  (*this)[0.420e3] = 0.00454;
282  (*this)[0.425e3] = 0.00478;
283  (*this)[0.430e3] = 0.00495;
284  (*this)[0.435e3] = 0.0053;
285  (*this)[0.440e3] = 0.00635;
286  (*this)[0.445e3] = 0.00751;
287  (*this)[0.450e3] = 0.00922;
288  (*this)[0.455e3] = 0.00962;
289  (*this)[0.460e3] = 0.00979;
290  (*this)[0.465e3] = 0.01011;
291  (*this)[0.470e3] = 0.0106;
292  (*this)[0.475e3] = 0.0114;
293  (*this)[0.480e3] = 0.0127;
294  (*this)[0.485e3] = 0.0136;
295  (*this)[0.490e3] = 0.015;
296  (*this)[0.495e3] = 0.0173;
297  (*this)[0.500e3] = 0.0204;
298  (*this)[0.505e3] = 0.0256;
299  (*this)[0.510e3] = 0.0325;
300  (*this)[0.515e3] = 0.0396;
301  (*this)[0.520e3] = 0.0409;
302  (*this)[0.525e3] = 0.0417;
303  (*this)[0.530e3] = 0.0434;
304  (*this)[0.535e3] = 0.0452;
305  (*this)[0.540e3] = 0.0474;
306  (*this)[0.545e3] = 0.0511;
307  (*this)[0.550e3] = 0.0565;
308  (*this)[0.555e3] = 0.0596;
309  (*this)[0.560e3] = 0.0619;
310  (*this)[0.565e3] = 0.0642;
311  (*this)[0.570e3] = 0.0695;
312  (*this)[0.575e3] = 0.0772;
313  (*this)[0.580e3] = 0.0896;
314  (*this)[0.585e3] = 0.11;
315  (*this)[0.590e3] = 0.1351;
316  (*this)[0.595e3] = 0.1672;
317  (*this)[0.600e3] = 0.2224;
318  (*this)[0.605e3] = 0.2577;
319  (*this)[0.610e3] = 0.2644;
320  (*this)[0.615e3] = 0.2678;
321  (*this)[0.620e3] = 0.2755;
322  (*this)[0.625e3] = 0.2834;
323  (*this)[0.630e3] = 0.2916;
324  (*this)[0.635e3] = 0.3012;
325  (*this)[0.640e3] = 0.3108;
326  (*this)[0.645e3] = 0.325;
327  (*this)[0.650e3] = 0.34;
328  (*this)[0.655e3] = 0.371;
329  (*this)[0.660e3] = 0.41;
330  (*this)[0.665e3] = 0.429;
331  (*this)[0.670e3] = 0.439;
332  (*this)[0.675e3] = 0.448;
333  (*this)[0.680e3] = 0.465;
334  (*this)[0.685e3] = 0.486;
335  (*this)[0.690e3] = 0.516;
336  (*this)[0.695e3] = 0.559;
337  (*this)[0.700e3] = 0.624;
338 
339  compile();
340  }
341 
342 
343  /**
344  * Absorption length of pure water.
345  *
346  * \param lambda wavelength of light [nm]
347  * \return absorption length [m]
348  */
349  double operator()(const double lambda) const
350  {
351  const double y = JGridSplineFunction1D_t::operator()(lambda);
352 
353  return 1.0 / y;
354  }
355  };
356 
357 
358  /**
359  * Function object for absorption length of pure water.
360  */
362 }
363 
364 #endif
double f4(const double x)
Model specific function to describe light scattering in water (f4).
result_type operator()(const argument_type x) const
Function value evaluation.
Definition: JFunctional.hh:333
static const JAbsorptionLengthOfPureWater getAbsorptionLengthOfPureWater
Function object for absorption length of pure water.
double operator()(const double lambda) const
Absorption length of pure water.
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
double rayleigh(const double a, const double x)
Auxiliary method to describe light scattering in water (Rayleigh).
Type definition of a spline interpolation based on a JGridCollection with result type double...
double petzhold(const double x)
Measurement of light scattering in water.
Absorption length of pure water.
Physics constants.
static const double PI
Mathematical constants.
then JCalibrateToT a
Definition: JTuneHV.sh:116
double p00075(const double x)
Model specific function to describe light scattering in water (p00075).
double henyey_greenstein(const double g, const double x)
Auxiliary method to describe light scattering in water (Henyey-Greenstein).
Double_t g1(const Double_t x)
Function.
Definition: JQuantiles.cc:25