Beruflich Dokumente
Kultur Dokumente
FRIDMAN MAHAJAN
FOR THE Students and Engineers
THERMAL SCIENCE AND ENERGY
ENGINEERING Theory and Guide for Setting Up ENGINEERING COLLECTION
LIBRARY Ella Fridman Harshad S. Mahajan Derek Dunn-Rankin, Editor
Create your own Laboratory experiments are a vital part of engineering education,
Customized Content which historically were considered impractical for distance learning.
Bundlethe more This book presents a guide for the practical employment of a heat
Heat Transfer
books you buy, transfer virtual lab for students and engineers.
the greater your Inside, the authors have detailed this virtual lab which is designed
and can implement a real-time, robust, and scalable software sys-
Students and
Fridman and Mahajan combined Internet capabilities with tra-
& Chemical
ditional laboratory exercises to create an efficient environment to
Engineering
carry out interactive, online lab experiments. Thus, the virtual lab
Materials Science
can be used from a remote location as a part of a distance learning
& Engineering
Engineers
strategy. With this book, youll be capable of executing VIs (Virtual
Civil &
Instruments) specifically developed for the experiment in question,
Environmental
providing you with great ability to control the remote instrument
Engineering
and to receive and present the desired experimental data.
Advanced Energy
Technologies Ella Fridman, PhD, was assistant professor and graduate program
director at University of Toledo until 2008 when she died in a car
Theory and Guide for
THE TERMS
Perpetual access for
accident. She started as junior scientist at the Institute of Thermo-
physics of the Ukrainian Academy of Science. In 1989 Ella Fridman Setting Up
a one time fee became a PhD in Mechanical Engineering and continued to work
No subscriptions or in the same Institute as senior scientists until 1990 when she immi-
access fees grated to the United States.
Unlimited Harshad Mahajan, MS, graduated from University of Toledo. He
concurrent usage worked as a software development specialist at Dox Systems LLC
Downloadable PDFs
Free MARC records
for three years before moving back to India. In India, he did free-
lancing and online tutoring. He has also worked with esteemed Ella Fridman
organizations like J.P. Morgan Chase and L&T Infotech. He pres-
For further information,
a free trial, or to order,
ently works as a Java application developer in Mumbai.
Harshad S. Mahajan
contact:
sales@momentumpress.net
ISBN:
ISBN: 978-1-60650-548-9
978-1-60650-574-8
www.momentumpress.net
HEAT TRANSFER
VIRTUAL LAB FOR
STUDENTS AND
ENGINEERS
HEAT TRANSFER
VIRTUAL LAB FOR
STUDENTS AND
ENGINEERS
Theory and Guide for
Setting Up
DOI: 10.5643/9781606505496
10 9 8 7 6 5 4 3 2 1
KEY WORDS
v
Contents
List of Figures ix
Acknowledgments xi
1Introduction 1
1.1 History of Distance Learning and Concept of Virtual Lab 1
1.2 What Is Virtual Lab? 2
1.3 Analysis of the Project Requirements 4
1.4 Learning Theory and Its Influence on Role Design 6
1.5 System Architecture 7
1.6 Model Hierarchy 9
1.7 Web User Interface 9
1.8 Questions 11
2 LabVIEW Basics 15
2.1 LabVIEW Introduction 15
2.2 G-Language 16
2.3 Front Panel 17
2.4 Block Diagram 19
2.5 LabVIEW Palettes 20
2.6 Programming with LabVIEW 21
2.7 Programming Structures 27
2.8 Data Acquisition with LabVIEW 32
2.9 Questions 37
3Hardware: Armfield Heat Exchanger and
HT30XC Service Unit 39
3.1 Operating HT30XC Using Customer-Generated Software 39
3.2 USB Interface Driver Function Calls 42
3.3 Labview Data Logger 44
vii
viii Contents
Bibliography 105
Index 107
List of Figures
ix
x List of Figures
xi
CHAPTER 1
Introduction
1. Graphical programming
2. Simplicity in design
3. Acquire and save the measurements and readings for further analy-
sis in various file formats including xls, csv, txt, and so forth
4. Stand-alone instrument control through vendor-specific or generic
plugins
5. Automated tests and validation system
can be downloaded and installed for free. In both cases, the client will be
capable of executing virtual instruments (VIs) specifically developed for
the experiment in question, providing the client with great ability to con-
trol the remote instrument and to receive and present the desired experi-
mental data. The other solution seeks to exploit the additional functionally
of the recent browsers, enabling the server system to respond in many
different formats, such as JavaScript, HTML, or eXtensible Markup Lan-
guage (XML), which gives the client great flexibility in storing, process-
ing, and presenting the data received. This is achieved by creating web
solutions based on either the information server application information
interface (ISAPI) server extensions, or on a component object model with
extensions (COM+) solution at the lab side.
The project intends to increase its student base through online education
aimed at fulfilling the needs of remote students. Remote students need
time flexibility, instant guidance, and feedback. This project intends to
design a system around virtual labs to achieve exactly that in a perfect
pedagogical approach. The project places great emphasis on laborato-
ries that account for approximately 40 percent of program content. The
distance-learning program must continue to offer the same quality of
interaction with the faculty and the laboratory that it now offers its onsite
students. Remote laboratories have been successfully used in electrical
engineering education to interact with spectroscopy, measurements, and
control systems laboratories. The same is to be achieved for mechanical
engineering students.
This book describes the pilot version of a remote interactive lab-
oratory that is used for thermodynamics laboratories by students from
remote sites. In a remote delivery scenario, it is important that the deliv-
ery mechanism, laboratory course content, and instructional design be
tailored to
Case studies, projects and group work correlate with the three well-
known pedagogical approaches, namely, objectivist, constructivist, and
group interaction, respectively. The objectivist approach emphasizes that
students learn by explicitly being informed or taught by subject experts.
The constructivist approach is based on learners learning by performing
authentic activities and constructing knowledge in authentic learning
environments.
The group interaction approach is based on groups of learners engag-
ing in collaborative problem solving that increases student engagement
with the subject matter resulting in better learning. The hands-on labo-
ratories build practical internetworking abilities and skills in students
and correspond to a constructive, collaborative, situated, learner-centric
environment. Situated learning has been used in technology-based courses
to present academic knowledge in a practical context to teach students
problem-solving skills and is employed in the Virtual Lab to transform
novice students into experts in the context of the industry in which they
will ultimately work.
In the labs, the students gain a broad range of hands-on experience
and knowledge to understand the practical conditions under which to
apply specific internetworking principles, theories, and techniques. The
laboratory employs state-of-the-art networking equipment, simulators,
and other hardware in a learner-centric environment that engages students
in collaborative activities. Students learn to apply theoretical knowledge
to practical networking issues, hands-on configuration of equipment, and
strategies and techniques for troubleshooting networks. Most engineering
activities in a modern enterprise are conducted in a collaborative setting
with a lot of interaction among team members. This makes it impera-
tive that the project models and implements a collaborative environment
onsite to facilitate the acquisition of problem solving, reasoning, and man-
agement skills required by the companies today. Student interaction is
encouraged by suitably designing laboratory activities such that students
carry them out in groups of two to three.
6 HEAT TRANSFER VIRTUAL LAB
1. Expert curriculum
2. Ease of use
INTRODUCTION 7
Most courses require the students to interact with the devices in the labora-
tory. For this purpose, onsite students access and configure the devices in
the laboratory using a command line interface or a graphical user interface
(GUI). A key issue with the remote delivery of the Virtual Lab content is
to convert the onsite student interaction with the devices in the laboratory
into online real-time interaction with the devices.
Roles layer
Physical layer
Instrumentation Interface
Application
Storage server Network
The other approach is a more flexible one, that is, the intention is
not to create as similar conditions as possible, but to make some kind of
adapted remote laboratory system that will provide the functionality based
on the logical interconnection with theoretical material, serving as support
for easier understanding and also for the introduction and illustration of
basic notions characteristic for measurements. The presentation and user
interface are accommodated to different conditions imposed by remote
access. Only the most important controls, measured values, and results are
shown, and the user interface can be quite different comparing to labora-
tory instruments, but logically quite functional and sufficient for complete
understanding. In this book, the first approach is used, as it is primarily for
the illustration of main characteristics, functionality, and capabilities of
implemented prototype of remote laboratory system.
In Figure 10.1 Roles Layer can be further divided into 3 tiers. Tier 1 consists
of Faculty and Administration (including the director), Tier 2 consists of
teaching/lab assistants, and Tier 3 consists of students. Tier 1 administra-
tion handles finances, enrollment, registration, and other functions associ-
ated with disseminating program information (students get automatically
enrolled for the lab class when they register for the course associated with
it). The faculty is the sole course content provider in charge of designing
an expert curriculum. It also administers tests, examines and assesses stu-
dents, and provides feedback on student competencies, thus meeting the
e-learning resource metrics of expert curriculum. It is also the responsi-
bility of Tier 1 personnel to maintain the integrity of the educational pro-
cess. The teaching/lab assistants (Tier 2) maintain and update lab notes for
each course. In addition, they test and configure the devices in the Inter-
net-working laboratory for proper use and create and maintain user account
information based on information from the administration. In general, the
teaching/lab assistants, guided by the faculty, maintain a dynamic, engag-
ing mechanical laboratory that is easy to use and meet e-learning resource
metrics. The Tier 2 support maintains and upgrades network services on
servers and workstations at the remote site.
Web user interface is on the highest level and serves for communication
with remote usersstudents. Web interface for Virtual Lab consists of
10 HEAT TRANSFER VIRTUAL LAB
two parts. The first part is the theoretical introduction and explanation for
the experiment that will be performed. It also includes precise instruc-
tions on how to perform the experiment, the meaning of all values that
should be entered or selected, and values that are obtained as a result of
the experiment. Besides textual information about the experiment, it sup-
ports a graphical presentation of measured data in the experiment, which
is important for the full understanding of the performed experiment. With
graphical presentation, it is very easy to see that presented data are from
the real world, obtained on real equipment with all the influences that
cannot be avoided in real experiment. Together with the basic shapes of
obtained lines that characterize the observed dependencies, the unavoid-
able noise is also present. A web interface should also contain means for
control of user access to the system.
1.7.1EXPERIMENT
Collecting the user input data from the corresponding web page
Checking the data consistency
Preparing and sending data to programmable devices for equip-
ment management
Full control and management of the experiment process using the
programmable devices
Accepting the data measured in experiment from programmable
devices
Data processing and calculation of indirectly measured quantities
Preparing and sending data to a web server
1.8 QUESTIONS
Developer uses Javac (java compiler) to convert .java to .class files. .class
files are java bytecode files.
Java Test.class
bytecode
OS SUPPORT
LabVIEW Basics
1. Block Diagram
2. Front Panel
3. G-Language
4. LabVIEW Palettes
5. Hands on LabVIEW for designing simple calculator
2.2G-LANGUAGE
Blue Integer
Orange Float
Purple Char
Green Bool
2.3FRONT PANEL
The Front Panel is the user interface of the VI. Figure 2.2 shows a simple
Front Panel of a calculator. We will design the same in Section 2.6.1.
The Front Panel is a kind of front desk of the company. It can be
designed by bringing together various input and output controls from the
palettes. The input controls include text boxes, numeric incrementers,
toggle buttons, sliders, and so forth. The output controls can be graphs,
LEDs, labels, and so forth. Other controls include labels, images, borders,
and so forth. For every control, we pull onto the Front Panel; we get its
background counterpart in the Block Diagram window. A Front Panel can
be made as sophisticated as the user wants, depending upon the appli-
cation. LabVIEW provides a plethora of controls, such as various types
of buttons, LED indicators, dials, waveform plotters, and so forth. The
Front Panel shown in the image is of a simple calculator application. It
shows two numerical inputs and four numerical outputs. Each of these six
controls has its counterpart in the Block Diagram window shown in the
following section.
Table 2.2. Comparison of java code with LabVIEW G-language
Java G-language
Summation.java Summation.vi
package com.momentumpress.labview.ch7;
publicclass Summation {
publicstaticvoid main(String[] args){
int N = 5;
int sum = 0;
//For loop java syntax
for(int i=1; i<=N; i++){
sum = sum + i;
18 HEAT TRANSFER VIRTUAL LAB
}
System.out.println(Summation of + N + = +sum);
}
}
Output: Output:
Summation of 5 = 15
LabVIEW BASICS 19
Depending upon the application, Front Panels can quickly get pretty
sophisticated. The Front Panel of the virtual lab experiment of Chapter 4
is a good example of a sophisticated Front Panel. It makes use of many
controls, indicators, charts, and programming structures. It can be seen in
Figure 4.5.
A Block Diagram is the back office where all the processing really hap-
pens. This is where all the components, controls, and functions are wired
together. The Figure 2.3 shows the Block Diagram of the Front Panel of
a calculator, shown in the Figure 2.2. Num1 and Num2 are the numerical
inputs, whereas the rest of the four controls are numerical outputs. The
orange wires and controls represent their data type as integer. The triangles
represent the numerical operations; we perform on the numerical inputs. It
is fairly simple to comprehend, mainly due to its graphical nature.
20 HEAT TRANSFER VIRTUAL LAB
Figure 2.4 shows the Tools Palette. Select the menu option View > Tools
Palette to see the Tools Palette. Hover the cursor on the small icons to see
the name of each tool. In the palette, there are the following: Operating
tool, Positioning tool, Labeling tool, Wiring tool, Edit Text tool, Scroll
Window tool, Breakpoint tool, Probe tool, and Operate Value tool. When a
tool icon is clicked, the cursor takes the shape of the icon when it is on the
Front Panel or the Block Diagram, thus giving visual guidance of the tool
to the user. Alternatively, if the Automatic Tool Selection is on, the mouse
pointer automatically turns itself into the appropriate tool when brought
closer to the relevant objects. For instance, the mouse pointer turns into
a Connect Wire tool when brought closer to the terminals on the
Block Diagram window, or it turns into Operate Value tool when
brought closer to a button on the Front Panel window.
LabVIEW BASICS 21
Select the menu option View > Controls Palette or right-click the Front
Panel to see the Controls Palette (Figure 2.5). This palette has subpalettes
as shown in Table 2.3 (as of LabVIEW 2013).
Notice that this palette is highlighted and operational when the Front
Panel is active. Hover the cursor on the icons to see the pop-up names.
Expand the subpalettes to see the available controls and indicators under
that category. Show/Hide Subpalettes allows the user to pick and choose
the visible subpalettes.
Select the menu View > Functions Palette or right-click the Block
Diagram workspace to display the Functions palette (Figure 2.6). If you
right-click the Block Diagram window, the Function palette appears in
temporary mode, in other words, it disappears immediately when the
Block Diagram loses focus. To make the Functions palette stay on, click
the thumbtack in the upper left corner of the palette to pin the palette so it
is no longer temporary.
Subpalettes in the Functions palette are described briefly in Table 2.4.
Subpalettes Description
Subpalettes Description
1. Start LabVIEW.
2. Create project and save it as Calculator.vi.
3. Go to Block Diagram window. Right click on the workspace to
open the Controls palette.
4. Under Modern > Numeric subpalette, find Numeric Control and
Numeric Indicator. Drag two instances of Numeric Controls and
four instances of Numeric Indicators. Arrange all the controls as
shown in Figure 2.7.
5. Double click on the labels to edit the name of the control. Name one
of the Numeric Indicators Num1 and the other Num2. Name the
Numeric Indicators as Num1 + Num2,Num1 Num2,Num1
* Num2, and Num1 / Num2, as shown in Figure 2.7.
26 HEAT TRANSFER VIRTUAL LAB
0 0 NaN 0
1 0 Inf 0
1 0 -Inf -0
11. Once all the connections are in place, all you need to do is click on
the Run Continuously button. You can now play around
by inputting the values in the Numeric Controls. Please note that
LabVIEW is smart enough to recognize the Divide By Zero case
as shown in Table 2.5.
The time delay of 1 s allows the user to see the Numeric Indicator
named Sum (Calculated by For Loop) and update the sum on every
iteration. It helps the user appreciate the fact that the sum is calculated by
going over the Add operation N number of times.
Shift Register is a new control in this VI. It is used for passing the
values between iterations of the loop. We pass the sum calculated in the
current iteration to the next iteration through the Shift Register. The Shift
Register can be introduced to a loop structure by right-clicking the left or
right border of a loop and selecting the Add Shift Register from the short-
cut menu. We need to initialize the shift registers otherwise; it uses the old
value from the last run as its default value. In our case, we initialized the
shift register to zero by wiring a constant 0 to the input terminal of the shift
register .
2.7.2SEQUENCE
2.7.3CASE
Case structure executes only one case out of the available cases based on
the selector value arrived at the selector terminal. The VI of the V-Lab
experiment makes use of the case structure to choose the subdiagram
based on the mode of operation, namely, co-current or concurrent.
LabVIEW BASICS 31
As can be seen, the toggle button on the Front Panel in Figure 2.14
is wired to the selector input terminal of the case structure in Figure 2.15.
In our example the selector value is of type Boolean. Similarly we can tie
String, Integer, enumerated type, and error cluster to the Selector terminal.
The Selector Label shows the subdiagram for that particular case selector
value.
32 HEAT TRANSFER VIRTUAL LAB
Transduce
Hardware or
Signal
device under
conditioning
observation
Computer
Driver software
Application software (Figure 2.18)
Sample and
Sensor Quantizer Encoder
Hold circuit
Type A
7.3 mm 8.5 mm
Type B
3.0 mm 6.8 mm
Mini-A
3.0 mm 6.8 mm
Mini-B
come with USB power chargers. Also, the instrumentation world banks
upon this cheaper and faster interface standard. USB defines four types of
ports as shown in Figure 2.20.
The Armfields heat exchanger equipment is fitted with USB interface
with Type-B port. A USB cable with Type-A and Type-B port is also pro-
vided with the setup. Hence, it is very easy to connect the device to any
general purpose computer that has a USB port.
2.9 QUESTIONS
Hardware:
Armfield Heat Exchanger
and HT30XC Service Unit
This chapter describes the hardware we used for the Heat Exchanger
Virtual Laboratory. The hardware used was from the Armfield company.
We will discuss the details of how to interface a computer with this hard-
ware. Following details are provided in this chapter:
The interface between the Armfield heat exchanger bench and the com-
puter is a universal serial bus (USB) interface, meeting the standard
Microsoft protocols. Armfield is registered with Microsoft as an autho-
rized supplier of USB interfacing equipment.
The interface is capable of passing data on 26 channels, as described
in the following text:
The channel allocations for the HT30XC are tabulated in the following
text.
0 Not used
1 Not used
2 Low Monitors the water level 0 = Low Level; 1 = OK
level in the hot water vessel
3 Not used
4 Ther- Monitors the output of 0 = Over Temp; 1 = OK
mostat/ the over-temperature
level thermostat AND the
monitor water level in the hot
water vessel
5 Not used
6 Not used
7 Not used
42 HEAT TRANSFER VIRTUAL LAB
This function takes the channel number as its argument and returns the
current value of physical quantity at that channel.
function Read Analog (var channel: integer; var value: integer); stdcall;
HARDWARE 43
Channels Description
07 Differential channels
015 Single-ended channels
1631 Multiplexed channels
2047 5V
9999 Error
The std call directive indicates that the call is handled in a way that is
recognizable by most programming languages, including LabVIEW.
Table 04 shows how the channel number should be selected:
Table 3.2 shows the meaning of the values returned.
There are only two analog channels as explained in Table 0.2. This call
sends values to both the analog output channels. The values sent should be
between 2047 corresponding to 5V.
This call returns the values from one of the eight digital channels mentioned
in Table 0.3. The meaning of the returned values is described in Table 3.3.
0 Channel is off
1 Channel is on
1 Error
0 8 differential channels
1 16 open-ended channels
This call writes values from the eight digital output channels. Please note
that all the arguments to this call have to be either 0 or 1.
1. Go to the Block Diagram window and right click to open the Func-
tions palette.
2. From the functions palette, pick Call Library Function and place
it on the block diagram. Search for Call Library Function or directly
find it under Connectivity > Libraries & Executables subpalette as
shown in the Figure 3.2.
3. Double click the Call Library Function icon to open the
settings UI.
HARDWARE 45
Figure 3.3. Function tab setup of ReadAnalog function via Call Library
Function VI
Figure 3.4. Parameters tab setup of ReadAnalog function via Call Library
Function VI.
HARDWARE 47
Figure 3.5. Function tab setup of WriteAnalog function via Call Library
Function VI
Follow the same steps as explained in Section 3.1.3.1 except that the func-
tion name to be specified is ReadDigital.
Figure 3.5 shows Call Library Function setup for writing to analog chan-
nels. Please make sure that the controls tied to the two input terminals are
clamped at -2047 and +2047. This can be done through the Data Entry tab
of the Properties window for the Numeric Control. Set Response to value
outside limit to Coerce.
Also, set the data representation to Word (I16) as shown in Figure 3.6
and Figure 3.7.
Follow the same steps as explained in Section 3.1.3.1 except that the func-
tion name to be specified is WriteDigital and add eight parameters, named
DO1 to DO8 to this function.
48 HEAT TRANSFER VIRTUAL LAB
Design of LabVIEW
VI Program
This chapter details all the aspects of the LabVIEW VI program, used
for the Heat Exchanger experiment. Every control used and its purpose
in the virtual instrument (VI) is explained. It gives a fair idea about how
the VI was built. Hence, it gives the reader enough material to start
building one of his or her own for future work.
Once the knowledge of how to use the LabVIEW controls and indi-
cators is obtained, as mentioned earlier, LabVIEW programming is as
easy as dragging and dropping the required controls and indicators
very much similar to putting together puzzle pieces! One gets to experi-
ence real rapid prototype development in the world of instrumentation,
by virtue of LabVIEW. The ability of rapid prototyping in turn helps the
designer incrementally better the design.
Let us begin with the algorithm of the VI.
50 HEAT TRANSFER VIRTUAL LAB
Start
C
Initialize the VI
Set Readings Counter to 0
Set default operation modes, colors of graphs, values in the
controls, set power switch off.
N
Power Switch On?
PID
Calculate the PID output in % for temperature control. Convert
it into the number corresponding to the temperature value to
be inputted to the equipment.
N
B Start Readings?
A
DESIGN OF LABVIEW VI PROGRAM 51
B
A
N
Clear Table?
Initialize the readings counter & clear the table for fresh set.
N
Stop Recording?
N
Write Readings
to file?
Save the readings in an xls file on the LabVIEW server & FTP
the file to the web server.
y
Continue? C
Stop
There are three execution controls that were used extensively in the proj-
ect, namely:
1. While loop
2. Case structure
3. The stacked sequence structure
4.2.1.1While Loop
4.2.1.2Case Structure
The front panel makes the web interface that the students use to perform
the experiment online. The front panel consists of three tabs, namely, Pre-
lab Instructions, Controls, and Readings. We will discuss each tabs design
in detail in the following sections.
Figure 4.1 shows the Pre-lab instructions. The same pre-lab instructions
are shared as a part of experiment material. However, putting it up on the
experiment UI, is a convenience for the student.
4.3.1.1Architecture
This tab contains all the instructions that an experimenter is expected to read
and understand. They will facilitate the experimenter to use the interface.
54 HEAT TRANSFER VIRTUAL LAB
The Controls Tab is the heart of this VI. All the controls and indicators
are on this tab. The user/student uses this tab to perform the experiment.
This tab can be vertically divided into two halves. The left half contains
the controls whereas the right half consists of indicators and graphs. In the
left half the relevant controls are separated into five logical groups. The
right half contains the three graph plotters for hot water flow, cold water
flow, and temperatures. Each of these graphs and the controlgroups are
explained in brief in Table 4.1.
4.3.2.1Architecture
This is the main tab, which is used for performing the experiment. It con-
tains all the controls and indicators needed. It can be used to input various
parameters and observe the real time graphs of hot flow rate (L/min), cold
flow rate (L/min), and temperature (C).
Co-current Mode: Hot and cold water flow in the same direction through the shell
and tube heat exchanger.
Countercurrent Mode: Hot water flows in the opposite direction of cold water
through the shell and tube heat exchanger.
This is a power switch, when turned on, an LED glows on the equipment that
brings the equipment to life.
Using these controls the flow rates and temperature can be set.
Hot water flow rate range: 0 to 5 L/min
Cold water flow rate range: 0 to 5 L/min
DESIGN OF LABVIEW VI PROGRAM 55
This cluster of text control is used to set the P, I, and D parameter values.
This is an indicator that shows the current time period selected for the pulse width
modulation (PWM).
This is a simple picture control that is used to describe the schematic of the shell
and heat exchanger. It also shows the thermostat locations with four dynamically
56 HEAT TRANSFER VIRTUAL LAB
selectable colors.
This is a graph control that plots the four temperature graphs. Each graph bears the
corresponding color. The graph color can be changed dynamically. Since there
are four graphs displayed at a time, this dynamic color selection feature comes
handy in correlating each graph to its thermostat location on schematic and the
digital reading beside.
DESIGN OF LABVIEW VI PROGRAM 57
4.3.3.1Architecture
This tab contains three push buttons and a table (Table 4.2).
This tab is where the experimenter can record the readings while the VI
is running. The readings can be written or exported to an excel file. If
needed, the table can be cleared to start a fresh set of readings.
58 HEAT TRANSFER VIRTUAL LAB
The Block Diagram contains the entire LabVIEW program. Figure 4.4
shows an analogy, where the Block Diagram is the back office operation
center or a factory and the Front Panel is the Front Desk. The way the
Front Desk staff liaises between customers and the Back Office, Lab-
VIEW Front Panel accepts the inputs from the user and communicates
the outputs to the user in a presentable manner, while the actual processing
of the inputs is taken care of by the Block Diagram.
Figure 4.5 shows the block diagram used by us to implement the vir-
tual Heat Exchanger lab. The figure at the first glance appears to be very
complex. However, LabVIEWs strengths abstracted the complexity away
from the prototyping process and it appeared to be easier while designing
this complex looking VI.
Explaining every control on the VI is out of scope. Instead, it is
better that the VI be downloaded from the publishers website and
self-studied.
DESIGN OF LABVIEW VI PROGRAM 59
This section only explains about P control for the tank heater. The rest of
the parameters derivation can be done on similar lines.
(Reference: Stephanopoulos, G. 1984. An Introduction to Theory and
Practice. New York, NY: Prentice Hall.)
Fi, Ti
F, T
Steam
control
Steam out
valve
Steam in
Ti,s
t=0 Time
Answer:-
In steady state (i.e. T=Ts, V=v) where T is temperature and V is vol-
ume of the water in the tank.
The energy balance around the tank yields.
where
x = Heat coefficient
Cp = Specific heat of water
Now,
Suppose Ti increases suddenly as shown in Figure 4.7.
If nothing is done on Q, the temperature T will start rising with time.
And, h T changes with time will be given by the transient energy
balance around the tank.
That is,
dT
V x Cp = F x Cp(Ti T) + Q(4.2)
dt
where,
V = volume of the water in the tank.
(4.2) (4.1) gives
d (T Ts )
V x Cp = F x Cp[(Ti Ti, s) (T Ts)] + [Q Qs]
dt
{
{
{
DESIGN OF LABVIEW VI PROGRAM 63
Accumulation MV
= TTs = Error or deviation of liquids temp T from desired value Ts.
We want to drive to zero by manipulating appropriately the value
of heat i/p Q.
To do this, there are various control laws. We are only interested in
PID laws, namely, P, PI, and PID.
For P control:
Q = a(T Ts)
=a
Put this in Equation 4.2,
d
V x Cp = F x Cp[(Ti Ti,s) x] + [a x Qs]
dt
= F x Cp[x ] + [a x Qs] (x is constant)
d 1 1
= F x Cp x F x Cp
dt V x Cp V x Cp
1 1
+ [a Qs ]
V x Cp V x Cp
1
assume a =y
V x Cp
1
Qs =z
V x Cp
y, z are constants.
d
= ( F x) ( F ) + (y z)
dt V V
d
= ( F x z) ( F +y)
dt V V
a b
{
{
0 t
d
dt = 0 dt
1
ln(a + eb )0e = t
b
a
In( ) = bt
a + b
1
= e-bt
b
1+ ( )
a
= (a/b)(ebt 1)
64 HEAT TRANSFER VIRTUAL LAB
Q = a + dt + Qs.
0
As we wanted to use PID control, we get the PID values from the formulae
as follows:
P = 169.8
I = 1.5
D = 0.166
These values gave me the initial PID values to start the tuning with.
2. Now after putting these values and observing the system response
for approximately 5 min, we observed that the amplitude of the
oscillations was reduced but the system was moving toward insta-
bility (so-called unbounded output).
That means, the integral component was more. We have to
reduce I by 50%.
Now I = 0.75
P = 169.8
D = 0.166
3. This brought the system back to stability. However, there was a
steady state error of almost 1 degree. The parameter that contributes
to SS error is P. That means P has to be reduced. Hence P was
reduced by 50%.
Now P = 85
I = 0.75
D = 0.166
4. There still remained an SS error of 0.5 degree. Hence we reduced
P by 50 % again.
Now P = 40 (Instead of 42), I = 0.75, D = 0.166
Also we thought of making it faster. Hence, we doubled the D value
to 0.322 and then to 0.4.
4.6 QUESTIONS
Experiments
This chapter shows the four experiments that can be performed using the
Virtual Lab setup.
Experiment 1 Shell and tube heat exchanger
Experiment 2 Energy balance across a shell and tube heat
exchanger
Experiment 3 Temperature efficiencies and temperature pro-
files of counter-current and co-current mode of
operation
Experiment 4 PID control of the heater
The LabVIEW interface is developed such that the user can easily control
all the process parameters from a single screen. A separate screen has been
developed to take the readings conveniently. There are two experiments
that are designed to be performed with Armfields Heat Exchanger equip-
ment using the LabVIEW interface so far.
5.2.1WEBSITE
1. Home
2. Equipment
3. Instructions
4. Perform experiment
5. Assignments
Home: This section currently has a snapshot of the actual equipment used
for the experiment. However, this section gives introductory information
about the website.
Equipment: This section gives information about hardware peripherals.
It mentions various details about HT30XC Service Unit and HT33 Shell
and Tube Heat Exchanger. It also shows schematic as well as pictures of
the real equipment.
Instructions: This section has all the instructions required for a user to
get his/her computer up for accessing the experiment online. Also, the
general instructions required for running the LabVIEW VI are included
in this section.
Perform experiment: This section has the actual LabVIEW interface
for the experiment. In order to view this interface, one needs to follow
the instructions in the instructions section to install all the prerequisite
software.
Assignments: This section has experiment-specific assignment files. One
can easily download these MSWord files and use them to perform the
experiment along with the general instructions provided in the Instruc-
tions section.
You may find both these software on the Internet. Or to install the
above-mentioned software, please follow the instructions step by step:
1. Either use your own computer or use those machines that will let
you install the above-mentioned software. (Note: To install these
software, you need to login with Admin rights.)
2. Go to the following link: http://<your_hostname>/Instructions.html
3. Under the heading Computer Requirements, you will see links to
download the above-mentioned software.
4. Download and install both software on your machine.
5. Restart the computer.
When the prerequisite software are installed, you will need to follow the
instructions given in the following text before you can actually start with
the experiment:
5.3EXPERIMENT RESULTS
Calculations:
Average values of the quantities:
Result:
This experiment demonstrates that using a simple heat exchanger, a stream
of cold fluid can be heated by indirect contact with another fluid stream
at a higher temperature (the fluid streams being separated by a wall that
conducts heat). This transfer of heat results in a cooling of the hot fluid.
5.3.2.1Objective
To perform an energy balance across a shell and tube heat exchanger and
to calculate the overall efficiency at different fluid flow rates.
5.3.2.2Method
5.3.2.4Procedure
5.3.2.4.1Operational Procedures
1. Enter the temperature controller screen and set the set point to 60C
and mode to automatic.
2. Adjust the cold water flow control (not the pressure regulator) to
give 1 L/min and the hot water flow control to give 3 L/min.
3. Allow the heat exchanger to stabilize (use the IFD Channel History
screen to monitor the temperatures).
4. When the temperatures are stable, take a sample
5. Adjust the cold water flow control to give 2 L/min. Allow the heat
exchanger to stabilize then take another sample.
Qa = qmcold Cpcold(T4-T3)
qmcold = 0.050
Cpcold = 4.182
DTcold = 3.68
Qa = 0.050 4.182 3.68 = 0.769488
Heat power lost (or gained):
Qf = Qe - Qa (W)
Qf = 0.05235864
Overall efficiency:
h = (Qa/Qe)100
= 93.63
5.3.2.6Conclusions
5.3.3.1Objective
5.3.3.2Method
By measuring the temperatures of the two fluid streams and using the tem-
perature changes and differences to calculate the heat energy transferred
and the temperature efficiencies.
5.3.3.4Theory/Background
Figure 5.1 shows the concurrent operation flow directions of hot and cold
water. When the heat exchanger is connected for countercurrent operation,
the hot and cold fluid streams flow in opposite directions across the heat
transfer surface (the two fluid streams enter the heat exchanger at opposite
ends). The hot fluid passes through the seven tubes in parallel, the cold fluid
passes across the tubes three times, directed by the baffles inside the shell.
When the heat exchanger is connected for co-current operation, the hot
and cold fluid streams flow in the same direction across the heat transfer
surface (the two fluid streams enter the heat exchanger at the same end).
5.3.3.5Procedure
1. Enter the temperature controller screen and set the set point to 60C
and mode to automatic.
2. Adjust the cold water flow control (not the pressure regulator) to
give 1 L/min and the hot water flow control to give 2 L/min.
3. Allow the heat exchanger to stabilize (use the IFD Channel History
screen to monitor the temperatures).
4. When the temperatures are stable, take a sample.
5. Repeat the experiment using co-current flow.
5.3.3.7 Conclusions
From the mean temperature efficiencies calculated in both cases, it looks like
the co-current mode was better than the countercurrent mode of o peration in
78 HEAT TRANSFER VIRTUAL LAB
this particular case. However, the selection of the best arrangement for a par-
ticular application depends on many parameters such as overall heat transfer
coefficient, logarithmic mean temperature difference, fluid flow rate, and so
forth. These will be explained and investigated in later exercises.
DThot DTcold
As can be seen from the preceding table, DThot in the case of the counter-
current mode of operation is more than that of the co-current mode. How-
ever, the DTcold value is less in case of the countercurrent as compared to
its value in case of the co-current mode.
As can be seen from the preceding calculations, in the case of counter-
current mode of operation, hot fluid temperature efficiency is better than
that of cold fluid temperature efficiency. But in the case of the co-current
mode, both are almost equal.
P 0.5 Gu
PI 0.45 Gu 1.2/Pu
PID 0.6 Gu 2/Pu Pu/8
EXPERIMENTS 79
Graphs:
Figure 5.3 provides a graph of the controlled temperature variable (T1).
Result:
T1..
39
37
Temperature (Degree Celcius)
35
33
31
29
27
25
0 500 1000 1500 2000 2500 3000
Time (Seconds)
P
700
600
500
Parameter P
400 P
300
200
100
0
0 500 1000 1500 2000 2500 3000 3500
Time (Seconds)
Note: It is not feasible to include all the 2932 readings in the report. Hence, we have included only that part of the readings where
the system achieved stability and relatively better response (i.e., response with least average error). However you can see all the data
points on the graphs.
EXPERIMENTS 81
82 HEAT TRANSFER VIRTUAL LAB
I
2
1.5
I
Parameter I
0.5
0
0 500 1000 1500 2000 2500 3000 3500
0.5
Time (Seconds)
D
0.5
0.4
0.3 D
Parameter D
0.2
0.1
0
0 500 1000 1500 2000 2500 3000 3500
0.1
Time (Seconds)
From the preceding table, it can be seen that the system response was
better due to PID control, as compared to the response of the system with
simple comparator control.
This section includes a report submitted by the lab assistant on his own
observation of students during the experiment. In the following report I
refers to the lab assistant.
EXPERIMENTS 83
1. Richard Faber
2. Craig
3. Jason
4. Maggie
1. Setting the hot water flow rate can be made easier. I have to think
about it.
2. Reduce the three digits of accuracy to two digits.
3. Craig faced trouble setting the inputs due to the i/p o/p difference
error. The solution can be reduced from three decimal digits of
accuracy to one digit.
84 HEAT TRANSFER VIRTUAL LAB
Jason
1. He faced trouble accessing the VI because by the time he took over,
the wireless Internet signal was too low to access any web page.
Hence he used wired Internet to access the lab.
2. During his turn, I noted that nobody had bothered to wait until the
temperature reached 60C before they could start recording the
readings.
3. So I had Richard and Jason repeat the experiment and take the read-
ings at temperature T1 = 60C.
Overall conclusion drawn from a chat with Richard, Craig, and
Jasonafter the session
1. Richard seemed happy with the so-called toy.
2. Craig said, It was not a bad experience though. I perceive his
statement as It was OK.
3. Jason faced lot of troubles while doing the experiment. He said that
he was not that computer savvy. But I think when he repeated the
experiment; he was pretty good with it.
4. I do not know about Maggie. She finished the experiment in a jiffy
and left before I could see her perform the experiment.
5. I have to improve the control accuracy for the hot and cold flow
rates. Also a control over temperature needs to be improved.
5.3.4.2 A
reas of Improvement Identified From the Students
Feedback
1. The first two problems were cured by introducing the PID control
technique. The initial P, I, and D parameter values were found using
the ultimate cycle method. Then the parameters were tuned to
give least possible error. The method is explained in the How did I
arrive at the PID parameters values? section of the report.
EXPERIMENTS 85
2. In the case of a second problem, I talked with every batch about the
instruction sheet. I refined the instructions iteratively after every
session of the PID lab depending on the students feedback.
3. I also added a visual aid feature in the LabVIEW interface. This fea-
ture lets the student select the color for temperature nodes (T1, T2,
T3, T4) on the schematic dynamically during the experiment. The
selected color automatically gets applied to the respective graphs
of the temperature nodes. This change in the graphs color makes
it easier for the student to identify which graph in the temperature
chart corresponds to which temperature node.
This experiment was developed after the suggestions of the students from
the first experiment was implemented. This resulted in a better feedback
from the students for this experiment.
Feedback from lab assistant: The lab assistant noted that approach b
is better than approach a used for this experiment. Since in approach
a, the automated VI takes care of all the inputs automatically, the stu-
dent simply sits back and observes the response of the system as the input
parameters are changed automatically. This approach rids the student of all
the other activities like calculation of P, I, D parameters, thus letting him/
her fully concentrate on observing how the system behaves for different P,
I, D values. But it was found that students preferred active involvement in
the experiment rather than just sitting and watching the system response.
CHAPTER 6
Factors Influencing
the Virtual Lab
Software drivers for programmable devices are at the lowest level of the
Virtual Lab system. Depending on the type of programmable devices, they
directly access the hardware or use the manufacturers software librar-
ies for accessing hardware. They are designed for efficiency and reuse,
as every experiment must use one or more programmable devices. Every
programmable device is represented by one class or hierarchy of classes.
The structure of the device determines the corresponding structure of
classes that represent the programming model for each type of program-
mable device. The top class represents common features of the instrument,
while the descendent classes that inherit the top class correspond to logical
or physical parts of the device. Setting the devices and functional proper-
ties of devices are modeled as class methods, which are accessed by call-
ing corresponding methods of instantiated classes. Programmable devices
that are used in the prototype system consist of a data acquisition system
(DAS). It has four standard sections:
6.3USER AUTHENTICATION
Currently the experiment does not need any login. We do not see any need
of the authentication process presently because there are only a handful
of students who are accessing the experiment that too only during their
lab session, when the lab assistant is available in the lab. In short, there
is nothing much on the site other than the LabVIEW VI that is vulnera-
ble to attacks. Here we are assuming that no hacker would like to prove
himself by hacking an academic site, which has absolutely no material of
general interest, but the heat exchanger experiment specific information.
However, in the future, if need arise, the user authentication protocol can
easily be incorporated.
Besides the general methods and tools for delivering training discussed
already, it is important to consider when live training can address the chal-
lenges of delivering complex content, and when live training falls short.
Dedicated classes, consisting of hands-on instruction taught in phys-
ical classrooms, are effective but not scalable to reach a large number
of learners. They also are extremely expensive, particularly when limited
resources (equipment and instructors) must be sent into the field. Dedi-
cated classes may require any or all of the following:
6.4.3COURSEWARE
After considering the tools and methodologies and the business issues
surrounding technical training, the final item to consider is the learner
himself. Consider the typical cell phone user. He may or may not read the
manual(s) that come with the new model cell phone. But he will acknowl-
edge that without actually beginning to use the cell phone, he would never
claim to be proficient. One must place calls to learn to use a new phone.
And the same applies to virtually any technology in modern life, from
microwaves to VCRs. We learn by doing. And nothing is more critical
than in the area of technical training, which carries with it so many depen-
dencies and complexities. In many respects the near hands-on aspect of
simulations comes closest to providing the immersion necessary to learn
new technologies. But simulations, while fine for some purposes, lack one
thing: a compelling and personalized experience that gets built based on
the learners state of interaction with the learning objects. A newer form
of technology, with a valuable underlying pedagogical approach to back
it up, has only recently begun to be noticed in e-Learning and training cir-
cles. It is still in its infancy but is already being used successfully by early
adopters in the field of technical training, and it is called Virtual Labs.
The Virtual Lab system can be useful and used by many categories of
users ranging from regular students at various levels of education sys-
tem, to remote users that relay especially on remote access to education
materials. Virtual Lab could be used as an addition to regular laboratory
exercises, or if significantly developed as replacement of part or all exer-
cises in particular subjects. It can also be used as part of the educational
process not just for remote access to experiments, but as a system to be
studied from various aspectsweb server programming, software exper-
iment management, management of programmable devices, network con-
nections of PCs that constitute the Virtual Lab system, and so forth. This
approach can lead to further system development by advanced students as
part of their seminal, graduate, or postgraduate activities, exams or some
other kinds of engagement. Finally, this system does not have to be used
92 HEAT TRANSFER VIRTUAL LAB
6.6FUTURE DEVELOPMENTS
Experiment Instructions
Operational Procedures
1. Enter the temperature controller screen and set the set point to 60C
and mode to automatic.
2. Adjust the cold water flow control (not the pressure regulator) to
give 1 L/min and the hot water flow control to give 3 L/min.
3. Allow the heat exchanger to stabilize (use the IFD Channel History
screen to monitor the temperatures).
96 HEAT TRANSFER VIRTUAL LAB
1. Plug the USB cable in the Armfields heat exchanger unit and turn
on the switch of the unit.
EXPERIMENT INSTRUCTIONS 97
Seq. # P I D
1 560 0 0
2 280 1.71 0.14
3 560 0 0
4 280 0 0
5 140 0 0
6 70 0 0
7 35 1.44 0
8 35 0.72 0
9 17 0.8 0.001
Temperature (degree Celcius)
61.5
61
60.5
60
59.5
Temperature (Celcius)
59
58.5
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
Time (Seconds)
94
89
84
79
74
100 HEAT TRANSFER VIRTUAL LAB
Temperature (Celcius)
69
64
59
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Time (Seconds)
You are assigned a task of finding out the PID parameters for the newly
brought heat exchanger system in the lab. You decide to use the ultimate
cycle method. Let us say for the initial PID values of P = 50, I = 0, D = 0,
the heat exchanger is behaving as shown in Figure 7.1. The temperature
setpoint is 60C. What will you change and by how much as the first step
toward the tuning of PID parameters?
After you made the change in the PID parameters, you got the follow-
ing response (Figure 7.2). Is the system stable? Why? Which parameters
would you change and by how much such that the system regains its sta-
bility? Give reasons for your decision.
CHAPTER 8
Related Work
There are a small number of past and ongoing activities to create and
establish online lab facilities. This book presents a new model for inter-
active virtual laboratory experiments based on LabVIEW. Based on this
model, we designed a generic software framework for laboratory instruc-
tion over the Internet. We implemented and deployed this framework
for a thermodynamics lab. Our results show that this framework can
enable more students to be exposed to a comprehensive laboratory expe-
rience and increases the involvement of the teaching staff in laboratory
instruction.
Dr. Clark K. Colton, a professor from the department of Chemical
Engineering, Massachusetts Institute of Technology, coined the term
iLabs, referring to their interdepartmental online lab collaborations using
VPN. Another prominent example is EGEE, providing a grid infrastruc-
ture to distribute and process the vast amount of data resulting from
experiments in the large hadron collider at CERN. The U.K. e-Science
Program features a working group (Instruments on the Grid) address-
ing, for example, the integration of X-ray crystallography or sensors for
urban pollution into the grid. During iGrid 2005, the transparent operation
of a biology experiment on a test-bed of globally distributed visualiza-
tion, storage, computational, and network resources was demonstrated.
The environment was based on the distributed virtual computer. How-
ever, these approaches have a number of different drawbacks: They tend
to be either too focused with respect to the targeted instruments, or do
not address interactive steering of instruments, or are part of a dedicated
demo environment where the environment set-up making the laboratory
equipment available is mostly performed manually by the participating
researchers. A more generic approach, driven by an initiative supported
by the U.S. National Science Foundation, led to the definition of the Com-
mon Instrument Middleware Architecture (CIMA). CIMA is targeting
104 HEAT TRANSFER VIRTUAL LAB
BOOKS:
Travis, J., and J. Kring. LabVIEW For Everyone. Stephanopoulos, G. 1984. Chem-
ical Process Control: An Introduction to Theory and Practice. New York, NY:
Prentice Hall.
WEBSITES:
Ella Fridman, PhD was assistant professor and graduate program director
at University of Toledo until 2008 when she died in a car accident. She
started as junior scientist at the Institute of Thermophysics of the Ukrainian
Academy of Science. In 1989 Ella Fridman became a PhD in Mechanical
Engineering and continued to work in the same Institute as senior scien-
tists up to 1990 when she immigrated to the United States.
B E
Block Diagram, 1920, 5860 Experiments
instructions, 95101
C Internet, 6769
Call Library Function VI, 45, LabVIEW interface, 67
46, 47 results, 6985
CIMA. See Common Instrument
Middleware Architecture F
Co-current flow, 7478 Factors influencing, Virtual Lab
Common Instrument Middleware chatserver, 92
Architecture (CIMA), concurrent requirements, 8889
103104 courseware, 9091
Controls sub-palettes, 22 dedicated classes, 89
experiment management
D system, 92
DAQ systems. See Data learning gap, 91
acquisition (DAQ) systems network of virtual labs, 9293
D/A section. See Digital analog programmable devices, 8788
section simulation, 93
110 Index
FRIDMAN MAHAJAN
FOR THE Students and Engineers
THERMAL SCIENCE AND ENERGY
ENGINEERING Theory and Guide for Setting Up ENGINEERING COLLECTION
LIBRARY Ella Fridman Harshad S. Mahajan Derek Dunn-Rankin, Editor
Create your own Laboratory experiments are a vital part of engineering education,
Customized Content which historically were considered impractical for distance learning.
Bundlethe more This book presents a guide for the practical employment of a heat
Heat Transfer
books you buy, transfer virtual lab for students and engineers.
the greater your Inside, the authors have detailed this virtual lab which is designed
and can implement a real-time, robust, and scalable software sys-
Students and
Fridman and Mahajan combined Internet capabilities with tra-
& Chemical
ditional laboratory exercises to create an efficient environment to
Engineering
carry out interactive, online lab experiments. Thus, the virtual lab
Materials Science
can be used from a remote location as a part of a distance learning
& Engineering
Engineers
strategy. With this book, youll be capable of executing VIs (Virtual
Civil &
Instruments) specifically developed for the experiment in question,
Environmental
providing you with great ability to control the remote instrument
Engineering
and to receive and present the desired experimental data.
Advanced Energy
Technologies Ella Fridman, PhD, was assistant professor and graduate program
director at University of Toledo until 2008 when she died in a car
Theory and Guide for
THE TERMS
Perpetual access for
accident. She started as junior scientist at the Institute of Thermo-
physics of the Ukrainian Academy of Science. In 1989 Ella Fridman Setting Up
a one time fee became a PhD in Mechanical Engineering and continued to work
No subscriptions or in the same Institute as senior scientists until 1990 when she immi-
access fees grated to the United States.
Unlimited Harshad Mahajan, MS, graduated from University of Toledo. He
concurrent usage worked as a software development specialist at Dox Systems LLC
Downloadable PDFs
Free MARC records
for three years before moving back to India. In India, he did free-
lancing and online tutoring. He has also worked with esteemed Ella Fridman
organizations like J.P. Morgan Chase and L&T Infotech. He pres-
For further information,
a free trial, or to order,
ently works as a Java application developer in Mumbai.
Harshad S. Mahajan
contact:
sales@momentumpress.net
ISBN:
ISBN: 978-1-60650-548-9
978-1-60650-574-8
www.momentumpress.net