Jpp  18.6.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JUNESCO.hh
Go to the documentation of this file.
1 #ifndef __JACOUSTICS__JUNESCO__
2 #define __JACOUSTICS__JUNESCO__
3 
4 /**
5  * \file
6  *
7  * Sound velocity according UNESCO equation.
8  * \author mdejong
9  */
10 namespace JACOUSTICS {}
11 namespace JPP { using namespace JACOUSTICS; }
12 
13 namespace JACOUSTICS {
14 
15  /**
16  * Get sound velocity according UNESCO equation.
17  * K.V. Mackenzie, Nine-term equation for the sound speed in the oceans (1981)\n
18  * J. Acoust. Soc. Am. 70(3), pp 807-812
19  *
20  * \param D Depth [m]
21  * \param S Salinity [ppk]
22  * \param T Temperature [C]
23  * \return sound velocity [m/s]
24  */
25  inline double getVelocityMackenzie(const double D, const double S, const double T)
26  {
27  return (1448.96
28  + 4.591 * T
29  - 5.304e-2 * T*T
30  + 2.374e-4 * T*T*T
31  + 1.340 * (S - 35)
32  + 1.630e-2 * D
33  + 1.675e-7 * D*D
34  - 1.025e-2 * T * (S - 35)
35  - 7.139e-13 * T*D*D*D);
36  }
37 
38 
39 
40  /**
41  * Get sound velocity according UNESCO equation.
42  * A.B. Coppens, Simple equations for the speed of sound in Neptunian waters (1981)\n
43  * J. Acoust. Soc. Am. 69(3), pp 862-863
44  *
45  * \param D Depth [m]
46  * \param S Salinity [ppk]
47  * \param T Temperature [C]
48  * \return sound velocity [m/s]
49  */
50  inline double getVelocityCoppens(const double D, const double S, const double T)
51  {
52  const double t = T * 0.1;
53  const double d = D * 1.0e-3;
54  const double c = 1449.05 + 45.7 * t - 5.21 * t*t + 0.23 * t*t*t + (1.333 - 0.126*t + 0.009 * t*t)*(S - 35);
55 
56  return (c +
57  (16.23 + 0.253*t) * d +
58  (0.213 - 0.1*t) * d*d +
59  (0.016 + 0.0002*(S-35))*(S - 35)*t*d);
60  }
61 
62 
63  /**
64  * Get sound velocity according UNESCO equation ().
65  *
66  * \param D Depth [m]
67  * \param S Salinity [ppk]
68  * \param T Temperature [C]
69  * \return sound velocity [m/s]
70  */
71  inline double getVelocity(const double D, const double S, const double T)
72  {
73  return getVelocityMackenzie(D, S, T);
74  }
75 }
76 
77 #endif
double getVelocityCoppens(const double D, const double S, const double T)
Get sound velocity according UNESCO equation.
Definition: JUNESCO.hh:50
double getVelocityMackenzie(const double D, const double S, const double T)
Get sound velocity according UNESCO equation.
Definition: JUNESCO.hh:25
do set_variable OUTPUT_DIRECTORY $WORKDIR T
$WORKDIR ev_configure_dqsimulator txt echo process $DQ_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DQ_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonStart.sh:47
double getVelocity(const double D, const double S, const double T)
Get sound velocity according UNESCO equation ().
Definition: JUNESCO.hh:71
do echo Generating $dir eval D
Definition: JDrawLED.sh:53