Governance by those who do the work.

Sunday, December 20, 2015

Upward Natural Convection

There was a mistake in my simulation of the (insulated) back surface. It doesn't affect the measurement or simulation of the test surface. Here is a proper simulation of the plate with the rough side facing down:

The red lines are the simulations; the others are measured. The backside simulation expects more convection than was measured, resulting in the measured back face temperature being higher than its simulated temperature.

Because they are not thermally conductive over their whole surfaces, natural convection from the four vertical sides can't be modelled with established theory. My simulation models these sides as having 3.2 times the natural convection from the 52 mm × 305 mm metal surfaces not covered by insulation. The 3.2 factor was arrived at from natural convective runs on the Convection Machine.

The streamlines in Fujii and Imura[76]'s figure 14(f) show air from the edges of the plate moving toward the rising column at the plate's centre. But in the Convection Machine this air has already been heated by the rough (downward) face and four sides. Thus the convection from the (upward) back side would be reduced and its temperature higher than if the other faces were not convecting.

With the rough test surface facing downward its convection is not affected by the other faces. With the plate 5 K hotter than ambient, convection from the bottom face is about 0.6 W and about .348 W for each vertical face. Their combined 2 W dwarfs the .297 W expected through the insulation for the back face (upward). So it is not surprising that the back face convection is reduced.

If the rough test surface faces up, then its expected 20.3 W convection will experience reduction from the 1.63 W of convection from the other faces.  Unfortunately, in this case it does affect the measurements.

Friday, December 18, 2015

Scaled Colburn Analogy Asymptote

I have rewritten the Scaled Colburn Analogy Asymptote section to address the Convection Machine measurements at low Reynolds numbers:

The logarithmic scale amplifies the variances below Re=10000.  The graph below shows Nu/Pr1/3 on a linear scale where variations can be seen as comparable in magnitude to the variation between experiments where Re is larger than 10000.

 

The revised formula, which includes the Re range over which the surface should be treated as rough, is:


Saturday, December 5, 2015

A Convection Surprise

Years ago I heard advice to experimental physicists to continue refining their experiments, even after they yield a hoped-for result.

Last week I realized that if I switched the wind-tunnel fan to the lower speed setting, it might be able to run at speeds lower than 100r/min.  I tried it and it worked!  This updated plot has points at Re values less than 10000 and they show significantly less convection than expected.  As in an earlier post, there would be many possible explanations for finding too much convection, but not for finding too little.

At these low wind speeds the fan speed wanders through a +/-10% range and the convection measurements are averaged over time.  I have rewritten my program to compute the convection over smaller intervals than the whole trial and included both the whole trial and smaller runs in the graph.  My program also averages measurements through a trapezoidal window, which reduces the variation between the smaller intervals within an experimental trial.


Here is a link to a pdf of plots splitting the measurements in 2 through 8 pieces.  Each trial's dots are distributed vertically, reflecting the noisy temperature readings.

The four lowest trials cluster near the asymptote for turbulent convection from a smooth surface, even though the rough surface asymptote would convect more heat.  In the "Measured over time split into 4 intervals" chart it is seen that the plate spends most of its time over the range between the two asymptotes.


If the switching between asymptotes were correlated with fan speed variations, we would expect to see the dots for each trial on a slanted line; but they are roughly vertical.  The transition between laminar and turbulent forced convective modes remains an unsolved problem for theory.  Modelling the transition between these two turbulent forced convective modes may be as intractable.

Wednesday, November 25, 2015

Simplified Convection Model

With the asymptote established, it was time to work on the lower speeds.  My models were stubbornly predicting too much convection for 0109rpm-20151031T023629.  It turns out that the apparent deficit for rough upward natural convection was nearly equal to the apparent deficit for rough downward convection.  Thus it was likely that I was underestimating the radiative cooling and natural convection from the four sides, which act in both orientations.  Increasing the modeled side surface conductances yields values for the rough surface matching smooth natural convection within the experimental variations.

I managed to coax the wind-tunnel fan to run at 93 r/min for a data run, extending test coverage down to Re=8000.  Where my earlier plot showed points clustering around the L4-norm of the Scaled-Colburn-Analogy-Asymptotes, the new point aligns with the others along the asymptotes themselves, as predicted by my SCAA formula:

  NuSCAA = max(Nu8.9, Nu8.11, NuRS)

The small convection from 0093rpm-20151125T170700 and 0109rpm-20151031T023629 also confirm that mixed convection uses a high degree norm (the highest being the "max" function).  This essentially says that natural and forced convection do not mix; it is either one or the other.  When the Convection Machine gets fitted with a smaller fan, I will be able to test at the transition point.

Saturday, November 21, 2015

Forced Convection From a Rough Plate

In October I collected data from experiments over the full range of wind speeds possible in my wind tunnel: 0.45m/s to 4.5m/s.  More time was consumed in making a simulation which matched the dozen datasets.  In this speed range all convection is a blend of natural and forced convection.  I built the simulation to support variable L-norms for combining the natural and forced convection components.  The L-norm that allowed match to the data was L4, which was also the only working L-norm for combining the three speed ranges of forced convection.  The L4-norm looks like: (N4+F4)1/4.  The main goal was to test my correlation for forced convection from a rough plate:
This graph shows the experimental support for my "Scaled Colburn Analogy Asymptote" formula for forced convection from a rough plate.  Here is a link to a pdf of graphs comparing simulation with experiment.

