0% found this document useful (0 votes)
23 views1 page

CSM-521 Lab2

IITBHU, CSM Lab2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views1 page

CSM-521 Lab2

IITBHU, CSM Lab2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Indian Institute of Technology (Banaras Hindu University)

Department of Mathematical Sciences


IDD 5th Year & Ph. D.
Lab Assignment - 2

Course: CSM-521-Computational Fluid Dynamics

Last date of Submission : November 02 , 2023 MM: 05

1. Write a computer program in C/MATLAB that uses the upstream differencing and
Lax methods to approximate the solution to the initial- boundary value problem
ut  ux  0 x  0, t  0
u ( x,0)  2  x x0
u (0, t )  2  t t 0
At t = 0.5, for 0  x  1 , compare numerical result with the exact solution, u  2  x  t .

2. Write a computer program in C/MATLAB that uses the linear Lax Wendroff method to
approximate the solution to the initial- boundary value problem
ut  (u 2 / 2) x  0 x  0, t  0
u ( x,0)  x x0
u (0, t )  0 t 0
At t = 1, for 0  x  1 , compare numerical result with the exact solution, u  x / (1  t ) .

3. Write a computer program in C/MATLAB for the problem 1, using the following
schemes
(i) McCormack Method
(ii) Leap Frog Method

You might also like