Reformat asm constants

This commit is contained in:
2025-11-13 16:52:38 +01:00
parent 7e34b9aa71
commit f14e2c8d8e
2 changed files with 118 additions and 110 deletions

View File

@@ -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]
@@ -42,13 +32,9 @@ class ASM3 {
K_A_HCO: 0.5, // saturation constant S_HCO [mole HCO3 m-3] 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_O: 0.20, // aerobic respiration rate [d-1]
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]
@@ -75,7 +61,25 @@ class ASM3 {
// Composition (charge) // Composition (charge)
i_cNH: 1/14, // charge per S_NH [mole H+ g-1 NH3-N] 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] 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.
@@ -215,4 +219,4 @@ class ASM3 {
} }
} }
module.exports = { ASM3, ASM_CONSTANTS }; module.exports = { ASM3, ASM_CONSTANTS, KINETIC_CONSTANTS, STOICHIOMETRIC_CONSTANTS };

View File

@@ -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]
@@ -42,13 +32,9 @@ class ASM3 {
K_A_HCO: 0.5, // saturation constant S_HCO [mole HCO3 m-3] 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_O: 0.15, // aerobic respiration rate [d-1]
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]
@@ -75,7 +61,25 @@ class ASM3 {
// Composition (charge) // Composition (charge)
i_cNH: 1/14, // charge per S_NH [mole H+ g-1 NH3-N] 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] 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.
@@ -215,4 +219,4 @@ class ASM3 {
} }
} }
module.exports = { ASM3, ASM_CONSTANTS }; module.exports = { ASM3, ASM_CONSTANTS, KINETIC_CONSTANTS, STOICHIOMETRIC_CONSTANTS };