The largest uncertainty in the measurements is the wind-speed (proportional to  Re), which the anemometer gives as 3% at 4m/s.  As the speed reduces, the uncertainty grows quickly.  The "fan law" says that wind-speed is proportional to fan rotation rate.  This turned out to not hold at speeds above 3m/s, which had a lesser slope than at low speeds.  At high speeds, the anemometer readings inside the wind-tunnel are erratic.  This link to the fan wind-speed curve shows the formula used in simulations versus 5 measured wind-speed data runs.


Some of my assumptions were wrong.  Natural convection from a rough surface turns out to be greater than convection from a smooth surface both upward and downward facing.  In order to obtain the matches (red versus blue, green) shown below, the downward convection is multiplied by 2.44; the upward convection by 1.56.  The rough plate surface has an area 2.44 times that of a smooth surface and 1.56 is its square-root.  There is latitude in these numbers and convection from the four sides; experiments with the rough surface covered by a sheet of aluminum would refine the model.


 The blue trace is the measured temperature from the smooth back.  The simulated red trace is a good match when the back is on top.   The poor match below when the smooth back is facing down is probably because the plate was not suspended, but sitting on small wooden blocks without much clearance.  I will perform the measurement again with more clearance in the future.


Monday, October 5, 2015

Forced Convection Success!

When I replaced the plate insulation, I covered the back surface (but not the sides) with aluminum foil.  An isothermal surface, I put a temperature sensor at the center of the back foil and added modeling for this back surface to the simulation, which is described in Measurements of Convection From a Rectangular Plate

After calibrating the fan speed in the wind-tunnel, the next task was to model the forced convective component of the heat transfer from the parts of the heated plate other than the surface under test: the back and sides.  The isothermal back can be modeled using the standard formula in series with the block of insulation.  Unlike natural convection, forced convection can be modeled for non-isothermal surfaces by integrating the local convection in the direction of the fluid flow.  There are three calculations for the four sides: the sides whose long dimensions are parallel to the flow, the side facing into the flow, and the side facing away from the flow.

For the sides parallel to the flow, the local convective surface conductance in series with the local insulation conductance is integrated in the direction of the flow.

For the side facing the flow, the fluid velocity along the long center-line line is zero, increasing to V at the long edges.  So I integrate from the center-line to the long edges.

For the side facing away from the flow, the average fluid velocity along the long center-line is also zero.  I integrate from the long edges to the center-line, but only the turbulent component (the chart below shows the difference from windward is insignificant).

ins_back    long_side   windward    leeward    total      rough
65.6mW/K + 2*77.2mW/K + 77.2mW/K + 77.2mW/K = 0.374W/K vs 0.572W/K @ 0.0m/s
73.9mW/K + 2*98.3mW/K + 0.108W/K + 0.101W/K = 0.479W/K vs 1.20W/K @ 1.0m/s
74.9mW/K + 2*0.111W/K + 0.120W/K + 0.117W/K = 0.535W/K vs 2.17W/K @ 2.0m/s
75.5mW/K + 2*0.123W/K + 0.132W/K + 0.131W/K = 0.584W/K vs 3.25W/K @ 3.0m/s
76.0mW/K + 2*0.133W/K + 0.145W/K + 0.144W/K = 0.631W/K vs 4.33W/K @ 4.0m/s
 
4 m/s simulations with the new model were predicting way too much convection when compared with measurements.  After checking all the calculations, it was clear that something basic was wrong.  The formula which the apparatus was built to test is the Scaled Colburn Analogy.  Originally (it has been updated) it was scaling only the characteristic length in the Colburn Analogy. Scaling both the characteristic length and mean-height-of-roughness yields this:


The green trace is the measured plate temperature; black is the ambient temperature; and blue is the temperature of the back foil. The thin red traces are the simulated plate and back temperatures. Because 4 m/s flow has high convective surface conductance, the back and ambient temperatures are nearly the same.  The ambient bumps occured at times when a dehumidifier in the room turned on.

To have such close match before tweaking is exciting!  A run at 3 m/s also shows excellent match:



Does the model work for natural convection?



This match was unexpected because I didn't have a natural convection model for the four sides.  But this match leads to an explanation: the air heated by the downward-facing plate rises past the four sides, so there is little temperature difference through the sides to drive additional convection.

This natural convection match is perhaps too good.  The measurements were taken in the wind tunnel whose top panel will somewhat impede the ascent of the heated air.  The missing difference could be because the simulation has the thermal radiation from the sides cooling the plate, but most of that radiation would be due to heat rising from the (bottom) test surface.

Sunday, September 6, 2015

Sandstone Formation


Roberta and I recently returned from a fantastic Grand Canyon Expeditions 8-Day Motorized Trip down the Colorado River through the Grand Canyon.  The Geology is fascinating and quite unlike the glacier-scoured granite mountains in New Hampshire with which I am familiar.


  

The "Big Dune" sand bar at mile 119 where we camped is backed by Tapeats Sandstone carved into flowing forms.


Sandstone is obviously deposited in layers.  Is this process observable at human time scales; or would one need to spend years at the bottom of a shallow sea?

