FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
NetFlowInteraction.h
1#pragma once
2
20#include "NetWakeCaster.h"
21
22#include <fhsim/ISimObjectLogger.h>
23#include <fhsim_environment/BodyWake.h>
24#include <fhsim_environment/EnvironmentProvider.h>
25#include <memory>
26#include <string>
27#include <vector>
28
29class ISimObjectCreator;
30
32{
33public:
39 explicit NetFlowInteraction(ISimObjectCreator* creator);
41
51 void FinalSetup(const std::string& objectName, double rho, environment::EnvironmentProvider* environment, std::unique_ptr<const net_wake::WakePanelSource> structure,
52 ISimObjectLogger& logger);
53
60 void PreOdeFcn(double T, const double* X);
61
72 void FlowAt(double T, int point, const double pos[3], const double* nodeWaveVelocity, double vel[3]) const;
73
75 const environment::wake::WakeCaster* WakeCaster() const { return m_wake ? m_wake->Caster() : nullptr; }
76
77private:
79 struct SamplePointNodes
80 {
81 int nodes[3] = {0, 0, 0};
82 int count = 0;
83 };
84
85 environment::wake::BodyWakeSettings m_settings;
86 environment::EnvironmentProvider* m_environment = nullptr;
87 std::unique_ptr<const net_wake::WakePanelSource> m_structure;
88 std::unique_ptr<const net_wake::PanelSourceSet> m_panels;
89 std::unique_ptr<environment::wake::BodyWake> m_wake;
90 std::vector<SamplePointNodes> m_pointNodes;
91};
Definition NetFlowInteraction.h:32
void FinalSetup(const std::string &objectName, double rho, environment::EnvironmentProvider *environment, std::unique_ptr< const net_wake::WakePanelSource > structure, ISimObjectLogger &logger)
NetFlowInteraction(ISimObjectCreator *creator)
void PreOdeFcn(double T, const double *X)
const environment::wake::WakeCaster * WakeCaster() const
The wake caster; null without CastWake or an environment, or before FinalSetup.
Definition NetFlowInteraction.h:75
void FlowAt(double T, int point, const double pos[3], const double *nodeWaveVelocity, double vel[3]) const