MAE200B - Homework No. 1: Laura Novoa January 15, 2016
MAE200B - Homework No. 1: Laura Novoa January 15, 2016
MAE200B - Homework No. 1: Laura Novoa January 15, 2016
Laura Novoa
January 15, 2016
Problem 1
The function u(x, y) is governed by:
u
= 2xu
x
Subject to the BC: u(0, y) = si n(y). Calculate the Solution.
Solution
Assuming our "common clock" to be the new variable s, from the boundary condition:
u(0, y) = si n(y)
u(s = 0) = si n()
Thus, we know that
(
y(0) =
x(0) = 0
1
, B = 0, and F = u
2x
d x(s)
1
=A=
ds
2x(s)
2x(s)d x(s) =
>
d s x 2 = s +C 1 s = x 2
C
1
BC : x(0) = 0 C 1 = 0
d y(s)
=B =0
ds
d y = 0 y(s) = C 2 y(s) =
BC : y(0) = C 2 =
d u(s)
= F = u
ds
d u(s)
=
u(s)
Problem 2 Use the Method of characteristics to solve the following two equations for u(x, y) :
u
u
+ 2t
=1
t
x
u
u
+x
= si n(t )
t
x
u(x, 0) = f (x)
u(x, 0) = g (x)
In both cases:
(a) Use the rigorous approach to express the characteristics and the solutions in terms of an
independent variable s.
(b) Derive and plot the shapes of the characteristics.
(c) Derive the solutions u(x, t ) for arbitrary f and g .
(d) Specialize the solutions for f (x) = e x and g (x) = cos(x). Make 3D plots of the respective solutions.
Solution
(I)
u
u
+ 2t
= 1, u(x, 0) = f (x)
t
x
A = 1, B = 2t , and F = 1
x(s) x(0) =
t (s) t (0) = 0
a)
0
d t (s)
>
1
= A = 1 t (s) = s +C 1 s = t (s)
C
1
ds
BC : t (0) = 0 C 1 = 0
d x(s)
= B = 2t (s) = 2s x(s) = s 2 +C 2 x(s) = s 2 +
ds
BC : x(0) = C 2 =
d u(s)
= F = 1 u(s) = s +C 3 u(s) = s + f ()
3
ds
BC : u(0) = f () C 3 = f ()
b) Eliminating s from the first two equation gives the characteristic equation:
Substituting 1 into 2 :
x(s) = t (s)2 +
(II)
u
u
+x
= si n(t ), u(x, 0) = g (x)
t
x
A = 1, B = x, and F = si n(t )
x(s) x(0) =
t (s) t (0) = 0
a)
0
d t (s)
>
= A = 1 t (s) = s +C 1 s = t (s)
C
1
1
ds
BC : t (0) = 0 C 1 = 0
d x(s)
= B = x(s)
ds
d x(s)
=
x(s)
d s x(s) = C 2 e s x(s) = e s
BC : x(0) = C 2 =
d u(s)
= F = si n(t (s)) from 1 si n(s)
ds
d u(s) =
si n(s)
BC : u(0) = g () 1 +C 3 = g () C 3 = g () + 1
b) Eliminating s from the first two equation gives the characteristic equation:
Substituting 1 into 2 :
x(s) = e t (s)
Problem 3
The potential, incompressible solution for 2D stagnation-point flow is:
u = Ax , v = Ay
Where u and v are the horizontal and vertical velocity components, respectively, and A is a constant. At time t = 0 a blob of contaminants is introduced in this flow. The initial shape of the
blob is a circle centered at (x = 0, y = b) with radius R < b. You are asked to find the shape of the
blob at later times using the following steps.
(a) Neglecting diffusion, and assuming that the contaminant is a passive scalar, write the transport equation for the contaminant concentration C(x, y, t).
Considering steady-state flow:
C
t
= 0 we have:
0
7
C
C
C
+u
+v
=0
t
x
y
(b) and (c): Write differential evolution equations for the characteristics and the concentration
field, using as independent variable the time t measured by an observed moving with a fluid
particle.Integrate the above equations to obtain algebraic relations for the characteristics (x(t),
y(t)) and the concentration field c(t).
d x(t )
= Ax(t )
dt
d x(t )
=A
x(t )
d t x(t ) = C 1 e At
d y(s)
= Ay(t ) y(t ) = C 2 e At
dt
1 ln
x(t )
= At
C1
dC (t )
= 0 C (t ) = C 3 = constant
dt
x(t )
x(t ) 1
C1
C3
1 into 2 y(t ) = C 2 exp ln
= C 2 exp ln
= C2
y(t ) =
C1
C1
x(t )
x(t )
(e) Derive an analytic expression for the shape of the blob for t > 0. Characterize this shape,and
plot for A = 1, b = 1, R = 0.5, t = 1.
At t = 0, from the equation of the circumference with a b displacement in the y axis:
x 02 + (y 0 b)2
=R
x 2
0
y0 b
+
R
=1
y(t ) = C 2 e At
Applying initial conditions:
x(0) = x 0 C 1 = x o x(t ) = x 0 e At
y(0) = y 0 C 2 = y o y(t ) = y 0 e At
Substituting 2 and 3 into 1 will give us an analytic expression for the shape of the blob for
t > 0.
x(t )
e At R
y(t )
e At
!2
=1
x(t )
e At R
y(t ) b
Re At
=1
10
11
PDE #2
[X,T] = meshgrid(-10:.5:25);
U = -1*cos(T) + cos(X.*exp(-T));
figure
surf(X,T,U)
xlabel('x')
ylabel('t')
zlabel('u')
%Plot characteristics
C = [-10:1:10];
t = [-5:0.1:5];
figure
for i=1:length(C)
x = C(i).*exp(t);
plot(t,x)
ylim = ([0 100]);
hold on
end
xlabel('t(s)')
ylabel('x(s)')
Problem 3
clc
clear all
close all
%Plot characteristic lines
C = [-10:1:10];
x = [-5:0.1:5];
for i=1:length(C)
y = C(i)./x;
plot(x,y)
axis([ -inf inf 0 100]);
hold on
end
xlabel('x(t)')
ylabel('y(t)')
Plotting blob
%t = 0
r = 0.5; %radius
xc = 0; %0
yc = 1; % b
theta = 0 : .1 : 2*pi;
x = r * cos(theta) + xc;
y = r * sin(theta) + yc;
%figure
plot(x, y)
t = 1;
A = 1;
xt = x.*exp(A.*t);
yt = y.*exp(-1*A.*t);
hold on
plot(xt, yt)
t = 2;
A = 1;
xt = x.*exp(A.*t);
yt = y.*exp(-1*A.*t);
hold on
plot(xt, yt)
xlabel('x(t)')
ylabel('y(t)')
axis([ -5 5 0 5]);