Compare commits
2 Commits
2b37163a8a
...
f14e2c8d8e
| Author | SHA1 | Date | |
|---|---|---|---|
| f14e2c8d8e | |||
| 7e34b9aa71 |
17
reactor.html
17
reactor.html
@@ -102,6 +102,19 @@
|
|||||||
} else {
|
} else {
|
||||||
$(".PFR").show();
|
$(".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() {
|
oneditsave: function() {
|
||||||
// save logger fields
|
// save logger fields
|
||||||
@@ -144,6 +157,10 @@
|
|||||||
<label for="node-input-resolution_L"><i class="fa fa-tag"></i> Resolution</label>
|
<label for="node-input-resolution_L"><i class="fa fa-tag"></i> Resolution</label>
|
||||||
<input type="text" id="node-input-resolution_L" placeholder="#">
|
<input type="text" id="node-input-resolution_L" placeholder="#">
|
||||||
</div>
|
</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>
|
<h3> Internal mass transfer calculation (optional) </h3>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="node-input-kla"><i class="fa fa-tag"></i> kLa [d-1]</label>
|
<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
|
NUM_SPECIES: 13
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
const KINETIC_CONSTANTS = {
|
||||||
* 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 = {
|
|
||||||
// Hydrolysis
|
// Hydrolysis
|
||||||
k_H: 9., // hydrolysis rate constant [g X_S g-1 X_H d-1]
|
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]
|
K_X: 1., // hydrolysis saturation constant [g X_S g-1 X_H]
|
||||||
@@ -44,11 +34,7 @@ class ASM3 {
|
|||||||
b_A_NO: 0.10 // anoxic respiration rate [d-1]
|
b_A_NO: 0.10 // anoxic respiration rate [d-1]
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
const STOICHIOMETRIC_CONSTANTS = {
|
||||||
* Stoichiometric and composition parameters for ASM3. Using Koch et al. 2000 parameters.
|
|
||||||
* @property {Object} stoi_params - Stoichiometric parameters
|
|
||||||
*/
|
|
||||||
this.stoi_params = {
|
|
||||||
// Fractions
|
// Fractions
|
||||||
f_SI: 0., // fraction S_I from hydrolysis [g S_I g-1 X_S]
|
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]
|
f_XI: 0.2, // fraction X_I from decomp X_H [g X_I g-1 X_H]
|
||||||
@@ -77,6 +63,24 @@ class ASM3 {
|
|||||||
i_cNO: -1/14 // charge per S_NO [mole H+ g-1 NO3-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.
|
* Temperature theta parameters for ASM3. Using Koch et al. 2000 parameters.
|
||||||
* These parameters are used to adjust reaction rates based on temperature.
|
* These parameters are used to adjust reaction rates based on temperature.
|
||||||
@@ -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
|
NUM_SPECIES: 13
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
const KINETIC_CONSTANTS = {
|
||||||
* 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 = {
|
|
||||||
// Hydrolysis
|
// Hydrolysis
|
||||||
k_H: 3., // hydrolysis rate constant [g X_S g-1 X_H d-1]
|
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]
|
K_X: 1., // hydrolysis saturation constant [g X_S g-1 X_H]
|
||||||
@@ -44,11 +34,7 @@ class ASM3 {
|
|||||||
b_A_NO: 0.05 // anoxic respiration rate [d-1]
|
b_A_NO: 0.05 // anoxic respiration rate [d-1]
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
const STOICHIOMETRIC_CONSTANTS = {
|
||||||
* Stoichiometric and composition parameters for ASM3.
|
|
||||||
* @property {Object} stoi_params - Stoichiometric parameters
|
|
||||||
*/
|
|
||||||
this.stoi_params = {
|
|
||||||
// Fractions
|
// Fractions
|
||||||
f_SI: 0., // fraction S_I from hydrolysis [g S_I g-1 X_S]
|
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]
|
f_XI: 0.2, // fraction X_I from decomp X_H [g X_I g-1 X_H]
|
||||||
@@ -77,6 +63,24 @@ class ASM3 {
|
|||||||
i_cNO: -1/14 // charge per S_NO [mole H+ g-1 NO3-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.
|
* Temperature theta parameters for ASM3.
|
||||||
* These parameters are used to adjust reaction rates based on temperature.
|
* These parameters are used to adjust reaction rates based on temperature.
|
||||||
@@ -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