April 1999
==========

file		subroutine	description
----		----------	-----------
airpr.F		AIRDEN		FUNCTION to evaluate density as function of temp.
		AIRBET		FUNCTION to evaluate thermal expansion coefficient
				as function of temperature.

bsim2cfd.F	BS2CFDSB	Maps bps surface temperatures and convection
				coefficients to dfs solid boundaries. Used when
				there is bps-dfs thermal conflation.
		TREFBC		Calculate the reference temperature for surface
				convection when CFD models surface convection with
				a convection coefficient. Used when there is
				bps-dfs thermal conflation.
		BS2CFDBLK	Maps BSim thermal conditions onto CFD blockages.
				Used when there is bps-dfs thermal conflation.

bndaryl.F	BNDARL		Imposes BCs when flow is laminar. Separate entry
				points for U, W, W, and T.
                                                     
bndaryt.F	BNDART		Imposes BCs when flow is turbulent. Separate entry
				points for U, W, W, P-prime, T, k, and epsilon.
				Also has entry for imposing blockages.

bndldum.F	BNDARL		Not currently in use: delete from archive.

cfcalc.F	CFCALC		Controlling routine for CFD iterations. Iterates
				until solution converged. Calls subs to set up and
				solve active variables each iteration. Displays
				progress of solution and residuals.
		INIT		Initializes solution variables prior to iteration.
		PROPS		Calculates eddy viscosity, density, thermal
				expansion coefficient, and energy diffusion
				coefficient following each iteration.
		CALCU		Calculates coefficients for U-momentum eqn. Calls
				sub (BNDARL or BNDART) to impose BCs. Calls solver
				to update U solution.
		CALCV		Same as CALCU but for V-momentum.
		CALCW		Same as CALCU but for W-momentum.
		CALCP		Similar to CALCU but deals with continuity eqn and
				solves for P-prime.
		CALCT		Similar to CALCU but deals with energy eqn and
				solves for T.
		CALCTE		Similar to CALCU but deals with turbulent kinetic
				energy eqn and solves for k.
		CALCED		Similar to CALCU but deals with dissipation of
				turbulent kinetic energy eqn and solves for
				epsilon.
		INDBND		Sets U, V, W to 0 at solid boundaries and sets
				P at air-flow openings. Called only once, prior
				to iteration.
		INOUT		Sets T, U, V, W, k, epsilon at air-flow openings
				following each iteration.
		RECRES		Modifies residuals of solution variable if pressure
				fixed in a cell.

cfconv.F	CFAREA		Calculates area of west, south, etc surfaces.
		CFCONV		Calculates surface convection coefficients based
				on CFD solution.

cfdat.F		CFDDTA		Reads contents of .dfd file.
		INICNT		Sets constant fluid properties and turbulence
				constants. Calculates number of cells in domain.
		IGETCN		Returns air-flow network connection number when
				passed name specified in .dfd file.
		IGETND		Returns air-flow node number when passed name
				specified in .dfd file.
		IDSURF		Returns number of building surface when passed
				name specified in .dfd file.

cfdfin.F	CFDFIN		Manages files at end of dfs-only simulation.

cfdumb.F	BLBNDR		Dummy version of BLBNDR for dfs (ie. CFD only).
		CFMZBK		Dummy version of CFMZBK for dfs (ie. CFD only).

cfdumm.F	MFBNDR		Dummy version of MFBNDR for dfs (ie. CFD only).

cfgrid.F	GRID		Establishes mesh boundaries and geometrical
				quantifies.

cfmatl.F	PRNMAT		Writes results to matlab formatted file.
		STRFUN		Evaluates stream function. Only used when creating
				matlab files.

cfmgerb.F	CFMNGE		Controls CFD calculations for bps-dfs conflated
				simulations. Called each bps time step CFD active.
				Invokes CFCALC. Controls conflation. Controls
				dynamic flow visualization.
		DFSPER		Prompts user (from bps) for period during which
				CFD active. Only used when bps-dfs conflated.
		SURFCONF	Calls CFMNGE each time step there is surface conflation.

cfmgerc.F	CFMNGE		Controls CFD calculations for dfs (ie. CFD only).
				Invokes CFCALC. Controls creation of output
				(matlab, photon, text, flow visualization).

