Variable Volume Tank by M. Arny 1982 This subroutine models a vertical cylindrical tank, which contains a variable quantity of liquid, using analytically solved differential equations. The level of the liquid in the tank is allowed to vary between user specified high and low level limits. When the high level limit is exceeded additional flow into the tank is dumped and the level indicator is set equal to +1. When the liquid level falls below the low level limit, further flow out of the tank ceases and the tank level indicator is set equal to -1. Since the flow rates into and out of the tank are not necessarily the same, both flowrates are specified as tank model inputs. INPUTS 4 1 Inlet Temperature 2 Inlet Mass Flowrate 3 Outlet Mass Flowrate 4 Ambient Temperature PARAMETERS 11 1 Tank Volume 2 Tank Diameter 3 Wetted Tank Wall - U Valve 4 Dry Tank Wall - U Valve 5 Minimum Liquid Volume in Tank 6 Maximum Liquid Volume in Tank 7 Specific Heat of Liquid 8 Density of Liquid 9 Reference Temperature (usually mains water temperature) 10 Initial Temperature of Liquid in Tank 11 Initial Mass of Liquid in Tank OUTPUTS 17 1 Outlet Temperature 2 Outlet Mass Flowrate 3 Mass Flowrate of Liquid Added to Tank (dM inlet - dM dump) 4 Q Dumped (tank overflow) 5 Q Loss by Conduction 6 Change in Internal Energy in Tank from Initial Conditions 7 Tank Level: +1 for liquid volume >= max. volume 0 for min. volume <= liquid volume <= max. volume -1 for liquid volume <= min. volume 8 Tank Temperature at beginning of Timestep 9 Mass in tank at beginning of timestep 10 Tank temperature at end of timestep 11 Mass in tank at end of timestep 12 ------ 13 ------ 14 Q in - Energy added to Tank by Flow In 15 Q out - Energy removed from Tank by Flow Out 16 Energy Stored in Tank 17 Change in Mass in Tank from Initial Conditions REF: Arny, M.D. "Thermal Analysis for the Design of an Industrial Process Water Heating System Utilizing Waste Heat Recovery and Solar Energy" Masters' Thesis, University of Wisconsin-Madison 1982