clear all; close all; clc;

% :::: Impact force and induced vibration ::::
% Created by:   Maarten Dekker
% Date:         2013-04-09
% Version:      #01

% Parameters
m1 = 10;   % [kg] mass of body 1
m2 = 100;  % [kg] mass of body 2; if one mass then fill in 0 (zero)
v1 = 0.1;  % [m/s] velocity of body 1
v2 = 1;    % [m/s] velocity of body 2; if one mass then fill in 0 (zero)
C  = 1e8;  % [N/m] Contactstiffness (e.g. with Hertz contact stiffness)

% Computations
m = m1 + m2;     % [kg]  Equivalent mass
v = v1 + v2;     % [m/s] Equivalent velocity
F = v*sqrt(m*C); % [N] Impact force

u = sqrt(m*v^2/C); % [m] approach of bodies
t = 2*u/v;         % [s] deceleration time
a = v/t;           % [m/s^2] deceleration
G = a/9.81;        % [-] amount of G's

f = 1/2/pi*sqrt(C/m); % [Hz]