% class_demo_3A.m
% example of a tank with two inputs, flow and temperature

clc, close all, clear all

A=10; % tank area
F1=12; % amplitude of step flow in
alpha=4; % discharge flow constant
H_init=10;
T_init=70;
delta_T=50; % change in temp step flow in above T_init
step_size=0.025; % RK-4 integration step size
tfinal=500;
estop=0.01; % stop condition for |dH/dt| and |dT/dt|
sim('class_demo_3A')
t=t_H(:,1);
H=t_H(:,2);
T=t_T(:,2);
subplot(2,1,1)
plot(t,H)
ylabel('H (ft)')
title('H vs t')
subplot(2,1,2)
plot(t,T)
xlabel('t  (min)')
ylabel('T (deg F)')
title('T vs t')