MoorDyn
Waves.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2022, Matt Hall
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  * 1. Redistributions of source code must retain the above copyright notice,
8  * this list of conditions and the following disclaimer.
9  *
10  * 2. Redistributions in binary form must reproduce the above copyright notice,
11  * this list of conditions and the following disclaimer in the documentation
12  * and/or other materials provided with the distribution.
13  *
14  * 3. Neither the name of the copyright holder nor the names of its
15  * contributors may be used to endorse or promote products derived from
16  * this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28  * POSSIBILITY OF SUCH DAMAGE.
29  */
30 
35 #ifndef WAVES_H
36 #define WAVES_H
37 
38 #include "MoorDynAPI.h"
39 
40 #ifdef __cplusplus
41 extern "C"
42 {
43 #endif
44 
50 typedef struct __MoorDynSeafloor* MoorDynSeafloor;
51 
53 typedef struct __MoorDynWaves* MoorDynWaves;
54 
69 int DECLDIR
71  double x,
72  double y,
73  double z,
74  double U[3],
75  double Ud[3],
76  double* zeta,
77  double* PDyn,
78  MoorDynSeafloor seafloor);
79 
87 double DECLDIR
88 WaveNumber(double Omega, double g, double h);
89 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif
#define DECLDIR
Prefix to export C functions on the compiled library.
Definition: MoorDynAPI.h:68
struct __MoorDynSeafloor * MoorDynSeafloor
A 3D Seafloor instance.
Definition: Seafloor.h:14
int DECLDIR MoorDyn_GetWavesKin(MoorDynWaves waves, double x, double y, double z, double U[3], double Ud[3], double *zeta, double *PDyn, MoorDynSeafloor seafloor)
Get the velocity, acceleration, wave height and dynamic pressure at a specific position and time.
Definition: Waves.cpp:895
struct __MoorDynWaves * MoorDynWaves
A mooring point instance.
Definition: Waves.h:53
struct __MoorDynSeafloor * MoorDynSeafloor
A seafloor descriptor.
Definition: Waves.h:50
double DECLDIR WaveNumber(double Omega, double g, double h)
Compute the wave number.
Definition: Waves.cpp:923