# CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2012.

## Presentation on theme: "CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2012."— Presentation transcript:

CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2012

Lab 3 Overview Based on materials from Chapter 18 –Chapter 18 – Creating User Interfaces with Maple Components Use of slider, text, button and plot area components to control the AC simulation procedure

Lab 3 Overview Lab 3 outline –Part 0 – practice using Maple’s components palette to create a user interface –Part 1 – User interface for the HVAC procedure Use the final procedure developed in Lab 2 (Part 2) and develop a user interface to control the high and low AC air flow settings and to invoke the simulation –Part 2 – modify the thermostat control algorithm to allow for 3 (high, middle and low) states

Lab 3 Maple Concepts: Discussion and Demo Part 1 – Maple Procedure Header from Lab 2 –HVACSim2=proc(totaltime, dt,T0,Tea0,Vz0, lf,hf, aFunc,fFunc) totaltime = duration of time step simulation dt = size of each time step T0 = initial room (and outside wall) temperature Tea0 = temperature of cooling air Vzo = zone volume of air (always use 4000 scf) lf = low flow rate hf = high flow rate aFunc = name of acState function (acState0, acState1) fFunc = name of airFlowControl function (airFlowControl0, airFlowControl1) –HVACSim2(30, 0.01, 90, 60, 4000, 3500,6000, acState0, airFlowControl0);

Lab 3 Maple Concepts: Discussion and Demo Part 1 - Demo of Maple User Interface Components –Note – the “Draw Plot” button for Part 2 should be programmed as follows (actual parameter values are suggested here for the original, 2 state thermostat control functions): –Do( %nameofplotarea = plots[display] (HVACSim1(30, 0.01, 90, 65, 4000, %lowFlowSlider, %highFlowSlider, acState0, airFlowControl0)))

Lab 3 Maple Concepts: Discussion and Demo Part 2 – Design specs for modified thermostat control –AcState rules 3 levels high, middle and low flow rates (80, 76 and 74 degree thresh holds respectively) 3 points of action –High changes to low at 74 degrees –Low changes to middle at 76 degrees –Middle changes to high at 80 degrees –airFlowControl considerations Only lf and hf values are passed into proc Middle state flow value computed as function of lf and hf values –Hint – the computed middle state flow rate should be closer to lf than hf

Quiz Week (7) Activities Quiz 3 will be released on Friday (5/11) at 6 PM –Deadline: Thursday (5/17) at 4:30 PM –Makeup quiz – from Friday (5/18) at 9 AM through Sunday (5/20) at 11:00 PM 30% penalty Pre-lab 4 quizlet –From Thursday (5/17 – noon) through Monday (5/21 – 8 AM) Be sure to visit the CLC for quiz or general Maple assistance

Download ppt "CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2012."

Similar presentations