[go: up one dir, main page]

0% found this document useful (0 votes)
69 views2 pages

Assignment Codes

The document provides three methods (a, b, c) to solve a boundary value problem (BVP) using an implicit finite difference scheme. Method a and b are explicit, while method c uses beam warming. It also gives the initial and boundary conditions, exact solution, and asks to write MATLAB code to plot the numerical solution and derive the finite difference scheme for the 2D heat equation. The submission deadline is next Monday.

Uploaded by

hundasa chala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views2 pages

Assignment Codes

The document provides three methods (a, b, c) to solve a boundary value problem (BVP) using an implicit finite difference scheme. Method a and b are explicit, while method c uses beam warming. It also gives the initial and boundary conditions, exact solution, and asks to write MATLAB code to plot the numerical solution and derive the finite difference scheme for the 2D heat equation. The submission deadline is next Monday.

Uploaded by

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

Apply the following two methods (a), (b), (c) to solve a BVP with the given IC & BCs.

Use mesh sizes in x and t

h = k = 1/20.

 2U i  3U n i 1  2U i  U i 1 )
n n n n n
a) U (i, n  1)  U in  t[v(U i 1 U
)  c x ( i 1 ]
4x x 2

b) U (i, n  1)  n
 t[v (
U n i 1  U i  2U n i 1
n
U
)  c x ( i 1
 2U i  U i 1 )
n n n

U i
3x x 2
]

c) Beam Warming Method

3U n i  4U i 1  U n i  2  2U i 1  U i  2 )
n n n n
U
U (i, n  1)  U i  t[v ( )  cx ( i
n
]
2x 2x 2

 ( 0.5t ) 2
0.25
BCs: u (0, t )  e 0.00125 0.04t

0.0252  0.02t

 (1.5 t ) 2
0.25
u (1, t )  e 0.00125 0.04t

0.0252  0.02t

 ( x  0.5 ) 2
IC: u ( x,0)  e 0.00125

 ( x  0.5 t ) 2
0.25
Exact: u ( x, t )  e 0.00125 0.04t

0.0252  0.02t

Write mat lab code and plot solution graphs.

2) Derive FDM for 2D heat equation and write a code

Submission date- Next Monday


Now we take the value v= cx=1. This method is explicit

n U n i +1 + 2U i n 3U n i 1 U i +1n 2U i n + U i 1
n
)
A, U (i, n + 1) = U i [(
4
) 20( ]

1
U (i, n + 1) = (
4

b) U (i, n  1)  n
 t[v (
U n i 1  U i  2U n i 1
n
U
)  c x ( i 1
 2U i  U i 1 )
n n n

U i
3x x 2
]

You might also like