Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions internal/calc/calc_level_01.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ func (c *CalcLevel1) Run() {
c.Q_int = c.calcQInt()
}

// calcACRefEstim calculates A_C_Ref_Estim
// Estimated by use of conversion factors
// Unit: m²
// Formula: IF(A_C_IntDim>0, A_C_IntDim, IF(A_C_ExtDim>0, 0.85*A_C_ExtDim, IF(A_C_Living>0, 1.1*A_C_Living, IF(A_C_Use>0, 1.4*A_C_Use, 0.85/3*V_C))))
Expand All @@ -110,7 +109,6 @@ func (c *CalcLevel1) calcACRefEstim() float64 {
}
}

// calcPRoof calculates p_Roof
// Unit: m²/m²
// Formula: IF(OR($Code_AtticCond="C",$Code_AtticCond="PI",$Code_AtticCond="NI"),1.6,IF($Code_AtticCond="P",0.8,IF($Code_AtticCond="-",1.2,0)))
func (c *CalcLevel1) calcPRoof() float64 {
Expand All @@ -125,7 +123,6 @@ func (c *CalcLevel1) calcPRoof() float64 {
return 0
}

// calcQRoof calculates q_Roof
// Unit: m²
// Formula: IF(OR($Code_AtticCond="C",$Code_AtticCond="PI",$Code_AtticCond="NI"),15,IF($Code_AtticCond="P",7,IF($Code_AtticCond="-",5,0)))
func (c *CalcLevel1) calcQRoof() float64 {
Expand All @@ -140,7 +137,6 @@ func (c *CalcLevel1) calcQRoof() float64 {
return 0
}

// calcPCeiling calculates p_Ceiling
// Unit: m²/m²
// Formula: IF(OR($Code_AtticCond="C",$Code_AtticCond="PI",$Code_AtticCond="NI"),0,IF($Code_AtticCond="P",0.6,IF($Code_AtticCond="-",0,1.2)))
func (c *CalcLevel1) calcPCeiling() float64 {
Expand All @@ -155,7 +151,6 @@ func (c *CalcLevel1) calcPCeiling() float64 {
return 1.2
}

// calcQCeiling calculates q_Ceiling
// Unit: m²
// Formula: IF(OR($Code_AtticCond="C",$Code_AtticCond="PI",$Code_AtticCond="NI"),0,IF($Code_AtticCond="P",3,IF($Code_AtticCond="-",0,5)))
func (c *CalcLevel1) calcQCeiling() float64 {
Expand All @@ -170,7 +165,6 @@ func (c *CalcLevel1) calcQCeiling() float64 {
return 5
}

// calcFAtticCond calculates f_AtticCond
// Formula: IF(LEFT($Code_AtticCond,1)="C",1,IF(LEFT($Code_AtticCond,1)="P",0.5,0))
func (c *CalcLevel1) calcFAtticCond() float64 {
code := c.Lvl0.BasicParameters.BuildingAppearance.Code_AtticCond
Expand All @@ -185,7 +179,6 @@ func (c *CalcLevel1) calcFAtticCond() float64 {
return 0
}

// calcFCellarCond calculates f_CellarCond
// Formula: IF(LEFT($Code_CellarCond,1)="C",1,IF(LEFT($Code_CellarCond,1)="P",0.5,0))
func (c *CalcLevel1) calcFCellarCond() float64 {
code := c.Lvl0.BasicParameters.BuildingAppearance.Code_CellarCond
Expand All @@ -200,7 +193,6 @@ func (c *CalcLevel1) calcFCellarCond() float64 {
return 0
}

// calcFComplexRoof calculates f_ComplexRoof
// Formula: IF(Code_ComplexRoof="Simple",0.9,IF(Code_ComplexRoof="Complex",1.3,1))
func (c *CalcLevel1) calcFComplexRoof() float64 {
code := c.Lvl0.BasicParameters.BuildingAppearance.Code_ComplexRoof
Expand All @@ -212,7 +204,6 @@ func (c *CalcLevel1) calcFComplexRoof() float64 {
return 1
}

// calcFComplexFootprint calculates f_ComplexFootprint
// Formula: IF(Code_ComplexFootprint="Simple",0.9,IF(Code_ComplexFootprint="Complex",1.2,1))
func (c *CalcLevel1) calcFComplexFootprint() float64 {
code := c.Lvl0.BasicParameters.BuildingAppearance.Code_ComplexFootprint
Expand All @@ -224,7 +215,6 @@ func (c *CalcLevel1) calcFComplexFootprint() float64 {
return 1
}

// calcCodeEstimConstructionBorderWallToCellarOrSoil calculates Code_Estim_ConstructionBorder_Wall_ToCellarOrSoil
// wall bordering at soil or unheated cellar
// Formula: IF($Code_CellarCond="P","Unh","Soil")
func (c *CalcLevel1) calcCodeEstimConstructionBorderWallToCellarOrSoil() string {
Expand All @@ -234,7 +224,6 @@ func (c *CalcLevel1) calcCodeEstimConstructionBorderWallToCellarOrSoil() string
return "Soil"
}

// calcCodeEstimConstructionBorderFloor calculates Code_Estim_ConstructionBorder_Floor
// floor above cellar or soil
// Formula: IF($Code_CellarCond="-","Soil","Cellar")
func (c *CalcLevel1) calcCodeEstimConstructionBorderFloor() string {
Expand All @@ -244,8 +233,6 @@ func (c *CalcLevel1) calcCodeEstimConstructionBorderFloor() string {
return "Cellar"
}

// calcAExactEnvSum calculates A_Exact_Env_Sum
// Calculates the sum of various building element areas
// Unit: m²
// Formula: SUM(A_Roof_1:A_Door_1)
func (c *CalcLevel1) calcAExactEnvSum() float64 {
Expand All @@ -262,8 +249,6 @@ func (c *CalcLevel1) calcAExactEnvSum() float64 {
envelope.A_Door_1
}

// calcACalcWindow2 calculates A_Calc_Window_2
// element type window 2
// Unit: m²
// Formula: IF($Code_TypeIntake_EnvelopeArea="Estimation",0,A_Window_2)
func (c *CalcLevel1) calcACalcWindow2() float64 {
Expand All @@ -273,7 +258,6 @@ func (c *CalcLevel1) calcACalcWindow2() float64 {
return c.Lvl0.BasicParameters.Envelope.A_Window_2
}

// calcACalcWindowHorizontal calculates A_Calc_Window_Horizontal
// tilted below 30°, otherwise classified as vertical
// Unit: m²
// Formula: IF($Code_TypeIntake_EnvelopeArea="Estimation",0,A_Window_Horizontal)
Expand All @@ -284,7 +268,6 @@ func (c *CalcLevel1) calcACalcWindowHorizontal() float64 {
return c.Lvl0.BasicParameters.Envelope.A_Window_Horizontal
}

// calcACalcWindowSouth calculates A_Calc_Window_South
// deviation from orientation: +/- 45°
// Unit: m²
// Formula: IF($Code_TypeIntake_EnvelopeArea="Estimation",0,A_Window_South)
Expand All @@ -295,7 +278,6 @@ func (c *CalcLevel1) calcACalcWindowSouth() float64 {
return c.Lvl0.BasicParameters.Envelope.A_Window_South
}

// calcACalcWindowNorth calculates A_Calc_Window_North
// deviation from orientation: +/- 45°
// Unit: m²
// Formula: IF($Code_TypeIntake_EnvelopeArea="Estimation",0,A_Window_North)
Expand All @@ -306,8 +288,6 @@ func (c *CalcLevel1) calcACalcWindowNorth() float64 {
return c.Lvl0.BasicParameters.Envelope.A_Window_North
}

// calcDInsulationMeasureRoof1 calculates d_Insulation_Measure_Roof_1
// Element type roof 1
// Unit: m
// Formula: IF(d_Insulation_Input_Measure_Roof_1<>0, d_Insulation_Input_Measure_Roof_1, d_Insulation_PredefinedMeasure_Roof_1)
func (c *CalcLevel1) calcDInsulationMeasureRoof1() float64 {
Expand All @@ -317,8 +297,6 @@ func (c *CalcLevel1) calcDInsulationMeasureRoof1() float64 {
return c.Lvl0.AdvancedParameters.InsulationMeasures.D_Insulation_PredefinedMeasure_Roof_1
}

// calcDInsulationMeasureRoof2 calculates d_Insulation_Measure_Roof_2
// Element type roof 2
// Unit: m
// Formula: IF(d_Insulation_Input_Measure_Roof_2<>0, d_Insulation_Input_Measure_Roof_2, d_Insulation_PredefinedMeasure_Roof_2)
func (c *CalcLevel1) calcDInsulationMeasureRoof2() float64 {
Expand All @@ -328,8 +306,6 @@ func (c *CalcLevel1) calcDInsulationMeasureRoof2() float64 {
return c.Lvl0.AdvancedParameters.InsulationMeasures.D_Insulation_PredefinedMeasure_Roof_2
}

// calcDInsulationMeasureWall1 calculates d_Insulation_Measure_Wall_1
// Element type wall 1
// Unit: m
// Formula: IF(d_Insulation_Input_Measure_Wall_1<>0, d_Insulation_Input_Measure_Wall_1, d_Insulation_PredefinedMeasure_Wall_1)
func (c *CalcLevel1) calcDInsulationMeasureWall1() float64 {
Expand All @@ -339,8 +315,6 @@ func (c *CalcLevel1) calcDInsulationMeasureWall1() float64 {
return c.Lvl0.AdvancedParameters.InsulationMeasures.D_Insulation_PredefinedMeasure_Wall_1
}

// calcDInsulationMeasureWall2 calculates d_Insulation_Measure_Wall_2
// Element type wall 2
// Unit: m
// Formula: IF(d_Insulation_Input_Measure_Wall_2<>0, d_Insulation_Input_Measure_Wall_2, d_Insulation_PredefinedMeasure_Wall_2)
func (c *CalcLevel1) calcDInsulationMeasureWall2() float64 {
Expand All @@ -350,8 +324,6 @@ func (c *CalcLevel1) calcDInsulationMeasureWall2() float64 {
return c.Lvl0.AdvancedParameters.InsulationMeasures.D_Insulation_PredefinedMeasure_Wall_2
}

// calcDInsulationMeasureWall3 calculates d_Insulation_Measure_Wall_3
// Element type wall 3
// Unit: m
// Formula: IF(d_Insulation_Input_Measure_Wall_3<>0, d_Insulation_Input_Measure_Wall_3, d_Insulation_PredefinedMeasure_Wall_3)
func (c *CalcLevel1) calcDInsulationMeasureWall3() float64 {
Expand All @@ -361,8 +333,6 @@ func (c *CalcLevel1) calcDInsulationMeasureWall3() float64 {
return c.Lvl0.AdvancedParameters.InsulationMeasures.D_Insulation_PredefinedMeasure_Wall_3
}

// calcDInsulationMeasureFloor1 calculates d_Insulation_Measure_Floor_1
// Element type floor 1
// Unit: m
// Formula: IF(d_Insulation_Input_Measure_Floor_1<>0, d_Insulation_Input_Measure_Floor_1, d_Insulation_PredefinedMeasure_Floor_1)
func (c *CalcLevel1) calcDInsulationMeasureFloor1() float64 {
Expand All @@ -372,8 +342,6 @@ func (c *CalcLevel1) calcDInsulationMeasureFloor1() float64 {
return c.Lvl0.AdvancedParameters.InsulationMeasures.D_Insulation_PredefinedMeasure_Floor_1
}

// calcDInsulationMeasureFloor2 calculates d_Insulation_Measure_Floor_2
// Element type floor 2
// Unit: m
// Formula: IF(d_Insulation_Input_Measure_Floor_2<>0, d_Insulation_Input_Measure_Floor_2, d_Insulation_PredefinedMeasure_Floor_2)
func (c *CalcLevel1) calcDInsulationMeasureFloor2() float64 {
Expand All @@ -383,48 +351,34 @@ func (c *CalcLevel1) calcDInsulationMeasureFloor2() float64 {
return c.Lvl0.AdvancedParameters.InsulationMeasures.D_Insulation_PredefinedMeasure_Floor_2
}

// calcRMeasureWindow1 calculates R_Measure_Window_1
// Element type window 1
// Unit: m²*K/W
// Formula: R_PredefinedMeasure_Window_1
func (c *CalcLevel1) calcRMeasureWindow1() float64 {
return c.Lvl0.AdvancedParameters.ThermalResistances.R_PredefinedMeasure_Window_1
}

// calcRMeasureWindow2 calculates R_Measure_Window_2
// Element type window 2
// Unit: m²*K/W
// Formula: R_PredefinedMeasure_Window_2
func (c *CalcLevel1) calcRMeasureWindow2() float64 {
return c.Lvl0.AdvancedParameters.ThermalResistances.R_PredefinedMeasure_Window_2
}

// calcRMeasureDoor1 calculates R_Measure_Door_1
// Element type door 1
// Unit: m²*K/W
// Formula: R_PredefinedMeasure_Door_1
func (c *CalcLevel1) calcRMeasureDoor1() float64 {
return c.Lvl0.AdvancedParameters.ThermalResistances.R_PredefinedMeasure_Door_1
}

// calcGGlNMeasureWindow1 calculates g_gl_n_Measure_Window_1
// Element type window 1
// Unit: m²*K/W
// Formula: g_gl_n_PredefinedMeasure_Window_1
func (c *CalcLevel1) calcGGlNMeasureWindow1() float64 {
return c.Lvl0.AdvancedParameters.SolarTransmittance.G_gl_n_PredefinedMeasure_Window_1
}

// calcGGlNMeasureWindow2 calculates g_gl_n_Measure_Window_2
// Element type window 2
// Unit: m²*K/W
// Formula: g_gl_n_PredefinedMeasure_Window_2
func (c *CalcLevel1) calcGGlNMeasureWindow2() float64 {
return c.Lvl0.AdvancedParameters.SolarTransmittance.G_gl_n_PredefinedMeasure_Window_2
}

// calcRBeforeWindow1 calculates R_Before_Window_1
// Element type window 1
// Unit: m²*K/W
// Formula: IFERROR(IF(ISNUMBER(U_Window_1), 1/U_Window_1, 0), 0)
func (c *CalcLevel1) calcRBeforeWindow1() float64 {
Expand All @@ -435,8 +389,6 @@ func (c *CalcLevel1) calcRBeforeWindow1() float64 {
return 0
}

// calcRBeforeWindow2 calculates R_Before_Window_2
// Element type window 2
// Unit: m²*K/W
// Formula: IFERROR(IF(ISNUMBER(U_Window_2), 1/U_Window_2, 0), 0)
func (c *CalcLevel1) calcRBeforeWindow2() float64 {
Expand All @@ -447,8 +399,6 @@ func (c *CalcLevel1) calcRBeforeWindow2() float64 {
return 0
}

// calcRBeforeDoor1 calculates R_Before_Door_1
// Element type door 1
// Unit: m²*K/W
// Formula: IFERROR(IF(ISNUMBER(U_Door_1), 1/U_Door_1, 0), 0)
func (c *CalcLevel1) calcRBeforeDoor1() float64 {
Expand All @@ -459,21 +409,18 @@ func (c *CalcLevel1) calcRBeforeDoor1() float64 {
return 0
}

// calcHVentilation calculates h_Ventilation
// Unit: W/(m²*K)
// Formula: 0.34*(n_air_use + n_air_infiltration)*h_room
func (c *CalcLevel1) calcHVentilation() float64 {
return 0.34 * (c.Lvl0.AdvancedParameters.AirInfiltration.N_air_use + c.Lvl0.AdvancedParameters.AirInfiltration.N_air_infiltration) * c.Lvl0.BasicParameters.BuildingAppearance.H_room
}

// calcSumDeltaTForHeatingDays calculates Sum_DeltaT_for_HeatingDays
// Unit: kKh/a
// Formula: (theta_i - Theta_e) * HeatingDays
func (c *CalcLevel1) calcSumDeltaTForHeatingDays() float64 {
return (c.Lvl0.AdvancedParameters.ClimateConditions.Theta_i - c.Lvl0.AdvancedParameters.ClimateConditions.Theta_e) * float64(c.Lvl0.AdvancedParameters.ClimateConditions.HeatingDays)
}

// calcQInt calculates q_int
// Unit: kWh/(m²*a)
// Formula: phi_int * 0.024 * HeatingDays
func (c *CalcLevel1) calcQInt() float64 {
Expand Down
Loading
Loading