Docsity

Time Marching Problems - Computational Fluid Dynamics I - Assignment 6 | ENAE 684, Assignments of Aerospace Engineering

Toggle sidebar
bg1
ENAE684, Problem Set #6
Time Marching
Due Tuesday, October 21st, 2008 (50 points)
(6.1) Consider a two-parameter multi-step family of methods given by:
un+1=un!1+h
"
1# u
n+
"
0# u
n!1
[ ]
a) What is the
!
"
#
relationship?
b) What are the conditions for
!
"
1
and
!
"
0
that make it at least first-order accurate?
c) What are the conditions for
!
"
1
and
!
"
0
that make second-order accurate? What is this
second order accurate method usually called?
(6.2) Consider Bernstein’s method:
˜
u
n+1/ 2=un+1
2
h! u
n
un+1=un+h! ˜ u
n+1/ 2
Apply the representative equation to find the exact transient and particular solutions of the
process. Note: This will be an RK2 method.
(6.3) Use the boundary locus method to plot the stability boundary in the complex λh-plane for the
method of Gazdag:
(6.4) Consider the single linear homogenous ODE:
! u =i
"
u
a) Find σr and σi for a fourth order Runge-Kutta (RK4).
b) Find the amplitude at the end of a study using the RK4 method if the initial amplitude was
1.0 and we let ωh = 0.10 and require 150 time steps to complete the study. Find the phase
error, Erω in degrees, at the end of the study. (Solve this analytically, not numerically.)
c) Repeat a) and b) for third order Runge-Kutta (RK3) with ωh = 0.075 and 200 time steps.
d) Repeat a) and b) for second order Runge-Kutta (RK2) with ωh = 0.05 and 300 time steps.
(Note: for all of these you can assume the form for the
λ−σ
relationship.)
Recall Lax’s method with the point operator given as:
!
uj
n+1=uj+1
n+uj"1
n
2"a#t
#x
uj+1
n"uj"1
n
2
$
%
&
'
(
)
(6.5) Consider the linear convection problem, where a > 0, with a Dirichlet boundary condition at
x = 0 and a non-reflective boundary condition (Euler-explicit w/ 2-pt backwards) at the other
end:
!
ut+aux=0; a=1; 0 "x"
#
pf3

Partial preview of the text

Download Time Marching Problems - Computational Fluid Dynamics I - Assignment 6 | ENAE 684 and more Assignments Aerospace Engineering in PDF only on Docsity!

ENAE684, Problem Set

Time Marching

Due Tuesday , October 21st, 2008 (50 points)

(6.1) Consider a two-parameter multi-step family of methods given by:

un + 1 = un! 1 + h [ " 1 u # n + " 0 un #! 1 ]

a) What is the! " # relationship?

b) What are the conditions for

" 1 and

" 0 that make it at least first-order accurate?

c) What are the conditions for

" 1 and

" 0 that make second-order accurate? What is this

second order accurate method usually called?

(6.2) Consider Bernstein’s method: u ˜ n +1/ 2 = un +

h un!

un + 1 = un + h u ˜! n +1/ 2

Apply the representative equation to find the exact transient and particular solutions of the

process. Note: This will be an RK2 method.

(6.3) Use the boundary locus method to plot the stability boundary in the complex λh-plane for the

method of Gazdag:

u^ ˜ n + 1 = un +

h

( 3 u ˜" n #^ u ˜" n # 1 )

un + 1 = un +

h

( u ˜" n + 1 +^ u ˜" n )

(6.4) Consider the single linear homogenous ODE: u! = i " u

a) Find σr and σi for a fourth order Runge-Kutta (RK4).

b) Find the amplitude at the end of a study using the RK4 method if the initial amplitude was

1.0 and we let ωh = 0.10 and require 150 time steps to complete the study. Find the phase

error, Erω in degrees , at the end of the study. (Solve this analytically, not numerically.)

c) Repeat a) and b) for third order Runge-Kutta (RK3) with ωh = 0.075 and 200 time steps.

d) Repeat a) and b) for second order Runge-Kutta (RK2) with ωh = 0.05 and 300 time steps.

(Note: for all of these you can assume the form for the λ−σ relationship.)

Recall Lax’s method with the point operator given as:

u j

n + 1

u nj +^ 1 + u nj " 1

a # t

# x

u nj + 1 " u nj " 1

(6.5) Consider the linear convection problem, where a > 0, with a Dirichlet boundary condition at

x = 0 and a non-reflective boundary condition (Euler-explicit w/ 2-pt backwards) at the other

end:

ut + aux = 0 ; a = 1 ; 0 " x "

Discontinuous Initial Condition:

u ( x ,0) =

0.5 x <^ "^

1.5^ "^

# x # "

Continuous Dirichlet Boundary Condition:

u (0, t ) = 1 " 0.5cos[ 4 t ]

Please run the attached MATLAB code (newwave.m which calls exact.m) for Lax’s method

(meth=1) for CFL = 0.8 and 41 points (including end points). Repeat with 81 points

(including end points). Include the plots that are produced and note any observations about

the method, code and solutions.

% newwave.m % % Written by Dr. James D. Baeder for ENAE % UNIVERSITY OF MARYLAND % % Linear advection equation % u_t + au_x = 0 ;a> 0 % Dirichlet at left and no reflection at right % Numerical Method (with appropriate bc’s): % 1) Lax's Method % u_j^n+1 = u_j^n - 0.5cfl(u_j+1^n - u_j-1^n) % + 0.5(u_j+1^n - 2u_j^n + u_j-1^n) % Initial Solution: % u(t=0,x) = 1.5 ; x>pi/ % 0.5 ; x<=pi/ % Boundary Condition: % u(t,x=0) = 1 - 0.5cos(-4t) % Exact Solution: % Implemented in exact.m % Numerical Solution: % ?!?!?!?!?!?!?! % % Let's clear everything including graphics for figures 1 clear; figure(1); clf; % Let's get the input from the user!!!! imeth = input('Enter method (1): '); cfl = input('Enter cfl number: '); jmax = input('Enter # of mesh points (including end points): '); % Set some variables for now a = 1; tfinal = pi; xend = pi; % Calculate some variables dx = xend/(jmax-1); % mesh spacing in x dt = cfldx/a; % time step size dtdx = dt/dx; nsteps = round(tfinal/dt); % total number of time steps npart = round(nsteps/4); % intermediate time step % initialize mesh locations x = (0:jmax-1)dx; % store exact solution at a few times uparte=exact(x,a,dtnpart); uinite=exact(x,a,0); % initial data: u=uinite;