Molar Solubility of CaF2 Calculator using Activities
CaF2 Molar Solubility Calculator
Enter the ionic strength of the solution (mol/L).
Enter the activity coefficient for Calcium ions (unitless). Typically between 0.1 and 1.0.
Enter the activity coefficient for Fluoride ions (unitless). Typically between 0.1 and 1.0.
Enter the temperature in degrees Celsius (°C).
Enter the ionic radius for Calcium ions in Angstroms (Å).
Enter the ionic radius for Fluoride ions in Angstroms (Å).
| Ionic Strength (I) (mol/L) | Calculated γCa²⁺ | Calculated γF⁻ | Molar Solubility (M) |
|---|
Understanding Molar Solubility of CaF2 using Activities
What is Molar Solubility of CaF2 using Activities?
The molar solubility of Calcium Fluoride (CaF2) using activities is a precise chemical concept that quantifies the maximum concentration of CaF2 that can dissolve in a solution under specific conditions, taking into account the non-ideal behavior of ions. Unlike simple molar solubility, which assumes ions behave ideally, activity-based calculations incorporate *activity coefficients* (γ). These coefficients correct for the electrostatic interactions between ions in a solution, which can significantly deviate from ideal behavior, especially at higher concentrations or ionic strengths. Calcium Fluoride is known for its low solubility, making its precise determination crucial in various environmental and industrial applications. Understanding its solubility using activities provides a more accurate picture of its behavior in complex aqueous systems.
Who should use this calculator?
This calculator is designed for chemists, environmental scientists, chemical engineers, geologists, and students involved in:
- Water quality analysis
- Geochemical modeling
- Predicting mineral precipitation/dissolution
- Designing chemical processes involving calcium and fluoride
- Understanding the behavior of sparingly soluble salts in different ionic environments.
Common Misconceptions:
A common misconception is that the solubility product constant (Ksp) is always directly related to the molar concentration. However, Ksp is thermodynamically defined in terms of activities, not concentrations. Another misunderstanding is that activity coefficients are constant; they vary significantly with ionic strength, ion charge, and ion size, meaning solubility changes dynamically with the solution’s composition.
Molar Solubility of CaF2 using Activities Formula and Mathematical Explanation
The fundamental principle is the solubility product expression for CaF2:
CaF2(s) <=> Ca²⁺(aq) + 2F⁻(aq)
The thermodynamic solubility product, Ksp°, is defined in terms of activities:
Ksp° = aCa²⁺ * (aF⁻)²
Where aCa²⁺ and aF⁻ are the activities of Calcium and Fluoride ions, respectively.
Activity is related to concentration ([]) by the activity coefficient (γ):
aCa²⁺ = [Ca²⁺] * γCa²⁺
aF⁻ = [F⁻] * γF⁻
If ‘s’ is the molar solubility of CaF2, then:
[Ca²⁺] = s
[F⁻] = 2s
Substituting these into the Ksp° expression:
Ksp° = (s * γCa²⁺) * (2s * γF⁻)²
Ksp° = s * γCa²⁺ * 4s² * γF⁻²
Ksp° = 4s³ * γCa²⁺ * γF⁻²
To solve for ‘s’ (molar solubility), we first need Ksp° and the activity coefficients (γ).
The Ksp° for CaF2 at 25°C is approximately 3.9 x 10⁻¹¹. However, Ksp° itself can be temperature-dependent. The activity coefficients are the most challenging part and depend heavily on the ionic strength (I) of the solution.
For estimating activity coefficients at moderate ionic strengths, the Davies Equation is commonly used:
log γᵢ = -0.51 Zᵢ² (√I / (1 + √I) – 0.3 I)
Where:
- γᵢ is the activity coefficient of ion i
- Zᵢ is the charge of ion i
- I is the ionic strength of the solution (I = 0.5 * Σ[mᵢ * Zᵢ²])
The Davies equation is an extension of Debye-Hückel theory. More complex models like Pitzer equations provide higher accuracy, especially at high ionic strengths, but are computationally intensive.
In this calculator, we utilize the Davies equation to estimate the activity coefficients for ions based on the provided ionic strength and temperature (implicitly via standard Ksp values). The calculator then uses these derived coefficients to solve for ‘s’.
Variables Table
| Variable | Meaning | Unit | Typical Range / Notes |
|---|---|---|---|
| Ksp° | Thermodynamic Solubility Product Constant | Unitless (thermodynamic) / M² (if concentration-based) | Approx. 3.9 x 10⁻¹¹ at 25°C for CaF2; varies with temperature. |
| s | Molar Solubility | mol/L (M) | Determined by the calculation; expected to be low for CaF2. |
| aCa²⁺ | Activity of Calcium ion | Unitless | a = [Ca²⁺] * γCa²⁺ |
| aF⁻ | Activity of Fluoride ion | Unitless | a = [F⁻] * γF⁻ |
| [Ca²⁺] | Molar Concentration of Calcium ion | mol/L (M) | Equal to ‘s’ if CaF2 is the only source. |
| [F⁻] | Molar Concentration of Fluoride ion | mol/L (M) | Equal to ‘2s’ if CaF2 is the only source. |
| γCa²⁺ | Activity Coefficient of Calcium ion | Unitless | Typically < 1.0; dependent on Ionic Strength. |
| γF⁻ | Activity Coefficient of Fluoride ion | Unitless | Typically < 1.0; dependent on Ionic Strength. |
| I | Ionic Strength | mol/L (M) | Calculated from all ions present; e.g., 0.001 to 1.0 M. |
| Zᵢ | Charge of Ion i | Unitless (integer) | +2 for Ca²⁺, -1 for F⁻. |
| T | Temperature | °C | Standard conditions are often 25°C. |
| rᵢ | Ionic Radius | Ångstroms (Å) | Used in more advanced models like Pitzer, sometimes implicitly in empirical fits. |
Practical Examples
Example 1: CaF2 Solubility in Pure Water (Low Ionic Strength)
Assume pure water with negligible ionic strength (I ≈ 0). The activity coefficients are approximately 1.
Ksp° ≈ 3.9 x 10⁻¹¹
Ksp° = 4s³ * γCa²⁺ * γF⁻²
3.9 x 10⁻¹¹ ≈ 4s³ * (1) * (1)²
s³ ≈ (3.9 x 10⁻¹¹) / 4 ≈ 9.75 x 10⁻¹²
s ≈ ³√(9.75 x 10⁻¹²) ≈ 2.14 x 10⁻⁴ M
This is the theoretical solubility in ideal conditions.
Example 2: CaF2 Solubility in a Solution with 0.01 M NaCl
Here, the ionic strength needs to be calculated. NaCl dissociates into Na⁺ and Cl⁻, each with a charge of ±1.
I = 0.5 * ([Na⁺]*1² + [Cl⁻]*(-1)²) = 0.5 * (0.01 * 1 + 0.01 * 1) = 0.01 M
Using the Davies Equation (or the calculator’s approximation):
log γCa²⁺ ≈ -0.51 * (2)² * (√(0.01) / (1 + √(0.01)) – 0.3 * 0.01)
log γCa²⁺ ≈ -2.04 * (0.1 / 1.1 – 0.003) ≈ -2.04 * (0.0909 – 0.003) ≈ -2.04 * 0.0879 ≈ -0.179
γCa²⁺ ≈ 10⁻⁰.¹⁷⁹ ≈ 0.66
log γF⁻ ≈ -0.51 * (-1)² * (√(0.01) / (1 + √(0.01)) – 0.3 * 0.01)
log γF⁻ ≈ -0.51 * (0.1 / 1.1 – 0.003) ≈ -0.51 * 0.0879 ≈ -0.045
γF⁻ ≈ 10⁻⁰.⁰⁴⁵ ≈ 0.89
Now, plug these into the Ksp expression:
3.9 x 10⁻¹¹ = 4s³ * (0.66) * (0.89)²
3.9 x 10⁻¹¹ = 4s³ * 0.66 * 0.7921 ≈ 2.098 s³
s³ ≈ (3.9 x 10⁻¹¹) / 2.098 ≈ 1.86 x 10⁻¹¹
s ≈ ³√(1.86 x 10⁻¹¹) ≈ 2.65 x 10⁻⁴ M
In this case, the solubility *increases* slightly compared to pure water because the increased ionic strength lowers the activity coefficients, effectively making the ions “less active” and favoring dissolution to maintain the Ksp product.
How to Use This Molar Solubility Calculator
- Input Ionic Strength (I): Enter the calculated ionic strength of your solution in mol/L. If you don’t know it, you might need to estimate it based on the concentrations of all dissolved ions.
- Input Activity Coefficients (γ): If you have pre-calculated or known activity coefficients for Ca²⁺ and F⁻ at your specific ionic strength and temperature, enter them. Otherwise, the calculator might use an internal estimation method (like Davies Equation, simplified here). For rough estimates, values between 0.1 and 1.0 are common.
- Input Temperature: Provide the temperature in Celsius (°C). This affects the Ksp value used.
- Input Ionic Radii: Enter the ionic radii for Ca²⁺ and F⁻ in Ångstroms. These are used in more sophisticated models, but approximations are often used.
- Click ‘Calculate Solubility’: The calculator will compute the molar solubility (s) of CaF2.
Reading the Results:
- Molar Solubility (M): This is the primary output, showing the maximum concentration of CaF2 that can dissolve in mol/L under the given conditions.
- Intermediate Values: These show the calculated effective ionic strength, the log of the activity coefficient term derived from the Davies equation, and the overall activity coefficient for CaF2.
- Key Assumptions & Inputs: Displays the values you entered, serving as a reference for your calculation.
Decision-Making Guidance:
A higher molar solubility value indicates that more CaF2 can dissolve. Comparing solubility under different ionic strengths or temperatures helps predict precipitation, scale formation, or dissolution rates in real-world systems. For instance, if calculated solubility exceeds the concentration limit in a system, precipitation is likely.
Key Factors That Affect Molar Solubility Results
- Ionic Strength (I): This is arguably the most critical factor after temperature. As ionic strength increases, the “ionic atmosphere” around each ion becomes more significant. This leads to stronger inter-ionic attractions, which stabilizes the ions in solution relative to the solid phase. Consequently, activity coefficients (γ) decrease, and the calculated molar solubility often increases to maintain the Ksp balance.
- Temperature (T): Solubility is temperature-dependent. For CaF2, solubility generally increases with temperature, although the magnitude depends on the specific thermodynamics of dissolution (ΔH°). The Ksp° value used in calculations must correspond to the temperature of interest.
- Activity Coefficients (γ): These are direct consequences of ionic strength, ion charge, and ion size. They correct the concentration terms to reflect the effective concentration (or “escaping tendency”) of ions. Using accurate activity coefficients is key to obtaining realistic solubility values. Models like Davies, Pitzer, or specific ion interaction theories (SIT) are employed.
-
Presence of Other Ions (Common Ion Effect & Complexation): While the basic calculation assumes only Ca²⁺ and F⁻ are relevant (beyond supporting ions contributing to I), the presence of other ions can significantly alter solubility.
- Common Ion Effect: If F⁻ or Ca²⁺ ions are already present in high concentrations from other sources, the solubility of CaF2 will be significantly reduced.
- Complexation: If ions like citrate, EDTA, or even other anions (like SO₄²⁻) are present, they can form soluble complexes with Ca²⁺, effectively lowering the free [Ca²⁺] and increasing the solubility of CaF2.
- pH: Although CaF2 itself doesn’t directly involve H⁺ or OH⁻ in its dissolution equilibrium, changes in pH can affect the speciation of other ions present or influence the dissolution of CaF2 if it’s in contact with acidic or basic solutions, particularly if impurities are present. Fluoride itself is the conjugate base of a weak acid (HF), but its basicity is very low (pKa of HF ≈ 3.17), so significant protonation of F⁻ only occurs at very low pH.
- Ionic Radius and Hydration: More advanced models account for the physical size and hydration shells of ions. Larger ions or ions with less strong hydration shells might interact differently with the solvent and other ions, affecting their activity coefficients and ultimately solubility. This is more relevant for Pitzer-type models.
- Pressure: While typically a minor effect for solid solubility in aqueous solutions under normal environmental conditions, significant pressure changes can slightly alter the solubility of sparingly soluble salts.
Frequently Asked Questions (FAQ)
-
Q1: What is the difference between molar solubility and solubility product (Ksp)?
Molar solubility (s) is the concentration of the dissolved salt (e.g., moles of CaF2 per liter) at saturation. The solubility product (Ksp) is a constant (at a given temperature) representing the product of the activities of the ions in a saturated solution. Ksp is related to molar solubility by a specific equation that depends on the stoichiometry of the salt (e.g., Ksp = 4s³ for CaF2 in ideal conditions). -
Q2: Why do activity coefficients matter for CaF2 solubility?
Activity coefficients correct for non-ideal behavior of ions in solution. In real solutions, ions interact electrostatically, which affects their effective concentration. Ignoring these effects leads to inaccurate predictions, especially in solutions with significant ionic strength. For CaF2, especially in natural waters or industrial brines, these effects are non-negligible. -
Q3: Can this calculator predict precipitation?
Yes, indirectly. If you calculate the ion product (Q = [Ca²⁺]actual * γCa²⁺ * ([F⁻]actual * γF⁻)²) using the actual concentrations and estimated activity coefficients in your solution, and compare it to the Ksp°:- If Q > Ksp°, precipitation will occur.
- If Q < Ksp°, more solid can dissolve.
- If Q = Ksp°, the solution is saturated.
This calculator primarily focuses on determining ‘s’ at saturation.
-
Q4: What ionic strength value should I use?
The ionic strength (I) is calculated as I = 0.5 * Σ(mᵢ * Zᵢ²), where mᵢ is the molality (or molarity for dilute solutions) and Zᵢ is the charge of each ion in the solution. You need to know the concentrations of all major ions present. If only CaF2 is dissolving, and the solvent is pure water, I will be very low. If other salts (like NaCl, MgSO₄) are present, they significantly increase I. -
Q5: How accurate are the Davies Equation estimates for activity coefficients?
The Davies equation provides reasonable estimates for activity coefficients up to an ionic strength of about 0.1 M. Beyond that, especially above 0.5 M, its accuracy decreases significantly. For higher ionic strengths, more sophisticated models like the Pitzer equations are necessary. -
Q6: Does the Ksp value change with ionic strength?
The *thermodynamic* solubility product (Ksp°) is defined using activities and is ideally constant at a given temperature, independent of ionic strength. However, the *concentration-based* solubility product (Ksp = [Ca²⁺][F⁻]²) *does* change with ionic strength because Ksp = Ksp° / (γCa²⁺ * γF⁻²). As γ values decrease with increasing I, the concentration-based Ksp increases, leading to higher molar solubility. -
Q7: What is the typical molar solubility of CaF2?
In pure water (ideal conditions), the molar solubility is around 2.14 x 10⁻⁴ M. In natural waters with moderate ionic strengths, it can be slightly higher, perhaps in the range of 2.5 x 10⁻⁴ to 3.5 x 10⁻⁴ M, depending heavily on the specific ionic composition. -
Q8: Can this calculator handle complexation or the common ion effect directly?
No, this calculator uses a simplified model. It calculates the solubility based on Ksp and activity coefficients derived from the provided ionic strength. To account for complexation or the common ion effect, you would need to modify the equilibrium expressions and potentially use a speciation model or manually adjust the effective [Ca²⁺] and [F⁻] values before calculating solubility.
Related Tools and Internal Resources
- CaF2 Molar Solubility Calculator: Use our interactive tool to perform calculations.
- Ionic Strength Calculator: Estimate the ionic strength of your solution based on ion concentrations.
- Activity Coefficient Calculator: Explore different models (Debye-Hückel, Davies) for activity coefficient estimation.
- Chemical Equilibrium Principles: Learn more about the fundamentals of chemical equilibrium and solubility.
- Water Chemistry Analysis Guide: Understand how solubility impacts water quality assessments.
- Geochemical Modeling Software: Discover tools for advanced simulations of natural water systems.
// right before the closing tag or at the end of the body.
// Since the prompt requires a SINGLE HTML file and NO EXTERNAL LIBRARIES,
// we MUST embed the Chart.js library or replace it with native SVG/Canvas drawing.
// Given the complexity, using Chart.js via CDN is the most practical way unless native drawing is requested.
// **EDIT:** The prompt SPECIFICALLY says “❌ No external chart libraries”.
// This means Chart.js cannot be used. I will have to draw using native Canvas API.
// This significantly increases complexity. For now, I will keep the structure and note this limitation.
// **RE-EDIT:** To comply STRICTLY, I will remove Chart.js and add a placeholder Canvas drawing function.
// **FINAL RE-EDIT:** Re-implementing basic Canvas drawing for the chart to avoid external libraries.
// — Native Canvas Drawing Function —
function drawChart(data) {
var canvas = document.getElementById(‘solubilityChart’);
var ctx = canvas.getContext(‘2d’);
var width = canvas.width;
var height = canvas.height;
ctx.clearRect(0, 0, width, height); // Clear previous drawing
// Chart Options (simplified)
var chartTitle = ‘Effect of Ionic Strength on Solubility and Activity Coefficients’;
var xAxisLabel = ‘Ionic Strength (I) (mol/L)’;
var y1Label = ‘Molar Solubility (M)’; // Left Y-axis (Log scale)
var y2Label = ‘Activity Coefficient (unitless)’; // Right Y-axis (Linear scale)
// Chart Styling
var primaryColor = ‘#004a99’;
var successColor = ‘#28a745’;
var warningColor = ‘#ffc107’;
var textColor = ‘#333’;
var gridColor = ‘#ddd’;
// — Calculate Scale Ranges —
var solubilityData = data.solubility;
var gammaCaData = data.gammaCa;
var gammaFData = data.gammaF;
var maxSolubility = Math.max.apply(null, solubilityData.filter(Number.isFinite));
var minSolubility = Math.min.apply(null, solubilityData.filter(Number.isFinite));
// For log scale, avoid zero or negative values
minSolubility = Math.max(minSolubility, 1e-9); // Prevent log(0) or log(negative)
var maxGamma = Math.max.apply(null, gammaCaData.concat(gammaFData).filter(Number.isFinite)) || 1.0;
var minGamma = Math.min.apply(null, gammaCaData.concat(gammaFData).filter(Number.isFinite)) || 0.0;
// Adjust margins and padding
var margin = { top: 40, right: 60, bottom: 50, left: 60 }; // Increased right margin for second Y axis
var plotWidth = width – margin.left – margin.right;
var plotHeight = height – margin.top – margin.bottom;
// — Draw Title —
ctx.font = ’16px Arial’;
ctx.fillStyle = primaryColor;
ctx.textAlign = ‘center’;
ctx.fillText(chartTitle, width / 2, margin.top / 2);
// — Draw Axes and Labels —
ctx.font = ’12px Arial’;
ctx.fillStyle = textColor;
// Y2 Axis (Activity Coefficients) – Right
ctx.save();
ctx.translate(width – margin.right / 2, margin.top + plotHeight / 2);
ctx.rotate(-Math.PI / 2);
ctx.textAlign = ‘center’;
ctx.fillText(y2Label, 0, 0);
ctx.restore();
// Y1 Axis (Solubility) – Left
ctx.save();
ctx.translate(margin.left / 2, margin.top + plotHeight / 2);
ctx.rotate(-Math.PI / 2);
ctx.textAlign = ‘center’;
ctx.fillText(y1Label, 0, 0);
ctx.restore();
// X Axis Label
ctx.textAlign = ‘center’;
ctx.fillText(xAxisLabel, margin.left + plotWidth / 2, height – margin.bottom / 2);
// — Draw Grid Lines and Ticks —
ctx.lineWidth = 1;
ctx.strokeStyle = gridColor;
ctx.font = ’10px Arial’;
ctx.fillStyle = textColor;
// X-Axis Ticks and Labels
var numXTicks = data.labels.length;
if (numXTicks > 1) {
var xTickSpacing = plotWidth / (numXTicks – 1);
for (var i = 0; i < numXTicks; i++) {
var xPos = margin.left + i * xTickSpacing;
// Grid Line
ctx.beginPath();
ctx.moveTo(xPos, margin.top);
ctx.lineTo(xPos, height - margin.bottom);
ctx.stroke();
// Tick Mark
ctx.beginPath();
ctx.moveTo(xPos, height - margin.bottom);
ctx.lineTo(xPos, height - margin.bottom + 5);
ctx.stroke();
// Label
ctx.textAlign = 'center';
ctx.fillText(data.labels[i], xPos, height - margin.bottom + 15);
}
}
// Y1 Axis (Log Scale Ticks) - Left
var logMinSolubility = Math.log10(minSolubility);
var logMaxSolubility = Math.log10(maxSolubility);
var yScaleFactor = plotHeight / (logMaxSolubility - logMinSolubility);
for (var exp = Math.floor(logMinSolubility); exp <= Math.ceil(logMaxSolubility); exp++) {
var tickValue = Math.pow(10, exp);
if (tickValue >= minSolubility && tickValue <= maxSolubility) {
var yPos = margin.top + plotHeight - (Math.log10(tickValue) - logMinSolubility) * yScaleFactor;
// Grid Line
ctx.beginPath();
ctx.moveTo(margin.left, yPos);
ctx.lineTo(width - margin.right, yPos);
ctx.stroke();
// Tick Mark
ctx.beginPath();
ctx.moveTo(margin.left - 5, yPos);
ctx.lineTo(margin.left, yPos);
ctx.stroke();
// Label
ctx.textAlign = 'right';
ctx.fillText(tickValue.toExponential(1), margin.left - 10, yPos + 4); // Offset slightly for alignment
}
}
// Y2 Axis (Linear Scale Ticks) - Right
var gammaScaleFactor = plotHeight / (maxGamma - minGamma);
var numYTicksGamma = 5; // Number of ticks for the secondary axis
var gammaTickSpacing = plotHeight / numYTicksGamma;
for (var i = 0; i <= numYTicksGamma; i++) {
var tickValue = minGamma + i * (maxGamma - minGamma) / numYTicksGamma;
var yPos = margin.top + plotHeight - (tickValue - minGamma) * gammaScaleFactor;
// Grid Line (optional for secondary axis, can clutter)
// ctx.beginPath();
// ctx.moveTo(margin.left, yPos);
// ctx.lineTo(width - margin.right, yPos);
// ctx.stroke();
// Tick Mark
ctx.beginPath();
ctx.moveTo(width - margin.right, yPos);
ctx.lineTo(width - margin.right + 5, yPos);
ctx.stroke();
// Label
ctx.textAlign = 'left';
ctx.fillText(tickValue.toFixed(2), width - margin.right + 10, yPos + 4);
}
// --- Draw Data Series ---
function drawLine(dataArray, color, yAxisScale, scaleFactor, minVal, yScaleOffset) {
ctx.beginPath();
ctx.lineWidth = 2;
ctx.strokeStyle = color;
for (var i = 0; i < dataArray.length; i++) {
var xPos = margin.left + (plotWidth / (numXTicks - 1)) * i;
var value = dataArray[i];
var yPos;
if (yAxisScale === 'log') {
if (value <= 0) value = minSolubility; // Handle non-finite or zero values
yPos = margin.top + plotHeight - (Math.log10(value) - logMinSolubility) * yScaleFactor;
} else { // Linear scale
yPos = margin.top + plotHeight - (value - minGamma) * gammaScaleFactor;
}
if (i === 0) {
ctx.moveTo(xPos, yPos);
} else {
ctx.lineTo(xPos, yPos);
}
}
ctx.stroke();
}
// Draw Solubility Line (Left Y-axis, Log Scale)
drawLine(solubilityData, primaryColor, 'log', yScaleFactor, minSolubility, logMinSolubility);
// Draw Activity Lines (Right Y-axis, Linear Scale)
drawLine(gammaCaData, successColor, 'linear', gammaScaleFactor, minGamma, 0);
drawLine(gammaFData, warningColor, 'linear', gammaScaleFactor, minGamma, 0);
// --- Draw Legend ---
var legendX = margin.left;
var legendY = margin.top / 3; // Position legend higher up
var legendItemHeight = 15;
var legendSquareSize = 12;
ctx.font = '12px Arial';
ctx.textAlign = 'left';
// Solubility Legend
ctx.fillStyle = primaryColor;
ctx.fillRect(legendX, legendY, legendSquareSize, legendSquareSize);
ctx.fillStyle = textColor;
ctx.fillText(y1Label, legendX + legendSquareSize + 5, legendY + legendSquareSize - 2);
// Gamma Ca Legend
ctx.fillStyle = successColor;
ctx.fillRect(legendX + 120, legendY, legendSquareSize, legendSquareSize); // Offset horizontally
ctx.fillStyle = textColor;
ctx.fillText('γCa²⁺', legendX + 120 + legendSquareSize + 5, legendY + legendSquareSize - 2);
// Gamma F Legend
ctx.fillStyle = warningColor;
ctx.fillRect(legendX + 220, legendY, legendSquareSize, legendSquareSize); // Offset horizontally
ctx.fillStyle = textColor;
ctx.fillText('γF⁻', legendX + 220 + legendSquareSize + 5, legendY + legendSquareSize - 2);
}
// --- Initial Calculation on Load ---
window.onload = function() {
// Set default values and perform initial calculation
resetCalculator();
calculateSolubility(); // Trigger calculation with defaults
};