The sand banks on which we camped were deposited by varying water flows in the Colorado river.  The Glen Canyon Dam having reduced the Colorado's flow and variations, in 2013 the flow was increased fourfold for 6 days in an effort to replenish the sandbanks which have been diminishing.


These photos from the USGS show the Big Dune sandbar before and after the flood.  Sand was deposited.  While walking along a small vertical face in the sand bar, I noticed horizontal striations.  So the sandbar is deposited in layers.

This photo and the detail below show the striations and their resemblance to the sandstone layers.

 

This would have merely been an amusing coincidence had not our next camp site, "OC's" at mile 137, had an even finer example of sand layering.  Not only does the sandstone face show both highly parallel layers and more fluid flows, the sand displays them as well.


 Names and mileages from:

"Belknap's Waterproof Grand Canyon River Guide"; New Edition 2014;
Buzz Belnap - Loie Belknap Evans;
Westwater Books, Evergreen Colorado US;
Library of Congress Control Number: 2006937059;
ISBN 978-0-916370-16-9;
ISBN 10:0-916370-16-X

Tuesday, August 4, 2015

Fan Calibration

Reflecting the infrared beam off of the fan blades to gauge its rotation rate was receiving spurious ticks.  I moved the photo-transistor opposite the LED so that the blades interrupt the beam, which solved the problem.


I wrote a program which logs the fan rotation rate every second while capturing the anemometer readings I type in.  Because there is delay between rotational speed changes and air speed in the chamber, my test runs start at full speed, ramp down to 300 r/min, then ramp back up to full speed.  The delay will affect the two halves in opposite directions.  When the delay is properly modeled, the two lines will converge.



From the graphs it was determined that the delay ranged from less than 1 second at full speed to 5 seconds around 300 r/min.  The graph to the right shows airspeed versus rotation rate (compensating for this delay).


The graph below is a time-series of the same run (with the delay compensated).  Around 2 m/s the airspeed vs rotation rate curve is not monotonic.  The time-series shows this is true both with decreasing and increasing rotation-rate.  And this feature appears in all of the measurement sequences I captured.


At rates above 1200 r/min it was difficult to keep up with the larger airspeed variations.  But in all the datasets I captured, the slope above 1200 r/min is less steep than below 1200 r/min.

A quick search of the Internet finds engineering "fan laws" saying that air speed is proportional to rotational speed.  The black line on the graph is the sort predicted by fan laws.  It has a slope of 0.191 m/r.

The critical question is whether these non-linearities are properties of the fan-wind-tunnel system or artifacts of the anemometer.

We removed the plate from the chamber and ran the tests again. Because the plate is not reducing the cross-section of the chamber, the airspeed and slope of the black line is less, 0.172 m/r.  The negative slope around 2.1 m/s persists. This does not appear to be hysteresis or flow state because the negative slope happens with both increasing and decreasing speed.  While the rotational speed around which this occurs increases by 100 r/min, the airspeed range is unchanged.  So this test doesn't provide a razor for identifying the source of the non-linearity.

While standing 3 meters in front of the fan running at full speed I felt erratic puffs of air.  Could these puffs be the same phenomena as the 10% airspeed variations found inside the chamber at high speeds?  I repeatedly folded a length of plastic deer fence to fashion a diffuser and strapped it to the front of the fan.  Remember that the fan sucks air through the chamber;  the diffuser is on the exhaust side of the fan.

This resulted in a dramatic decrease in the erratic puffing and the airspeed variation inside the chamber.  The high-speed slope variation is reduced, indicating that at least part of this slope is a property of the wind-tunnel.  The 2 m/s non-linearity kink is unaffected.

I set the fan speed so that under the plate
the anemometer read just above 2.1m/s.  I slowly pulled the anemometer forward so that it was no longer under the plate.  The airspeed should have then dropped, and it does so at other speeds, but not at 2.1 m/s.  So the anemometer is responsible for the kink!

Anemometers perform poorly at low speeds and are calibrated at the upper end of their ranges.  If the "fan laws" hold, I can rely on the more accurate high speed readings and interpolate the rest.  With the diffuser the upper curves are close enough to the straight line to use the straight line in calculations.

Saturday, July 18, 2015

Ready for Forced convection Measurements

Martin Jaffer helped suspend the plate in the wind tunnel. The plate is suspended from four 0.38 mm-diameter lengths of steel piano wire terminated at eight zither tuning pins in wooden blocks above the test chamber. The wire is sheathed by close-fitting Teflon tubing where it would contact the plate. The plate is not centered, but shifted halfway towards the front of test chamber. This gives more clearance from the turbulent transition regions spreading from the tunnel walls.

 There is a strip of duct-tape covering the metal edge between the insulation and the machined surface. Although it is more difficult to model (what is the thermal conductivity of duct-tape?), measurement shows that it reduces the heat flow from the non-test surfaces.

This photo shows the electronics board, cables, and fan speed control. The ambient sensor board (temperature, pressure, humidity) can be seen hanging off the left side of the tunnel.


