|
FhSim
3.1.0
Marine systems simulation
|
#include <WaterMapFields.h>
Inheritance diagram for environment::ShelteredWaveField:
Collaboration diagram for environment::ShelteredWaveField:Public Member Functions | |
| ShelteredWaveField (std::shared_ptr< marenv::wave::WaveField > base, std::shared_ptr< const WaterMap > map) | |
| const std::shared_ptr< marenv::wave::WaveField > & | Base () const |
| The open-sea waves. | |
| 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: still an upper bound of the sheltered elevation. | |
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. | |
Waves felt in sheltered water (Waves.ShelterMap; river and sheltered-water plan, Phase 2): a wave field whose kinematics are those of the base field times the water map's shelter s at the horizontal position.
Elevation, particle velocity and acceleration and the dynamic pressure scale with s, the surface normal's tilt with s. The total pressure is rho g z plus the scaled dynamic pressure below the sheltered surface and 0 above it (marenv's convention, owner ruling D8). The component list (GetWaveComponents, used by the drawing) is the base field's: the picture applies Visual.WaterMap itself. An approximation (a real shelter changes the spectrum, not only the amplitude), meant to stop bodies in a basin or a river from moving in open-sea waves.
| environment::ShelteredWaveField::ShelteredWaveField | ( | std::shared_ptr< marenv::wave::WaveField > | base, |
| std::shared_ptr< const WaterMap > | map | ||
| ) |
| [in] | base | The open-sea waves. |
| [in] | map | The water map with the shelter. |
|
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.