MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / waveSuperposition

Class waveSuperposition

src/waves/waveSuperposition/waveSuperposition.H:50–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48\*---------------------------------------------------------------------------*/
49
50class waveSuperposition
51{
52 // Private data
53
54 //- Reference to the database
55 const objectRegistry& db_;
56
57 //- The origin of the wave coordinate system
58 const vector origin_;
59
60 //- The mean flow direction
61 const vector direction_;
62
63 //- The mean flow speed
64 const scalar speed_;
65
66 //- Wave models to superimpose
67 PtrList<waveModel> waveModels_;
68
69 //- The angle relative to the mean velocity at which the waves propagate
70 scalarList waveAngles_;
71
72 //- Scaling in the flow direction
73 const autoPtr<Function1<scalar>> scale_;
74
75 //- Scaling perpendicular to the flow direction
76 const autoPtr<Function1<scalar>> crossScale_;
77
78
79 // Private Member Functions
80
81 //- Get the transformation to actual coordinates
82 void transformation
83 (
84 const vectorField& p,
85 tensor& axes,
86 scalar& u,
87 vectorField& xyz
88 ) const;
89
90 //- Get the wave elevation relative to the mean at a given time, mean
91 // velocity and local coordinates. Local x is aligned with the mean
92 // velocity, and y is perpendicular to both x and gravity.
93 tmp<scalarField> elevation
94 (
95 const scalar t,
96 const vector2DField& xy
97 ) const;
98
99 //- Get the wave velocity at a given time, mean velocity and local
100 // coordinates. Local x is aligned with the mean velocity, z with
101 // negative gravity, and y is perpendicular to both.
102 tmp<vectorField> velocity
103 (
104 const scalar t,
105 const vectorField& xyz
106 ) const;
107

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected