Skip to content

Commit

Permalink
aero: checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
philiplinden committed Nov 17, 2024
1 parent a17b046 commit fb5c6e7
Show file tree
Hide file tree
Showing 7 changed files with 292 additions and 159 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ iyes_perf_ui = { version = "0.3.0" }
bevy_common_assets = { version = "0.11.0", features = ["ron"], optional = true }
ron = { version = "0.8.1", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
parry3d = { version = "0.17.2", features = ["parallel"] }

[[bin]]
name = "yahs"
Expand Down
Binary file not shown.
46 changes: 35 additions & 11 deletions docs/drag.md → docs/intro_to_drag.md
Original file line number Diff line number Diff line change
@@ -1,97 +1,121 @@
# Aerodynamic Drag Calculations
# Introduction to Newtonian Aerodynamics

This is a summary of the paper
[Newtonian Aerodynamics for General Body Shapes](https://ntrs.nasa.gov/citations/19660012440)
and its implementation in our simulation. It is generated using ChatGPT
`o1-mini`.

## 1. Introduction to Newtonian Aerodynamics

Newtonian Aerodynamics applies Newtonian mechanics to predict aerodynamic forces
such as drag and lift on objects moving through a fluid (like air). This
approach is particularly useful for objects in supersonic or hypersonic flows.

## 2. Fundamental Concepts
### a. Drag Force (Fₓ)
Drag is the resistance force acting opposite to the direction of an object's
velocity.

### b. Lift Force (Fᵧ)
Lift is the force perpendicular to the direction of motion, often associated
with winged objects.
- *Drag Force (Fₓ)* is the resistance force acting opposite to the direction of
an object's velocity.

### c. Flow Regimes
- **Subsonic**: Flow speeds less than the speed of sound.
- **Supersonic**: Flow speeds greater than the speed of sound.
- **Hypersonic**: Flow speeds significantly higher than supersonic speeds.
- *Lift Force (Fᵧ)* is the force perpendicular to the direction of motion, often
associated with winged objects.

- *Flow Regimes*

- **Subsonic**: Flow speeds less than the speed of sound.
- **Supersonic**: Flow speeds greater than the speed of sound.
- **Hypersonic**: Flow speeds significantly higher than supersonic speeds.

## 3. Newtonian Impact Theory

The Newtonian Impact Theory estimates aerodynamic forces based on the assumption
that fluid particles impacting the body either stick or rebound elastically.

### Key Assumptions

1. The fluid is treated as a collection of particles.
2. Particles impacting the body either stick or reflect off elastically.
3. The flow is steady and uniform far from the body.
4. Viscous effects are neglected.

### Mathematical Formulation

#### a. Pressure Coefficient (Cₚ)

\[ C_p = \frac{P - P_{\infty}}{\frac{1}{2} \rho V_{\infty}^2} \] Where:

- \( P \) = Local pressure on the body.
- \( P_{\infty} \) = Free-stream pressure.
- \( \rho \) = Fluid density.
- \( V_{\infty} \) = Free-stream velocity.

#### b. Newtonian Drag Coefficient (C_d)

\[ C_d = \int \left(1 - \cos(\theta)\right) dA \] Where:

- \( \theta \) = Angle between the local surface normal and the free-stream
velocity vector.
- \( dA \) = Differential area element.

## 4. Calculating Aerodynamic Forces

### a. Drag Force (Fₓ)

\[ F_x = \frac{1}{2} \rho V_{\infty}^2 C_d A \] Where:

- \( A \) = Reference area (e.g., frontal area).

### b. Lift Force (Fᵧ)

\[ F_y = \frac{1}{2} \rho V_{\infty}^2 C_l A \] Where:

- \( C_l \) = Lift coefficient.

## 5. Application to General Body Shapes

The paper extends Newtonian Impact Theory to arbitrary body shapes by
decomposing the body's surface into differential elements, calculating local
impact angles, and integrating contributions to overall aerodynamic forces.

### a. Surface Sampling

To handle complex geometries, the body's surface is sampled at numerous points.
Each point's normal vector and its angle relative to the flow direction are
determined.

### b. Numerical Integration

Due to the complexity of analytical solutions for irregular shapes, numerical
techniques are employed to perform surface integrals for drag and lift.

## 6. Enhancements and Corrections

While Newtonian Impact Theory provides foundational estimates, the paper
discusses enhancements for improved accuracy, including:

- Correction factors based on empirical data.
- Considering how the body's orientation relative to the flow affects the
distribution of impact angles.

## 7. Practical Implementation Considerations

### a. Computational Efficiency

Sampling the surface at too many points can be computationally intensive.
Optimal sampling densities should balance accuracy and performance.

### b. Integration with Physics Engines

Aerodynamic forces must be integrated with the physics engine's update loops,
ensuring forces are applied correctly based on the body's current state and
orientation.

### c. Validation

Comparing simulation results with experimental data to validate and calibrate
the implemented models.

## 8. Summary of Mathematical Steps for Implementation

1. **Surface Sampling**: Discretize the body's surface into numerous points.
2. **Local Impact Angle Calculation**: Compute the angle between each normal
vector and the free-stream velocity vector.
Expand Down
Loading

0 comments on commit fb5c6e7

Please sign in to comment.