Aerodynamic Objects Core 2.0.0
Loading...
Searching...
No Matches
AerodynamicObjects.Flow.PointSource Class Reference

Provides flow velocity from a point at the position of the source. More...

Inheritance diagram for AerodynamicObjects.Flow.PointSource:
AerodynamicObjects.FlowPrimitive

Public Member Functions

override void Awake ()
 
override Vector3 VelocityFunction (Vector3 position)
 Override this function to change the way the velocity of the fluid is calculated. More...
 
- Public Member Functions inherited from AerodynamicObjects.FlowPrimitive
void GetInteractionID ()
 Obtains a unique interaction ID for the object. More...
 
virtual void Awake ()
 
virtual void OnEnable ()
 
virtual void OnDestroy ()
 
virtual void OnDisable ()
 
void AddSelfToScene ()
 
void AcquireFluidVolume (FluidVolume fluidVolume)
 
void RemoveFromScene ()
 
Vector3 VelocityFunction (Vector3 position, int flowAffectedID)
 Wrapper function which first checks if the interaction should happen. More...
 
virtual Vector3 VelocityFunction (Vector3 position)
 Override this function to change the way the velocity of the fluid is calculated. More...
 
bool IsInteractionIgnored (int flowAffectedID)
 
void IgnoreInteraction (int flowAffectedID)
 
void IgnoreInteraction (FlowAffected flowAffected)
 
void AddSelfToGlobalFluid ()
 
void RemoveSelfFromGlobalFluid ()
 

Public Attributes

float sourceStrength = 1f
 The volume flow rate produced by the source in m^3/s. More...
 
float semiAngle = 180
 Controls the angular extent of the source. More...
 
float coreRadius = 0.1f
 Used to limit the maximum velocity magnitude. More...
 
Fade fade = Fade.DistanceSquared
 How the velocity fades with radius. More...
 
- Public Attributes inherited from AerodynamicObjects.FlowPrimitive
float strengthScale = 1f
 This value is used to scale the flow primitive behaviour. More...
 
int interactionID = 0
 The unique ID number for this flow primitive, used for identifying pairs of ignored interactions by the FlowInteractionManager. More...
 

Detailed Description

Provides flow velocity from a point at the position of the source.

Can be used with positive or negative strength to simulate a source or sink respectively.

Member Function Documentation

◆ Awake()

override void AerodynamicObjects.Flow.PointSource.Awake ( )
virtual

Reimplemented from AerodynamicObjects.FlowPrimitive.

◆ VelocityFunction()

override Vector3 AerodynamicObjects.Flow.PointSource.VelocityFunction ( Vector3  position)
virtual

Override this function to change the way the velocity of the fluid is calculated.

Parameters
positionPosition of the object in the global (earth) frame of reference.
Returns
The velocity of the fluid at the given position in the global (earth) frame.

Reimplemented from AerodynamicObjects.FlowPrimitive.

Member Data Documentation

◆ coreRadius

float AerodynamicObjects.Flow.PointSource.coreRadius = 0.1f

Used to limit the maximum velocity magnitude.

Defines a core region in which the velocity magnitude is a constant equal to the velocity magnitude at the core radius. Value must be greater than zero

◆ fade

Fade AerodynamicObjects.Flow.PointSource.fade = Fade.DistanceSquared

How the velocity fades with radius.

For physically conserving flow from a point source use distance squared

◆ semiAngle

float AerodynamicObjects.Flow.PointSource.semiAngle = 180

Controls the angular extent of the source.

A default value of 180 degrees creates a spherical source (flow in all directions). 90 degrees creates a hemispherical source.

◆ sourceStrength

float AerodynamicObjects.Flow.PointSource.sourceStrength = 1f

The volume flow rate produced by the source in m^3/s.

A negative value changes the source into a sink


The documentation for this class was generated from the following file: