How to Calculate Epoxy Equivalent Weight

Epoxy Equivalent Weight Calculator & Guide :root { –primary-color: #004a99; –secondary-color: #f8f9fa; –success-color: #28a745; –text-color: #333; –border-color: #ccc; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(–secondary-color); color: var(–text-color); line-height: 1.6; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; padding-top: 20px; padding-bottom: 40px; } .container { width: 100%; max-width: 960px; background-color: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1); margin: 0 auto; box-sizing: border-box; } h1, h2, h3 { color: var(–primary-color); text-align: center; margin-bottom: 20px; } h1 { font-size: 2.5em; } h2 { font-size: 2em; border-bottom: 2px solid var(–primary-color); padding-bottom: 10px; margin-top: 40px; } h3 { font-size: 1.5em; margin-top: 30px; } .calculator-section { margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid var(–border-color); } .calculator-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; } .loan-calc-container { display: flex; flex-direction: column; gap: 20px; } .input-group { display: flex; flex-direction: column; gap: 5px; } .input-group label { font-weight: bold; color: var(–primary-color); } .input-group input, .input-group select { padding: 12px; border: 1px solid var(–border-color); border-radius: 5px; font-size: 1em; box-sizing: border-box; } .input-group input:focus, .input-group select:focus { outline: none; border-color: var(–primary-color); box-shadow: 0 0 0 3px rgba(0, 74, 153, 0.2); } .input-group .helper-text { font-size: 0.9em; color: #666; } .error-message { color: #dc3545; font-size: 0.9em; margin-top: 5px; display: none; /* Hidden by default */ } .button-group { display: flex; gap: 15px; margin-top: 25px; flex-wrap: wrap; } .btn { padding: 12px 25px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; font-weight: bold; transition: background-color 0.3s ease, transform 0.2s ease; text-transform: uppercase; white-space: nowrap; } .btn-primary { background-color: var(–primary-color); color: white; } .btn-primary:hover { background-color: #003366; transform: translateY(-2px); } .btn-secondary { background-color: var(–border-color); color: var(–text-color); } .btn-secondary:hover { background-color: #aaa; transform: translateY(-2px); } .btn-success { background-color: var(–success-color); color: white; } .btn-success:hover { background-color: #218838; transform: translateY(-2px); } #results-container { margin-top: 30px; padding: 20px; background-color: var(–primary-color); color: white; border-radius: 5px; text-align: center; } #results-container h3 { color: white; margin-bottom: 15px; } .main-result { font-size: 2.5em; font-weight: bold; margin-bottom: 10px; color: #fff; } .intermediate-results div, .formula-explanation { margin-bottom: 10px; font-size: 1.1em; } .formula-explanation strong { color: #fff; } table { width: 100%; border-collapse: collapse; margin-top: 20px; margin-bottom: 30px; box-shadow: 0 1px 10px rgba(0,0,0,0.08); } th, td { padding: 12px 15px; text-align: left; border: 1px solid var(–border-color); } thead { background-color: var(–primary-color); color: white; } tbody tr:nth-child(even) { background-color: #f2f2f2; } caption { font-size: 1.1em; margin-bottom: 10px; font-weight: bold; color: var(–text-color); text-align: left; } #chart-container { width: 100%; max-width: 700px; margin: 20px auto; background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 15px rgba(0,0,0,0.05); } #chart-container h3 { text-align: center; margin-bottom: 20px; } canvas { display: block; margin: 0 auto; } .article-content { text-align: left; margin-top: 40px; padding: 30px; background-color: #fff; border-radius: 8px; box-shadow: 0 2px 15px rgba(0,0,0,0.05); width: 100%; max-width: 960px; box-sizing: border-box; } .article-content p, .article-content ul, .article-content ol { margin-bottom: 20px; color: #555; } .article-content ul, .article-content ol { padding-left: 25px; } .article-content li { margin-bottom: 10px; } .article-content a { color: var(–primary-color); text-decoration: none; font-weight: bold; } .article-content a:hover { text-decoration: underline; } .faq-item { margin-bottom: 15px; } .faq-item h4 { color: var(–primary-color); margin-bottom: 5px; font-size: 1.2em; cursor: pointer; position: relative; padding-left: 20px; } .faq-item h4::before { content: '+'; position: absolute; left: 0; font-weight: bold; color: var(–primary-color); } .faq-item.active h4::before { content: '-'; } .faq-item div { padding-left: 20px; display: none; color: #555; } .related-tools ul { list-style: none; padding: 0; } .related-tools li { margin-bottom: 15px; border-left: 3px solid var(–primary-color); padding-left: 10px; } /* Responsive adjustments */ @media (max-width: 768px) { h1 { font-size: 2em; } h2 { font-size: 1.7em; } .container { padding: 20px; } .btn { width: 100%; margin-bottom: 10px; } .button-group { flex-direction: column; align-items: center; } .btn:last-child { margin-bottom: 0; } #results-container { padding: 15px; } .main-result { font-size: 2em; } }

How to Calculate Epoxy Equivalent Weight (EEW)

An essential metric for understanding epoxy resin chemistry and performance.

Epoxy Equivalent Weight Calculator

Enter the mass of the epoxy resin sample in grams (g).
Enter the total number of epoxide (oxirane) groups in the resin molecule. For common epoxy resins like Bisphenol A diglycidyl ether (DGEBA), this is often 2.
Enter the molecular weight of the entire epoxy resin molecule in grams per mole (g/mol).

Results

–.– g/eq
Weight of Epoxy Groups: –.– g
Epoxy Equivalent Weight (EEW): –.– g/eq
Epoxy Value: –.– %
Formula Used: EEW = (Molecular Weight of Resin) / (Number of Epoxy Groups)

Epoxy Equivalent Weight Analysis

EEW vs. Resin Molecular Weight Impact

Impact of changing Resin Molecular Weight on EEW for a fixed number of epoxy groups (2).
Variable Meaning Unit Typical Range/Value
Epoxy Resin Mass Mass of the epoxy resin sample being analyzed. grams (g) 10 – 1000
Number of Epoxy Groups Total count of epoxide functional groups per molecule. count 1 – 4+ (e.g., 2 for DGEBA)
Molecular Weight of Resin The average molar mass of the epoxy resin. grams per mole (g/mol) 200 – 2000+
Epoxy Equivalent Weight (EEW) The mass of the resin that contains one equivalent of epoxide groups. grams per equivalent (g/eq) 150 – 500+
Epoxy Value The percentage of the resin's mass that is contributed by the epoxy groups. % Variable, depends on EEW and MW

{primary_keyword}

Epoxy Equivalent Weight (EEW), often referred to as the epoxide equivalent weight, is a fundamental characteristic of epoxy resins. It quantifies the mass of the resin that contains one "equivalent" of reactive epoxide (oxirane) groups. This value is absolutely crucial for formulators and chemists to accurately determine the stoichiometry required when mixing epoxy resins with curing agents (hardeners). Proper stoichiometry ensures optimal cross-linking, leading to desirable physical and chemical properties in the cured epoxy system, such as strength, chemical resistance, and thermal stability. Without a correct EEW, achieving the desired performance in adhesives, coatings, composites, and encapsulants becomes challenging, if not impossible. Understanding and accurately calculating EEW is therefore a cornerstone of successful epoxy resin formulation.

What is Epoxy Equivalent Weight (EEW)?

Epoxy Equivalent Weight (EEW) is defined as the number of grams of an epoxy resin that contains one mole of the epoxide functional groups. In simpler terms, it's the mass of the resin sample that corresponds to a single reactive site. This single reactive site is capable of reacting with a corresponding equivalent of a curing agent. For instance, if an epoxy resin has an EEW of 200 g/eq, it means that 200 grams of that resin contain one mole of epoxide groups and will react with one mole of functional groups on the curing agent.

Who Should Use It?

  • Epoxy Formulators: To precisely calculate the amount of curing agent needed for a specific resin batch, ensuring correct mixing ratios.
  • Chemists and Researchers: To characterize and compare different epoxy resins, study reaction kinetics, and develop new epoxy systems.
  • Quality Control Technicians: To verify the consistency and purity of incoming epoxy resin batches.
  • Engineers and Product Developers: To select the appropriate epoxy system for a given application based on its reactivity and performance characteristics.

Common Misconceptions:

  • EEW is the same as Molecular Weight (MW): This is incorrect. EEW is derived from MW but specifically relates to the reactive groups, not the entire molecule's mass. A resin with a higher MW might have a lower EEW if it contains more epoxy groups per molecule.
  • All epoxy resins have the same EEW: This is false. EEW varies significantly depending on the type of epoxy resin, its structure, and the number of epoxy groups it contains.
  • EEW directly indicates the hardness or strength of the cured resin: While EEW influences the degree of cross-linking and thus affects properties, it's not a direct measure of hardness or strength. The choice of curing agent and other additives also play significant roles.

EEW Formula and Mathematical Explanation

The calculation of Epoxy Equivalent Weight (EEW) is straightforward and relies on fundamental chemical principles. The core idea is to determine how much resin mass is associated with each reactive epoxy group.

The primary formula is derived from the definition:

EEW = (Molecular Weight of Resin) / (Number of Epoxy Groups per Molecule)

Let's break down the variables:

Variable Explanations:

Variable Meaning Unit Typical Range/Value
Molecular Weight of Resin (MW) The average mass of one mole of the epoxy resin molecules. This value is determined by the chemical structure of the resin. For example, Bisphenol A diglycidyl ether (DGEBA) resins typically have a base MW of around 340.41 g/mol for the monomeric unit. Higher molecular weight oligomers will have larger MWs. grams per mole (g/mol) 200 – 2000+
Number of Epoxy Groups per Molecule (ne) This represents the functionality of the resin concerning epoxide groups. Most common epoxy resins derived from Bisphenol A and epichlorohydrin are difunctional (ne = 2). However, resins like triglycidyl isocyanurate (TGIC) are trifunctional (ne = 3), and novolac-based epoxies can have ne > 2. count 1 – 4+ (e.g., 2 for DGEBA)
Epoxy Equivalent Weight (EEW) The final calculated value. It represents the mass of the resin that carries one equivalent of epoxide functionality. This is the critical value for stoichiometric calculations with curing agents. grams per equivalent (g/eq) 150 – 500+

The calculator also provides the Epoxy Value, which is the percentage of the resin's weight that is contributed by the epoxide groups. While not directly used to calculate EEW, it's an related property:

Epoxy Value (%) = (Number of Epoxy Groups * Molecular Weight of Epoxy Group) / (Molecular Weight of Resin) * 100

Where the molecular weight of an epoxy group (oxirane ring) is approximately 43.05 g/mol.

This calculation allows us to understand the concentration of reactive sites within the resin, which is fundamental for controlling the cure reaction and final properties.

Practical Examples (Real-World Use Cases)

Understanding EEW is vital for practical epoxy applications. Let's look at a couple of examples:

Example 1: Standard Bisphenol A Epoxy Resin

  • Scenario: You have a standard liquid epoxy resin, Bisphenol A diglycidyl ether (DGEBA) monomer, with a molecular weight of approximately 340.41 g/mol. This common resin is difunctional.
  • Inputs for Calculator:
    • Epoxy Resin Mass: 100 g (for demonstration, EEW is independent of sample mass)
    • Number of Epoxy Groups: 2
    • Molecular Weight of Resin: 340.41 g/mol
  • Calculator Output:
    • Main Result (EEW): 170.21 g/eq
    • Intermediate Value (Weight of Epoxy Groups): 85.11 g
    • Intermediate Value (Epoxy Value): 25.00 %
  • Interpretation: This means every 170.21 grams of this specific resin batch contains one equivalent of epoxy groups. If you were using a curing agent with an amine hydrogen equivalent weight (AHEW) of 50 g/eq, you would need 170.21 grams of resin for every 50 grams of curing agent to achieve a 1:1 stoichiometric ratio of reactive sites. This precise ratio is critical for achieving optimal material properties.

Example 2: Higher Molecular Weight Epoxy Resin

  • Scenario: You are working with a solid epoxy resin, which is a higher molecular weight oligomer of DGEBA. Let's assume its average molecular weight is 1500 g/mol. These typically remain difunctional.
  • Inputs for Calculator:
    • Epoxy Resin Mass: 100 g
    • Number of Epoxy Groups: 2
    • Molecular Weight of Resin: 1500 g/mol
  • Calculator Output:
    • Main Result (EEW): 750.00 g/eq
    • Intermediate Value (Weight of Epoxy Groups): 18.75 g
    • Intermediate Value (Epoxy Value): 2.83 %
  • Interpretation: The EEW has significantly increased (from 170.21 to 750.00 g/eq). This indicates that a much larger mass of this higher molecular weight resin is needed to provide the same number of reactive epoxy groups compared to the liquid monomer. This translates to a lower overall reactivity per unit mass and potentially a slower cure rate. It also implies a higher proportion of non-reactive backbone in the cured network, which can affect flexibility and toughness. Formulators must adjust their hardener quantities accordingly.

How to Use This Epoxy Equivalent Weight Calculator

Our Epoxy Equivalent Weight (EEW) calculator is designed for simplicity and accuracy. Follow these steps to get your results:

  1. Locate the Input Fields: You'll find three main fields: "Epoxy Resin Mass," "Number of Epoxy Groups," and "Molecular Weight of Resin."
  2. Enter Epoxy Resin Mass: Input the mass of the epoxy resin sample you are working with in grams. While the EEW value itself is independent of the sample size, this field helps in contextualizing the calculation and is used for calculating the "Weight of Epoxy Groups" and "Epoxy Value". Enter '100' for a standard reference.
  3. Enter Number of Epoxy Groups: This is a critical parameter. For most standard Bisphenol A epoxy resins (like DGEBA), this value is 2. Check your resin's technical datasheet if unsure. Some specialized resins might have 1, 3, or more epoxy groups.
  4. Enter Molecular Weight of Resin: Find the average molecular weight of your specific epoxy resin. This information is usually provided in the manufacturer's technical data sheet (TDS). Ensure the unit is grams per mole (g/mol).
  5. Validate Inputs: The calculator will perform inline validation. Ensure all fields contain valid positive numbers. Error messages will appear below any field with incorrect input.
  6. Click "Calculate EEW": Once all inputs are valid, click the "Calculate EEW" button.

Reading Your Results:

  • Main Result (EEW): This is the primary output, displayed prominently. It shows the mass of your resin in grams that contains one equivalent of epoxy groups (g/eq).
  • Intermediate Values:
    • Weight of Epoxy Groups: Shows the total mass of the reactive epoxy groups within your specified resin sample mass.
    • Epoxy Value: Displays the percentage of the resin's mass that is represented by the epoxy groups.
  • Formula Explanation: A reminder of the calculation performed: EEW = MW / ne.

Decision-Making Guidance:

The calculated EEW is your key to determining the correct amount of curing agent. You need to find the Equivalent Weight (or specific mixing ratio) of your chosen hardener and then use the EEW to calculate the precise mass of hardener required to match the epoxy groups. A common target is an epoxy-to-hardener stoichiometric ratio, often aiming for a slight excess of one reactant depending on the system's requirements.

Key Factors That Affect EEW Results

While the formula for EEW is simple, the inputs (Molecular Weight and Number of Epoxy Groups) are influenced by several factors. Understanding these is crucial for accurate calculations and consistent results:

  1. Resin Chemistry and Type: The fundamental building blocks of the epoxy resin dictate its molecular weight and the number of epoxy groups. For example, Bisphenol A-based epoxies will have different MW and EEW profiles than epoxy novolacs or cycloaliphatic epoxies, even if they are all difunctional.
  2. Molecular Weight Distribution (MWD): Commercial epoxy resins are often mixtures of molecules with varying chain lengths (oligomers). The "Molecular Weight of Resin" used is typically an average. Variations in MWD can lead to slight deviations in the actual EEW of a batch compared to the calculated value based on the average MW.
  3. Purity and Byproducts: The presence of unreacted starting materials, impurities, or side-reaction products can alter the overall molecular weight and the effective number of epoxy groups. High purity resins generally have more consistent and predictable EEW values.
  4. Degree of Polymerization: For epoxy resins that are oligomeric (like many solid epoxy resins), the average degree of polymerization directly impacts the Molecular Weight. Higher oligomer content means higher MW and consequently higher EEW, assuming the functionality remains constant.
  5. Functional Group Definition: It's crucial to know what constitutes an "epoxy group." While typically referring to the oxirane ring, some modified resins might have other reactive sites. Always refer to the resin's specification sheet for definitive information on functionality.
  6. Temperature Effects on Measurement: While EEW is a chemical property, viscosity and density (which are related and sometimes used in indirect EEW measurements) can be temperature-dependent. Ensure consistent temperature control if performing titrations or other physical measurements to determine MW or EEW.
  7. Manufacturer Specifications: The most reliable source for the Molecular Weight and Number of Epoxy Groups (leading to EEW) is the manufacturer's Technical Data Sheet (TDS) or Certificate of Analysis (CoA) for the specific resin batch. These are based on rigorous testing.

Frequently Asked Questions (FAQ)

What is the difference between EEW and Epoxide Value?

Epoxy Equivalent Weight (EEW) is the mass of resin containing one equivalent of epoxide groups (g/eq). Epoxide Value is the percentage by weight of the epoxide groups in the resin (%). EEW is derived from MW and functionality, while Epoxide Value is a related metric indicating the concentration of reactive groups.

Can I use the EEW calculator if my resin has only one epoxy group?

Yes, absolutely. Simply enter '1' for the "Number of Epoxy Groups." This scenario applies to some monofunctional epoxy-reactive diluents or specific modified resins.

How does EEW affect cure time?

A lower EEW generally indicates a higher concentration of reactive epoxy groups per unit mass, leading to faster reaction rates and potentially shorter cure times, assuming the same curing agent and conditions. A higher EEW means fewer reactive sites per gram, often resulting in slower reactions.

Is EEW the same for all epoxy resins from the same manufacturer?

No. Manufacturers produce a range of epoxy resins with different molecular weights and functionalities (e.g., liquid vs. solid epoxies, epoxy novolacs vs. standard DGEBA). Each specific product will have its own distinct EEW. Always refer to the product's TDS.

What happens if I use the wrong EEW to calculate my hardener amount?

Using an incorrect EEW leads to improper stoichiometry. Too much or too little curing agent will result in incomplete cross-linking. This can significantly degrade the final properties, such as reducing mechanical strength, chemical resistance, adhesion, and thermal stability, and may even lead to a system that never fully cures.

How is the Molecular Weight of Resin determined?

It's typically determined through analytical techniques like Gel Permeation Chromatography (GPC) for polymers, or calculated from the chemical structure for simple monomers. Manufacturers provide this data on technical datasheets.

Does the calculator account for moisture absorption affecting EEW?

This calculator uses the theoretical EEW based on the provided molecular weight and functionality. It does not account for environmental factors like moisture absorption, which can affect the actual performance but not the intrinsic chemical EEW value of the pure resin.

Can EEW be used to compare different types of resins (e.g., epoxy vs. polyurethane)?

No. EEW is specific to epoxy resins and their epoxide groups. Other polymer systems like polyurethanes have their own characteristic metrics related to their reactive functional groups (e.g., isocyanate index for polyurethanes).

Related Tools and Internal Resources

var chartInstance = null; // Global variable to hold the chart instance function isValidNumber(value) { return !isNaN(parseFloat(value)) && isFinite(value) && parseFloat(value) >= 0; } function showError(elementId, message) { var errorElement = document.getElementById(elementId); if (errorElement) { errorElement.innerText = message; errorElement.style.display = 'block'; } } function hideError(elementId) { var errorElement = document.getElementById(elementId); if (errorElement) { errorElement.innerText = "; errorElement.style.display = 'none'; } } function validateInputs() { var valid = true; var epoxyResinMass = parseFloat(document.getElementById("epoxyResinMass").value); var epoxyGroups = parseFloat(document.getElementById("epoxyGroups").value); var molecularWeight = parseFloat(document.getElementById("molecularWeight").value); if (!isValidNumber(epoxyResinMass) || epoxyResinMass <= 0) { showError("epoxyResinMassError", "Please enter a valid positive number for resin mass."); valid = false; } else { hideError("epoxyResinMassError"); } if (!isValidNumber(epoxyGroups) || epoxyGroups <= 0) { showError("epoxyGroupsError", "Please enter a valid positive number for epoxy groups."); valid = false; } else { hideError("epoxyGroupsError"); } if (!isValidNumber(molecularWeight) || molecularWeight <= 0) { showError("molecularWeightError", "Please enter a valid positive number for molecular weight."); valid = false; } else { hideError("molecularWeightError"); } return valid; } function calculateEEW() { if (!validateInputs()) { return; } var epoxyResinMass = parseFloat(document.getElementById("epoxyResinMass").value); var epoxyGroups = parseFloat(document.getElementById("epoxyGroups").value); var molecularWeight = parseFloat(document.getElementById("molecularWeight").value); var eew = molecularWeight / epoxyGroups; var weightOfEpoxyGroups = (epoxyResinMass / molecularWeight) * epoxyGroups * 43.05; // 43.05 is MW of oxirane group var epoxyValue = (weightOfEpoxyGroups / epoxyResinMass) * 100; document.getElementById("main-result").innerText = eew.toFixed(2) + " g/eq"; document.getElementById("totalEpoxyGroupsWeight").innerText = "Weight of Epoxy Groups: " + weightOfEpoxyGroups.toFixed(2) + " g"; document.getElementById("epoxyEquivalentWeight").innerText = "Epoxy Equivalent Weight (EEW): " + eew.toFixed(2) + " g/eq"; document.getElementById("epoxyValue").innerText = "Epoxy Value: " + epoxyValue.toFixed(2) + " %"; updateChart(molecularWeight); } function resetCalculator() { document.getElementById("epoxyResinMass").value = "100"; document.getElementById("epoxyGroups").value = "2"; document.getElementById("molecularWeight").value = "340.41"; document.getElementById("main-result").innerText = "–.– g/eq"; document.getElementById("totalEpoxyGroupsWeight").innerText = "Weight of Epoxy Groups: –.– g"; document.getElementById("epoxyEquivalentWeight").innerText = "Epoxy Equivalent Weight (EEW): –.– g/eq"; document.getElementById("epoxyValue").innerText = "Epoxy Value: –.– %"; hideError("epoxyResinMassError"); hideError("epoxyGroupsError"); hideError("molecularWeightError"); if (chartInstance) { chartInstance.destroy(); chartInstance = null; } drawInitialChart(); // Redraw the initial state of the chart } function copyResults() { var mainResult = document.getElementById("main-result").innerText; var intermediateResults = document.getElementById("totalEpoxyGroupsWeight").innerText + "\n" + document.getElementById("epoxyEquivalentWeight").innerText + "\n" + document.getElementById("epoxyValue").innerText; var formula = document.querySelector(".formula-explanation").innerText; var assumptions = "Key Assumptions:\n" + "Epoxy Resin Mass: " + document.getElementById("epoxyResinMass").value + " g\n" + "Number of Epoxy Groups: " + document.getElementById("epoxyGroups").value + "\n" + "Molecular Weight of Resin: " + document.getElementById("molecularWeight").value + " g/mol"; var textToCopy = "— Epoxy Equivalent Weight Calculation —\n\n" + mainResult + "\n\n" + intermediateResults + "\n\n" + formula + "\n\n" + assumptions; navigator.clipboard.writeText(textToCopy).then(function() { // Optional: Provide user feedback, e.g., a temporary message var copyButton = document.querySelector('.btn-success'); var originalText = copyButton.innerText; copyButton.innerText = 'Copied!'; setTimeout(function() { copyButton.innerText = originalText; }, 2000); }, function(err) { console.error('Failed to copy results: ', err); alert('Failed to copy results. Please copy manually.'); }); } function toggleFaq(element) { var parent = element.parentElement; parent.classList.toggle('active'); var content = parent.querySelector('div'); if (content.style.display === "block") { content.style.display = "none"; } else { content.style.display = "block"; } } function drawInitialChart() { var ctx = document.getElementById("eewChart").getContext("2d"); if (chartInstance) { chartInstance.destroy(); } chartInstance = new Chart(ctx, { type: 'line', data: { labels: ["100", "200", "300", "400", "500", "600", "700", "800", "900", "1000"], // Example MWs datasets: [{ label: 'EEW (g/eq)', data: [50, 100, 150, 200, 250, 300, 350, 400, 450, 500], // Example EEWs for 2 groups borderColor: 'rgb(0, 74, 153)', backgroundColor: 'rgba(0, 74, 153, 0.1)', fill: true, tension: 0.1 }] }, options: { responsive: true, maintainAspectRatio: true, scales: { y: { beginAtZero: true, title: { display: true, text: 'Epoxy Equivalent Weight (g/eq)' } }, x: { title: { display: true, text: 'Molecular Weight of Resin (g/mol)' } } }, plugins: { legend: { display: true, position: 'top', }, title: { display: true, text: 'EEW vs. Resin Molecular Weight (2 Epoxy Groups)' } } } }); } function updateChart(currentMW) { var ctx = document.getElementById("eewChart").getContext("2d"); var epoxyGroups = parseFloat(document.getElementById("epoxyGroups").value); var dataPoints = []; var labels = []; var minMW = 100; var maxMW = 1500; var step = (maxMW – minMW) / 9; for (var mw = minMW; mw = minMW && currentMW parseFloat(label) > currentMW); if (insertIndex === -1) { labels.push(currentMW.toFixed(0)); dataPoints.push(currentMW / epoxyGroups); } else { labels.splice(insertIndex, 0, currentMW.toFixed(0)); dataPoints.splice(insertIndex, 0, currentMW / epoxyGroups); } } if (chartInstance) { chartInstance.destroy(); } chartInstance = new Chart(ctx, { type: 'line', data: { labels: labels, datasets: [{ label: 'EEW (g/eq)', data: dataPoints, borderColor: 'rgb(0, 74, 153)', backgroundColor: 'rgba(0, 74, 153, 0.1)', fill: true, tension: 0.1 }] }, options: { responsive: true, maintainAspectRatio: true, scales: { y: { beginAtZero: true, title: { display: true, text: 'Epoxy Equivalent Weight (g/eq)' } }, x: { title: { display: true, text: 'Molecular Weight of Resin (g/mol)' } } }, plugins: { legend: { display: true, position: 'top', }, title: { display: true, text: 'EEW vs. Resin Molecular Weight (' + epoxyGroups + ' Epoxy Group' + (epoxyGroups !== 1 ? 's' : ") + ')' } } } }); } // Initialize chart on page load window.onload = function() { drawInitialChart(); // Trigger initial calculation to populate results and chart based on default values calculateEEW(); };

Leave a Comment