HW4 - I STANBUL TECHN ICAL UN IVERSITY FACULTY OF MECHAN...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
ISTANBUL TECHNICAL UNIVERSITY FACULTY OF MECHANICAL ENGINEERING MAK 475E Numerical Fluid Dynamics Homework #4 Can Tümer 030050282 Doç. Dr. Hasan Güne ş 08.01.2008
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
1. A wave is propagating in a closed-end tube. Compute the wave propagation up to t =0.15 sec by solving the first-order wave equation; a > 0. where a, the speed of sound, is selected to be 200 m/s. Assume that at time t = 0, a disturbance of a triangular shape has been generated as shown below. Solve the problem using Lax-Wendroff method. Three sets of step sizes are specified as follows: I) dx = 1.0, dt = 0.005 II) dx = 1.0, dt = 0.0025 III) dx = 1.0, dt = 0.00125 Print and plot the solution at intervals of 0.025 sec up to t = 0.15. Solution: The Theory; From the Taylor Expansion, we can write; ( , + )= , +∂ ∂ * +∂ * !+ u x t ∆t ux t u t ∆t 2u t2 ∆t22 O∆t3 At this point, all we have to do is the determination of the velocity derivatives by; ∂ ∂ =- *∂ ∂ u t a u x =- *∂ ∂ ∂ ∂ =- *∂ ∂ ∂ ∂ = (∂ ) 2u t2 a u t u x a u x u t a2 u2 x2
Background image of page 2
With the adaptation of these derivatives to our expansion equation; ( , + )≅ , - *∂ ∂ * + (∂ )* u x t ∆t ux t a u x ∆t a2 u2 x2 ∆t22 After obtaining this, we implement the central difference formulations; + = - * + - - * + * * * + - * + - uin 1 uin a ui 1n ui 1n2 ∆t 12 a2 ∆t2 ui 1n 2 uin ui 1n∆x2 Now, with all the nth order terms known, this FDE represents itself as an implicit solution to a time propagating problem. However we need to check if it is stable in order to commence the codification of the algorithm. = , ; = * = * , = For ∆t 0 005s C a ∆t∆x 200 0 0051 1 so the algorithm is stable since C 1 for = , . . ∆t 0 005 s and all the other step sizes are smaller The MATLAB Code; clear all clc %The velocity of the sound wave at these conditions. a=200; %The interval of displacement is defined. h=1; %The final value of displacements. xfinal=70; %The interval count of displacements. Nx=(xfinal-0)/1; %A displacement vector has been defined for plotting purposes. x=[1:Nx]; %A conversion coefficient for corresponding time intervals is defined. cc=4; %The initial time interval. dt=0.005/cc; %The final time value. tfinal=0.15; %The interval count of time. Nt=(tfinal-0)/dt;
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
%The solution matrix is determined with time as columns. T=zeros(Nx,Nt);
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 21

HW4 - I STANBUL TECHN ICAL UN IVERSITY FACULTY OF MECHAN...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online