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

Flow primitives are used to define the velocity behaviour of the fluid. More...

Inheritance diagram for AerodynamicObjects.FlowPrimitive:
AerodynamicObjects.Demos.FlowRoundAnAerofoil AerodynamicObjects.Demos.LiftingFlowAroundACylinder AerodynamicObjects.Flow.AreaSource AerodynamicObjects.Flow.DisplacementBody AerodynamicObjects.Flow.LineSource AerodynamicObjects.Flow.PointSource AerodynamicObjects.Flow.UniformFlow AerodynamicObjects.Flow.VortexFilament

Public Member Functions

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 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

Flow primitives are used to define the velocity behaviour of the fluid.

By default, flow primitives will affect the global velocity of the fluid, i.e. they will affect every IFluidInteractive object in the scene. They can be restricted to a specific domain by adding a FluidDomain component to the same object or to any parent of the Flow Primitive.

Member Function Documentation

◆ AcquireFluidVolume()

void AerodynamicObjects.FlowPrimitive.AcquireFluidVolume ( FluidVolume  fluidVolume)

◆ AddSelfToGlobalFluid()

void AerodynamicObjects.FlowPrimitive.AddSelfToGlobalFluid ( )

◆ AddSelfToScene()

void AerodynamicObjects.FlowPrimitive.AddSelfToScene ( )

◆ Awake()

virtual void AerodynamicObjects.FlowPrimitive.Awake ( )
virtual

◆ GetInteractionID()

void AerodynamicObjects.FlowPrimitive.GetInteractionID ( )

Obtains a unique interaction ID for the object.

Should be called when the object is created.

◆ IgnoreInteraction() [1/2]

void AerodynamicObjects.FlowPrimitive.IgnoreInteraction ( FlowAffected  flowAffected)

◆ IgnoreInteraction() [2/2]

void AerodynamicObjects.FlowPrimitive.IgnoreInteraction ( int  flowAffectedID)

◆ IsInteractionIgnored()

bool AerodynamicObjects.FlowPrimitive.IsInteractionIgnored ( int  flowAffectedID)

◆ OnDestroy()

virtual void AerodynamicObjects.FlowPrimitive.OnDestroy ( )
virtual

◆ OnDisable()

virtual void AerodynamicObjects.FlowPrimitive.OnDisable ( )
virtual

◆ OnEnable()

virtual void AerodynamicObjects.FlowPrimitive.OnEnable ( )
virtual

◆ RemoveFromScene()

void AerodynamicObjects.FlowPrimitive.RemoveFromScene ( )

◆ RemoveSelfFromGlobalFluid()

void AerodynamicObjects.FlowPrimitive.RemoveSelfFromGlobalFluid ( )

◆ VelocityFunction() [1/2]

virtual Vector3 AerodynamicObjects.FlowPrimitive.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 in AerodynamicObjects.Demos.FlowRoundAnAerofoil, AerodynamicObjects.Demos.LiftingFlowAroundACylinder, AerodynamicObjects.Flow.AreaSource, AerodynamicObjects.Flow.DisplacementBody, AerodynamicObjects.Flow.LineSource, AerodynamicObjects.Flow.PointSource, AerodynamicObjects.Flow.UniformFlow, and AerodynamicObjects.Flow.VortexFilament.

◆ VelocityFunction() [2/2]

Vector3 AerodynamicObjects.FlowPrimitive.VelocityFunction ( Vector3  position,
int  flowAffectedID 
)

Wrapper function which first checks if the interaction should happen.

If the interaction is ignored then returns a zero velocity vector. Otherwise, the regular VelocityFunction(position) is returned.

Parameters
positionPosition of the object in the global (earth) frame of reference.
flowAffectedIDThe interaction ID of the object which is being affected by this flow primitive
Returns
The velocity of the fluid at the given position in the global (earth) frame.

Member Data Documentation

◆ interactionID

int AerodynamicObjects.FlowPrimitive.interactionID = 0

The unique ID number for this flow primitive, used for identifying pairs of ignored interactions by the FlowInteractionManager.

◆ strengthScale

float AerodynamicObjects.FlowPrimitive.strengthScale = 1f

This value is used to scale the flow primitive behaviour.

For example, the LifeSpan class will change this value for a flow primitive to give the effect of the flow primitive decaying over time. For this value to properly work, the velocity returned by the flow primitive should be scaled by this Strength Scale value.

Overal multiplier to the strength of the effect, value of 1 by default. Useful for fading in or out the effect via code or quickly experimenting with effect strength in the inspector.


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