FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
GriddedWake.h
1#pragma once
3
4#include <marenv/grid/UniformGrid3.h>
5#include <marenv/marenv.h>
6#include <marenv/wake/BlendedField.h>
7#include <marenv/wake/WakeBlend.h>
8#include <marenv/wake/WakeField.h>
9#include <marenv/wake/WakeTypes.h>
10
11#include <memory>
12#include <string>
13
14namespace marenv::wake
15{
24{
27 double sourceVelocity[3];
28 std::string warning;
29
37 bool Deficit(double t, const double pos[3], double& deficit) const;
38
46 bool Sample(double t, const double pos[3], WakeSample& out) const;
47
54 void ToFrame(double t, const double pos[3], double xi[3]) const;
55
57 bool Stationary() const;
58
63 bool MayReach(const WakeQueryRegion& region) const;
64
66 void Sketch(double t, FieldSketch& out) const;
67};
68
111class GriddedWake : public BlendedField<GriddedSnapshot>
112{
113public:
114 GriddedWake() = default;
115 ~GriddedWake() override = default;
116
126 void Publish(std::shared_ptr<const GriddedSnapshot> snapshot, double blendTime = 0.0);
127};
128} // namespace marenv::wake
Definition UniformGrid3.h:27
Definition BlendedField.h:104
Definition GriddedWake.h:112
void Publish(std::shared_ptr< const GriddedSnapshot > snapshot, double blendTime=0.0)
Definition FieldSketch.h:16
Definition GriddedWake.h:24
grid::UniformGrid3< double > logRatio
L = sum log(1 - d_i) at the nodes, frame coordinates.
Definition GriddedWake.h:26
void ToFrame(double t, const double pos[3], double xi[3]) const
std::string warning
Resolution warning of WakeBuilder::Finish; empty when x_start >= 1.5 cells for every source.
Definition GriddedWake.h:28
bool MayReach(const WakeQueryRegion &region) const
bool Deficit(double t, const double pos[3], double &deficit) const
bool Stationary() const
Whether the frame is at rest (velocity 0), so the snapshot does not change with t.
double sourceVelocity[3]
Source velocity u_s of the sources, m/s, NED.
Definition GriddedWake.h:27
void Sketch(double t, FieldSketch &out) const
Appends the grid's box at t (see WakeField::Sketch()).
bool Sample(double t, const double pos[3], WakeSample &out) const
WakeFrame frame
Frame of the grid; pose(t) = origin + velocity (t - t0).
Definition GriddedWake.h:25
Definition WakeTypes.h:70
Definition WakeField.h:23
Definition WakeTypes.h:21