BTW, the function as found by Blasius can be evaluated by
saving the following code as a file
zeta1p.m
:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% Blasius second function for impulsively started boundary layer flow. %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This really returns function zeta_1', which is the scaled second order % contribution to the velocity profile. Argument eta may be an array. % start of the function definition function z1p = zeta1p(eta) % constant c1=1/sqrt(pi); % store the values of the exponential ex=exp(-eta.^2); % store the values of the complementary error function erc=erfc(eta); % compute function zeta_1' according to the result of Blasius z1p=-3*c1*eta.*ex.*erc+.5*(2*eta.^2-1).*erc.^2+2/pi*ex.^2+c1*eta.*ex... +2*erc-4/(3*pi)*ex+(3+4/(3*pi))*c1*(eta.*ex-.5/c1*(2*eta.^2+1).*erc);Also,
blaseq.m
containing:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Definition of the first order system of ODE that represents the Blasius %% %%%% equation for the boundary layer along a semi-infinite flat plate. %%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Notations: % x(1) = f, x(2) = f', x(3) = f'' % The initial condition for f'' at eta = 0 should be about 0.33206. The % other two initial conditions are zero. % Return the derivatives of the x-values function xp = blaseq(eta,x) xp=[x(2); x(3); -.5*x(1)*x(3)];Then you can integrate the system using a statement like
[eta_vals, x_vals] = ode45(@blaseq, [0 10], [0; 0; tau_wall]);where
tau_wall
is x_vals
.)
x_vals
, use x_vals(:,i)
.