-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOWS_size_calc.js
More file actions
28 lines (24 loc) · 869 Bytes
/
OWS_size_calc.js
File metadata and controls
28 lines (24 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// OWS_size_calc.js
// Calculates the required capacity of the oil-water separator (filter)
const {
rainfallIntensityLpsm2,
catchmentAreaM2,
rainDurationMinutes,
runoffCoefficient,
} = require('./inputData');
/**
* Calculate the required filter (OWS) flow rate in liters per second.
* @returns {number} Required flow rate in L/s
*/
function calculateRequiredOWSFlowRate() {
const rainfallVolumeL =
rainfallIntensityLpsm2 * catchmentAreaM2 * 60 * rainDurationMinutes * runoffCoefficient;
const requiredFlowRateLps = rainfallVolumeL / (rainDurationMinutes * 60);
return requiredFlowRateLps;
}
module.exports = { calculateRequiredOWSFlowRate };
/*
console.log('=== OWS Required Flow Rate Calculation ===');
const requiredOWSFlowRate = calculateRequiredOWSFlowRate();
console.log(`Required OWS flow rate: ${requiredOWSFlowRate.toFixed(2)} L/s`);
*/