PSS Thermal Module
MATLAB toolboxes for aerospace analysis
Thermal Functions

The Thermal module functions. View the published Thermal Demos. More...

Directories

directory Brayton
 Brayton cycle and engine designs.
 
directory Demos
 Thermal demos.
 
directory HeatExchanger
 
directory Help
 
directory ThermalAnalysis
 
directory ThermalGraphics
 
directory ThermalProperties
 
directory ThermalAnalysis
 
directory ThermalControl
 
directory ThermalGraphics
 

Functions

function BraytonIdeal (in gamma, in pR, in cP, in t3, in qR)
 Ideal Brayton cycle. More...
 
function AbsoluteViscosity (in gas, in t)
 Computes the absolute viscosity. More...
 
function FrictionLaminar (in rE, in type)
 Computes the laminar friction. More...
 
function HeatExchanger (in d)
 Designs a heat exchanger for a one sided heat flux. More...
 
function HeatExchangerWithLosses (in d, in doPlot)
 Implements a flat plate heat exchanger with radiation losses. More...
 
function HeatTransferChannel (in d)
 Designs a heat exchanger for a one sided heat flux. More...
 
function HeatTransferCoeff (in nU, in k, in d)
 Computes the Heat transfer coefficient. More...
 
function KinematicViscosity (in mu, in rho)
 Computes the Kinematic viscosity. More...
 
function NusseltDeveloping (in x, in D, in rE, in isHFD)
 Computes the Nusselt number for developing turbulent flow. More...
 
function NusseltLaminar (in g, in type)
 Computes the Nusselt number for laminar flow. More...
 
function NusseltTurbulent (in rE, in pR)
 Computes the Nusselt number for fully developed turbulent flow. More...
 
function PrandtlNikuradse (in rE)
 Computes the Fanning friction factor for fully developed turbulent flow. More...
 
function PrandtlNumber (in mu, in cP, in k)
 Computes the Prandtl number. More...
 
function PressureDropChannel (in d)
 Computes the channel pressure drop. More...
 
function ReynoldsNumberKinematic (in u, in d, in nu)
 Computes the Reynolds number. More...
 
function ThermalConductivity (in gas, in t)
 Computes the thermal conductivity. More...
 
function AeroHeatFlux (in f, in sigma, in type)
 Aerodynamic heat flux. More...
 
function BTUToJoule (in bTU)
 Converts BTUs to Joules. More...
 
function FSolarPanelThermal (in x, in d)
 Used by fmins from SolarPanelThermal to compute panel temperatures. More...
 
function GrayBody (in alphaOrEpsilon)
 Aborptivity and emissivity of a gray body. More...
 
function Isothermal (in el, in center, in d, in jD)
 Model a spacecraft as an isothermal radiator. More...
 
function IsothermalHelio (in r, in qECIToBody, in nEclipse, in mass, in heat, in temp, in d)
 Isothermal model in heliocentric orbit. More...
 
function IsothermalLunar (in el, in d, in jD)
 Model a spacecraft as an isothermal radiator in lunar orbit. More...
 
function JouleToBTU (in j)
 Converts Joules to BTUs. More...
 
function LambertL (in theta, in E)
 Lambert's cosine law. More...
 
function OptimalMLIDensity (in tH, in tC, in d)
 Determine optimal Multi-layer Insulation (MLI) density. More...
 
function PanelThermalModel (in g, in flux)
 Computes the temperatures of a panel from a CAD model. More...
 
function PlanckL (in T, in lambda)
 Planck's law for a black body. More...
 
function RadBFp (in epsilon, in T1, in Tn)
 Radiation between equal area flat plates. More...
 
function RadDa (in T, in epsilon, in da)
 Radiation from an incremental area. More...
 
function RadiationShapeFactor (in w1, in w2, in l, in units)
 Computes the radiation shape factor. More...
 
function RHSAerodynamicHeating (in d)
 Compute aerodynamic heating. More...
 
function RHSIsothermal (in x, in t, in d)
 Model a spacecraft as an isothermal radiator. More...
 
function SolarPanelThermal (in d)
 Compute the front/back temperatures of a solar panel. More...
 
function SpaceCamera (in action, in modifier, in g, in jD)
 Draw spacecraft in orbit about a planet, as seen by an in-situ camera. More...
 
function SpacecraftThermal (in mode, in g, in e)
 Compute the temperature in input flux for the spacecraft components. More...
 
function ThermalColorMap (in temp, in tempMax, in colorMap)
 Generates a color corresponding to a temperature. More...
 
function ThermalEquilibrium (in d, in q, in t, in nIts, in epsilon)
 This function computes the thermal equilibrium for a system. More...
 
function Thermnet (in mn, in cnm, in cc, in inm, in onm, in rnm, in rc, in tnom)
 Creates a set of first order differential equations to model. More...
 
function DrawThermalPlugIn (in action, in hFig, in modifier)
 Draw a thermal diagram. More...
 
function PlotThermal (in q, in temp, in t, in g, in units)
 Plots flux and temperature. More...
 
function ThermalImager (in action, in g, in d)
 Color a spacecraft or planet corresponding to a temperature. More...
 
function AbsDa (in alpha, in dA, in S)
 Absorbed radiation from an incremental area. More...
 
function BlckBody ()
 Aborptivity and emissivity of a black body. More...
 
function EmittanceParallelPlates (in e)
 Computes the emittance of plates in parallel. More...
 
function HeatFP (in q2, in alpha2, in e2, in e1, in k, in fC, in tau)
 Computes the temperature at two surfaces of a flat plate. More...
 
function HeatShieldCoating (in name)
 Values for heat shield coatings. More...
 
function RadiatorCoating (in name)
 Values for radiator coatings. More...
 
function TempConv (in from, in to, in tI)
 Converts temperatures between units. More...
 
function TempCyl (in alpha, in epsilon, in rOverL, in S, in n, in u)
 Temperature of a cylinder. More...
 
function TempFP (in alpha, in epsilon, in S, in n, in u)
 Temperature of a flat plate. More...
 
function TempSph (in alpha, in epsilon, in S)
 Temperature of a sphere. More...
 
function WiensDsp (in T)
 Computes the peak black body wavelength as a function of temperature. More...
 

Detailed Description

The Thermal module functions. View the published Thermal Demos.

Function Documentation

◆ AbsDa()

function AbsDa ( in  alpha,
in  dA,
in  S 
)

Absorbed radiation from an incremental area.

Type AbsDa for a demo.

Form

q = AbsDa( alpha, dA, S )


Inputs

alpha       (1,1)    Absorptivity
dA          (1,1)    Incremental area
S           (1,:)    Heat flux

Outputs

q           (1,:)    Absorbed heat flux (watts)

References: Van Vliet, R. M., Passive Temperature Control in the Space Environment, MacMillan, 1965, p. 4.


◆ AbsoluteViscosity()

function AbsoluteViscosity ( in  gas,
in  t 
)

Computes the absolute viscosity.

Absolute viscosity. Extrapolates beyond the range of data. The data might not be valid for the input temperature. For example, the gas may become a liquid at a low temperature or a molecule mau dissociate at a high temperature.

Type AbsoluteViscosity for a demo for xenon.


Form

mu = AbsoluteViscosity( gas, t )


Inputs

gas   (1,:)   Gas
t     (1,:)   Temperature (deg-K)

Outputs

mu    (1,:)   Absolute viscosity (Pa s)

Reference: https://www.engineeringtoolbox.com/ gases-absolute-dynamic-viscosity-d_1888.html


Referenced by HeatTransferChannel(), and PressureDropChannel().

◆ AeroHeatFlux()

function AeroHeatFlux ( in  f,
in  sigma,
in  type 
)

Aerodynamic heat flux.

The input may be a data structure or a file name of a .mat file containing the data structure. Since this uses the standard atmosphere model it only works up to 80 km. See StdAtm.m.

This model uses the assumption that the tip is blunt and that the Prandtl number is 1. The heat flux is therefore (1/4)cF rho V^3. The characteristic length is the radius of a nose cone or length of the flat surface.

Type AeroHeatFlux for a demo.


Form

AeroHeatFlux
qDot = AeroHeatFlux( f, sigma )


Inputs

f            (1,:)     Filename
or
(1,1)     Data structure
.time     (1,:) Time (sec)  (Plotting only)
.velocity (1,:) Velocity (m/s)
.altitude (1,:) Altitude (m)
.range    (1,:) Range (m) (Plotting only)
sigma        (1,1)    Characteristic length (m)
type         (1,:)    'laminar plate' 'turbulent plate' 'blunt nose'

Outputs

qDot         (1,:)     Heat flux (W/m^2)

References: H. Julian Allen and A. J. Eggers, Jr., "A Study of the Motion and Aerodynamic Heating of Ballistic Missiles Entering the Earth's Atmosphere at High Supersonic Speeds," NACA Report 1381. Hankey, W., 'Re-entry Aerodynamics", AIAA Press.


◆ BlckBody()

function BlckBody ( )

Aborptivity and emissivity of a black body.


Form

[alpha, epsilon] = BlckBody


Inputs


Outputs

alpha      (1,1)  Absorptivity
epsilon    (1,1)  Emissivity

◆ BraytonIdeal()

function BraytonIdeal ( in  gamma,
in  pR,
in  cP,
in  t3,
in  qR 
)

Ideal Brayton cycle.

Computes the efficiency, mass flow and temperatures. This power plant has a single compressor and turbine. Both are 100% efficient.

The cycle points are

1 - compressor inlet 2 - compressor outlet 3 - turbine inlet 4 - turbine outlet

Note: t2 = t4 in this ideal cycle.

Type BraytonIdeal for a demo comparing helium, nitrogen and carbon dioxide.


Form

[eff, mDot, t] = BraytonIdeal( gamma, pR, cP, t3, qR )


Inputs

gamma    (1,1)  Ratio of specific heats
pR       (1,:)  Pressure ratio
t3       (1,1)  Temperature at end of combustor  (deg-K)
cP       (1,1)  Specific heat constant pressure J/kg deg-K
qR       (1,1)  Heat input (W)

Outputs

eff      (1,1)  Thermal efficiency
mDot     (1,:)  Mass flow (kg/s)
t        (4,:)  Cycle temperatures (deg-K)

References: N. Ait Messaoudene, "Thermal Power Plants," ME 435, University of Hail.


◆ BTUToJoule()

function BTUToJoule ( in  bTU)

Converts BTUs to Joules.

Type BTUToJoule for a demo.


Form

j = BTUToJoule(bTU)


Inputs

bTU   (1,:) BTU

Outputs

j     (1,:) Joules

See also JouleToBTU.


◆ DrawThermalPlugIn()

function DrawThermalPlugIn ( in  action,
in  hFig,
in  modifier 
)

Draw a thermal diagram.

Shows each node and a line where there is conductivity or radiative heat transfer between nodes. First you initialize the routine

tag = DrawThermalPlugIn( 'initialize',g  )

where g is a CAD model with the added field thermalNet which is struct with fields, b, the input matrix, k, the thermal conductivity matrix, and l, the radiative coupling matrix. Each matrix is n-by-n where n is the number of components.

To update write

DrawThermalPlugIn( 'update', tag, t )

where t(k) is the temperature of component k.

Each node is colored based on the temperature. You can set the maximum temperature by writing

DrawThermalPlugIn( 'set max temp', tag, tMax )

Has a built-in demo using ThermalCube.mat


Form

DrawThermalPlugIn( action, modifier )


Inputs

action      (1,:)  Action
modifier    (1,:)  Modifier to the action

Outputs

tag         (1,:)  The tag that identifies the display   

See also: ThermalCube, ThermalColorMap


◆ EmittanceParallelPlates()

function EmittanceParallelPlates ( in  e)

Computes the emittance of plates in parallel.

The heat flux through the plates is then sigma T^4/nB.
The rest is reflected.


Type EmittanceParallePlates for a demo.

Form

nB = EmittanceParallelPlates( e )


Inputs

e           (1,:)    Plate emittances

Outputs

nB          (1,1)    Number of black plates

References: Van Vliet, R. M., Passive Temperature Control in the Space Environment, MacMillan, 1965, pp. 78-86


◆ FrictionLaminar()

function FrictionLaminar ( in  rE,
in  type 
)

Computes the laminar friction.

Turbulent flow generally happens for rE > 1e4.

Type FrictionLaminar for a demo. T


Form

f = FrictionLaminar( rE, type )


Inputs

rE        (1,:) Reynold's number
type      (1,:) 'square', 'circular'

Outputs

f         (1,:) Friction factor

Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 465-466.


Referenced by PressureDropChannel().

◆ FSolarPanelThermal()

function FSolarPanelThermal ( in  x,
in  d 
)

Used by fmins from SolarPanelThermal to compute panel temperatures.

This returns a cost for the deviations of the front/back solar panel
temperature equations from zero.

Form

y = FSolarPanelThermal( x, d )


Inputs

x               (2,1) [tF;tB] Front and back temperatures
d               (1,1) Data structure
.alpha (1,1) Absorptivity
.epsF  (1,1) Front emissivity
.epsB  (1,1) Back emissivity
.etaP  (1,1) Fraction of flux to power
.k     (1,1) Front/back conductivity
.s     (1,1) Solar flux

Outputs

y               (1,1) Cost

◆ GrayBody()

function GrayBody ( in  alphaOrEpsilon)

Aborptivity and emissivity of a gray body.


Form

[alpha, epsilon] = GrayBody( alphaOrEpsilon )


Inputs

alphaOrEpsilon  (1,:) Either alpha or epsilon

Outputs

alpha           (1,:) Absorptivity
epsilon         (1,:) Emissivity

References: Van Vliet, R. M., Passive Temperature Control in the

Space Environment, MacMillan, 1965, p. 5.


◆ HeatExchanger()

function HeatExchanger ( in  d)

Designs a heat exchanger for a one sided heat flux.

The output data structure has all the value in the input plus values computed in the function.

Type HeatExchanger for demos with Helium/Xenon and Helium.


Form

[d, l] = HeatExchanger( d )


Inputs

d              (.)    Input data structure
.q         W
.tInlet    K
.tOutlet   K
.mach      
.pressure  ATM
.cP
.gamma
.molWt

Outputs

d              (.)    Output data structure
.mDot (1)  Mass flow
.u    (1)  Speed
.rhoI (1)  Inlet density
.rhoO (1)  Outlet density
.areaChannel
.hChannel
l              {:,3}  Latex formatted output

◆ HeatExchangerWithLosses()

function HeatExchangerWithLosses ( in  d,
in  doPlot 
)

Implements a flat plate heat exchanger with radiation losses.

A flat plate heat exchanger. One side has a uniform thermal input. The other has radiation heat loss. k may be a pointer to a function

k = fun( tB, d.kData )

that returns the total conductance.

Type HeatExchangerWithLosses for a demo.


Form

d = HeatExchangerWithLosses;
[tB,tS4,q4] = HeatExchangerWithLosses( d, doPlot )


Inputs

d       (.) Data structure
.l      (1,1) Length (m)
.k      (1,1) Thermal conductance (W/m2 deg-K), or handle
.kData  (.)   Data structure to data for k, optional
.qDot   (1,1) Heat flux (W/m)
.n      (1,1) Number of divisions in length
.mDot   (1,1) Cooling gas flow (kg/s)
.cP     (1,1) Gas heat capacity  (J/kg deg-K)
.eps    (1,1) Emissivity of the shell
.tB0    (1,1) Initial duct temperature (deg-K)
.c      (1,1) Circumference, perimeter of channel receiving flux
doPlot

Outputs

tB      (1,:)   Gas temperature (deg-K)
tS4     (1,:) Wall temperature (deg-K)
q4      (1,:) Radiative heat flux (W/m^2)

◆ HeatFP()

function HeatFP ( in  q2,
in  alpha2,
in  e2,
in  e1,
in  k,
in  fC,
in  tau 
)

Computes the temperature at two surfaces of a flat plate.

given that the heat input is on face 2. Both sides emit to free space.

Form

[t1, t2] = HeatFP( q2, alpha2, e2, e1, k, fC, tau )


Inputs

q2          (1,1)   Heat flux on face 2  (watts/m^2)
alpha2      (1,1)   Absorptivity of face 2
e2          (1,1)   Emissivity of face 2
e1          (1,1)   Emissivity of face 1
k           (1,1)   Conductivity between the faces (watts/deg-K)
fC          (1,1)   Fraction of incoming heat converted to electricity
tau         (1,1)   Fractional error

Outputs

t1          (1,1)   Temperature of face 1
t2          (1,1)   Temperature of face 2

◆ HeatShieldCoating()

function HeatShieldCoating ( in  name)

Values for heat shield coatings.

'name' is not case sensitive. All values are averages.
If no input is entered it will return the available materials.

Form

[alpha, epsilon, ratio] = HeatShieldCoating( name )

- ----------------------------------------------------------------------—

Inputs

name        (1,:)    Name

Outputs

alpha       (1,1)    Absorptivity
epsilon     (1,1)    Emissivity
ratio       (1,1)    alpha/epsilon

References: Van Vliet, R. M., Passive Temperature Control in the Space Environment, MacMillan, 1965, p. 108.


◆ HeatTransferChannel()

function HeatTransferChannel ( in  d)

Designs a heat exchanger for a one sided heat flux.

The output data structure has all the values in the input plus values computed in the function. The latex formatted output can be saved to a file using CreateLatexTable or printed in the command window using DisplayLatexTable.

Type HeatTransferChannel for a demo with a 70% Helium/ 30% Xenon mixture.


Form

[d, l] = HeatTransferChannel( d )


Inputs

d              (.)    Input data structure
.name       (1,:)   Name
.length     (1,1)   Channel length (m)
.w          (1,1)   Channel width (m)
.h          (1,1)   Channel height (m)
.q          (1,1)   Total heat flux (MW)
.cP         (1,1)   Heat capacity (J/kg-K)
.gamma      (1,1)   Ratio of specific heats
.tInlet     (1,1)   Inlet temperature (deg-K)
.tOutlet    (1,1)   Outlet temperature (deg-K)
.pressure   (1,1)   Inlet pressure (Atm)
.gas        {1,2*n) {'name' fraction ...}
.kC         (1,1)   Inlet pressure drop
coefficient
.kE         (1,1)   Outlet pressure drop
coefficient

Outputs

d              (.)    Additions to the data structure
.mDot       (1,1)   Mass flow rate (kg/s)
.u          (1,1)   Velocity (m)
.qChannel   (1,1)   Heat flux (W/m)
.dP       (1,1)   Pressure drop (Atm)
.area     (1,1)   Channel area (m^2)
.d        (1,1)   Channel dimension (m)
l              {:,3}  Latex formatted output

References AbsoluteViscosity(), CreateLatex(), Demo(), HeatTransferChannel(), HeatTransferCoeff(), NusseltLaminar(), NusseltTurbulent(), PrandtlNumber(), PressureDropChannel(), ReynoldsNumberKinematic(), and ThermalConductivity().

Referenced by HeatTransferChannel().

◆ HeatTransferCoeff()

function HeatTransferCoeff ( in  nU,
in  k,
in  d 
)

Computes the Heat transfer coefficient.

Type HeatTransferCoeff for a demo.


Form

h = HeatTransferCoeff( nU, k, d )


Inputs

nU  (1,:)   Nusselt number
k   (1,:)   Conductivity (W/m deg-K)
d   (1,:)   Diameter (m)

Outputs

h   (1,:)    Heat transfer coefficient (W/m^2 deg-K)

Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 477.

  • ----------------------------------------------------------------------—H

Referenced by HeatTransferChannel().

◆ Isothermal()

function Isothermal ( in  el,
in  center,
in  d,
in  jD 
)

Model a spacecraft as an isothermal radiator.

This is useful for preliminary estimates of radiator area.
The spacecraft illuminated area is aS with radiators of area aR.
You enter the orbit and the center (any of the nine planets or the sun)
plus the orbital elements and spacecraft properties. The function will
compute the temperature as a function of time.
This function includes solar, albedo and radiation.
In a heliocentric orbit planetary encounters are ignored. In planetary
orbit albedo, planetary radiation and eclipses are modeled.


For a demo of a geosynchronous spacecraft type Isothermal.

Form

t = Isothermal( el, center, d, jD )


Inputs

el       (1,6) Orbital elements [a i W w e M]
center   (1,:) Name of center (major planets and sun)
d        (1,1) Data structure
.aR    (1,1) Radiator area (m^2)
.aS    (1,1) Spacecraft illuminated area (m^2)
.alpha (1,1) Spacecraft absorption (0-1)
.epsR  (1,1) Radiator emissivity (0-1)
.t0    (1,1) Initial Temperature (deg-K)
.cP    (1,1) Average specific heat of the spacecraft (J/kg deg-K)
.m     (1,1) Spacecraft mass  (kg)
.p     (1,n) Power consumption (W)
jD       (1,n) Julian dates

Outputs

t        (1,n) Temperatures (deg-K)

References: Agrawal, B. ,"Design of Geosynchronous Spacecraft," Prentice-Hall, 1986, pp. 281-283


◆ IsothermalHelio()

function IsothermalHelio ( in  r,
in  qECIToBody,
in  nEclipse,
in  mass,
in  heat,
in  temp,
in  d 
)

Isothermal model in heliocentric orbit.

Calculates the temperature derivative.


Form

tempDot = IsothermalHelio( qECIToBody, nEclipse, mass, heat, temp, d )


Inputs

r           (3,1) Vector to sun
qECIToBody  (4,1) Quaternion
nEclipse    (1,1) Eclipse
mass        (1,1) Mass (kg))
heat        (1,1) Heat generated internally (W)
temp        (1,1) Temperature (deg-K)
d           (.)   Data structure 
.cP     (1,1) Specific heat (J/kg-deg-K)

Outputs

tempDot   (1,1) Temperature derivative (deg-K/s)

◆ IsothermalLunar()

function IsothermalLunar ( in  el,
in  d,
in  jD 
)

Model a spacecraft as an isothermal radiator in lunar orbit.

This is useful for preliminary estimates of radiator area.
The spaceccraft illuminated area is aS with radiators of area aR.
You enter the orbital elements and spacecraft properties. The function will
compute the temperature as a function of time.


This function includes solar, albedo and radiation. Both lunar and
earth eclipses are modeled.


Type IsothermalLunar for a demo.

Form

IsolthermalLunar;
t = Isothermal( el, d, jD )


Inputs

el       (1,6) Orbital elements [a i W w e M]
d        (1,1) Data structure
.aR    (1,1) Radiator area (m^2)
.aS    (1,1) Spacecraft illuminated area (m^2)
.alpha (1,1) Spacecraft absorption (0-1)
.epsR  (1,1) Radiator emissivity (0-1)
.t0    (1,1) Initial Temperature (deg-K)
.cP    (1,1) Average specific heat of the spacecraft (J/kg deg-K)
.m     (1,1) Spacecraft mass  (kg)
.p     (1,:) Internal power consumption (W)
jD       (1,n) Julian dates

Outputs

t        (1,n) Temperature (deg-K)

◆ JouleToBTU()

function JouleToBTU ( in  j)

Converts Joules to BTUs.

Type JouleToBTU for a demo.


Form

bTU = JouleToBTU(j)


Inputs

j   (1,:) Joules

Outputs

bTU (1,:) BTU

See also BTUToJoule.


◆ KinematicViscosity()

function KinematicViscosity ( in  mu,
in  rho 
)

Computes the Kinematic viscosity.

Type KinematicViscosity for a demo.


Form

nu = KinematicViscosity( mu, rho )


Inputs

mu    (1,:)   Viscosity (kg/m-s)
rho   (1,:)   Density   (kg/m^3)

Outputs

nu    (1,:)   Kinematic viscosity (m^2/s)

Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 477.


◆ LambertL()

function LambertL ( in  theta,
in  E 
)

Lambert's cosine law.

Type LambertL for a demo.


Since version 1.

Form

dE = LambertL( theta, E )


Inputs

theta   (1,:) Angle (rad)
E       (1,:) Total emissive power

Outputs

dE      (1,:) Flux per unit solid angle (dE/dw)

References: Thomas, L. C., Heat Transfer, Prentice-Hall, 1992, pp. 271-273.


◆ NusseltDeveloping()

function NusseltDeveloping ( in  x,
in  D,
in  rE,
in  isHFD 
)

Computes the Nusselt number for developing turbulent flow.

This correlation was developed for air in short smooth tubes.


Form

fN = NusseltDeveloping( rE, pR )


Inputs

x      (1,:)   Distance along pipe
D      (1,1)   Diameter of pipe
rE     (1,:)   Reynolds number
isHFD   (1)    Whether a hydrodynamic calming section is used, in which case
HFD conditions exist from the start.

Outputs

fN    (1,:)      Factor multiplying the Nusselt number

Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 471.


◆ NusseltLaminar()

function NusseltLaminar ( in  g,
in  type 
)

Computes the Nusselt number for laminar flow.

Developing laminar flow of air in a circular pipe with uniform wall temperature.

Type NusseltLaminar for a demo.


Form

nU = NusseltLaminar( g, type )


Inputs

g     (1,:)   x/D/(RePr)
type  (1,:)   hfd or tfd
hfd - hydrodynamic fully developed flow (default)
tfd - thermal fully developed flow

Outputs

nU    (1,:)     Nusselt number

Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 470.


Referenced by HeatTransferChannel().

◆ NusseltTurbulent()

function NusseltTurbulent ( in  rE,
in  pR 
)

Computes the Nusselt number for fully developed turbulent flow.

Turbulent flow generally happens for rE > 1e4.

Type NusseltTurbulent for a demo.


Form

nU = NusseltTurbulent( rE, pR )


Inputs

rE    (1,:)   Reynolds number
pR    (1,:)   Prandtl number

Outputs

nU    (1,:)     Nusselt number

Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 471.


Referenced by HeatTransferChannel().

◆ OptimalMLIDensity()

function OptimalMLIDensity ( in  tH,
in  tC,
in  d 
)

Determine optimal Multi-layer Insulation (MLI) density.

Type OptimalMLIDensity for a demo


Form

d = OptimalMLIDensity;          % data structure
[nD,q,C] = OptimalMLIDensity(tH,tC,d)


Inputs

tH (1,1)  Hot temperature
tC (1,1)  Cold temperature
d   (.)   Input data structure
.n      (1,1) Number of layers
.cS     (1,1) Conduction coefficient
.cR     (1,1) Radiative coefficient
.gamma  (1,1) Conduction exponent
.epsTR  (1,1) Effective emissivity

Outputs

nD  (1,:)  MLI density (layers/cm)
q   (1,:)  Heat flux (W/m^2)
C   (1,:)  Conductance (W/m^2 K)

Reference: C. W. Keller, G. R. C. Cunningham, and A. P. Glassford.

"Final Report Thermal Performance of Multilayer Insulations" Technical Report NASA CR-134477, Lockheed Missiles & Space Company, April 1974.


◆ PanelThermalModel()

function PanelThermalModel ( in  g,
in  flux 
)

Computes the temperatures of a panel from a CAD model.

It always uses the side with the largest area.


Inputs

g               (1,1)  CAD data structure
flux            (1,1)  Solar flux

Outputs

t               (:,4)  [t on sun, t standby sun, t on eclipse,
t standby eclipse]
p               (:,2)  [p on, p standby]

◆ PlanckL()

function PlanckL ( in  T,
in  lambda 
)

Planck's law for a black body.

Also computes the total flux over the range of wavelengths.

Type PlanckL for a demo.


Form

PlanckL
[q, lambda, qTotal] = PlanckL( T, lambda )


Inputs

T            (1,n) Temperature (deg-K)
lambda       (n,m) Wavelength vector (micro-meters)

Outputs

q            (n,m) Black body flux density (watts/m^2-microns)
lambda       (n,m) Wavelength vector (micro-meters)
qTotal       (n,1) Total flux (watts/m^2)

References: Thomas, L. C., Heat Transfer, Prentice-Hall, 1992, p. 265


◆ PlotThermal()

function PlotThermal ( in  q,
in  temp,
in  t,
in  g,
in  units 
)

Plots flux and temperature.


Form

PlotThermal( q, temp, t, g, units )


Inputs

q              (:,:)  Flux. Each row is a component
temp           (:,:)  Temperature. Each row is a component
t              (1,:)  Time (sec)
g              (1,1)  Spacecraft data structure
units          {2}    {'Flux units' 'Temperature units' }

Outputs

None

◆ PrandtlNikuradse()

function PrandtlNikuradse ( in  rE)

Computes the Fanning friction factor for fully developed turbulent flow.

Turbulent flow generally happens for rE > 1e4.

Type PrandtlNikuradse for a demo. This compares the explicit formula with the Prandtl/Nikuradse equation.


Form

f = PrandtlNikuradse( rE )


Inputs

rE   (1,:)  Reynold's number

Outputs

f     (1,:) Fanning friction factor

Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 471.


Referenced by PressureDropChannel().

◆ PrandtlNumber()

function PrandtlNumber ( in  mu,
in  cP,
in  k 
)

Computes the Prandtl number.

Type PrandtlNumber for a demo.


Form

pR = PrandtlNumber( mu, cP, k )


Inputs

mu    (1,:)   Viscosity (kg/m-s)
cP    (1,:)   Heat capacity (J/kg)
k     (1,:)   Conductivity (W/(m K))

Outputs

f     (1,:) Fanning friction factor

Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 471.


Referenced by HeatTransferChannel().

◆ PressureDropChannel()

function PressureDropChannel ( in  d)

Computes the channel pressure drop.

Type PressureDropChannel for a demo.


Form

dP = PressureDropChannel( d )


Inputs

d       (.)     Input data structure
.length     (1,1)   Channel length (m)
.w          (1,1)   Channel width or diameter (m)
.h          (1,1)   Channel height (m)
.u          (1,1)   Velocity (m/s)
.cP         (1,1)   Heat capacity (J/kg-K)
.gamma      (1,1)   Ratio of specific heats
.tInlet     (1,1)   Inlet temperature (deg-K)
.tOutlet    (1,1)   Outlet temperature (deg-K)
.pressure   (1,1)   Inlet pressure (ATM)
.gas        {1,2*n) {'name' fraction ...}
.tube       (1,:)   'square', 'circular', 'flat plate'

Outputs

dP     (1,1)    Pressure drop (Pa)

Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 471.


References AbsoluteViscosity(), Demo(), FrictionLaminar(), PrandtlNikuradse(), PressureDropChannel(), ReynoldsNumberKinematic(), RHS(), and RK4().

Referenced by HeatTransferChannel(), and PressureDropChannel().

◆ RadBFp()

function RadBFp ( in  epsilon,
in  T1,
in  Tn 
)

Radiation between equal area flat plates.

Since version 1.

Form

[Nb, q] = RadBFp( epsilon, T1, Tn )


Inputs

epsilon     (1,:)  Vector of emissivities
T1          (1,1)  Temperature of first surface (°K)
Tn          (1,1)  Temperature of nth surface (°K)

Outputs

Nb          (1,1)  Equivalent black plates
q           (1,1)  Heat flux

References: Van Vliet, Passive Temperature Control in the Space Environment, MacMillan, 1965, pp. 78-86.


◆ RadDa()

function RadDa ( in  T,
in  epsilon,
in  da 
)

Radiation from an incremental area.

Type RadDa for a demo.

Form

q = RadDa( T, epsilon, da )


Inputs

T              (1,:) Temperature (deg-K)
epsilon        (1,1) Emissivity
da             (1,1) incremental area (m^2)

Outputs

q              (1,:) Heat flux (watts)

References: Van Vliet, R. M., Passive Temperature Control in the Space Environment, MacMillan, 1965, p. 3.


◆ RadiationShapeFactor()

function RadiationShapeFactor ( in  w1,
in  w2,
in  l,
in  units 
)

Computes the radiation shape factor.

w1, w2 and L need to be in the same units.

TypeRadiationShapeFactors for a demo.


Form

f = RadiationShapeFactor( w1, w2, l, units )


Inputs

w1    (1,1) Plate one width
w2    (1,1) Plate two width
l     (1,:) Distance
units (1,:) Units for plot

Outputs

f   (1,:) Shape factor

◆ RadiatorCoating()

function RadiatorCoating ( in  name)

Values for radiator coatings.

'name' is not case sensitive. All values are averages.
If no input is entered it will return the available materials.

Form

[alpha, epsilon, ratio] = RadiatorCoating( name )


Inputs

name        (1,:)    Name

Outputs

alpha       (1,1)    Absorptivity
epsilon     (1,1)    Emissivity
ratio       (1,1)    alpha/epsilon

References: Van Vliet, R. M., Passive Temperature Control in the Space Environment, MacMillan, 1965, p. 121.


◆ ReynoldsNumberKinematic()

function ReynoldsNumberKinematic ( in  u,
in  d,
in  nu 
)

Computes the Reynolds number.

Turbulent flow generally happens for rE > 1e4. d is a characteristic length. It is typically diameter for pipe flow.

Type ReynoldsNumberKinematic for a demo.


Form

rE = ReynoldsNumberKinematic( u, d, nu )


Inputs

u     (1,:)   Velocity (m/s)
d     (1,:)   Characteristic length (m)
nu    (1,:)   Kinematic viscosity (m^2/s)

Outputs

rE    (1,:)   Reynolds number

Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 374.


Referenced by HeatTransferChannel(), and PressureDropChannel().

◆ RHSAerodynamicHeating()

function RHSAerodynamicHeating ( in  d)

Compute aerodynamic heating.

This is a flat plate model.

Form

qDot = RHSAerodynamicHeating( d )


Inputs

d       (1,1)   Data structure
.rho (1,1) Density (kg/m^3)
.v   (1,1) Velocity (m/s)
.s   (1,1) Surface area (m^2)
.cH  (1,1) Heat transfer coefficient

Outputs

qDot    (1,1)   Heating rate

Reference: http://worldofaerospace.googlepages.com/Calculate- Aerodynamic-Heating-Rate.htm


◆ RHSIsothermal()

function RHSIsothermal ( in  x,
in  t,
in  d 
)

Model a spacecraft as an isothermal radiator.

This model works only in Earth orbit.

  • alpha is the absorptivity (0 to 1)
  • epsilon is the emissivity (0 to )
  • m is the mass (kg)
  • cp is the specific heat
  • a_r is the radiator area
  • a_s is the surface area

Form

xDot = RHSIsothermal( x, t, d )


Inputs

x        (1,1) Temperature
t        (1,1) Time
d         (.)  Data structure
.a1    (1,1) epsilon*a_r/cp*m
.a2    (1,1) alpha*a_s/cp*m
.a3    (1,1) 1/cp*m
.p     (1,1) Internal power
.jD0   (1,1) Julian date at t = 0
.rECI  (3,1) ECI Position vector
jD       (1,n) Julian dates

Outputs

xDot     (1,1) Temperatures (deg-K)

References: Agrawal, B. ,"Design of Geosynchronous Spacecraft," Prentice-Hall, 1986, pp. 281-283


◆ SolarPanelThermal()

function SolarPanelThermal ( in  d)

Compute the front/back temperatures of a solar panel.

Asumes that the front of the panel is illuminated and the back
has not illumination. 


Type SolarPanelThermal for a demo.

Form

[tF, tB] = SolarPanelThermal( d )


Inputs

d               (1,1) Data structure
.alpha (1,1) Absorptivity
.epsF  (1,1) Front emissivity
.epsB  (1,1) Back emissivity
.etaP  (1,1) Fraction of flux to power
.k     (1,1) Front/back conductivity
.s     (1,1) Solar flux

Outputs

tF              (1,1) Front temperature
tB              (1,1) Back temperature
c               (1,1) Final cost

◆ SpaceCamera()

function SpaceCamera ( in  action,
in  modifier,
in  g,
in  jD 
)

Draw spacecraft in orbit about a planet, as seen by an in-situ camera.

An imager function can be specified, for instance optical or thermal
coloration. If no function is specified the CAD colors are used.


There are five calls you need to make when using this plugin.


(1) INITIALIZE
tag = SpaceCamera( 'initialize', d, g, jD )


d      data structure
.camera            (:)  Camera model
.position         (1,4) Position of the window
.planetName       (1,:) Planet name
.imagerFunction   (1,:) Imager function (can be handle, optional)
.name             (1,:) Name for the plugin (optional)
.scale            (1,1) Flag to scale up the spacecraft (optional)
.ambientStrength  (1,1) Default strength if not 0 (optional)
g      is the spacecraft CAD data structure. It contains the ECI orbit
position of the spacecraft. The field for orbit position
.rECI must be in kilometers. The spacecraft model must be in
meters.
jD     is the Julian date


You need to save tag to call the function in subsequent calls.


(2,3) UPDATE THE SPACECRAFT AND CAMERA

If you are updating the camera you should make these two calls in sequence:


SpaceCamera( 'update camera',     tag, camera, jD )
SpaceCamera( 'update spacecraft', tag, g, jD )


The data structure in the 'update camera' call is as follows:


camera   Camera data structure, see CameraDatabase
.position       (3,1) Position of camera (m)
.up             (3,1) Up unit vector in the camera frame
.focalLength    (1,1) Focal length
.aperture       (1,1) Aperture diameter
.rho            (1,1) Imager diameter
.rBody          (3,1) Location of camera in ECI frame, if known. (m)
.qBody          (4,1) Orientation of camera from ECI frame, if known    


(4) EXTRACT IMAGE

To extract an image type


rGB = SpaceCamera( 'get frame', tag )


(5) QUIT

To close the display type


SpaceCamera( 'quit', tag )


There are additional calls for interacting with the camera.
'get scene attitude'  Return the ECI to planet-fixed transformation
'set ambient'         Set an ambient strength for the patches
'toggle names'        Toggle the spacecraft names
'get camera'          Get the camera model
'get model'           Get the target CAD model

Form

tag = SpaceCamera( action, modifier, g, jD )


Inputs

action      (1,:)  Action
modifier    (1,:)  Modifier to the action
g           (1,1)  Spacecraft data structure
jD          (1,1)  Julian Date

Outputs

tag         (1,:)  The tag that identifies the display   
or another output

◆ SpacecraftThermal()

function SpacecraftThermal ( in  mode,
in  g,
in  e 
)

Compute the temperature in input flux for the spacecraft components.

This computes the average temperature of each component. The optical input is a flux vector with magnitude in watts. The number of points generated will equal the length of the longest transformation matrix in g or the longest member of e. If the number of points is > 1 all other members of e and transformation matrices in g must equal that number of 1.

The computations can use shadowing. To get shadowing you must enter the shadow and scanLines fields.


Form

temperature = SpacecraftThermal( mode, g, e )


Inputs

mode      ''        String: 'init' or 'run'
g         (.)       Spacecraft data structure
e         (.)       Disturbances data structure
.planet             (1,:) Will compute density and mu for various
planets
.planetRadius       (1,:) Radius of the planet (km)
.albedo             (1,1) Albedo fraction
.radiation          (1,1) Planet radiation (watts)
.s                  (3,:) Solar optical radiation flux vector (watts)
.r                  (3,:) Distance from gravity center (km)
.tSamp              (1,1) Sample time between transformation matrices in g
.shadow             (1,1) 1 for on, 0 for off
.nScanLines         (1,1) Number of scan lines for shadowing
.showScans          (1,1) 1 means show the HSRCAD scan display
.computePR          (1,1) 1 means include planetary radiation
.units              (1,:) 'm', 'in', 'ft'

Outputs

p            (:)    Output data structure
.qSun        (:) Flux from the sun
.qAlbedo     (:) Albedo flux
.qRadiation  (:) Planetary radiation flux
.qTotal      (:) Total flux
.temperature (:) Temperature

◆ TempConv()

function TempConv ( in  from,
in  to,
in  tI 
)

Converts temperatures between units.


Form

tC = TempConv( from, to ,tI )


Inputs

from       (1,1)    Units of tI ('K','R','C','F')
to         (1,1)    Units of tC ('K','R','C','F')
tI         (1,:)    Temperature (deg from)

Outputs

tC         (1,:)    Converted temperature (deg to)

◆ TempCyl()

function TempCyl ( in  alpha,
in  epsilon,
in  rOverL,
in  S,
in  n,
in  u 
)

Temperature of a cylinder.

Includes ends.


Form

T = TempCyl( alpha, epsilon, rOverL, S, n, u )


Inputs

alpha         (1,1)  Absorptivity
epsilon       (1,1)  Emissivity
rOverL        (1,1)  Ratio of radius to length
S             (1,1)  Heat flux (watts)
n             (3,1)  Unit vector of axis of symmetry
u             (3,:)  Unit vectors to flux source

Outputs

T             (1,:)  Temperature (deg-K)

◆ TempFP()

function TempFP ( in  alpha,
in  epsilon,
in  S,
in  n,
in  u 
)

Temperature of a flat plate.


Form

t = TempFP( alpha, epsilon, S, n, u )


