PSS Thermal Module
MATLAB toolboxes for aerospace analysis
|
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... | |
The Thermal module functions. View the published Thermal Demos.
function AbsDa | ( | in | alpha, |
in | dA, | ||
in | S | ||
) |
Absorbed radiation from an incremental area.
Type AbsDa for a demo.
q = AbsDa( alpha, dA, S )
alpha (1,1) Absorptivity dA (1,1) Incremental area S (1,:) Heat flux
q (1,:) Absorbed heat flux (watts)
References: Van Vliet, R. M., Passive Temperature Control in the Space Environment, MacMillan, 1965, p. 4.
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.
mu = AbsoluteViscosity( gas, t )
gas (1,:) Gas t (1,:) Temperature (deg-K)
mu (1,:) Absolute viscosity (Pa s)
Reference: https://www.engineeringtoolbox.com/ gases-absolute-dynamic-viscosity-d_1888.html
Referenced by HeatTransferChannel(), and PressureDropChannel().
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.
AeroHeatFlux qDot = AeroHeatFlux( f, sigma )
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'
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.
function BlckBody | ( | ) |
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.
[eff, mDot, t] = BraytonIdeal( gamma, pR, cP, t3, qR )
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)
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.
function BTUToJoule | ( | in | bTU | ) |
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
DrawThermalPlugIn( action, modifier )
action (1,:) Action modifier (1,:) Modifier to the action
tag (1,:) The tag that identifies the display
See also: ThermalCube, ThermalColorMap
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.
nB = EmittanceParallelPlates( e )
e (1,:) Plate emittances
nB (1,1) Number of black plates
References: Van Vliet, R. M., Passive Temperature Control in the Space Environment, MacMillan, 1965, pp. 78-86
function FrictionLaminar | ( | in | rE, |
in | type | ||
) |
Computes the laminar friction.
Turbulent flow generally happens for rE > 1e4.
Type FrictionLaminar for a demo. T
f = FrictionLaminar( rE, type )
rE (1,:) Reynold's number type (1,:) 'square', 'circular'
f (1,:) Friction factor
Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 465-466.
Referenced by PressureDropChannel().
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.
y = FSolarPanelThermal( x, d )
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
y (1,1) Cost
function GrayBody | ( | in | alphaOrEpsilon | ) |
Aborptivity and emissivity of a gray body.
[alpha, epsilon] = GrayBody( alphaOrEpsilon )
alphaOrEpsilon (1,:) Either alpha or epsilon
alpha (1,:) Absorptivity epsilon (1,:) Emissivity
References: Van Vliet, R. M., Passive Temperature Control in the
Space Environment, MacMillan, 1965, p. 5.
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.
[d, l] = HeatExchanger( d )
d (.) Input data structure .q W .tInlet K .tOutlet K .mach .pressure ATM .cP .gamma .molWt
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
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.
d = HeatExchangerWithLosses; [tB,tS4,q4] = HeatExchangerWithLosses( d, doPlot )
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
tB (1,:) Gas temperature (deg-K) tS4 (1,:) Wall temperature (deg-K) q4 (1,:) Radiative heat flux (W/m^2)
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.
[t1, t2] = HeatFP( q2, alpha2, e2, e1, k, fC, tau )
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
t1 (1,1) Temperature of face 1 t2 (1,1) Temperature of face 2
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.
[alpha, epsilon, ratio] = HeatShieldCoating( name )
name (1,:) Name
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.
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.
[d, l] = HeatTransferChannel( d )
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
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().
function HeatTransferCoeff | ( | in | nU, |
in | k, | ||
in | d | ||
) |
Computes the Heat transfer coefficient.
Type HeatTransferCoeff for a demo.
h = HeatTransferCoeff( nU, k, d )
nU (1,:) Nusselt number k (1,:) Conductivity (W/m deg-K) d (1,:) Diameter (m)
h (1,:) Heat transfer coefficient (W/m^2 deg-K)
Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 477.
Referenced by HeatTransferChannel().
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.
t = Isothermal( el, center, d, jD )
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
t (1,n) Temperatures (deg-K)
References: Agrawal, B. ,"Design of Geosynchronous Spacecraft," Prentice-Hall, 1986, pp. 281-283
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.
tempDot = IsothermalHelio( qECIToBody, nEclipse, mass, heat, temp, d )
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)
tempDot (1,1) Temperature derivative (deg-K/s)
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.
IsolthermalLunar; t = Isothermal( el, d, jD )
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
t (1,n) Temperature (deg-K)
function JouleToBTU | ( | in | j | ) |
function KinematicViscosity | ( | in | mu, |
in | rho | ||
) |
function LambertL | ( | in | theta, |
in | E | ||
) |
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.
fN = NusseltDeveloping( rE, pR )
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.
fN (1,:) Factor multiplying the Nusselt number
Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 471.
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.
nU = NusseltLaminar( g, type )
g (1,:) x/D/(RePr) type (1,:) hfd or tfd hfd - hydrodynamic fully developed flow (default) tfd - thermal fully developed flow
nU (1,:) Nusselt number
Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 470.
Referenced by HeatTransferChannel().
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.
nU = NusseltTurbulent( rE, pR )
rE (1,:) Reynolds number pR (1,:) Prandtl number
nU (1,:) Nusselt number
Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 471.
Referenced by HeatTransferChannel().
function OptimalMLIDensity | ( | in | tH, |
in | tC, | ||
in | d | ||
) |
Determine optimal Multi-layer Insulation (MLI) density.
Type OptimalMLIDensity for a demo
d = OptimalMLIDensity; % data structure [nD,q,C] = OptimalMLIDensity(tH,tC,d)
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
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.
function PanelThermalModel | ( | in | g, |
in | flux | ||
) |
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.
PlanckL [q, lambda, qTotal] = PlanckL( T, lambda )
T (1,n) Temperature (deg-K) lambda (n,m) Wavelength vector (micro-meters)
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
function PlotThermal | ( | in | q, |
in | temp, | ||
in | t, | ||
in | g, | ||
in | units | ||
) |
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.
f = PrandtlNikuradse( rE )
rE (1,:) Reynold's number
f (1,:) Fanning friction factor
Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 471.
Referenced by PressureDropChannel().
function PrandtlNumber | ( | in | mu, |
in | cP, | ||
in | k | ||
) |
Computes the Prandtl number.
Type PrandtlNumber for a demo.
pR = PrandtlNumber( mu, cP, k )
mu (1,:) Viscosity (kg/m-s) cP (1,:) Heat capacity (J/kg) k (1,:) Conductivity (W/(m K))
f (1,:) Fanning friction factor
Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 471.
Referenced by HeatTransferChannel().
function PressureDropChannel | ( | in | d | ) |
Computes the channel pressure drop.
Type PressureDropChannel for a demo.
dP = PressureDropChannel( d )
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'
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().
function RadBFp | ( | in | epsilon, |
in | T1, | ||
in | Tn | ||
) |
Radiation between equal area flat plates.
Since version 1.
[Nb, q] = RadBFp( epsilon, T1, Tn )
epsilon (1,:) Vector of emissivities T1 (1,1) Temperature of first surface (°K) Tn (1,1) Temperature of nth surface (°K)
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.
function RadDa | ( | in | T, |
in | epsilon, | ||
in | da | ||
) |
Radiation from an incremental area.
Type RadDa for a demo.
q = RadDa( T, epsilon, da )
T (1,:) Temperature (deg-K) epsilon (1,1) Emissivity da (1,1) incremental area (m^2)
q (1,:) Heat flux (watts)
References: Van Vliet, R. M., Passive Temperature Control in the Space Environment, MacMillan, 1965, p. 3.
function RadiationShapeFactor | ( | in | w1, |
in | w2, | ||
in | l, | ||
in | units | ||
) |
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.
[alpha, epsilon, ratio] = RadiatorCoating( name )
name (1,:) Name
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.
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.
rE = ReynoldsNumberKinematic( u, d, nu )
u (1,:) Velocity (m/s) d (1,:) Characteristic length (m) nu (1,:) Kinematic viscosity (m^2/s)
rE (1,:) Reynolds number
Reference: L. C. Thomas, "Heat Transfer," Prentice-Hall, 1992, p. 374.
Referenced by HeatTransferChannel(), and PressureDropChannel().
function RHSAerodynamicHeating | ( | in | d | ) |
Compute aerodynamic heating.
This is a flat plate model.
qDot = RHSAerodynamicHeating( d )
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
qDot (1,1) Heating rate
Reference: http://worldofaerospace.googlepages.com/Calculate- Aerodynamic-Heating-Rate.htm
function RHSIsothermal | ( | in | x, |
in | t, | ||
in | d | ||
) |
Model a spacecraft as an isothermal radiator.
This model works only in Earth orbit.
xDot = RHSIsothermal( x, t, d )
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
xDot (1,1) Temperatures (deg-K)
References: Agrawal, B. ,"Design of Geosynchronous Spacecraft," Prentice-Hall, 1986, pp. 281-283
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.
[tF, tB] = SolarPanelThermal( d )
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
tF (1,1) Front temperature tB (1,1) Back temperature c (1,1) Final cost
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
tag = SpaceCamera( action, modifier, g, jD )
action (1,:) Action modifier (1,:) Modifier to the action g (1,1) Spacecraft data structure jD (1,1) Julian Date
tag (1,:) The tag that identifies the display or another output
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.
temperature = SpacecraftThermal( mode, g, e )
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'
p (:) Output data structure .qSun (:) Flux from the sun .qAlbedo (:) Albedo flux .qRadiation (:) Planetary radiation flux .qTotal (:) Total flux .temperature (:) Temperature
function TempConv | ( | in | from, |
in | to, | ||
in | tI | ||
) |
function TempCyl | ( | in | alpha, |
in | epsilon, | ||
in | rOverL, | ||
in | S, | ||
in | n, | ||
in | u | ||
) |
Temperature of a cylinder.
Includes ends.
T = TempCyl( alpha, epsilon, rOverL, S, n, u )
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
T (1,:) Temperature (deg-K)
function TempFP | ( | in | alpha, |
in | epsilon, | ||
in | S, | ||
in | n, | ||
in | u | ||
) |
Temperature of a flat plate.
t = TempFP( alpha, epsilon, S, n, u )
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
t (1,:) Temperature (°K)
References: Van Vliet, R. M., Passive Temperature Control in the Space Environment, MacMillan, 1965, p. 6.
function TempSph | ( | in | alpha, |
in | epsilon, | ||
in | S | ||
) |
Temperature of a sphere.
Type TempSph for a demo.
T = TempSph( alpha, epsilon, S )
alpha (1,1) Absorptivity epsilon (1,1) Emissivity S (1,1) Heat flux (watts)
T Temperature (deg-K)
References: Van Vliet, R. M., Passive Temperature Control in the Space Environment, MacMillan, 1965, p. 6.
function ThermalColorMap | ( | in | temp, |
in | tempMax, | ||
in | colorMap | ||
) |
Generates a color corresponding to a temperature.
colorMap is optional. Type ThermalColorMap for a demo.
rGB = ThermalColorMap( temp, tempMax, colorMap )
temp (1,n) Temperatures tempMax (1,1) Maximum temperature colorMap (:,3) Color colorMap. Each row is [r b g]
rGB (n,3) Colors representing the temperature.
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.
mu = ThermalConductivity( gas, t )
gas (1,:) Gas t (1,:) Temperature (deg-K)
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().
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.
[t, err] = ThermalEquilibrium( d, q, t, nIts, epsilon )
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
t (:) Node temperatures err (:) Node temperature error
function ThermalImager | ( | in | action, |
in | g, | ||
in | d | ||
) |
Color a spacecraft or planet corresponding to a temperature.
h = ThermalImager( action, g, d ) becomes h = ThermalImager( 'initialize', h, d ) color = ThermalImager( 'spacecraft', g, d ) hSurf = ThermalImager( 'planet', g, d )
action (1,:) Action string g (.) Data structure d (.) Data structure
h (:) Varies depending on action.
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.
[a, b, c, ac, ar] = Thermnet( mn, cnm, cc, inm, onm, rnm, rc, tnom )
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
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
function WiensDsp | ( | in | T | ) |
Computes the peak black body wavelength as a function of temperature.
This function has a built-in demo.
lambda = WiensDsp( T )
T (1,:) Temperatures (deg-K)
lambda (1,:) Wavelength vector (µmeters)
References: Thomas, L. C., Heat Transfer, Prentice-Hall, 1992, p. 266