|
FhSim
3.1.0
Marine systems simulation
|
#include <WaterMapFields.h>
Inheritance diagram for environment::TidalWaveField:
Collaboration diagram for environment::TidalWaveField:Public Member Functions | |
| TidalWaveField (std::shared_ptr< marenv::wave::WaveField > base, std::shared_ptr< const Tide > tide) | |
| const std::shared_ptr< marenv::wave::WaveField > & | Base () const |
| const std::shared_ptr< const Tide > & | GetTide () const |
| std::string | SpectrumName () const override |
| std::string | WaveTheoryName () const override |
| marenv::Status | ComputeSurfaceElevation (double time, const double pos[2], double &elevationOut) override |
| marenv::Status | ComputeDynamicPressure (double time, const double pos[3], double &pressureOut) override |
| marenv::Status | ComputeTotalPressure (double time, const double pos[3], double &pressureOut) override |
| marenv::Status | ComputeSurfaceUnitNormal (double time, const double pos[2], double unitNormalOut[3]) override |
| marenv::Status | ComputeParticleVelocity (double time, const double pos[3], double velOut[3]) override |
| marenv::Status | ComputeParticleAcceleration (double time, const double pos[3], double accOut[3]) override |
| marenv::Status | ComputePointQuery (double time, const double pos[3], double &surface_elevation, double surface_unit_normal[3], double particle_velocity[3], double particle_acceleration[3], double &pressure) override |
| InsecureDatapointers | GetWaveComponents () const override |
| marenv::wave::WaveComponentData | GetWaveComponentsCopy () const override |
| marenv::wave::WaveComponentData | GetWaveComponentsCopy (double time, size_t maxComponents=0) const override |
| double | MaxWaveElevation () const override |
| The base field's bound plus the largest tidal level. | |
Public Member Functions inherited from marenv::wave::WaveField | |
| virtual | ~WaveField ()=default |
Additional Inherited Members | |
Protected Member Functions inherited from marenv::wave::WaveField | |
| WaveField ()=default | |
| Constructor. | |
The waves on a tidal water level (Tide.*; plan doc/plans/tide-wakes-gunnerus.md, Phase T1).
The still-water surface is at z = -eta(t) (NED). Every query of the base field is made at the depth below that surface: the base field sees (x, y, z + eta). So the elevation is the base elevation plus eta, the total pressure rho g (z + eta) plus the dynamic pressure there (0 above the surface), and the normal, the particle velocity and acceleration and the dynamic pressure are the base field's at the shifted depth. The vertical velocity of the level itself (at most a few cm/min) is left out. The component list is the base field's: the drawing adds the level itself (Environment::RenderUpdate).
| environment::TidalWaveField::TidalWaveField | ( | std::shared_ptr< marenv::wave::WaveField > | base, |
| std::shared_ptr< const Tide > | tide | ||
| ) |
| [in] | base | The waves about the still-water surface (may be a ShelteredWaveField). |
| [in] | tide | The tide. |
|
overridevirtual |
Returns the dynamic pressure at a specific position.
| [in] | time | Current simulation time. |
| [in] | pos | Position (x,y,z) for which the pressure is desired. |
| [out] | pressureOut | The pressure at pos. |
Implements marenv::wave::WaveField.
|
overridevirtual |
Returns the particle acceleration at a specific position.
| [in] | time | Current simulation time. |
| [in] | pos | Position (x,y,z) for which the particle acceleration is desired. |
| [out] | accOut | The particle acceleration at pos. |
The wave particle acceleration only; a current is not included.
Implements marenv::wave::WaveField.
|
overridevirtual |
Returns the particle velocity at a specific position.
| [in] | time | Current simulation time. |
| [in] | pos | Position (x,y,z) for which the particle velocity is desired. |
| [out] | velOut | The particle velocity at pos. |
The wave particle velocity only; a current is not included (EnvironmentFacade adds it).
Implements marenv::wave::WaveField.
|
overridevirtual |
Calculates multiple properties of the environment in one call.
| [in] | time | Simulation time. |
| [in] | pos | Position. |
| [out] | surface_elevation | The surface elevation above this point. |
| [out] | surface_unit_normal | The surface unit normal above this point. |
| [out] | particle_velocity | The particle velocity in this point. |
| [out] | particle_acceleration | The particle acceleration in this point. |
| [out] | pressure | The pressure. The pressure in this point. |
Implements marenv::wave::WaveField.
|
overridevirtual |
Returns the surface elevation at a specific position.
| [in] | time | Current simulation time. |
| [in] | pos | Position (x,y) for which surface elevation is desired. |
| [out] | elevationOut | Surface elevation at pos. |
Implements marenv::wave::WaveField.
|
overridevirtual |
Returns the unit normal vector of the surface at a specific position.
| [in] | time | Current simulation time. |
| [in] | pos | Position (x,y) for which the unit normal surface vector is desired. |
| [out] | unitNormalOut | The unit normal surface vector at pos. |
Implements marenv::wave::WaveField.
|
overridevirtual |
Returns the total (gauge) pressure at a specific position.
| [in] | time | Current simulation time. |
| [in] | pos | Position (x,y,z) for which the pressure is desired. |
| [out] | pressureOut | The pressure at pos, relative to the atmosphere. |
Owner ruling D8: the total pressure is rho g z + the dynamic pressure of ComputeDynamicPressure() (z positive down), and 0 for a point above the free surface. The dynamic pressure already holds the free-surface elevation, so the elevation is not added again.
Implements marenv::wave::WaveField.
|
inlineoverridevirtual |
Getter for wave component pointers.
Their use focus on efficiency. The views live as long as the field: its component snapshot is set only in the constructor, so the pointers stay valid until the field is destroyed. Do not use them after that.
Implements marenv::wave::WaveField.
|
inlineoverridevirtual |
Getter for a copy of wave component specifications.
Implements marenv::wave::WaveField.
|
inlineoverridevirtual |
Getter for a copy of wave component specifications at a given time.
| [in] | time | Simulation time used to evaluate the interpolation factor. |
| [in] | maxComponents | Maximum number of components to return (0 = all). |
During a transition this may return the merged components from both source and destination fields with amplitudes scaled by the interpolation factor. The default implementation ignores time: it takes the components of the time-independent overload and returns them sorted by descending amplitude (a signed zetaA, with std::sort or std::partial_sort, so components of equal amplitude come in an unspecified order). When limited, the components with the largest amplitudes are kept.
Reimplemented from marenv::wave::WaveField.
|
inlineoverridevirtual |
Reimplemented from marenv::wave::WaveField.
|
inlineoverridevirtual |
Getter for the name of the wave spectrum used for the realisation of the waves.
Implements marenv::wave::WaveField.
|
inlineoverridevirtual |
Getter for the name of the wave theory used for the realisation of the waves.
Implements marenv::wave::WaveField.