cftext.F	PRNTXT		Writes results to text file. Only used by dfs
				(ie. CFD-only).

cfutil.F	PRNPHI		Writes results to photon formatted file.
		REAPRN		Reads and writes solution variables (U, V, T, etc)
				to binary file each bps time step. Separate
				entry points for reading and writing.

cgd.F		cgd		Displays CFD gridding in prj.

chkconvg.F	CHECK		Prompts user whether on not to continue iteration
				if solution has not converged within specified
				limits.

dfs.F		PROGRAM DFS	Main program for dfs (ie. CFD only). Provides
				user interface for dfs.
		wirepk		Dummy routine for wireframe control
		cpwpk		Copywrite notice
		cfgpk		Dummy routines for c code active descriptions
				buttons.
		chgazi		Dummy routine.
		chgelev		Dummy routine.

dfsdummy.F	DFSPER		Dummy version of DFSPER for bld.
		MZMRX5		Dummy version of MZMRX5 for bld.
		CFDDTA		Dummy version of CFDDTA for bld.
		CFMNGE		Dummy version of CFMNGE for bld.
		SURFCONF	Dummy version of CFMNGE for bld.

lisolv_1.F	LISOLV		Initial equation solver. Sweeps forward in y and z
				directions. Not currently used.

lisolv_2.F	LISOLV		Second generation equation solver. Sweeps forward and backward in
				x and z directions. Not currently used.

lisolv_3.F	LISOLV		Current equation solver. Sweeps forward and backward in
				x, y, and z directions.

mfbndr.F	MFBNDR		Determines air-flow BCs for CFD based on bps'
				air-flow network solution. Invokes MFSOLV to
				solve bps' air-flow network. Only used when there
				is bps-dfs air-flow conflation.

mzmrx5.F	MZMRX5		Controls bps' solver's matrix handling when there
				is bps-dfs type 2 thermal conflation.
		MZCMS5		Reduces coefficients of surface node equations to
				end of forward reduction stage. Only used when
				there is bps-dfs type 2 thermal conflation.
		CFMZBK          Determines internal surface temperatures using
				bps' back substitution procedure. Used to update
				surface temperature BCs passed to CFD each 10
				solution sweeps. Only used when there is bps-dfs
				type 2 thermal conflation.

plot.F		PLOT		Tracks progress of solution by plotting residuals
				and monitoring variables as function of iteration.
		EXPSTR		Real-string conversion utility used by PLOT.

startup.F	scesprc		Standard subs for set-up and command-line parsing.
		ESCDEF		Standard subs for set-up and command-line parsing.
		parpsf		Standard subs for set-up and command-line parsing.
		parsim		Standard subs for set-up and command-line parsing.
		parres		Standard subs for set-up and command-line parsing.
		parsfza		Standard subs for set-up and command-line parsing.
		parsfz		Standard subs for set-up and command-line parsing.
		partf		Standard subs for set-up and command-line parsing.
		parspza		Standard subs for set-up and command-line parsing.

visual.F	FTV		Control generation of flow visualization images.
		VECTOR		Calculates velocity vectors at `P' grid points, for
				use in flow visualization.
		GETVEC		Reads in CFD flow vector file, for use in flow
				visualization.
		SETGEO		Sets the geometry for the CFD domain, for use in
				flow visualization.
		SETRES		Sets resolultion for flow visualization image.
		POLY		Makes the flow vectors into polygons, for use in
				flow visualization.
		PbyP		Iterates through each flow vector to determine
				which mesh points it covers, for use in flow
				visualization.
		MAKBIT		Creates X-bitmap file of flow visualization.
		TRNSF1		Translates and rotates the site co-ordinate system
				to a local face co-ordinate system, for use in
				flow visualization.
		TRNSF2		Translates and rotates a flow vector from site
				co-ordinates to local co-ordinates of site under
				consideration, for use in flow visualization.
		MESH		Places a mesh on the surface under consideration.
				Used for point containment tests performed as part
				of flow visualization.
		PANGS		Determines orientation of surface, for use in flow
				visualization.
		POINT2		Decides if a specified point is within or outwith
				an arrow polygon, for use in flow visualization.
		rdFVP		Reads contents of flow-visualization parameters
				file, for use in dynamic flow visualization.
