Api to Density Conversion Calculator

API to Density Conversion Calculator

Kilograms per Cubic Meter (kg/m³) Grams per Cubic Centimeter (g/cm³) Pounds per US Gallon (lb/gal)

Result:

function calculateDensity() { var apiGravityInput = document.getElementById("apiGravity").value; var outputUnit = document.getElementById("outputUnit").value; var resultDiv = document.getElementById("result"); var apiGravity = parseFloat(apiGravityInput); if (isNaN(apiGravity) || apiGravity < 0) { resultDiv.innerHTML = "Please enter a valid positive number for API Gravity."; return; } // Formula for Specific Gravity (SG) at 60°F from API Gravity // SG = 141.5 / (API Gravity + 131.5) var specificGravity = 141.5 / (apiGravity + 131.5); var density; var unitLabel; switch (outputUnit) { case "kg_m3": // Density (kg/m³) = SG * Density of water at 60°F (approx 999.01 kg/m³) density = specificGravity * 999.01; unitLabel = "kg/m³"; break; case "g_cm3": // Density (g/cm³) = SG * Density of water at 60°F (approx 1 g/cm³) density = specificGravity * 1; unitLabel = "g/cm³"; break; case "lb_gal": // Density (lb/gal) = SG * Density of water at 60°F (approx 8.33 lb/US gallon) density = specificGravity * 8.33; unitLabel = "lb/gal"; break; default: resultDiv.innerHTML = "An unexpected error occurred with the unit selection."; return; } resultDiv.innerHTML = "Density: " + density.toFixed(4) + " " + unitLabel + ""; } .calculator-container { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f9f9f9; border: 1px solid #ddd; border-radius: 8px; padding: 25px; max-width: 500px; margin: 30px auto; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); } .calculator-container h2 { text-align: center; color: #333; margin-bottom: 25px; font-size: 1.8em; } .form-group { margin-bottom: 18px; } .form-group label { display: block; margin-bottom: 8px; color: #555; font-weight: bold; } .form-group input[type="number"], .form-group select { width: calc(100% – 22px); padding: 12px; border: 1px solid #ccc; border-radius: 5px; font-size: 1em; box-sizing: border-box; } .form-group input[type="number"]:focus, .form-group select:focus { border-color: #007bff; outline: none; box-shadow: 0 0 5px rgba(0, 123, 255, 0.3); } .calculate-button { display: block; width: 100%; padding: 14px; background-color: #007bff; color: white; border: none; border-radius: 5px; font-size: 1.1em; cursor: pointer; transition: background-color 0.3s ease, transform 0.2s ease; margin-top: 25px; } .calculate-button:hover { background-color: #0056b3; transform: translateY(-2px); } .calculate-button:active { background-color: #004085; transform: translateY(0); } .result-container { background-color: #e9f7ff; border: 1px solid #b3e0ff; border-radius: 5px; padding: 15px; margin-top: 25px; text-align: center; } .result-container h3 { color: #0056b3; margin-top: 0; margin-bottom: 10px; font-size: 1.3em; } .calculator-result { font-size: 1.6em; color: #007bff; font-weight: bold; } .calculator-result strong { color: #0056b3; }

Understanding API Gravity and Density Conversion

API Gravity, or American Petroleum Institute gravity, is a measure of how heavy or light a petroleum liquid is compared to water. It's a crucial parameter in the petroleum industry, influencing everything from crude oil pricing to refining processes and transportation logistics. Unlike specific gravity, which is a direct ratio, API gravity is an inverse measure: higher API gravity indicates a lighter, less dense liquid, while lower API gravity signifies a heavier, denser liquid.

What is API Gravity?

API gravity is expressed in 'degrees API' and is calculated using a specific formula that relates it to the liquid's specific gravity (SG) at a standard temperature, typically 60°F (15.56°C). The formula for converting specific gravity to API gravity is:

API Gravity = (141.5 / Specific Gravity) - 131.5

Conversely, to find specific gravity from API gravity, the formula is:

Specific Gravity = 141.5 / (API Gravity + 131.5)

Water has an API gravity of 10°API. Liquids with API gravity greater than 10°API are lighter than water and will float, while those with API gravity less than 10°API are heavier than water and will sink.

Why is Density Conversion Important?

While API gravity is widely used in the oil and gas sector, many engineering calculations, material balances, and regulatory requirements necessitate density values in standard units like kilograms per cubic meter (kg/m³), grams per cubic centimeter (g/cm³), or pounds per US gallon (lb/gal). Converting API gravity to density allows for:

  • Accurate Mass Calculations: Essential for inventory management, custody transfer, and determining the mass of crude oil or refined products.
  • Process Design: Critical for designing pipelines, storage tanks, and refining units where fluid dynamics and volumetric flow rates are key.
  • Quality Control: Density is a direct indicator of product quality and can help identify different crude types or refined products.
  • Environmental Compliance: Understanding the density of spills or discharges is important for environmental impact assessments.

How the Conversion Works

The conversion from API gravity to density involves two main steps:

  1. Calculate Specific Gravity (SG): Using the API gravity value, the specific gravity at 60°F is determined. Specific gravity is the ratio of the density of the substance to the density of a reference substance (usually water) at a specified temperature.
  2. Convert SG to Desired Density Unit: Once the specific gravity is known, it is multiplied by the density of water in the desired unit at the standard temperature (60°F).

Common densities of water at 60°F (approximate values):

  • 1 g/cm³
  • 999.01 kg/m³
  • 8.33 lb/US gallon

Example Calculation:

Let's say you have crude oil with an API Gravity of 35.0 °API and you want to find its density in kg/m³.

  1. Calculate Specific Gravity (SG):
    SG = 141.5 / (35.0 + 131.5)
    SG = 141.5 / 166.5
    SG ≈ 0.85093
  2. Convert SG to kg/m³:
    Density (kg/m³) = SG × Density of water (kg/m³)
    Density (kg/m³) = 0.85093 × 999.01
    Density (kg/m³) ≈ 850.09 kg/m³

Therefore, crude oil with 35.0 °API has a density of approximately 850.09 kg/m³ at 60°F.

Using the Calculator

Our API to Density Conversion Calculator simplifies this process. Simply enter the API Gravity of your petroleum liquid, select your desired output density unit (kilograms per cubic meter, grams per cubic centimeter, or pounds per US gallon), and click 'Calculate Density'. The calculator will instantly provide the converted density value, making your calculations quick and error-free.

Leave a Reply

Your email address will not be published. Required fields are marked *