I finished the interrupt-driven code to measure the rotation rate of the fan. Each second it divides the number of times a blade has passed the sensor by the length of time between the zeroth and last blade passing. This reduces quantization error such that most readings are stable to within a couple of r/min. Occasionally there is an extra interrupt causing one reading to spike. It may be possible to correct the spike in software.
Measurements with the impeller anemometer are used correlate the fan rotation rate with the wind speed inside the tunnel. But the two significant digits of the anemometer are limiting. We tried to interpolate the dithering of the low order digit in collecting the data shown in this graph.

Tuesday, July 14, 2015

Some Mysteries Solved


http://people.csail.mit.edu/jaffer/SimRoof/Convection/Measurements has been updated with photos of the new insulation, derivation of the model for the back surface, and measurements of natural convection.

In the first version of the electronics the plate and ambient temperature sensors had 3 times the variance of the back surface sensor.  I also noticed that, in most of the runs, the ambient temperature would have an initial ramp up in the first 5 minutes.

The LM35CZ temperature sensor datasheet warns of self-heating for sensors not attached to heatsinks.  So I added circuitry and modified the program to power on the sensor 2ms before it is read and turn it off after.  Surprisingly, it didn't eliminate the ramp, but it reduced the variance to a level comparable with the back surface sensor!

I checked the other components and found that the MPXH6115A6U atmospheric pressure sensor dissipates 30mW (and has a long warm-up time in its specification).  The LM35CZ was mounted next to the MPXH6115A6U on the same header; heat conduction through their leads was responsible for the warmup.  I moved the LM35CZ off of the header and connected it with thin wires, which solved the problem.

I am still left with the mystery of why the LM35CZ in the plate has the large variance.  If the thermal adhesive which fastens it in a hole in the aluminum plate is broken, is self-heating creating the variance?  Disassembling the insulation to examine it may damage the insulation, requiring it to be replaced; so I will leave it as it is for now.

With the upward natural convection measurement looking reasonably consistent with the model, it is time to mount the plate in the wind tunnel.

When I rebuilt the electronics, I improved the sensitivity of the opto-interrupter.  Its sensitivity is now high enough that it responds to reflection of the fan blade.  This allows the led and phtotransistor to be on the same side of the fan, which simplifies mounting.  The photo shows the blue board with the LED adjacent to the board with the phototransistor.

Sunday, June 21, 2015

Setbacks


Last month saw some setbacks.

While measuring a voltage, my probe slipped and shorted the 20 volt supply to a signal pin, burning out the STM32F3Discovery board and many of the electronic components.  The damaged components are now replaced; the electronics are working as before.

The analog-to-digital converters on the STM32F303 have multiple inputs.  While checking voltages on the repaired board, I noticed that for each ADC, the first input to be converted was converted accurately, but the others were not.  Increasing the converter sampling-time from ADC_SAMPLETIME_1CYCLES_5 to ADC_SAMPLETIME_19CYCLES_5 results in all readings being reasonably accurate.  The noise on converted signals is also reduced.

The other setback is more serious.

Heat flow measurements are of heat flow from both sides of the plate. To infer the undesired heat flow from measurements of total heat flow requires that the heat flow from the front of the plate be precisely known.  But the point of this experiment is to measure the heat flow from the front.

An insulating cover for the front of the plate turned out to interact strongly with the convection from the short sides.  The only option remaining is to analyze and estimate the heat flow through the back of the plate.

I am making progress in calculating this, but the estimates are significantly smaller than measured by the experimental apparatus.  I am rebuilding the insulation to match the estimate model.

Thursday, May 7, 2015

First Measurements

In "Insulating Both Sides", the large squares of (polyisocyanurate) foam insulation are faced with aluminum foil, but the borders were extruded polystyrene foam. Their unfaced surfaces would be subject to radiative transfer, which depends on the temperature of surfaces in the room, and is difficult to isolate from convection. I realized that by facing all the insulation with aluminum foil (with emissivity around .08), the radiative transfer would be cut to negligible levels. But there were unintended consequences which are discussed below.

This story will evolve at http://people.csail.mit.edu/jaffer/SimRoof/Convection/Measurements#Integration".

The physical quantities to be measured are:
symbolunitsdescription
TFKFluid (Air) Temperature
TSKPlate Surface Temperature
PPaFluid (Atmospheric) Pressure
Vm/sFluid Velocity
ΦPa/PaRelative Humidity
ΠHW=J/sHeater Power

Previous laboratory measurements of forced convection have been performed by starting the fluid flow and plate heater, waiting until the system reaches equilibrium (as indicated by a stable plate temperature), then recording the measurements of the physical quantities.

Because the heat flow for forced convection over a rough surface is expected to be larger than for a smooth surface, our test plate is more massive than previous experiments in order to maintain uniform temperature across the plate. This results in settling times of minutes in the best case and times approaching and hour at low airflow rates.

Radiative heat transfer is not directly measurable separately from convective heat transfer. The approach here is to minimize radiative transfer by making the test plate and its insulated backside have low emissivity (roughly 8%). The hR of the plate is estimated assuming that the emissive surfaces (mostly the inside of the wind-tunnel) are at ambient temperature. The insulated backside will be at a lower temperature than the plate. With a 5K temperature difference between the plate and ambient, the backside is about 1K above ambient in still air; in moving air this difference will be less. The small temperature difference the backside and ambient, combined with its low emissivity mean that its radiative transfer can be lumped with the backside convection UB(V).

