|
Aerodynamic Objects Core 2.0.0
|
Used to calculate the aerodynamic forces and moments acting on an object based on geometry and flow velocity. More...
Public Types | |
| enum | ReferenceAreaShape |
| Used to descripe what shape the reference area of an aerodynamic object is. More... | |
Public Member Functions | |
| override void | Awake () |
| void | OnValidate () |
| void | Initialise () |
| Adds the specified models to the object and performs any dimension-related calculations. More... | |
| void | UpdateDimensions () |
| Update the dimensions for the aero object using its transform scale and the relative dimensions. More... | |
| void | SetVelocity (Vector3 velocity) |
| Set the velocity and local velocity of the object. More... | |
| void | SetPositionAndRotation (Vector3 position, Quaternion rotation) |
| Set the position and rotation of the object's transform. More... | |
| Vector3 | GlobalNetForce () |
| The net aerodynamic force acting on this object in the global frame of reference. More... | |
| Vector3 | LocalNetForce () |
| The net aerodynamic force acting on this object in the local frame of reference. More... | |
| Vector3 | GlobalNetTorque () |
| The net aerodynamic torque acting on this object in the global frame of reference. More... | |
| Vector3 | LocalNetTorque () |
| The net aerodynamic torque acting on this object in the local frame of reference. More... | |
| Vector3 Vector3 drag | GetLocalLiftAndDrag () |
| Vector3 Vector3 drag | GetGlobalLiftAndDrag () |
| float | GetDragCoefficient () |
| If the Aero Object has a drag model, calculates and returns the pressure drag coefficient. More... | |
| float | GetDragCoefficient (float referenceArea) |
| Uses the resolved net force of the object in the wind direction and the provided reference area to determine a drag coefficient. More... | |
| float | GetLiftCoefficient () |
| If the Aero Object has a lift model, returns the lift coefficient stored in the lift model. More... | |
| float | GetLiftCoefficient (float referenceArea) |
| Uses the resolved net force of the object orthogonal to the wind direction and the provided reference area to determine a lift coefficient. More... | |
| Vector3 | GetAerodynamicCentreGlobalPosition () |
| Returns the position of the object's aerodynamic centre. More... | |
| override void | FixedUpdate () |
| void | GetDynamicPressure () |
| Calculate the dynamic pressure, based on the body relative velocity. More... | |
| void | RunAerodynamics () |
| Perform all of the necessary calculations to find the aerodynamic forces acting on the object, based on the state of the object and the surrounding fluid. More... | |
| void | AddMonoBehaviourModel< T > () |
| Adds the given aerodynamic model to the aerodynamic object. More... | |
| void | AddModel< T > () |
| Adds the given aerodynamic model to the aerodynamic object. More... | |
| void | RemoveMonoBehaviourModel< T > () |
| Looks for a monobehaviour component which implements the IAerodynamicModel interface and removes it from this object's game object. More... | |
| void | RemoveModel< T > () |
| Remove the specified aerodynamic model from this object. More... | |
| void | ClearModels () |
| Remove all aerodynamic models from this object. More... | |
| T | GetModel< T > () |
| Get the instance of the specified aerodynamic model for this object. More... | |
| int | GetModelIndex< T > () |
| Get the index of the specified aerodynamic model for this object in the aerodynamicModels array. More... | |
| void | SetFluidVelocity (Vector3 velocity) |
| Sets the velocity of the fluid around the object using a velocity in the global (earth) frame of reference. More... | |
| void | AddToFluidVelocity (Vector3 velocity) |
| Add to the velocity of the fluid around the object. More... | |
| float | GetEllipsoidSurfaceArea () |
| The approximate surface area of the ellipsoid (m^2) More... | |
| void | GetAnglesOfAttackAndSideslip () |
| Calculate the angles of attack and sideslip for the object, based on its velocity. More... | |
| float | DynamicPressure () |
Public Member Functions inherited from AerodynamicObjects.FlowSensor | |
| override void | FixedUpdate () |
| override void | Awake () |
| void | GetObjectVelocity () |
| Determine the velocity and angular velocity of the object. More... | |
Public Member Functions inherited from AerodynamicObjects.FlowAffected | |
| void | GetInteractionID () |
| Obtains a unique interaction ID for the object. More... | |
| void | IgnoreInteraction (FlowPrimitive primitive) |
| Tells the flow interaction manager that this object and the provided flow primitive should not interact. More... | |
| void | IgnoreInteraction (FluidVolume fluidVolume) |
| Tells the flow interaction manager that this object and the provided fluid volume should not interact. More... | |
| virtual void | OnDestroy () |
| virtual void | Awake () |
| virtual void | FixedUpdate () |
| void | SubscribeToFluidVolume (FluidVolume fluidVolume) |
| Add this fluid volume to the object's list of fluid volumes. More... | |
| void | UnsubscribeFromFluidVolume (FluidVolume fluidVolume) |
| Remove this fluid volume from the object's list of fluid volumes. More... | |
| void | UpdateFluidVolumes () |
| Looks at the fluid volumes which are currently affecting this object and removes any that have become null or are now ignored. More... | |
| void | RemoveNullVolumes () |
| Removes any fluid volumes which have become null from the list of interacting fluid volumes for this object. More... | |
| Vector3 | GetFluidVelocity (Vector3 position) |
| Gets the fluid velocity at the provided position and checks whether to include the global fluid velocity or not. More... | |
| Vector3 | GetFluidVelocityNoInteractionCheck (Vector3 position) |
| Gets the fluid velocity at the provided position and checks whether to include the global fluid velocity or not. More... | |
| Vector3 | GetFluidVelocityWithGlobal (Vector3 position) |
| Gets the fluid velocity at the provided position under the assumption that the object IS affected by the global fluid. More... | |
| Vector3 | GetFluidVelocityWithGlobalNoInteractionCheck (Vector3 position) |
| Vector3 | GetFluidVelocityWithoutGlobal (Vector3 position) |
Public Attributes | |
| bool | hasDrag |
| bool | hasLift |
| bool | hasRotationalDamping |
| bool | hasRotationalLift |
| bool | hasBuoyancy |
| bool | updateDimensionsInRuntime = false |
| Set to true if the dimensions of this object will change during play mode. More... | |
| ReferenceAreaShape | referenceAreaShape = ReferenceAreaShape.Ellipse |
| What shape should reference areas use. More... | |
| AeroGroup | myGroup |
| The aerodynamic group that this object belongs to. More... | |
| float | BodyCamber |
| Body camber is the camber due to the shape of the object. More... | |
| List< ControlSurface > | controlSurfaces = new List<ControlSurface>() |
| All the control surfaces affecting the aero object. More... | |
| float | ControlCamber |
| Control camber is the camber due to the deflection of the control surface attached to the (m) More... | |
| Vector3 | dimensions |
| Overall size of the object in the local frame of reference. More... | |
| Vector3 | relativeDimensions = Vector3.one |
| The dimensions of the object in the local frame of reference, relative to the scale of the object's transform. More... | |
| Vector3 | camber |
| Camber of the object along each axis in the local frame of reference. More... | |
| IAerodynamicModel[] | aerodynamicModels = new IAerodynamicModel[0] |
| The collection of aerodynamic models which will be applied to this object. More... | |
| AerodynamicLoad[] | aerodynamicLoads = new AerodynamicLoad[0] |
| The aerodynamic loads acting on the object. More... | |
| AerodynamicLoad | netAerodynamicLoad = new AerodynamicLoad() |
| The sum of all the aerodynamic loads acting on the object. More... | |
| float | dynamicPressure |
| The dynamic pressure due to motion of the object through the fluid. More... | |
| Vector3 | groupDimensions |
| Vector3 | lift |
| Resolve the net force on this aero object into lift and drag using the local relative velocity. More... | |
Public Attributes inherited from AerodynamicObjects.FlowSensor | |
| Rigidbody | rb |
| VelocitySource | velocitySource = VelocitySource.Rigidbody |
| Which component should this object use to determine its velocity. More... | |
| Vector3 | velocity = Vector3.zero |
| Velocity of the object in the global (earth) frame of reference. More... | |
| Vector3 | localVelocity = Vector3.zero |
| Velocity of the object in the object's local frame of reference. More... | |
| Vector3 | relativeVelocity = Vector3.zero |
| Velocity of the object relative to the fluid. More... | |
| Vector3 | localRelativeVelocity = Vector3.zero |
| Velocity of the object relative to the fluid. More... | |
| Vector3 | angularVelocity = Vector3.zero |
| Angular velocity of the object in the global (earth) frame of reference. More... | |
| Vector3 | localAngularVelocity = Vector3.zero |
| Angular velocity of the object in the object's local frame of reference. More... | |
Public Attributes inherited from AerodynamicObjects.FlowAffected | |
| bool | affectedByGlobalFluid = true |
| Will the global fluid velocity affect this object? More... | |
| int | interactionID = 0 |
| The unique ID number for this object, used for identifying pairs of ignored interactions by the FlowInteractionManager. More... | |
| List< FluidVolume > | localFluidVolumes = new List<FluidVolume>() |
| The local fluid volumes that are currently affecting this object. More... | |
| Fluid | fluid = new Fluid() |
| The state and properties of the fluid around the object. More... | |
Properties | |
| float | TotalCamber [get] |
| Total camber is the combination of body camber and camber due to control surface deflection. More... | |
Used to calculate the aerodynamic forces and moments acting on an object based on geometry and flow velocity.
Used to descripe what shape the reference area of an aerodynamic object is.
| void AerodynamicObjects.AeroObject.AddModel< T > | ( | ) |
Adds the given aerodynamic model to the aerodynamic object.
If the object already has a model of the same type then an additional model will NOT be added.
| T | : | IAerodynamicModel | |
| T | : | new() |
| void AerodynamicObjects.AeroObject.AddMonoBehaviourModel< T > | ( | ) |
Adds the given aerodynamic model to the aerodynamic object.
If the object already has a model of the same type then an additional model will not be added.
| T | : | MonoBehaviour | |
| T | : | IAerodynamicModel | |
| T | : | new() |
| void AerodynamicObjects.AeroObject.AddToFluidVelocity | ( | Vector3 | velocity | ) |
Add to the velocity of the fluid around the object.
Velocity is measured in the global (earth) frame of reference.
| velocity | Velocity increment for the fluid in the global (earth) frame of reference. (m/s) |
|
virtual |
Reimplemented from AerodynamicObjects.FlowAffected.
| void AerodynamicObjects.AeroObject.ClearModels | ( | ) |
Remove all aerodynamic models from this object.
| float AerodynamicObjects.AeroObject.DynamicPressure | ( | ) |
|
virtual |
Reimplemented from AerodynamicObjects.FlowAffected.
| Vector3 AerodynamicObjects.AeroObject.GetAerodynamicCentreGlobalPosition | ( | ) |
Returns the position of the object's aerodynamic centre.
If no lifting model is present, this is assumed to be the centre of the aero object
| void AerodynamicObjects.AeroObject.GetAnglesOfAttackAndSideslip | ( | ) |
Calculate the angles of attack and sideslip for the object, based on its velocity.
| float AerodynamicObjects.AeroObject.GetDragCoefficient | ( | ) |
If the Aero Object has a drag model, calculates and returns the pressure drag coefficient.
| float AerodynamicObjects.AeroObject.GetDragCoefficient | ( | float | referenceArea | ) |
Uses the resolved net force of the object in the wind direction and the provided reference area to determine a drag coefficient.
| void AerodynamicObjects.AeroObject.GetDynamicPressure | ( | ) |
Calculate the dynamic pressure, based on the body relative velocity.
| float AerodynamicObjects.AeroObject.GetEllipsoidSurfaceArea | ( | ) |
The approximate surface area of the ellipsoid (m^2)
| float AerodynamicObjects.AeroObject.GetLiftCoefficient | ( | ) |
If the Aero Object has a lift model, returns the lift coefficient stored in the lift model.
| float AerodynamicObjects.AeroObject.GetLiftCoefficient | ( | float | referenceArea | ) |
Uses the resolved net force of the object orthogonal to the wind direction and the provided reference area to determine a lift coefficient.
| T AerodynamicObjects.AeroObject.GetModel< T > | ( | ) |
Get the instance of the specified aerodynamic model for this object.
Returns default (which should be null) if the specified model type is not stored by this object.
| T | The model type to get. |
| T | : | IAerodynamicModel |
| int AerodynamicObjects.AeroObject.GetModelIndex< T > | ( | ) |
Get the index of the specified aerodynamic model for this object in the aerodynamicModels array.
Returns -1 if the specified model type is not stored by this object.
| T | The model type to get. |
| T | : | IAerodynamicModel |
| Vector3 AerodynamicObjects.AeroObject.GlobalNetForce | ( | ) |
The net aerodynamic force acting on this object in the global frame of reference.
| Vector3 AerodynamicObjects.AeroObject.GlobalNetTorque | ( | ) |
The net aerodynamic torque acting on this object in the global frame of reference.
| void AerodynamicObjects.AeroObject.Initialise | ( | ) |
Adds the specified models to the object and performs any dimension-related calculations.
Also stores the current transform position and rotation ready for use in velocity calculations which use the object's transform (used when useTransformVelocity is true).
| Vector3 AerodynamicObjects.AeroObject.LocalNetForce | ( | ) |
The net aerodynamic force acting on this object in the local frame of reference.
| Vector3 AerodynamicObjects.AeroObject.LocalNetTorque | ( | ) |
The net aerodynamic torque acting on this object in the local frame of reference.
| void AerodynamicObjects.AeroObject.OnValidate | ( | ) |
| void AerodynamicObjects.AeroObject.RemoveModel< T > | ( | ) |
Remove the specified aerodynamic model from this object.
| T | The model type to remove. |
| T | : | IAerodynamicModel | |
| T | : | new() |
| void AerodynamicObjects.AeroObject.RemoveMonoBehaviourModel< T > | ( | ) |
Looks for a monobehaviour component which implements the IAerodynamicModel interface and removes it from this object's game object.
Also cleans up the list of aerodynamic models stored by this object.
| T | The model type to remove. |
| T | : | MonoBehaviour | |
| T | : | IAerodynamicModel | |
| T | : | new() |
| void AerodynamicObjects.AeroObject.RunAerodynamics | ( | ) |
Perform all of the necessary calculations to find the aerodynamic forces acting on the object, based on the state of the object and the surrounding fluid.
| void AerodynamicObjects.AeroObject.SetFluidVelocity | ( | Vector3 | velocity | ) |
Sets the velocity of the fluid around the object using a velocity in the global (earth) frame of reference.
| velocity | Velocity of the fluid in the global (earth) frame of reference. (m/s) |
| void AerodynamicObjects.AeroObject.SetPositionAndRotation | ( | Vector3 | position, |
| Quaternion | rotation | ||
| ) |
Set the position and rotation of the object's transform.
Also stores the position and rotation in case the transform is being used to determine velocity.
| position | Position of the object in the global frame of reference. (m) |
| rotation | Quaternion rotation of the object in the global frame of reference. |
| void AerodynamicObjects.AeroObject.SetVelocity | ( | Vector3 | velocity | ) |
Set the velocity and local velocity of the object.
Assumes the angular velocity is zero and will set the values accordingly.
| velocity | The translational velocity for the object in the global frame of reference. (m/s) |
| void AerodynamicObjects.AeroObject.UpdateDimensions | ( | ) |
Update the dimensions for the aero object using its transform scale and the relative dimensions.
Then update the dimension values for any aerodynamic models associated with this aero object.
| AerodynamicLoad [] AerodynamicObjects.AeroObject.aerodynamicLoads = new AerodynamicLoad[0] |
The aerodynamic loads acting on the object.
Given by the aerodynamic models attached to the object.
In the local frame of reference.
| IAerodynamicModel [] AerodynamicObjects.AeroObject.aerodynamicModels = new IAerodynamicModel[0] |
The collection of aerodynamic models which will be applied to this object.
| float AerodynamicObjects.AeroObject.BodyCamber |
Body camber is the camber due to the shape of the object.
This does not include the camber due to control surface deflection. (m)
| Vector3 AerodynamicObjects.AeroObject.camber |
Camber of the object along each axis in the local frame of reference.
(m)
| float AerodynamicObjects.AeroObject.ControlCamber |
Control camber is the camber due to the deflection of the control surface attached to the (m)
| List<ControlSurface> AerodynamicObjects.AeroObject.controlSurfaces = new List<ControlSurface>() |
All the control surfaces affecting the aero object.
These are added automatically by including a component on the same game object as this Aero Object.
| Vector3 AerodynamicObjects.AeroObject.dimensions |
Overall size of the object in the local frame of reference.
Accounting for relative dimensions and the scale of this object's transform. (m)
| float AerodynamicObjects.AeroObject.dynamicPressure |
The dynamic pressure due to motion of the object through the fluid.
Given by 0.5 * rho * V^2 (Pa)
| Vector3 AerodynamicObjects.AeroObject.groupDimensions |
| bool AerodynamicObjects.AeroObject.hasBuoyancy |
| bool AerodynamicObjects.AeroObject.hasDrag |
| bool AerodynamicObjects.AeroObject.hasLift |
| bool AerodynamicObjects.AeroObject.hasRotationalDamping |
| bool AerodynamicObjects.AeroObject.hasRotationalLift |
| Vector3 AerodynamicObjects.AeroObject.lift |
Resolve the net force on this aero object into lift and drag using the local relative velocity.
Resolve the net force on this aero object into lift and drag using the global relative velocity.
| AeroGroup AerodynamicObjects.AeroObject.myGroup |
The aerodynamic group that this object belongs to.
Groups control the aspect ratio when aero objects are used to create a wing, ensuring that sensible values of lift are produced.
| AerodynamicLoad AerodynamicObjects.AeroObject.netAerodynamicLoad = new AerodynamicLoad() |
The sum of all the aerodynamic loads acting on the object.
Given by the aerodynamic models attached to the object.
In the local frame of reference.
| ReferenceAreaShape AerodynamicObjects.AeroObject.referenceAreaShape = ReferenceAreaShape.Ellipse |
What shape should reference areas use.
This is useful when an AO represents a lifting surface and the area should be rectangular. If we took an ellipse with major and minor axes equivalent to a rectangle's width and height, the ellipsoid's area would be 1/(4*PI) times smaller than the rectangular area.
| Vector3 AerodynamicObjects.AeroObject.relativeDimensions = Vector3.one |
The dimensions of the object in the local frame of reference, relative to the scale of the object's transform.
I.e. relative dimensions of (2,2,2) will yield an aero object twice the size of the transform object.
| bool AerodynamicObjects.AeroObject.updateDimensionsInRuntime = false |
Set to true if the dimensions of this object will change during play mode.
Having this set to false saves a fairly costly update to the frames of reference used by the aerodynamics.
|
get |
Total camber is the combination of body camber and camber due to control surface deflection.
(m) (Read Only)