In this project you will calculate the heating and cooling loads for a typical r
ID: 3758526 • Letter: I
Question
In this project you will calculate the heating and cooling loads for a typical residence. The wintertime heating load is all of the heat that flows out of the building when the outside temperature is nearly its coldest and when there is no free heat provided by sunshine or internal lights or appliances. The coldest time is typically in the middle of January. The summertime cooling load is all of the heat that flows into the building when the outside temperature is nearly its hottest, the outside humidity is high, there are no clouds to block the sun, and the building is occupied with normal lighting and appliance usage. The hottest time is usually about 3:00 PM in the middle of July.
Assume that four design parameters are constant: The winter indoor design temperature is 72 degrees Fahrenheit, the summer indoor design temperature is 76 degrees Fahrenheit, the summer indoor design humidity ratio is 0.01 lbs of water vapor per pound of dry air, and the sunshine coming in through west windows at the design time is 193 BTU/hr/ft^2.(This is the value for 40 deg North Latitude at 3:00 PM on July 21.) The remaining design parameters are user inputs: total roof area, building perimeter, building height, total area of windows and doors, total area of west-facing windows, roof U-value, wall U-value, window and door U-value, winter outdoor design temperature, summer outdoor design temperature, summer outdoor humidity ratio, infiltration rate in cubic feet per minute (CFM), number of people present, and electricity in use. (1): Consider doors to be additional windows. The outputs of the program are total heating BTU/hr total cooling BTU/hr, and the cooling load expressed in the nearest whole number of “tons,” where one ton = 12,000 BTU/hr9. (2)
The heating-load components are as follows:
roof load area * roof U-value * winter temperature difference window load area * window U-value * winter temperature difference wall load net area * wall U-value * winter temperature difference infiltration load CFM * 1.08 * winter temperature difference
where:
winter temperature difference
winter indoor design temperature – winter outdoor design temperature
net wall area building perimeter * building height – window area
To provide a factor of safety and to accelerate morning warm up, multiply the total of all of the above heating-load components by a factor of 1.3.
The cooling-load components are as follows:
Sensible Cooling:
roof load area * roof U-value * summer temperature difference window load area * window U-value * summer temperature difference
(1): U-value is a measure of heat flow. The lower the U-value, the more slowly the material transfers heat in and out of your home.
(2): BTU = British Thermal Unit = amount of heat required to raise one pound of water by one degree Fahrenheit (degrees fahrenheit).
wall load net area * wall U-value * summer temperature difference infiltration temperature load CFM * 1.08 * summer temperature difference
solar load west solar heat gain * west window area electrical load 3.416 * Watts
people temperature load 250 * number of people
Latent Cooling:
infiltration humidity load CFM * 4675 * summer humidity difference
people humidity load 200 * number of people
where:
summer temperature difference
summer outdoor design temperature –
summer indoor design temperature
summer humidity difference
summer outdoor humidity ratio – summer indoor humidity ratio
To provide a factor of safety, multiply the total of all of the above cooling-load components by a factor of 1.1.
Make your program so that what appears on your computer screen matches the following sample session. The first 14 lines are prompts and input values, with input values in italics. The last 3 lines are outputs of the calculated results.
Sample session:
HVAC Load Calculation:
Enter total roof area in square ft: 1500
Enter building perimeter in ft: 140
Enter building height in ft: 18
Enter total window area in square ft: 400
Enter west window area in square ft: 80
Enter roof U-value: .04
Enter wall U-value: .10
Enter window U-value: .5
Enter winter outdoor temperature in deg F: 2.0
Enter summer outdoor temperature in deg F: 100
Enter summer outdoor humidity ratio: .013
Enter infiltration in CFM: 200
Enter number of people present: 3
Enter electrical use in Watts: 1500
Heating Load = 62608.0 BTU per hour
Cooling Load = 45354.1 BTU per hour or approximately 4 tons
Organize the project in accordance with this UML class diagram:
-roofArea: double = 1500.0
-perimeter: double = 140.0
-height: double = 18.0
-windowArea: double = 400.0
-westWindowArea: double = 80.0
-roofU: double = 0.04
-wallU: double = 0.10
-windowU: double = 0.5
-winterOutdoorTemperature: double = 2.0
-summerOutdoorTemperature: double = 100.
-summerOutdoorHumidity: double = 0.013
-infiltration: double = 200
-people: double = 3
-electrical: double = 1500
+getInputs() : void
+findHeatingLoad() : double
+findCoolingLoad() : double
+findCoolingSensibleLoad() : double
+printCapacities(heating : double, cooling : double) : void
-findCoolingLatentLoad() : double
-netWallArea() : double
The main program instantiates an HVACLoad object named load.
Then it asks it to getInputs, findHeatingLoad, findCoolingLoad, and printCapacities.
The getInputs method prompts for and inputs values for each of the instance variables.
The findHeatingLoad method uses local variables for the assumed winter indoor temperature, winter temperature difference, and winter heating load. It returns the winter heating load in BTUH.
The findCoolingLoad method uses a local variable for the summer cooling load, which accumulates values returned by findCoolingSensibleLoad and findCoolingLatentLoad. (These two load components are separated and the method for sensible cooling is public because cooling sensible load is needed independently for air-quantity calculations, which might be included in a future enhancement of this program.) The findCoolingLoad method returns the summer heating load in BTUH.
The findCoolingSensibleLoad method uses local variables for assumed summer indoor temperature, west solar gain, summer temperature difference, and sensible cooling load. It returns the summer sensible load in BTUH.
The findCoolingLatentLoad method uses local variables for the assumed summer indoor humidity ratio, the summer humidity difference, and the latent cooling load. It returns the summer latent load in BTUH.
The printCapacities method uses a local variable for tons. It multiplies the input heating load by the 1.3 warm-up factor and the input cooling load by the 1.1 safety factor, and computestons. Then it prints the results.
The netWallArea calculation is in a separate method because it might be changed later to a fancier algorithm, and it used by two other methods, findHeatingLoad and findCoolingSensibleLoad.
HVACLoadDriver +main(args : String[]) : voidExplanation / Answer
package heatcoolloads;
import java.util.Scanner;
public class HeatCoolLoads {
static double wnITemp = 72; // winterIndoorTemp = 72;
static double smITemp = 76; //summerIndoorTemp = 76;
static double hum = 0.01; // summerIndoorHumidity = 0.01 lbs per pound of dry air
static double sun = 193; // sunshine coming through the west window 193 BTU/hr/sq feet
// user inputs now,
static double tra, bperi, ht, windArea, westWindArea, doorArea, roofLd, windLd, wallLd, infltLd ; // total roof area, building perimeter, height, area of windows, west windows and doors
static double roofU, wallU, windowU, doorU;
static double wnOTemp, smOTemp, smOHum, inFiltR;
static double nP, elec; // num Of People = nP, elec = eletricity in use
// output variables
static double totHeat, totCoolong, coolingLoad;
static void winter() {
System.out.println("Sun = " + sun);
} // end function winter
static void summer() {
System.out.println("Sun = " + sun);
} // end function summer
static void calcHeatLoad() {
Scanner ip = new Scanner(System.in);
System.out.println(" HVAC Load Calculation: ");
System.out.println("Enter winter outdoor temperature in deg F:");
wnOTemp = ip.nextDouble();
System.out.println("Enter total roof area in square ft: ");
tra = ip.nextDouble();
System.out.println("Enter building perimeter in ft:");
bperi = ip.nextDouble();
System.out.println(" Enter building height in ft: ");
ht = ip.nextDouble();
System.out.println(" Enter total window area in square ft: ");
windArea = ip.nextDouble();
System.out.println(" Enter west window area in square ft: ");
double westWindArea = ip.nextDouble();
doorArea = ip.nextDouble();
System.out.println("Enter roof U-value: ");
roofU = ip.nextDouble();
System.out.println(" Enter wall U-value: ");
wallU = ip.nextDouble();
System.out.println(" ");
windowU = ip.nextDouble();
System.out.println(" ");
doorU = ip.nextDouble();
System.out.println("Enter summer outdoor temperature in deg F:");
smOTemp = ip.nextDouble();
System.out.println("Enter summer outdoor humidity ratio: ");
smOHum = ip.nextDouble();
System.out.println(" Enter infiltration in CFM: ");
inFiltR = ip.nextDouble();
System.out.println("Enter number of people present:");
double numOfPpl = ip.nextDouble();
System.out.println("Enter electrical use in Watts: ");
double watts = ip.nextDouble();
double wintTD = wnITemp - wnOTemp;
double smTD = smITemp - smOTemp;
double wallArea = bperi * ht - windArea;
roofLd = tra * roofU * wintTD * 1.3 ;
windLd = windArea * windowU * wintTD * 1.3 ;
wallLd = wallArea * wallU * wintTD * 1.3 ;
infltLd = inFiltR * 1.08 * wintTD * 1.3 ;
System.out.println(" Winter: Roof Load = " + roofLd + " Windows Load = " + windLd + " Wall Load = " + wallLd + " Infiltration Load = " + infltLd + "CFM");
roofLd = tra * roofU * smTD * 1.1 ;
windLd = windArea * windowU * smTD * 1.1 ;
wallLd = wallArea * wallU * smTD * 1.1 ;
infltLd = inFiltR * 1.08 * smTD * 1.1 ;
System.out.println(" Summer: Roof Load = " + roofLd + " Windows Load = " + windLd + " Wall Load = " + wallLd + " Infiltration Load = " + infltLd + "CFM");
System.out.println("Sun = " + sun);
} // end func heatload
static void coolingLoad() {
System.out.println("Sun = " + sun);
} // end func coolng load
public static void main(String[] args) {
System.out.println("Heating Cooling loads of residence buildings");
System.out.println("Sun = " + sun);
winter(); summer(); calcHeatLoad(); coolingLoad();
}
}
run:
Heating Cooling loads of residence buildings
Sun = 193.0
Sun = 193.0
Sun = 193.0
23
1
12
34
454
67.6534
34
34.54
34
34
23
13
556
Roof Load = 2165.8 Windows Load = 983273.2000000001 Wall Load = -101209.108 Infiltration Load = 38250.576CFM
Sun = 193.0
Sun = 193.0
BUILD SUCCESSFUL (total time: 24 seconds)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.