FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
LumpedSource.h
1#pragma once
4
5#include <marenv/wake/WakeConstants.h> // kMinRelativeFlow, kMaxThrustCoefficient
6#include <marenv/wake/WakeTypes.h>
7
8#include <vector>
9
10namespace marenv::wake
11{
16{
17 double force[3];
18 double relativeFlow[3];
19 double rho;
20 double rearCentre[3];
21 double frontalArea;
22 double meanSquareFlow = 0.0;
23 double ambientMeanSquareFlow = 0.0;
24};
25
30{
31 double relativeFlow[3];
32 double weight;
33 double ambientRelativeFlow[3] = {0.0, 0.0, 0.0};
34};
35
48void SetRelativeFlowFromSamples(const std::vector<FlowSample>& samples, LumpedSourceInput& input);
49
61
71
104
121LumpedSourceResult RelaxLumpedSource(const LumpedSourceInput& input, const LumpedSourceResult& fresh, double previousMomentum, double alpha);
122
133
140{
141 double force[3];
142 double relativeFlow[3];
143 double rho;
144 double rearCentre[3];
145 double axis[3];
146 double length;
147 double width;
148 double meanSquareFlow = 0.0;
150};
151
163
190} // namespace marenv::wake
LumpedLineSourceResult MakeLumpedLineSource(const LumpedLineSourceInput &input)
LumpedSourceResult MakeLumpedSource(const LumpedSourceInput &input)
KernelParams LumpedKernel(const KernelParams &user)
void SetRelativeFlowFromSamples(const std::vector< FlowSample > &samples, LumpedSourceInput &input)
LumpedSourceResult RelaxLumpedSource(const LumpedSourceInput &input, const LumpedSourceResult &fresh, double previousMomentum, double alpha)
double ReferenceSpeedSquared(const LumpedSourceInput &input)
Definition WakeTypes.h:33
Definition LumpedSource.h:30
double weight
Weight of the sample, such as its panel area; >= 0.
Definition LumpedSource.h:32
double relativeFlow[3]
Relative flow U_p = free stream - point velocity at the sample, m/s, NED.
Definition LumpedSource.h:31
double ambientRelativeFlow[3]
Ambient relative flow U_amb - point velocity at the sample, U_amb the current without any wake (R87),...
Definition LumpedSource.h:33
Definition WakeTypes.h:98
Definition WakeTypes.h:51
Definition LumpedSource.h:140
double width
Width of the body across the flow and across its projected axis, m.
Definition LumpedSource.h:147
double ambientMeanSquareFlow
As LumpedSourceInput::ambientMeanSquareFlow.
Definition LumpedSource.h:149
double relativeFlow[3]
Relative flow U_ref = free stream - source velocity u_s, m/s, NED.
Definition LumpedSource.h:142
double force[3]
Total hydrodynamic force F from the object's own law, no waves, N, NED.
Definition LumpedSource.h:141
double rearCentre[3]
Centre of the line at the object's rear face, m, NED.
Definition LumpedSource.h:144
double meanSquareFlow
As LumpedSourceInput::meanSquareFlow.
Definition LumpedSource.h:148
double axis[3]
Direction of the body's long axis, NED; need not be normal to U_ref, but not parallel to it.
Definition LumpedSource.h:145
double length
Length of the body along axis, m.
Definition LumpedSource.h:146
double rho
Fluid density of the object, kg/m^3.
Definition LumpedSource.h:143
Definition LumpedSource.h:156
LineSource source
The line source {rearCentre, e_U, axis, length, width, M}; value-initialised unless casts and not poi...
Definition LumpedSource.h:157
bool casts
False when the object casts no wake (|U_ref| < 1e-3 m/s, M = 0, a zero or non-finite axis,...
Definition LumpedSource.h:158
bool pointFallback
True when the body is nearly along the flow: the caller publishes point instead of source (MENV-0048)...
Definition LumpedSource.h:160
ElementarySource point
The point source of MakeLumpedSource() with the same M, flow direction and centre and the frontal are...
Definition LumpedSource.h:161
bool widened
True when the frontal area was widened to keep the momentum (the width to M / (0.96 L),...
Definition LumpedSource.h:159
Definition LumpedSource.h:16
double ambientMeanSquareFlow
Mean of |U_amb,p - u_p|^2 over the samples, U_amb the current without any wake: the ambient dynamic p...
Definition LumpedSource.h:23
double force[3]
Total hydrodynamic force F from the object's own law, no waves, N, NED.
Definition LumpedSource.h:17
double rearCentre[3]
Centre of the cross-section box at the object's rear face, m, NED.
Definition LumpedSource.h:20
double frontalArea
Frontal area A_f projected on the plane normal to U_ref, m^2.
Definition LumpedSource.h:21
double rho
Fluid density of the object, kg/m^3.
Definition LumpedSource.h:19
double relativeFlow[3]
Relative flow U_ref = free stream - source velocity u_s, m/s, NED.
Definition LumpedSource.h:18
double meanSquareFlow
Mean of |U_p|^2 over the object's sampled points, the mean dynamic pressure over 0....
Definition LumpedSource.h:22
Definition LumpedSource.h:66
bool casts
False when the object casts no wake (|U_ref| < 1e-3 m/s, M = 0, or a non-finite input or M).
Definition LumpedSource.h:68
bool widened
True when the area was widened to M / 0.96 to keep the momentum; the caller logs it.
Definition LumpedSource.h:69
ElementarySource source
The source {rearCentre, e_U, A_f, M}, solidity 0; value-initialised when casts is false.
Definition LumpedSource.h:67