The equation of state for the plate in forced convection is:
ΠH = h(V) ⋅ AS ⋅ (TSTF) + εS ⋅ εThRAs ⋅ (TSTF) + UB(V) ⋅ (TSTF) + C d TS

d t
symbolvalueunitsdescription
C4690J/KPlate Thermal Capacity
AS0.090m2Convecting Area
εS0.08Plate Surface Emissivity
εT0.95Tunnel Surface Emissivity
hR5.87W/(m2K)Radiative Surface Conductance
hW/(m2K)Convective Surface Conductance
UB(V)W/KBackside Surface Conductance (including radiative)

By collecting terms not dependent on TS into U(V), the equation of state is simplified:

U(V) = h(V) ⋅ AS + εS ⋅ εThRAs + UB(V)
ΠH = U(V) ⋅ (TSTF) + C d TS

d t
TS(t) = TF(t) + ΠH(t)

U(V) 
C 

U(V) 
d TS(t)

d t

This linear differential equation could be solved analytically, but because the independent variables are measured at discrete times, it make more sense to solve the analogous finite difference equation.

TS(t) = TF(t) + ΠH(t)

U(V) 
C  ⋅ (TS(t) − TS(t'))

U(V)  ⋅ (tt')
TS(t) ⋅ C  + U(V)  ⋅ (tt')

U(V)  ⋅ (tt')
= TF(t) + ΠH(t)

U(V) 
+ TS(t') ⋅ C 

U(V)  ⋅ (tt')
TS(t) = ΠH(t) ⋅ (tt') + TS(t') ⋅ C  + TF(t) ⋅ U(V) ⋅ (tt')

C + U(V)  ⋅ (tt')

When data is sampled every second, this simplifies to:

TS(t) = ΠH(t) + TS(t') ⋅ C  + TF(t) ⋅ U(V)

C + U(V) 

I had originally planned that my controller program would servo the plate temperature in a narrow range. But when I saw the first datasets from the plate being heated, I realized that having the plate temperature slew through a temperature span enables me to separate the dynamics of heating from convection. On the basis of the heating slope I make slight adjustments to C to compensate for the addition and removal of insulation; I won't clutter this article with that detail.

The image to the right shows the calculated TS(t) (red) versus the measured TS(t) (blue) and ambient temperature (black). Clearly there is a delay between the application of heat starting at 60 seconds and the plate temperature.

Introducing a 15 second delay for ΠH makes for a much better fit.

TS(t) = ΠH(t−15) + TS(t') ⋅ C  + TF(t) ⋅ U(V)

C + U(V) 

The full equation of state could be solved for h(V), but division by TSTF makes analysis of the noisy signals complicated. As in the delay case, simulation and visualization yield insights more readily than statistics.

My first measurements are of natural convection because V=0 eliminates one of the variables; also because the formulas for natural convection are well established (assuming that it is the same for rough surfaces as for smooth). In the temperature ranges tested here the dependence of h(0) on TS is too weak to materially effect the finite difference equation.

Determining UB(V) is a bit involved. In order to not have insulation projecting out of the four sides of the plate, the back edges of the plate were beveled and this space filled with wedges of insulation. The heat flow through these sides of the plate is larger than the heat flow through the insulation on the backside of the plate; and theory is insufficient to calculate the heat flow through the sides. So it must be measured. But measurement can only be of the heat transfer from all of the plate. Theory does predict the convection from the front of the plate, but the point of this experiment is to measure that.


I constructed an insulated cover for the front of the plate. A rough estimate of its conductance is UT(0)=134 mW/K.

By adding a collar of insulation to the sides of the back (seen to the right), the plate is symmetrically encapsulated in insulation. The conductance through the insulation can be estimated by assuming that the conductance through each truncated pyramid (of insulation) is the same as the conductance through a brick of insulation having dimensions which are the means of the truncated pyramid dimensions.

For a fully insulated plate in moving air, the outer surface of the insulation should be close to ambient temperature. I estimate it should conduct 190 mW/K through its front and back and 117 mW/K through its 4 sides, for a total of 308 mW/K between the plate and the insulation envelope. In still air (V=0 in these first tests), the flow should be less.

If these estimates are good, then the heat flow through the front cover will be 43% of the measured heat flow through the full insulation. The value of UB(V) could then be found by measuring the heat flow with the collar removed and subtracting 43% of the symmetrically insulated heat flow.

But the estimates are not close; in order to match the measured U(0) (blue trace) of the fully insulated plate, the red line on the graph is simulated at U(0)=420 mW/K, which is 36% larger than estimated.

The graph above shows the heating and cooling of the plate symmetrically encased in insulation. The black trace is ambient temperature, green the envelope temperature underneath the plate, blue the measured plate temperature, and red the simulated plate temperature (the red trace overlays the blue).

The graph below shows the heating and cooling of the insulated plate facing down (shown in the photograph above). It cools slightly faster than when facing up, perhaps because of the unsealed seams facing upward. With the temperature sensor (visible in the photograph) being on top, its green trace is much closer to ambient because upward convection is more efficient than downward convection.

The graph below shows the heating and cooling of the insulated plate facing up with the top cover but without the collar. The simulated U(0)=470 mW/K line (red) shows a bit too much curvature.

The graph below shows the convection from the plate facing up (without the top cover). The simulation (subtracting 43% of the full-insulation heat flow from the top-cover heat flow) shows significantly less convection than measured.

So the estimates of conduction through the insulation were not good enough. However, if I simulate with UB(0)=0.47 mW/K, the plate with the measured top-cover conductance, the plate upward convection matches beautifully!

One explanation would be that the top cover reduces the convection from the (four) plate sides by the same amount as conduction through the top cover insulation. The top-cover overhanging the plate sides would somewhat obstruct convection. But coincidences are toxic to science experiments.

Covering the side insulation with aluminum tape (to reduce emissivity) provided a heat conduction path from the areas where the conduction is thinnest to the rest of the back. So I made a cut through the aluminum tape on the sides, and it reduces the full-insulation U(0) from 0.42 to 0.38 W/K (shown below), about 10%. Recall that adding the collar to the plate with top-cover reduced the conduction from 470 mW/K to 420 mW/K, about 11%. This lends support to the idea that the aluminum tape was spreading plate heat to the foil envelope.

The next step is to make a similar cut to the top-cover and additional cuts to the side insulation and rerun these measurements.

Friday, April 10, 2015

Temperature Sensor Calibration

Having gotten the digital-to-analog and analog-to-digital conversions working while connected to each other, I plugged the STM32F3DISCOVERY board into my apparatus and started to debug the program to do analog-to-digital conversions of the LM35CZ temperature sensors. The initial readings were quite noisy; I traced this back to power supply noise caused by current fluctuations from the STM32F3DISCOVERY LEDs being switched on and off. I changed the program to keep the LEDs off during conversions and improved the power supply conditioning. The STM32F3DISCOVERY board consumes about 90.mA while running.

I found that the plate heater was slightly heating even though my program had the DAC controlling it set to 0. It turns out that when its output buffer is enabled, the STM32F303VCTx isn't specified to drive that output below 0.2V. Disabling the buffer reduced the output to a few millivolts.

The next task was to calibrate the temperature sensors. The calculations for measurement of convection are most sensitive to the time-derivative of the plate temperature and the difference between temperatures of the plate and ambient air. I attached the two ambient sensors ("ambient" and "free") to the back of the plate with thermal adhesive so that they would be at the same temperature. The statistics of (triple) 621 samples taken once per second are:

nREPS = 1ambientplatefreeoffset
mean:1696.751667.321734.46-29
variance:15.5816.659.83
mean:1.37.V1.34.V1.40.V-24.mV
variance:13.mV13.mV7.9.mV
mean:20.84C20.47C21.30C-0.36C
variance:0.19C0.20C0.12C

The plate-ambient offset is about -29 LSB = -24.mV = -0.36C. The 13.mV variance is rather large and matches measurements made by a RMS voltmeter at the ADC inputs; this bodes ill for the time-derivative of the plate temperature.

Note that voltage is measuread at the ADC input. There is a voltage gain of 6.56 from each LM35CZ (10.mV/C) output to the ADC input.

The STM32F303VCTx datasheet specifies a total unadjusted error of +/-4.5 LSB for the single-ended ADC at 25C and with a 3.3V supply.

The 16 LSB variance is much larger than the ADC error; thus it will act as a dither and smooth discontinuities in the ADC transfer function. So I rewrote the program to sum the result of converting each signal 16 times (per second). The statistics of 943 readings averaged over 16 conversions apiece are:

nREPS = 1ambientplatefreeoffset
mean:1702.791669.571736.16-33
variance:3.043.031.47
mean:1.37.V1.35.V1.40.V-27.mV
variance:2.4.mV2.4.mV1.2.mV
mean:20.91C20.50C21.32C-0.41C
variance:0.04C0.04C0.02C

The variance is reduced by a factor of 5, which will greatly reduce the effect of noise on the time-derivative of plate temperature.

This time the plate-ambient offset is about -33 LSB = -27.mV = -0.41C. All three temperatures are higher in the averaged test than in the single conversion test. This and subsequent sample runs in a thermostatically controlled building show that ambient and plate temperatures change enough to hamper calibration. The problem was worse when the plate was heated because the ambient sensor had only a small contact area with the plate, causing a temperature gradient which would be indistinguishable from a gain error.

So I fitted some insulation over the temperature sensors to protect them from air currents. This reduced the plate-ambient offset by an order of magnitude!

nREPS = 1ambientplatefreeoffset
mean:2173.752170.442230.43-3
variance:2.853.802.65
mean:1.75.V1.75.V1.80.V-2.7.mV
variance:2.3.mV3.1.mV2.1.mV
mean:26.69C26.65C27.39C-0.04C
variance:0.04C0.05C0.03C

A (304s) run near 20C also shows an offset smaller than the variance and guaranteed minimum offsets of the components.

nREPS = 1ambientplatefreeoffset
mean:1596.041598.531665.272
variance:3.013.001.37
mean:1.29.V1.29.V1.34.V2.0.mV
variance:2.4.mV2.4.mV1.1.mV
mean:19.60C19.63C20.45C0.03C
variance:0.04C0.04C0.02C

So the measurement program will not need to apply offset and scale corrections to the plate-ambient temperature difference. The ambient and plate sensors came from the same lot, the free sensor from a different batch. To convert the free temperature to the equivalent ambient temperature, multiply by 1.023 and subtract 1.318C.

Sunday, March 22, 2015

Programming the STM32F3-Discovery

http://www.st.com/web/en/catalog/tools/FM116/SC959/SS1532/LN1848/PF254044?sc=stm32f3discovery is the STM32F3DISCOVERY evaluation board I purchased. http://www.st.com/st-web-ui/static/active/jp/resource/technical/document/user_manual/DM00063382.pdf is Feb 2013 "UM1570 User manual STM32F3DISCOVERY Discovery kit for STM32F303xx microcontrollers".

STMicroelectronics offers a MS-Windows software named ST32CubeMX which enables a designer to configure a STM microprocessor and generates C and assembly code for driving it. http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/DM00104712.pdf is the Jan 2015 "UM1718 User manual STM32CubeMX for STM32 configuration and initialization C code generation".  In order to generate code for compilation with the Linux GCC toolchain, choose "TrueSTUDIO" as the toolchain.

When I purchased a STM32F3-discovery board last year, I downloaded ST32CubeMX version 1.0.  There are several projects using the Linux GCC toolchain to compile for STM processors which I found online.  But these projects use ST32CubeMX version 1.1.0; they are incompatible with the files generated by ST32CubeMX-1.0.  So I downloaded the latest ST32CubeMX, which turned out to be version 1.1.1.  The library functions have been renamed in ST32CubeMX-1.1.1 and the directories have been reorganized, so the code it generates is incompatible with both earlier versions.

STMicroelectronics has documentation for the microprocessor, the hardware abstraction layer (HAL), and "middlewares", but I can't figure how to navigate to them on their site.  Google search comes to the rescue.

http://www.st.com/web/en/resource/technical/document/reference_manual/DM00043574.pdf is the Jan 2015 manual for everything in the STM32F303xB/C/D/E, STM32F303x6/8, STM32F328x8, STM32F358xC, STM32F398xE chips other than the CPU, memory layout, and interrupts, which are documented (for STM32F3 and STM32F4) in May 2014 "PM0214 Programming manual" http://www.st.com/web/en/resource/technical/document/programming_manual/DM00046982.pdf

http://www.st.com/web/en/resource/technical/document/datasheet/DM00058181.pdf is the electrical and timing specifications for STM32F303xB and STM32F303xC.

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/DM00122016.pdf documents the hardware-abstraction-layer Feb 2015 "UM1786 User manual Description of STM32F3xx HAL drivers".  It corresponds to ST32CubeMX version 1.1.1.  Between this manual and the specifications, it should be possible to create firmware without starting from the ST32CubeMX (MS-Windows) program.

http://www.st.com/st-web-ui/static/active/jp/resource/technical/document/user_manual/DM00063382.pdf is Nov 2014 "UM1734 User manual STM32Cube USB device library".  It is not quite up-to-date with ST32CubeMX-1.1.1, referring to some function names (eg. Controllability()) which do not exist in version 1.1.1 or version 1.1.0.  Perhaps the code is in transition.  There are fields like _USBD_HandleTypeDef.dev_connection_status which are never referenced by the code and callbacks like HAL_PCD_ConnectCallback() which are never called.

The USB-CDC function CDC_Transmit_FS() is very useful; it sends a message over the USB to /dev/ttyACM0.  Its use has replaced the on-board LEDs for debugging my real-time program.

The toolchain I use is gcc-arm-embedded.  The version in Ubuntu-12.04 doesn't work with the STM32F3.  https://launchpad.net/gcc-arm-embedded has instructions for installing the current version of gcc-arm-embedded (which does work).

Openocd "Open On-Chip Debugger" is used to program and run gdb on the STM32F3DISCOVERY board.  The version of Openocd in Ubuntu-12.04 does not support the STM32F3DISCOVERY.  I downloaded and compiled from http://openocd.sourceforge.net/getting-openocd/.

https://github.com/mblythe86/stm32f3-discovery-basic-template is a 1.1.0 demonstration project for STM32F3.  It was helpful for creating Makefiles and gcc-arm-embedded linking.

Here is the process I used to port a project generated from the directory structure created by ST32CubeMX-1.1.1:

git clone https://github.com/cjheath/stm32f3-discovery-basic-template.git

In your project directory: Create "Device/ldscripts/" directory and copy "sections_flash.ld", "stm32f3discovery_def.ld", and "stm32f3.ld" from "stm32f3-discovery-basic-template/Device/ldscripts/" into "Device/ldscripts/".

Copy "Drivers/CMSIS/Device/ST/STM32F3xx/Source/Templates/gcc/startup_stm32f303xc.s" into "Device/".

Copy "Drivers/CMSIS/Device/ST/STM32F3xx/Source/Templates/system_stm32f3xx.c" into "Src/".

Copy Makefile from "stm32f3-discovery-basic-template/Libraries/Makefile" into directory "Drivers/".  In it set SRCS = to a list of all the files in "Drivers/STM32F3xx_HAL_Driver/Src/"

Copy "stm32f3-discovery-basic-template/Makefile" into project directory and modify for your file locations.
  


I am undoubtedly forgetting some of the other changes which were necessary.

The callbacks (and some other functions) have "__weak" definitions.  These are supposedly overridden by non-"__weak" function definitions.  I found that this was sometimes not happening.  Changing the link order did not fix the problem.  Removing the "__weak" definitions fixed it.

Even with the documentation, I was unable to get a differential analog-to-digital converter (ADC) to work correctly.  Instead, I convert the two channels separately and subtract.

Sunday, February 1, 2015

Insulating Both Sides


Because of edge effects, the heat leakage through the insulated back-of-the-plate is difficult to calculate.  It would be better to measure it; but that measurement must discount the heat transfer through the front side of the plate.  The .421 W which I estimate for leakage is less than the downward-facing convection (.525 W) for a plate at 5 K higher than ambient temperature.  Because the test surface of the plate is rough, I don't have confidence in convection calculations based on smooth plate measurements; and assuming what I am trying to measure means that I wouldn't be able to test the assertion that surface roughness has no effect on downward natural convection.

So I created insulation for the (rough) front surface of the plate. Constructed using the same materials and techniques as the backside insulation, its leakage should be roughly the same as the backside.

While cutting the extruded polystyrene foam I noticed that the board crowned in the center.  So I arranged the cut strips so that their centers pressed into the plate edges while the duct tape tensions their ends into corners.  It maintains a snug fit and doesn't need tape to seal it.  Because of the bevel, the backside foam is more complicated to cut; but I may at some point rebuild it using the same technique.

Because the expected downward-facing convection is close in magnitude to the leakage, the fully-insulated measurements should be made both level and at some inclinations (convection increases rapidly as the plate is tilted).

Friday, January 30, 2015

Insulating the Plate



The photo shows the thermal insulation for the aluminum plate's backside (covering the heaters).  The reflective square is 25 mm deep polyisocyanurate foam insulation (Dow TUFF-R) with foil on both sides.  The light green border is 19 mm thick extruded polystyrene foam which is beveled to match the back of the aluminum plate.  The corners and metal-to-foam seams are held together with duct tape.  The sensor cable and heater connections thread between the two types of insulation.  The pieces of insulation were machined using a radial-arm saw and a band-saw.  Knife cuts were not as clean.
While suspension by piano wire will be sufficient for performing forced convection measurements of a downward facing horizontal plate, we lack a way to support the plate with insulation at non-horizontal inclinations, which would allow interesting natural convection measurements.

Wednesday, January 21, 2015

Wiring the Plate

For those new to these postings, in 2011 through 2013 I developed a complete theory for single-phase mixed convection from a rough (or smooth) rectangular plate at uniform temperature:
  http://people.csail.mit.edu/jaffer/SimRoof/Convection

In 2014 I started assembling the equipment necessary to test this
theory:
  http://people.csail.mit.edu/jaffer/SimRoof/Convection/Measurements

Previous blog postings document the progress in building the wind tunnel and measurement and control electronics:
  http://voluntocracy.blogspot.com/2014

John Cox milled the front of the plate to have a precision rough surface with 3 mm average height of roughness.  This particular surface also has 3 mm root-mean-squared height of roughness.



John Cox milled slots in the back of the plate for the heaters (TO-220 resistors).  I drilled 11.mm deep pilot holes and tried to hand tap the holes for #6-32 screws.  On the first hole, the tap started to lean.  Carl Mikkelsen suggested that I remove the drive belt from my drill press, clamp the tap in the chuck, and tap (turning by hand) with the drill press enforcing vertical alignment.  Having only two hands, I used an elastic cord to counteract the spring in the press, as can be seen in the photograph.



 Tapping an 11.mm blind (not through) hole is not reliably acheived by machine, but is quite doable by hand.  I tapped each hole in 3 stages, backing out the tap and blowing out the hole with a (sports) ball inflation pump after each stage.  The resistance to turning the tap when the hole is clogged with chips feels different than the hard stop when the tap has reached the bottom of the hole.  Per Carl's suggestion I used vegetable oil when tapping, which eased cleanup and degreasing.



I wired the heaters (resistors) in series with solid AWG 22 wire (red).  The external drive points (top terminal of the top left and top right heaters) are also connected to conductors of the 6-wire ribbon cable (gray).  This allows measurement of the voltage across the heater chain to be unaffected by voltage drop in the drive wires.  Three gray wires connect to an electronic temperature sensor in the hole right of center.  The gray wire connected to the center screw grounds the plate in order to shield the temperature sensor from electrical noise.

In my initial calculations I neglected the tap taper length, so I shortened each screw by 1.6 mm.  I painted "Silver Alumina" thermal grease on the back of each heater and screwed it and a compression washer into its slot.  I used the TO-220 recommended torque limit on the screws.  But the screws were tight in the holes even without the compression washers, so I turned until the grease squeezed out.

To test the thermal coupling of the heaters to the plate, I jumpered the electronics board to run 1.83 Amps (33 Watts) through the string of heaters.  Applying the "finger test", the warmth of the plastic on the heaters was barely discernable, yet the plate temperature sensor registered a 1.K rise after several minutes.

Once the electronics board is programmed to record measurements of the sensors and heater power, I will encase the plate in polyisocyanurate foam board (insulation) and measure the power required to maintain a 5 K or 10 K temperature between the plate and ambient air.  Half of the ratio of this power to temperature difference is the (leakage) thermal conductivity of the back side of the plate.  The back of the plate will remain insulated while the front will be bare for convection measurements.