Skip to content
Permalink
482822af46
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
26 lines (24 sloc) 563 Bytes
function [Cd_out] = sphere_drag(Re_in,spline_type)
% interpolation for drag coeff based upon Reynolds number
% output is
% Cd: drag coeff
% input is
% Re_in: Reynolds number
% and
% spline_type: 'linear', 'cubic', or 'spline'/'pchip'
%function [Cd_out]=sphere_drag(Re_in,spline_type)
data = [2 0.52
5.8 0.52
16.8 0.52
27.2 0.5
29.9 0.49
33.9 0.44
36.3 0.18
40 0.074
46 0.067
60 0.08
100 0.12
200 0.16
400 0.19];
Cd_out = interp1(data(:,1),data(:,2),Re_in,spline_type);
end