Overview

This page contains links to the MATLAB codes, Excel spreadsheets, and LabVIEW VIs used in ME 449/549. The class material is provided as a convenience to students enrolled in the class. Anyone visiting this site is welcome to download and use these notes and lab exercises for their own education.

This material is copyright © 2001-2006 Gerald Recktenwald. All rights reserved. These notes may not be reproduced and distributed for profit using any means, or in any form without permission in writing from the author, Gerald Recktenwald.

Use of these materials in courses at other academic institutions can be arranged. Please to let me know that you are using my notes. I would like proper attribution for these materials.

Contents

Excel Spreadsheets

LabVIEW VIs

MATLAB Codes

Complete MATLAB Toolbox

You can save yourself a lot of hassle by downloading the entire toolbox as a single zip archive. In addition to avoiding the tedium of downloading each file individually, this zip archive contains to most up-to-date version of each of the programs.



LabVIEW VIs

The HP34970A.zip library is from National Instruments. It provides a collection of examples and building blocks.
The VIlib_71.zip contains examples of thermocouple temperature conversion, and plotting data from a text file
The VIlib.zip library has a larger set of VIs that are only compatible with LabVIEW 8.


Generic MATLAB Utilities

The following codes support analysis of thermal lab data, but they do not directly involve calculations for temperature, pressure or flow rate.

The loadColData function is used to read text files containing header text followed by columns of data.


Conversion of Pressure and Temperature to Flow Rate for the Flow Bench

The flowBench.xls spreadsheet performs data reduction for flow bench measurements. Input data are pressure differences and temperatures. Conversions of raw pressure transducer and thermocouple EMF are not included.



Temperature Conversion for Thermocouples and Thermocouples

The following codes are described in this PDF document.

Compute temperature of YSI 44006 thermistor given its resistance
thermistorT.m
Compute EMF given temperature
emfJtype.m for J-type thermocouples.
emfKtype.m for K-type thermocouples.
emfTtype.m for T-type thermocouples.
emfTtypes.m scalar (non vectorized) version for T-type thermocouples.
Compute Temperature given EMF
Jtemp.m for J-type thermocouples.
Ktemp.m for K-type thermocouples.
Ttemp.m for T-type thermocouples.
Ttemps.m scalar (non vectorized) version for T-type thermocouples.
Test conversion routines with round-trip calculation: EMF -> T -> EMF
testJtemp.m for J-type thermocouples.
testKtemp.m for K-type thermocouples.
testTtemp.m for T-type thermocouples.

Back to table of contents



Conversion of Output from Omega Pressure Transducers

The PX Series of differential pressure transducers have a linearized output. To a good approximation the output can be converted with the following simple relationship

        dp  - dpmin       Vout - Vmin
     ---------------  =  -------------
      dpmax - dpmin       Vmax - Vmin

where dp is the pressure sensed by the transducer, dpmin and dpmax are the minimum and maximum values of the pressure range for the transducer, Vout is the output voltage, and Vmin and Vmax are the minimum and maxium voltages corresponding to dpmin and dpmax. For the PX series, Vmin=1 V, and Vmax = 5 V.

Using the linearized output, along with Vmin=1 V, and Vmax = 5 V, the preceding equation can be rearranged as

	dp = dpmin + 0.25*(dpmax - dpmin)*(Vout - 1)

Therefore, the simple conversion relationship for a PX series transducer with the range 0 to 10 inches of water is

	dp = 2.5*(Vout - 1)

where Vout is the voltage output of the transducer and dp is the pressure in inches of water

To squeeze as much accuracy as possible out of the pressure transducer measurement, a least squares line fit was performed on the calibration data supplied with each transducer. These line fit functions are incorporated in the MATLAB codes listed below. The curve fits and the codes are described in this PDF document. Also note that the MATLAB codes take an input voltage and return the pressure in Pascals, not inches of water.

PX Series differential pressure transducers: input in Volts, output in Pascals
Omega05dp.m: 0 to 0.5 inch H20
Omega10dp.m: 0 to 10 inch H20
Omega25dp.m: +/- 2.5 inch H20
Omega30dp.m: 0 to 3 inch H20

Back to table of contents



Conversion of Pressure and Temperature to Flow Rate for the Flow Bench

The following mfiles perform data reduction on manual flow bench measurements. Use of the mfiles is documented in notes handed out in class.

airViscosity.m
expansionFactor.m
fanCurveMan2.m
fanCurveManual.m
flowBench.m
loadFlowBenchData.m
myFanCurve.m NEW. myFanCurve loads data from a single data file, performs data reduction, and plots the fan curve. Use this instead of myFanCurves when you have only one data set, or when you only want to work with one data set.
myFanCurves.m
myFanData.m
nozzleFlow.m

You can test the preceding mfiles with the following files containing data from fan curve measurements.

Panaflow20V.dat
Panaflow24V.dat

The following mfiles perform data reduction on flow bench measurements taken with the DAQ system.

fanCurveStats.m
lossCoeffStats.m

Back to table of contents



Process Data from DAQ System

The following mfiles perform basic post-processing of data collected from the BenchLink software.

NOTE: To run the flowBenchDataSelector tool you need both the mfile flowBenchDataSelector.m and the figure file flowBenchDataSelector.fig in your MATLAB path.

flowBenchDataSelector.m
flowBenchDataSelector.fig
loadAgilentData.m

You can test the flowBenchDataSelector tool on the sampleFlowBenchRaw.dat file.

Back to table of contents