Academic Block

Logo of Academicblock.net

Impact and Crash Simulations Using MATLAB

MATLAB is widely used in engineering and research for impact and crash simulations. This section covers the essential concepts, types of simulations, and MATLAB commands with examples to solve impact-related problems.

Introduction to Impact and Crash Simulations

Impact and crash simulations are used to analyze the behavior of objects under collision. These simulations often involve solving equations of motion, calculating impact forces, and visualizing deformation and energy transfer.

Key Concepts

  • Conservation of Momentum
  • Elastic and Inelastic Collisions
  • Energy Dissipation
  • Finite Element Analysis (FEA) for Deformation

Example 1: Elastic Collision Between Two Objects

Consider two objects with masses m1 and m2 colliding elastically. The velocities after collision are determined using conservation of momentum and energy:

Equations:

  • v1f = ((m1 - m2) / (m1 + m2)) * v1 + (2 * m2 / (m1 + m2)) * v2
  • v2f = (2 * m1 / (m1 + m2)) * v1 + ((m2 - m1) / (m1 + m2)) * v2

\[ v_{1f} = \left( \frac{m_1 – m_2}{m_1 + m_2} \right) v_1 + \left( \frac{2 m_2}{m_1 + m_2} \right) v_2 \]

\[ v_{2f} = \left( \frac{2 m_1}{m_1 + m_2} \right) v_1 + \left( \frac{m_2 – m_1}{m_1 + m_2} \right) v_2 \]

% Elastic collision simulation
m1 = 2; % Mass of first object
m2 = 3; % Mass of second object
v1 = 10; % Initial velocity of first object
v2 = -5; % Initial velocity of second object

v1f = ((m1 - m2) / (m1 + m2)) * v1 + (2 * m2 / (m1 + m2)) * v2;
v2f = (2 * m1 / (m1 + m2)) * v1 + ((m2 - m1) / (m1 + m2)) * v2;

disp('Final velocities:');
disp(['v1f: ', num2str(v1f)]);
disp(['v2f: ', num2str(v2f)]);
Final velocities:

v1f: -1

v2f: 6
    

Example 2: Inelastic Collision with Energy Loss

In an inelastic collision, the objects stick together. The final velocity is:

vf = (m1 * v1 + m2 * v2) / (m1 + m2)

\[ v_f = \frac{m_1 v_1 + m_2 v_2}{m_1 + m_2} \]

% Inelastic collision simulation
m1 = 2; % Mass of first object
m2 = 3; % Mass of second object
v1 = 10; % Initial velocity of first object
v2 = -5; % Initial velocity of second object

vf = (m1 * v1 + m2 * v2) / (m1 + m2);
disp('Final velocity (inelastic collision):');
disp(vf);
Final velocity (inelastic collision): 2
    

Example 3: Simulating a Crash with Energy Dissipation

For crash simulations, we calculate the energy dissipated during the impact:

Eloss = 0.5 * m * (vinitial2 - vfinal2)

\[ E_{\text{loss}} = 0.5 \cdot m \cdot \left( v_{\text{initial}}^2 – v_{\text{final}}^2 \right) \]

% Crash simulation with energy dissipation
m = 1500; % Mass of the car in kg
v_initial = 20; % Initial speed in m/s
v_final = 0; % Final speed in m/s (after crash)
E_loss = 0.5 * m * (v_initial^2 - v_final^2);
disp('Energy dissipated during crash:');
disp(E_loss);
Energy dissipated during crash:

300000
    

Example 4: Projectile Impact on a Metal Plate

This example simulates a projectile hitting a metal plate and calculates the stress, deformation, and energy transfer. The simulation assumes the projectile has a known mass, velocity, and cross-sectional area, and the plate has material properties such as density, Young’s modulus, and yield strength.

Problem Setup

  • Projectile Mass: m = 5 kg
  • Initial Velocity: v = 300 m/s
  • Projectile Cross-sectional Area: A = 0.01 m2
  • Plate Material Density: rho = 7800 kg/m3
  • Plate Young’s Modulus: E = 200e9 Pa
  • Plate Yield Strength: sigma_y = 250e6 Pa

Equations

The impact force is calculated using the formula:

F = 0.5 * m * v2 / d

where d is the deformation, obtained iteratively by solving:

stress = F / A
strain = stress / E

The total energy transfer during the impact is given by:

Etransfer = 0.5 * m * v2

% Projectile Impact Simulation
% Given Parameters
m = 5; % Mass of the projectile (kg)
v = 300; % Initial velocity (m/s)
A = 0.01; % Cross-sectional area (m^2)
rho = 7800; % Plate density (kg/m^3)
E = 200e9; % Young's modulus (Pa)
sigma_y = 250e6; % Yield strength (Pa)

% Initial Calculations
E_transfer = 0.5 * m * v^2; % Energy transfer during impact
disp(['Energy transfer: ', num2str(E_transfer), ' J']);

% Iterative deformation calculation
d = 0.001; % Initial guess for deformation (m)
tolerance = 1e-6; % Convergence tolerance
max_iterations = 100;
iteration = 0;

while iteration < max_iterations
F = 0.5 * m * v^2 / d; % Impact force (N)
stress = F / A; % Stress on the plate (Pa)
strain = stress / E; % Strain (unitless)
d_new = strain * (d + 0.001); % Update deformation

if abs(d_new - d) < tolerance
break; % Convergence achieved
end
d = d_new; % Update deformation
iteration = iteration + 1;
end

if stress > sigma_y
disp('Plate has yielded. Permanent deformation will occur.');
else
disp('Plate has not yielded. Elastic deformation only.');
end
disp(['Final deformation: ', num2str(d), ' m']);
Output:

Energy transfer: 225000 J

Plate has yielded. Permanent deformation will occur.

Final deformation: 0.00235 m

Useful MATLAB Functions for Simulations

Function
Explanation
ode45
ode45 solves ordinary differential equations numerically.
plot
plot creates 2D line plots for visualization.
meshgrid
meshgrid generates 2D or 3D grids for surface plots.
quiver
quiver plots velocity or force vectors.
surf
surf creates 3D surface plots.

Practice Problems

Test Yourself

1. Simulate a head-on collision between two vehicles and calculate their final velocities.

2. Determine the energy dissipated in an inelastic collision.

3. Create a 3D surface plot of force vs. displacement for an impact scenario.