Inputs

alpha         (1,1)  Absorptivity
epsilon       (1,1)  Emissivity
S             (1,1)  Heat flux (watts)
n             (3,1)  Outward unit vector
u             (3,:)  Unit vector to flux source

Outputs

t             (1,:)  Temperature (°K)

References: Van Vliet, R. M., Passive Temperature Control in the Space Environment, MacMillan, 1965, p. 6.


◆ TempSph()

function TempSph ( in  alpha,
in  epsilon,
in  S 
)

Temperature of a sphere.

Type TempSph for a demo.

Form

T = TempSph( alpha, epsilon, S )


Inputs

alpha         (1,1)  Absorptivity
epsilon       (1,1)  Emissivity
S             (1,1)  Heat flux (watts)

Outputs

T                    Temperature (deg-K)

References: Van Vliet, R. M., Passive Temperature Control in the Space Environment, MacMillan, 1965, p. 6.


◆ ThermalColorMap()

function ThermalColorMap ( in  temp,
in  tempMax,
in  colorMap 
)

Generates a color corresponding to a temperature.

colorMap is optional.


Type ThermalColorMap for a demo.

Form

rGB = ThermalColorMap( temp, tempMax, colorMap )


Inputs

temp           (1,n)       Temperatures
tempMax        (1,1)       Maximum temperature
colorMap       (:,3)       Color colorMap. Each row is [r b g]

Outputs

rGB            (n,3)       Colors representing the temperature.

◆ ThermalConductivity()

function ThermalConductivity ( in  gas,
in  t 
)

Computes the thermal conductivity.

Thermal conductivity of gases. Extrapolates beyond the range of data. The data may not be valid for any t since the substance may not be a gas or a molecule may dissociate at the input temperature.

Type ThermalConductivity for a demo for Xenon.


Form

mu = ThermalConductivity( gas, t )


Inputs

gas   (1,:)   Gas
t     (1,:)   Temperature (deg-K)

Outputs

k    (1,:)   Thermal conductivity (mW/m-K)

Reference: https://www.engineersedge.com/heat_transfer/ thermal-conductivity-gases.htm Heat Transfer, Lindon C. Thomas, Prentice-Hall, 1992


Referenced by HeatTransferChannel().

◆ ThermalEquilibrium()

function ThermalEquilibrium ( in  d,
in  q,
in  t,
in  nIts,
in  epsilon 
)

This function computes the thermal equilibrium for a system.

with conductive and radiative heat exchange.


lT^4 + kT = bq


Contains Built-in Demo which evalutates two nodes connected by a 
conductor.

Form

[t, err] = ThermalEquilibrium( d, q, t, nIts, epsilon )


Inputs

d           (:)   System matrices data structure
.k   linear term
.l   quadratic term
.b   input matrix
q           (:)   Input fluxes
t           (:)   Node temperatures
nIts        (1,1) Number of iterations
epsilon     (1,1) Error

Outputs

t           (:)   Node temperatures
err         (:)   Node temperature error

◆ ThermalImager()

function ThermalImager ( in  action,
in  g,
in  d 
)

Color a spacecraft or planet corresponding to a temperature.


Form

h     = ThermalImager( action, g, d )  becomes
h     = ThermalImager( 'initialize', h, d )
color = ThermalImager( 'spacecraft', g, d )
hSurf = ThermalImager( 'planet', g, d )


Inputs

action  (1,:)   Action string
g       (.)     Data structure
d       (.)     Data structure

Outputs

h       (:)     Varies depending on action.

◆ Thermnet()

function Thermnet ( in  mn,
in  cnm,
in  cc,
in  inm,
in  onm,
in  rnm,
in  rc,
in  tnom 
)

Creates a set of first order differential equations to model.

a thermal circuit. Inputs are the nodal masses,
a conductive node map, a radiative
node map, an input node map and an output node map. The output
is a set of first order differential equations in the form
.
T = aT + bq
y = cT


where T is the nodal temperature, q is the thermal input
and y is the vector of measurements.


A node map has one row for each node and as many columns as
are necessary to specify the connections.
Each node map is accompanied by a coefficient map that gives
either the conductive or radiative heat transfer coefficents
for the node pair. Radiative heat transfer is of the form:


4     4
q   = a(T   - T  )
ij      i     j 


Thermnet linearizes about the nominal temperature. The result
is


3       3
q   = a(T  T  - T  T )
ij      ni i    nj j


where the n indicates a nominal temperature. The radiative heat
transfer coefficient causes an asymmetry between nodes.


Thermnet will automatically make the a matrix symmetric for 
conduction. Thermnet will warn you if you entered a coefficient 
twice and the two were different. You only have to specify the 
connection in one direction.


If you want a node to conduct or radiate to infinity just
input "inf" as the node to which it is radiating or conducting.

Form

[a, b, c, ac, ar] = Thermnet( mn, cnm, cc, inm, onm, rnm, rc, tnom )


Inputs

mn          (1,n)    Thermal mass of each node
cnm         (n,:)    Conduction node map
cc          (n,:)    Conduction coefficients
inm         (m,:)    Input node map (nodes with inputs)
onm         (p,1)    Output node map (nodes with outputs)
rnm         (n,:)    Radiation node map
rc          (n,:)    Radiation coefficients
tnom        (1,n)    Nominal temperature for linearization

Outputs

a           (n,n)    Plant matrix
b           (n,m)    Input matrix
c           (p,n)    Output matrix
ac          (n,n)    Conduction part of the plant matrix
ar          (n,n)    Radiative (quartic) coefficient matrix

◆ WiensDsp()

function WiensDsp ( in  T)

Computes the peak black body wavelength as a function of temperature.

This function has a built-in demo.

Form

lambda = WiensDsp( T )

- ----------------------------------------------------------------------—

Inputs

T            (1,:) Temperatures (deg-K)

Outputs

lambda       (1,:) Wavelength vector (µmeters)

References: Thomas, L. C., Heat Transfer, Prentice-Hall, 1992, p. 266