This calculator helps determine the required circulation rate for an amine treating unit, a crucial process in gas sweetening. The circulation rate is determined by the amount of acid gas (like H₂S or CO₂) that needs to be removed from the process gas stream, the concentration of the amine solution, and the desired removal efficiency.
.calculator-container {
font-family: Arial, sans-serif;
border: 1px solid #ccc;
padding: 20px;
border-radius: 8px;
max-width: 500px;
margin: 20px auto;
background-color: #f9f9f9;
}
.calculator-container h2 {
text-align: center;
color: #333;
margin-bottom: 20px;
}
.input-section {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 15px;
margin-bottom: 20px;
}
.input-section label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #555;
grid-column: 1;
}
.input-section input[type="number"] {
width: calc(100% – 22px);
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
grid-column: 2;
}
button {
display: block;
width: 100%;
padding: 12px 15px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #45a049;
}
.result-section {
margin-top: 20px;
padding: 15px;
background-color: #e7f3fe;
border: 1px solid #b3e5fc;
border-radius: 4px;
text-align: center;
font-weight: bold;
color: #333;
}
var KG_PER_LB = 0.453592;
var LB_PER_KG = 2.20462;
var MOL_KG_RATIO = 1000; // To convert g/mol to kg/mol
function calculateCirculationRate() {
var acidGasLoad = parseFloat(document.getElementById("acidGasLoad").value);
var amineConcentration = parseFloat(document.getElementById("amineConcentration").value);
var acidGasToAmineRatio = parseFloat(document.getElementById("acidGasRatio").value);
var molecularWeightAmine = parseFloat(document.getElementById("molecularWeightAmine").value);
var molecularWeightAcidGas = parseFloat(document.getElementById("molecularWeightAcidGas").value);
var resultElement = document.getElementById("result");
resultElement.innerHTML = ""; // Clear previous results
if (isNaN(acidGasLoad) || isNaN(amineConcentration) || isNaN(acidGasToAmineRatio) || isNaN(molecularWeightAmine) || isNaN(molecularWeightAcidGas)) {
resultElement.innerHTML = "Please enter valid numbers for all fields.";
return;
}
if (acidGasLoad <= 0 || amineConcentration <= 0 || acidGasToAmineRatio <= 0 || molecularWeightAmine <= 0 || molecularWeightAcidGas <= 0) {
resultElement.innerHTML = "Please enter positive values for all fields.";
return;
}
// Calculation Steps:
// 1. Convert acid gas load from kg/hr to mol/hr
// mol/hr = (kg/hr * 1000 g/kg) / (MW acid gas g/mol)
var acidGasLoadMolPerHour = (acidGasLoad * 1000) / molecularWeightAcidGas;
// 2. Determine the theoretical amine required in mol/hr based on the ratio
// Amine (mol/hr) = Acid Gas (mol/hr) * Acid Gas to Amine Ratio (mol/mol)
var theoreticalAmineMolPerHour = acidGasLoadMolPerHour * acidGasToAmineRatio;
// 3. Convert theoretical amine required from mol/hr to kg/hr
// Amine (kg/hr) = Amine (mol/hr) * MW Amine (kg/mol)
var theoreticalAmineKgPerHour = theoreticalAmineMolPerHour * (molecularWeightAmine / MOL_KG_RATIO);
// 4. Calculate the total circulating amine solution in kg/hr
// The amine concentration is by weight. If the amine is 30% by weight,
// then the solution weight is Amine (kg) / 0.30.
// Circulating Amine Solution (kg/hr) = Theoretical Amine (kg/hr) / (Amine Concentration / 100)
var circulatingAmineSolutionKgPerHour = theoreticalAmineKgPerHour / (amineConcentration / 100);
// 5. Convert to Gallons Per Minute (GPM) – a common unit for circulation rate
// Need to assume a density for the amine solution. A typical value for 30% MEA is around 9.7 lb/gallon.
// Let's assume a density of 9.7 lb/gallon for calculation purposes.
// First, convert kg/hr to lb/hr:
var circulatingAmineSolutionLbPerHour = circulatingAmineSolutionKgPerHour * LB_PER_KG;
// Then, convert lb/hr to lb/min:
var circulatingAmineSolutionLbPerMinute = circulatingAmineSolutionLbPerHour / 60;
// Finally, convert lb/min to GPM using the assumed density (9.7 lb/gallon):
var assumedDensityLbPerGallon = 9.7;
var circulationRateGPM = circulatingAmineSolutionLbPerMinute / assumedDensityLbPerGallon;
resultElement.innerHTML = "Calculated Circulation Rate: " + circulationRateGPM.toFixed(2) + " GPM (Gallons Per Minute)";
resultElement.innerHTML += "Assumed Amine Solution Density: " + assumedDensityLbPerGallon + " lb/gallon";
}