Question: Develop a Matlab function myBCE 9 that applies the boundary conditions of provided to the dependent variable T . Do not set values for the
Develop a Matlab function myBCE that applies the boundary conditions of provided to the dependent variable T Do not set values for the global variables inside the function
Function Inputs:
t: scalar value of time t
T: column vector of temperature values Tvector at all M mesh points at time t
Function Outputs:
T: column vector of temperature Tvector at all M mesh points at time with the boundary conditions applied
Use global variable
dx: grid spacing x
Provided left and right functions:
On the left, the fluid entering the pipe has a prescribed temperature of:
Txt sin pit
On the right end of the pipe, the fluid leaving has a temperature gradient of:
dTdxxLt sin pi t
At t the temp of the fluid in the pipe is:
Txt
I only need to get the right boundary code correct. the left is solved for with:
Left boundary condition: Tx t
T sin pi t;
Current right boundary condition codes attempted:
Tend Tend dx sin pi t;
Right boundary condition x L
right sin pi t;
TM TM right dx;
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
