-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f61e561
commit 4d0973f
Showing
9 changed files
with
264 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
import Floor from "./Floor"; | ||
import cities from "./cities"; | ||
import internalHeatCapacities from "./internalHeatСapacities"; | ||
import purposes from "./pursoses"; | ||
|
||
export default class Building { | ||
constructor(inputData) { | ||
this.city = inputData.city; // Місто | ||
this.purpose = inputData.purpose; // Функційне призначення | ||
this.class = inputData.class; // Клас теплоємності | ||
this.floors = inputData.floors.map((floor) => new Floor(floor)); | ||
} | ||
|
||
// Кондиціонована площа | ||
A_f() { | ||
let allFloorArea = 0; | ||
this.floors.forEach((floor) => { | ||
allFloorArea += floor.totalArea(); | ||
}); | ||
return allFloorArea; | ||
} | ||
|
||
// Температура середовища | ||
phi_e(month) { | ||
return cities.find((city) => city.name === this.city).weather.phi_e[ | ||
month.index | ||
]; | ||
} | ||
|
||
// Внутрішня температура | ||
phi_int_set() { | ||
return purposes[this.purpose].phi_int_set; | ||
} | ||
|
||
// Енергопотреба | ||
Q_nd(month) { | ||
return this.Q_ht(month) - this.eta_gn(month) * this.Q_gn(month); | ||
} | ||
|
||
// Тепловтрати | ||
Q_ht(month) { | ||
return this.Q_tr(month) + this.Q_ve(month); | ||
} | ||
|
||
// Тепловтрати трансміссією | ||
Q_tr(month) { | ||
return ( | ||
this.H_tr_adj() * (this.phi_int_set() - this.phi_e(month)) * month.hours | ||
); | ||
} | ||
|
||
H_tr_adj() { | ||
return 2851.80144357191; // ПРИБИТО ГВОЗДЯМИ | ||
} | ||
|
||
// Тепловтрати вентиляцією | ||
Q_ve(month) { | ||
return ( | ||
this.H_ve_adj() * (this.phi_int_set() - this.phi_e(month)) * month.hours | ||
); | ||
} | ||
|
||
H_ve_adj() { | ||
return 2208.19636375854; // ПРИБИТО ГВОЗДЯМИ | ||
} | ||
|
||
// Теплонадходження | ||
Q_gn(month) { | ||
return this.Q_int(month) + this.Q_sol(month); | ||
} | ||
|
||
// Внутрішні теплонадходження | ||
Q_int(month) { | ||
return ( | ||
(this.N() / 168) * | ||
(this.Phi_int_Oc() + this.Phi_int_L() + this.Phi_int_A()) * | ||
this.A_f() * | ||
month.hours | ||
); | ||
} | ||
|
||
// Графік використання | ||
N() { | ||
return purposes[this.purpose].N; | ||
} | ||
|
||
// Тепловий потік від людей | ||
Phi_int_Oc() { | ||
return purposes[this.purpose].Phi_int_Oc; | ||
} | ||
|
||
// Тепловий потік від освітлення | ||
Phi_int_L() { | ||
return purposes[this.purpose].Phi_int_L; | ||
} | ||
|
||
// Тепловий потік від обладнання | ||
Phi_int_A() { | ||
return purposes[this.purpose].Phi_int_A; | ||
} | ||
|
||
// Сонячні теплонадходження | ||
Q_sol(month) { | ||
const data = [ | ||
5513398.57, 9207368.88, 14154325.33, 15299064.73, 19556223.74, | ||
19737772.63, 20173383.52, 18522636.55, 14991362.05, 10586494.33, | ||
5236609.01, 4377815.51, | ||
]; // ПРИБИТО ГВОЗДЯМИ | ||
return data[month.index]; | ||
} | ||
|
||
// Коефіцієнт використання надходжень | ||
eta_gn(month) { | ||
if (this.lambda(month) > 0 && this.lambda(month) !== 1) { | ||
return ( | ||
(1 - this.lambda(month) ** this.alpha()) / | ||
(1 - this.lambda(month) ** (this.alpha() + 1)) | ||
); | ||
} else if (this.lambda(month) === 1) { | ||
return this.alpha() / (this.alpha() + 1); | ||
} else if (this.lambda(month) < 0 && this.Q_gn(month) > 0) { | ||
return 1 / this.lambda(month); | ||
} else if (this.lambda(month) <= 0 && this.Q_gn(month) <= 0) { | ||
return 1; | ||
} else { | ||
return 0; | ||
} | ||
} | ||
|
||
// Внутрішня теплоємність | ||
C_m() { | ||
return ( | ||
internalHeatCapacities.find((capacite) => capacite.class === this.class) | ||
.C * this.A_f() | ||
); | ||
} | ||
|
||
// Безрозмірне співвідношення надходжень і втрат теплоти | ||
lambda(month) { | ||
return this.Q_gn(month) / this.Q_ht(month); | ||
} | ||
|
||
// Часова константа | ||
tau() { | ||
return this.C_m() / (this.H_tr_adj() + this.H_ve_adj()); | ||
} | ||
|
||
// Безрозмірний числовий параметр, що залежить від часової константи | ||
alpha() { | ||
return 1 + this.tau() / 15; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default class Facade { | ||
constructor() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import Facade from "./Facade"; | ||
|
||
export default class Floor { | ||
constructor(inputData) { | ||
this.area = inputData.area; | ||
this.quantity = inputData.quantity; | ||
this.height = inputData.height; | ||
this.facades = inputData.facades.map((facade) => new Facade(facade)); | ||
} | ||
|
||
totalArea() { | ||
return this.area * this.quantity; | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const cities = [ | ||
{ | ||
name: "Kharkiv", | ||
weather: { | ||
phi_e: [-4.7, -3.8, 1.1, 9.6, 16, 19.6, 21.6, 20.7, 15.4, 8.6, 2.2, -2.5], | ||
}, | ||
}, | ||
]; | ||
export default cities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const internalHeatCapacities = [ | ||
{ | ||
class: "Середній", | ||
C: 50, | ||
detalisation: | ||
"Будівлі великопанельні, великоблокові, з цегляними стінами товщиною в одну цеглу, із залізобетонними чи деревʼяними перекриттями", | ||
}, | ||
]; | ||
|
||
export default internalHeatCapacities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const months = [ | ||
{ index: 0, name: "Січень", days: 31, hours: 744 }, | ||
{ index: 1, name: "Лютий", days: 28, hours: 672 }, | ||
{ index: 2, name: "Березень", days: 31, hours: 744 }, | ||
{ index: 3, name: "Квітень", days: 30, hours: 720 }, | ||
{ index: 4, name: "Травень", days: 31, hours: 744 }, | ||
{ index: 5, name: "Червень", days: 30, hours: 720 }, | ||
{ index: 6, name: "Липень", days: 31, hours: 744 }, | ||
{ index: 7, name: "Серпень", days: 31, hours: 744 }, | ||
{ index: 8, name: "Вересень", days: 30, hours: 720 }, | ||
{ index: 9, name: "Жовтень", days: 31, hours: 744 }, | ||
{ index: 10, name: "Листопад", days: 30, hours: 720 }, | ||
{ index: 11, name: "Грудень", days: 31, hours: 744 }, | ||
]; | ||
export default months; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const purposes = { | ||
"Багатоквартирні будинки": { | ||
phi_int_set: 20, | ||
N: 112, | ||
Phi_int_Oc: 1.8, | ||
Phi_int_L: 2, | ||
Phi_int_A: 2, | ||
}, | ||
}; | ||
export default purposes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
"use client"; | ||
|
||
import Building from "../model/Building"; | ||
import months from "../model/months"; | ||
import styles from "../page.module.css"; | ||
|
||
export default function Test() { | ||
const inputData = { | ||
city: "Kharkiv", | ||
purpose: "Багатоквартирні будинки", | ||
class: "Середній", | ||
floors: [ | ||
{ | ||
area: 648.77, | ||
quantity: 1, | ||
height: 3, | ||
facades: [], | ||
}, | ||
{ | ||
area: 635.4, | ||
quantity: 1, | ||
height: 3, | ||
facades: [], | ||
}, | ||
{ | ||
area: 651.19, | ||
quantity: 3, | ||
height: 9, | ||
facades: [], | ||
}, | ||
{ | ||
area: 655.38, | ||
quantity: 4, | ||
height: 11.7, | ||
facades: [], | ||
}, | ||
], | ||
}; | ||
const building = new Building(inputData); | ||
console.log(building); | ||
return ( | ||
<main className={styles.main}> | ||
{months.map((month) => ( | ||
<p key={month.name}> | ||
<span>{month.name} </span> | ||
{building.Q_nd(month).toFixed(2)} | ||
</p> | ||
))} | ||
</main> | ||
); | ||
} |