How do I solve this problem? (BC)

2 views (last 30 days)
Brianna Corrion
Brianna Corrion on 29 Oct 2018
Commented: Brianna Corrion on 30 Oct 2018
  • A Matlab template has been provided on D2L which provides the necessary constants to calculate the temperature at 1 second intervals for a single day, in a 200o square foot house.
  • Use the provided constants in the Matlab template to set up a for loop as outlined above which will calculate the temperature at each time step.
  • Store these values in the vector “T_in”
  • Plot time vs internal temperature
  • Calculate in seconds how long the furnace has run on this day, store this as “time_on”
T_out=15; % Outdoor temperature in F
C= 3240; % Thermal Capacity of the Home, BTU/F
R= .002415; % Thermal Resistance F per BTU/h
time=0:1:24*60*60; %A time vector, one day in seconds
T_in=zeros(1,length(time)); %Initializing an indoor temp vector
T_in(1)=70; % Setting initial temperature to 70F
K=90000; %Heat rating of the furnace in BTU/h
u=0;
time_step=1/(24*60*60); %Time steps in hours
T_H=T_in(1)+.25; % High temp theshold
T_L=T_in(1)-.25; % Low temp threshold
count=0; %Initializes a count of how many seconds the furnace is on
  2 Comments
Walter Roberson
Walter Roberson on 30 Oct 2018
What error are you encountering?
Brianna Corrion
Brianna Corrion on 30 Oct 2018
Im not sure how to set up the loop

Sign in to comment.

Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!