Question: 1 . Modify the fCrankNicolson function and CNscript codes to accommodate a Type 3 boundary condition at x = 0 and type 2 at x
Modify the fCrankNicolson function and CNscript codes to accommodate a Type boundary condition at x and type at x L m Let the first boundary condition be characterized by BiL hLk and environment temperature Tomicron omicron deg C Pass these parameters to the new function, such as in the following function header line:
fCrankNicolsonnx dt Told, BiL, Tinf, qj qjp
Use these parameters to call your function:
L ;
nx ;
dt ;
Tinf ;
x :Lnx:L; tfinal ;
and let qt Wm constant beginning at time t s Make a plot showing Tx at different times, all on the same graph: t and s
Test the code with the script letting BiL How do you expect the solution to behave? What do you see in the results that confirms or informs your expectation?
Test the code with the script letting BiL How does this affect the solution at x Whats going on in the results at small times at x you can investigate letting dt be smaller, say dt if you wish
Test the code with a moderate value of BiL What do you see in the results? Approximately how long does it take for steady state?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
