Compare commits
2 Commits
2b37163a8a
...
f14e2c8d8e
| Author | SHA1 | Date | |
|---|---|---|---|
| f14e2c8d8e | |||
| 7e34b9aa71 |
17
reactor.html
17
reactor.html
@@ -102,6 +102,19 @@
|
||||
} else {
|
||||
$(".PFR").show();
|
||||
}
|
||||
|
||||
const updateDx = () => {
|
||||
const length = parseFloat($("#node-input-length").val()) || 0;
|
||||
const resolution = parseFloat($("#node-input-resolution_L").val()) || 1;
|
||||
const dx = resolution > 0 ? (length / resolution).toFixed(6) : "N/A";
|
||||
$("#dx-output").text(dx + " m");
|
||||
};
|
||||
|
||||
// Set up event listeners for real-time updates
|
||||
$("#node-input-length, #node-input-resolution_L").on("change keyup", updateDx);
|
||||
|
||||
// Initial calculation
|
||||
updateDx();
|
||||
},
|
||||
oneditsave: function() {
|
||||
// save logger fields
|
||||
@@ -144,6 +157,10 @@
|
||||
<label for="node-input-resolution_L"><i class="fa fa-tag"></i> Resolution</label>
|
||||
<input type="text" id="node-input-resolution_L" placeholder="#">
|
||||
</div>
|
||||
<div class="form-row PFR">
|
||||
<label for="node-input-dx"><i class="fa fa-tag"></i> dx (length / resolution) [m]</label>
|
||||
<span id="dx-output" style="display: inline-block; padding: 8px; font-weight: bold; color: #333;">--</span>
|
||||
</div>
|
||||
<h3> Internal mass transfer calculation (optional) </h3>
|
||||
<div class="form-row">
|
||||
<label for="node-input-kla"><i class="fa fa-tag"></i> kLa [d-1]</label>
|
||||
|
||||
@@ -7,17 +7,7 @@ const ASM_CONSTANTS = {
|
||||
NUM_SPECIES: 13
|
||||
};
|
||||
|
||||
/**
|
||||
* ASM3 class for the Activated Sludge Model No. 3 (ASM3). Using Koch et al. 2000 parameters.
|
||||
*/
|
||||
class ASM3 {
|
||||
|
||||
constructor() {
|
||||
/**
|
||||
* Kinetic parameters for ASM3 at 20 C. Using Koch et al. 2000 parameters.
|
||||
* @property {Object} kin_params - Kinetic parameters
|
||||
*/
|
||||
this.kin_params = {
|
||||
const KINETIC_CONSTANTS = {
|
||||
// Hydrolysis
|
||||
k_H: 9., // hydrolysis rate constant [g X_S g-1 X_H d-1]
|
||||
K_X: 1., // hydrolysis saturation constant [g X_S g-1 X_H]
|
||||
@@ -42,13 +32,9 @@ class ASM3 {
|
||||
K_A_HCO: 0.5, // saturation constant S_HCO [mole HCO3 m-3]
|
||||
b_A_O: 0.20, // aerobic respiration rate [d-1]
|
||||
b_A_NO: 0.10 // anoxic respiration rate [d-1]
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Stoichiometric and composition parameters for ASM3. Using Koch et al. 2000 parameters.
|
||||
* @property {Object} stoi_params - Stoichiometric parameters
|
||||
*/
|
||||
this.stoi_params = {
|
||||
const STOICHIOMETRIC_CONSTANTS = {
|
||||
// Fractions
|
||||
f_SI: 0., // fraction S_I from hydrolysis [g S_I g-1 X_S]
|
||||
f_XI: 0.2, // fraction X_I from decomp X_H [g X_I g-1 X_H]
|
||||
@@ -75,7 +61,25 @@ class ASM3 {
|
||||
// Composition (charge)
|
||||
i_cNH: 1/14, // charge per S_NH [mole H+ g-1 NH3-N]
|
||||
i_cNO: -1/14 // charge per S_NO [mole H+ g-1 NO3-N]
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ASM3 class for the Activated Sludge Model No. 3 (ASM3). Using Koch et al. 2000 parameters.
|
||||
*/
|
||||
class ASM3 {
|
||||
|
||||
constructor() {
|
||||
/**
|
||||
* Kinetic parameters for ASM3 at 20 C. Using Koch et al. 2000 parameters.
|
||||
* @property {Object} kin_params - Kinetic parameters
|
||||
*/
|
||||
this.kin_params = KINETIC_CONSTANTS;
|
||||
|
||||
/**
|
||||
* Stoichiometric and composition parameters for ASM3. Using Koch et al. 2000 parameters.
|
||||
* @property {Object} stoi_params - Stoichiometric parameters
|
||||
*/
|
||||
this.stoi_params = STOICHIOMETRIC_CONSTANTS;
|
||||
|
||||
/**
|
||||
* Temperature theta parameters for ASM3. Using Koch et al. 2000 parameters.
|
||||
@@ -215,4 +219,4 @@ class ASM3 {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { ASM3, ASM_CONSTANTS };
|
||||
module.exports = { ASM3, ASM_CONSTANTS, KINETIC_CONSTANTS, STOICHIOMETRIC_CONSTANTS };
|
||||
@@ -7,17 +7,7 @@ const ASM_CONSTANTS = {
|
||||
NUM_SPECIES: 13
|
||||
};
|
||||
|
||||
/**
|
||||
* ASM3 class for the Activated Sludge Model No. 3 (ASM3).
|
||||
*/
|
||||
class ASM3 {
|
||||
|
||||
constructor() {
|
||||
/**
|
||||
* Kinetic parameters for ASM3 at 20 C.
|
||||
* @property {Object} kin_params - Kinetic parameters
|
||||
*/
|
||||
this.kin_params = {
|
||||
const KINETIC_CONSTANTS = {
|
||||
// Hydrolysis
|
||||
k_H: 3., // hydrolysis rate constant [g X_S g-1 X_H d-1]
|
||||
K_X: 1., // hydrolysis saturation constant [g X_S g-1 X_H]
|
||||
@@ -42,13 +32,9 @@ class ASM3 {
|
||||
K_A_HCO: 0.5, // saturation constant S_HCO [mole HCO3 m-3]
|
||||
b_A_O: 0.15, // aerobic respiration rate [d-1]
|
||||
b_A_NO: 0.05 // anoxic respiration rate [d-1]
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Stoichiometric and composition parameters for ASM3.
|
||||
* @property {Object} stoi_params - Stoichiometric parameters
|
||||
*/
|
||||
this.stoi_params = {
|
||||
const STOICHIOMETRIC_CONSTANTS = {
|
||||
// Fractions
|
||||
f_SI: 0., // fraction S_I from hydrolysis [g S_I g-1 X_S]
|
||||
f_XI: 0.2, // fraction X_I from decomp X_H [g X_I g-1 X_H]
|
||||
@@ -75,7 +61,25 @@ class ASM3 {
|
||||
// Composition (charge)
|
||||
i_cNH: 1/14, // charge per S_NH [mole H+ g-1 NH3-N]
|
||||
i_cNO: -1/14 // charge per S_NO [mole H+ g-1 NO3-N]
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ASM3 class for the Activated Sludge Model No. 3 (ASM3).
|
||||
*/
|
||||
class ASM3 {
|
||||
|
||||
constructor() {
|
||||
/**
|
||||
* Kinetic parameters for ASM3 at 20 C.
|
||||
* @property {Object} kin_params - Kinetic parameters
|
||||
*/
|
||||
this.kin_params = KINETIC_CONSTANTS;
|
||||
|
||||
/**
|
||||
* Stoichiometric and composition parameters for ASM3.
|
||||
* @property {Object} stoi_params - Stoichiometric parameters
|
||||
*/
|
||||
this.stoi_params = STOICHIOMETRIC_CONSTANTS;
|
||||
|
||||
/**
|
||||
* Temperature theta parameters for ASM3.
|
||||
@@ -215,4 +219,4 @@ class ASM3 {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { ASM3, ASM_CONSTANTS };
|
||||
module.exports = { ASM3, ASM_CONSTANTS, KINETIC_CONSTANTS, STOICHIOMETRIC_CONSTANTS };
|
||||
Reference in New Issue
Block a user