<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pump Archives - Chemical Engineering Site</title>
	<atom:link href="https://chemicalengineeringsite.in/tag/pump/feed/" rel="self" type="application/rss+xml" />
	<link>https://chemicalengineeringsite.in/tag/pump/</link>
	<description>For Chemical Engineers</description>
	<lastBuildDate>Tue, 16 Sep 2025 14:19:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Centrifugal Pump Affinity Law Calculator</title>
		<link>https://chemicalengineeringsite.in/centrifugal-pump-affinity-law-calculator/</link>
		
		<dc:creator><![CDATA[chemicalengineeringsite]]></dc:creator>
		<pubDate>Tue, 16 Sep 2025 14:08:55 +0000</pubDate>
				<category><![CDATA[Calculators]]></category>
		<category><![CDATA[Centrifugal pump]]></category>
		<category><![CDATA[centrifugal pump calculator]]></category>
		<category><![CDATA[chemical engineering calculator]]></category>
		<category><![CDATA[flow calculation]]></category>
		<category><![CDATA[head calculation]]></category>
		<category><![CDATA[impeller diameter]]></category>
		<category><![CDATA[Pump]]></category>
		<category><![CDATA[pump affinity laws]]></category>
		<category><![CDATA[pump curve]]></category>
		<category><![CDATA[pump engineering tools]]></category>
		<category><![CDATA[pump optimization]]></category>
		<category><![CDATA[pump performance]]></category>
		<category><![CDATA[pump power]]></category>
		<category><![CDATA[pump speed]]></category>
		<category><![CDATA[variable speed pump]]></category>
		<guid isPermaLink="false">https://chemicalengineeringsite.in/?p=4065</guid>

					<description><![CDATA[<p>Pump Affinity Law Calculator — chemicalengineeringsite.in Pump Affinity Law Calculator Select Input Mode (Speed or Diameter change). Enter baseline point. Calculates new Q₂, H₂, P₂. Export to Excel with live formulas. Input Mode Speed Change Diameter Change Baseline Speed n₁ rpm Baseline Impeller Dia D₁ mmcmminch Baseline Flow Q₁ m³/sm³/hL/sgpm Baseline Head H₁ mft Baseline [&#8230;]</p>
<p>The post <a href="https://chemicalengineeringsite.in/centrifugal-pump-affinity-law-calculator/">Centrifugal Pump Affinity Law Calculator</a> appeared first on <a href="https://chemicalengineeringsite.in">Chemical Engineering Site</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Pump Affinity Law Calculator — chemicalengineeringsite.in</title>
<meta name="description" content="Compute new Flow (Q2), Head (H2), and Power (P2) for Speed or Diameter change using pump affinity laws. Export to Excel with live formulas." />
<style>
  /* === Mirror of Pump Specific Speed theme tokens & styles (psc-*) === */
  .psc-card{--b:#e6eef6;--t:#0f172a;--muted:#475569;--a:#2563eb;--bg:#ffffff;max-width:860px;margin:1.25rem auto;padding:1.25rem;border:1px solid var(--b);border-radius:16px;background:var(--bg);box-shadow:0 6px 20px rgba(2,6,23,.06)}
  .psc-title{margin:.25rem 0;font-size:1.25rem;color:var(--t)}
  .psc-sub{margin:0;color:var(--muted)}
  .psc-form{margin-top:.75rem}
  .psc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
  @media (max-width:860px){.psc-grid{grid-template-columns:1fr}}
  .psc-field{display:flex;flex-direction:column;gap:6px}
  .psc-field span{font-weight:600;color:var(--t)}
  .psc-inline{display:flex;gap:8px;align-items:center}
  .psc-field input,.psc-field select{width:100%;padding:.6rem .7rem;border:1px solid var(--b);border-radius:10px;background:#fff;color:var(--t)}
  .psc-unit{color:var(--muted)}
  .psc-actions{display:flex;gap:10px;margin-top:.75rem;flex-wrap:wrap}
  .psc-btn{border:1px solid var(--a);background:var(--a);color:#fff;border-radius:999px;padding:.55rem .9rem;font-weight:600;cursor:pointer}
  .psc-btn-ghost{background:#fff;color:var(--a)}
  .psc-results{margin-top:1rem;border-top:1px dashed var(--b);padding-top:.9rem}
  .psc-result{display:flex;justify-content:space-between;align-items:center;margin:.35rem 0}
  .psc-result-label{color:var(--muted)}
  .psc-result-value{font-size:1.1rem;font-weight:700;color:var(--t)}
  .psc-note{margin-top:.4rem;color:#b45309}
  .psc-details{margin-top:.6rem}
  .psc-footer{margin-top:.6rem;color:var(--muted)}

  /* Radio fieldset (mirrors SSC structure) */
  .psc-fieldset{border:1px dashed var(--b);border-radius:12px;padding:.6rem .7rem;margin-bottom:.6rem}
  .psc-fieldset legend{color:var(--muted)}
  .psc-radio{display:flex;align-items:center;gap:.45rem;margin-right:1rem;color:var(--t)}
</style>
</head>
<body>

<!-- Pump Affinity Law Calculator (Radio Input Mode) + Excel Export -->
<div id="pal" class="psc-card" role="region" aria-label="Pump Affinity Law Calculator">
  <div class="psc-header">
    <h3 class="psc-title">Pump Affinity Law Calculator</h3>
    <p class="psc-sub"> Select <strong>Input Mode</strong> (Speed or Diameter change). Enter baseline point. Calculates new Q₂, H₂, P₂. Export to Excel with live formulas.</p>
  </div>

  <form class="psc-form" onsubmit="return false;">
    <!-- Input Mode Radios -->
    <fieldset class="psc-fieldset">
      <legend>Input Mode</legend>
      <div class="psc-inline" role="radiogroup" aria-label="Input mode">
        <label class="psc-radio"><input type="radio" name="pal-mode" value="speed" checked /> <span>Speed Change</span></label>
        <label class="psc-radio"><input type="radio" name="pal-mode" value="diam" /> <span>Diameter Change</span></label>
      </div>
    </fieldset>

    <!-- Baseline (Point 1) -->
    <div class="psc-grid">
      <label class="psc-field">
        <span>Baseline Speed n₁</span>
        <div class="psc-inline">
          <input id="pal-n1" type="number" step="any" min="0" placeholder="e.g., 2900" required />
          <span class="psc-unit">rpm</span>
        </div>
      </label>

      <label class="psc-field">
        <span>Baseline Impeller Dia D₁</span>
        <div class="psc-inline">
          <input id="pal-d1" type="number" step="any" min="0" placeholder="e.g., 200" required />
          <select id="pal-d1-unit" aria-label="Diameter unit">
            <option value="mm" selected>mm</option>
            <option value="cm">cm</option>
            <option value="m">m</option>
            <option value="inch">inch</option>
          </select>
        </div>
      </label>

      <label class="psc-field">
        <span>Baseline Flow Q₁</span>
        <div class="psc-inline">
          <input id="pal-q1" type="number" step="any" min="0" placeholder="e.g., 120" required />
          <select id="pal-q1-unit" aria-label="Flow unit">
            <option value="m3s">m³/s</option>
            <option value="m3h" selected>m³/h</option>
            <option value="Ls">L/s</option>
            <option value="gpm">gpm</option>
          </select>
        </div>
      </label>

      <label class="psc-field">
        <span>Baseline Head H₁</span>
        <div class="psc-inline">
          <input id="pal-h1" type="number" step="any" min="0" placeholder="e.g., 40" required />
          <select id="pal-h1-unit" aria-label="Head unit">
            <option value="m" selected>m</option>
            <option value="ft">ft</option>
          </select>
        </div>
      </label>

      <label class="psc-field">
        <span>Baseline Power P₁</span>
        <div class="psc-inline">
          <input id="pal-p1" type="number" step="any" min="0" placeholder="e.g., 22" required />
          <select id="pal-p1-unit" aria-label="Power unit">
            <option value="kW" selected>kW</option>
            <option value="HP">HP</option>
          </select>
        </div>
      </label>

      <!-- Target (Point 2) for Speed Mode -->
      <label class="psc-field" id="pal-speed-box">
        <span>New Speed n₂ (Speed Change)</span>
        <div class="psc-inline">
          <input id="pal-n2" type="number" step="any" min="0" placeholder="e.g., 1450" />
          <span class="psc-unit">rpm</span>
        </div>
      </label>

      <!-- Target (Point 2) for Diameter Mode -->
      <label class="psc-field" id="pal-diam-box" style="display:none">
        <span>New Diameter D₂ (Diameter Change)</span>
        <div class="psc-inline">
          <input id="pal-d2" type="number" step="any" min="0" placeholder="e.g., 180" />
          <select id="pal-d2-unit" aria-label="Diameter unit">
            <option value="mm" selected>mm</option>
            <option value="cm">cm</option>
            <option value="m">m</option>
            <option value="inch">inch</option>
          </select>
        </div>
      </label>
    </div>

    <div class="psc-actions">
      <button type="button" id="pal-calc" class="psc-btn">Calculate</button>
      <button type="button" id="pal-export" class="psc-btn psc-btn-ghost" title="Export Excel with formulas"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4ca.png" alt="📊" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Export Excel</button>
      <button type="button" id="pal-reset" class="psc-btn psc-btn-ghost">Reset</button>
      <button type="button" id="pal-copy" class="psc-btn psc-btn-ghost" title="Copy results">Copy</button>
    </div>
  </form>

  <div class="psc-results" aria-live="polite">
    <div class="psc-result"><div class="psc-result-label">Mode</div><div class="psc-result-value"><span id="pal-mode-label">Speed Change</span></div></div>
    <div class="psc-result"><div class="psc-result-label">Ratio used (r)</div><div class="psc-result-value"><span id="pal-ratio">–</span></div></div>
    <div class="psc-result"><div class="psc-result-label">New Flow Q₂</div><div class="psc-result-value"><span id="pal-q2">–</span> <span id="pal-q2-unit">m³/h</span></div></div>
    <div class="psc-result"><div class="psc-result-label">New Head H₂</div><div class="psc-result-value"><span id="pal-h2">–</span> <span id="pal-h2-unit">m</span></div></div>
    <div class="psc-result"><div class="psc-result-label">New Power P₂</div><div class="psc-result-value"><span id="pal-p2">–</span> <span id="pal-p2-unit">kW</span></div></div>
    <div id="pal-note" class="psc-note"></div>
  </div>

  <details class="psc-details">
    <summary>Formulas, units &#038; assumptions</summary>
    <ul>
      <li><b>Speed Change (D constant):</b> Q₂ = Q₁·(n₂/n₁), H₂ = H₁·(n₂/n₁)², P₂ = P₁·(n₂/n₁)³</li>
      <li><b>Diameter Change (n constant):</b> Q₂ = Q₁·(D₂/D₁), H₂ = H₁·(D₂/D₁)², P₂ = P₁·(D₂/D₁)³</li>
      <li>Results shown in the <em>same units</em> as inputs (Flow: m³/s, m³/h, L/s, gpm; Head: m, ft; Power: kW, HP; Diameter: mm, cm, m, inch).</li>
      <li>Assumes constant efficiency. For large changes, verify with pump curves.</li>
    </ul>
  </details>

  <footer class="psc-footer">
    <small>Credit: <a href="https://chemicalengineeringsite.in/" target="_blank" rel="noopener">chemicalengineeringsite.in</a></small>
  </footer>
</div>

<!-- Only external dependency: SheetJS for Excel export -->
<script src="https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"></script>

<script>
(function(){
  const $ = id => document.getElementById(id);
  const byName = n => Array.from(document.getElementsByName(n));

  const EL = {
    // mode
    modeVal: () => (document.querySelector('input[name="pal-mode"]:checked')?.value || 'speed'),
    speedBox: $('pal-speed-box'),
    diamBox:  $('pal-diam-box'),
    modeLabel: $('pal-mode-label'),

    // baseline
    n1: $('pal-n1'),
    d1: $('pal-d1'), d1u: $('pal-d1-unit'),
    q1: $('pal-q1'), q1u: $('pal-q1-unit'),
    h1: $('pal-h1'), h1u: $('pal-h1-unit'),
    p1: $('pal-p1'), p1u: $('pal-p1-unit'),

    // targets
    n2: $('pal-n2'),
    d2: $('pal-d2'), d2u: $('pal-d2-unit'),

    // actions
    calc: $('pal-calc'),
    reset: $('pal-reset'),
    copy: $('pal-copy'),
    export: $('pal-export'),

    // outputs
    ratio: $('pal-ratio'),
    q2: $('pal-q2'), q2u: $('pal-q2-unit'),
    h2: $('pal-h2'), h2u: $('pal-h2-unit'),
    p2: $('pal-p2'), p2u: $('pal-p2-unit'),

    note: $('pal-note')
  };

  // === Unit helpers ===
  function D_to_m(v,u){ if(!isFinite(v))return NaN; if(u==='mm')return v/1000; if(u==='cm')return v/100; if(u==='m')return v; if(u==='inch')return v*0.0254; return NaN; }
  // Use m3/h as internal base
  function Q_to_m3h(v,u){ if(!isFinite(v))return NaN; if(u==='m3h')return v; if(u==='m3s')return v*3600; if(u==='Ls')return v*3.6; if(u==='gpm')return v*0.227124707; return NaN; }
  function Q_from_m3h(v,u){ if(u==='m3h')return v; if(u==='m3s')return v/3600; if(u==='Ls')return v/3.6; if(u==='gpm')return v/0.227124707; return NaN; }
  function H_to_m(v,u){ return u==='ft' ? v*0.3048 : v; }
  function H_from_m(v,u){ return u==='ft' ? v/0.3048 : v; }
  function P_to_kW(v,u){ return u==='HP' ? v*0.745699872 : v; }
  function P_from_kW(v,u){ return u==='HP' ? v/0.745699872 : v; }
  function flowLabel(u){ return u==='m3s'?'m³/s':(u==='m3h'?'m³/h':(u==='Ls'?'L/s':(u==='gpm'?'gpm':u))); }
  function round(v,dp){ if(!isFinite(v)) return '–'; const f=Math.pow(10,dp); return (Math.round(v*f)/f).toFixed(dp); }

  // === Mode UI toggle ===
  function updateModeUI(){
    const mode = EL.modeVal();
    const isSpeed = mode === 'speed';
    EL.speedBox.style.display = isSpeed ? '' : 'none';
    EL.diamBox.style.display  = isSpeed ? 'none' : '';
    EL.modeLabel.textContent  = isSpeed ? 'Speed Change' : 'Diameter Change';
    clearOutputs();
    EL.note.textContent = '';
  }
  byName('pal-mode').forEach(r => r.addEventListener('change', updateModeUI));

  // === Calculate ===
  let last = null; // for export/copy
  function calculate(){
    // baseline
    const n1 = Number(EL.n1.value);
    const d1v= Number(EL.d1.value);
    const q1v= Number(EL.q1.value);
    const h1v= Number(EL.h1.value);
    const p1v= Number(EL.p1.value);

    if (![n1,d1v,q1v,h1v,p1v].every(x => isFinite(x) && x>0)){
      clearOutputs();
      EL.note.textContent = 'Enter positive values for all baseline inputs.';
      return;
    }

    const d1_m   = D_to_m(d1v, EL.d1u.value);
    const q1_m3h = Q_to_m3h(q1v, EL.q1u.value);
    const h1_m   = H_to_m(h1v, EL.h1u.value);
    const p1_kW  = P_to_kW(p1v, EL.p1u.value);
    if (![d1_m,q1_m3h,h1_m,p1_kW].every(isFinite)){
      clearOutputs();
      EL.note.textContent = 'Check unit selections.';
      return;
    }

    // ratio r
    let r;
    if (EL.modeVal()==='speed'){
      const n2 = Number(EL.n2.value);
      if (!isFinite(n2) || n2<=0){ clearOutputs(); EL.note.textContent='Enter positive value for new speed n₂.'; return; }
      r = n2/n1;
    } else {
      const d2v = Number(EL.d2.value);
      if (!isFinite(d2v) || d2v<=0){ clearOutputs(); EL.note.textContent='Enter positive value for new diameter D₂.'; return; }
      const d2_m = D_to_m(d2v, EL.d2u.value);
      if (!isFinite(d2_m) || d2_m<=0){ clearOutputs(); EL.note.textContent='Check D₂ unit.'; return; }
      r = d2_m/d1_m;
    }

    // affinity laws
    const q2_m3h = q1_m3h * r;
    const h2_m   = h1_m   * (r*r);
    const p2_kW  = p1_kW  * (r*r*r);

    // display in input units
    const q2_disp = Q_from_m3h(q2_m3h, EL.q1u.value);
    const h2_disp = H_from_m(h2_m, EL.h1u.value);
    const p2_disp = P_from_kW(p2_kW, EL.p1u.value);

    EL.ratio.textContent = round(r,4);
    EL.q2.textContent    = round(q2_disp,3);
    EL.q2u.textContent   = flowLabel(EL.q1u.value);
    EL.h2.textContent    = round(h2_disp,3);
    EL.h2u.textContent   = EL.h1u.value;
    EL.p2.textContent    = round(p2_disp,3);
    EL.p2u.textContent   = EL.p1u.value;
    EL.note.textContent  = '';

    last = {
      mode: EL.modeVal(),
      n1, d1:d1v, d1u:EL.d1u.value, q1:q1v, q1u:EL.q1u.value, h1:h1v, h1u:EL.h1u.value, p1:p1v, p1u:EL.p1u.value,
      n2: EL.modeVal()==='speed' ? Number(EL.n2.value) : '',
      d2: EL.modeVal()==='diam'  ? Number(EL.d2.value) : '',
      d2u:EL.modeVal()==='diam'  ? EL.d2u.value : '',
      r, q2:q2_disp, h2:h2_disp, p2:p2_disp
    };
  }

  // === Misc helpers ===
  function clearOutputs(){
    EL.ratio.textContent='–'; EL.q2.textContent='–'; EL.h2.textContent='–'; EL.p2.textContent='–';
    EL.q2u.textContent=flowLabel(EL.q1u.value); EL.h2u.textContent=EL.h1u.value; EL.p2u.textContent=EL.p1u.value;
  }
  function resetAll(){
    EL.n1.value=''; EL.d1.value=''; EL.q1.value=''; EL.h1.value=''; EL.p1.value='';
    EL.n2.value=''; EL.d2.value='';
    EL.d1u.value='mm'; if(EL.d2u) EL.d2u.value='mm';
    EL.q1u.value='m3h'; EL.h1u.value='m'; EL.p1u.value='kW';
    clearOutputs(); EL.note.textContent=''; last=null;
    updateModeUI();
  }
  function copyResults(){
    const txt = `Pump Affinity Law Results
Mode: ${EL.modeVal()==='speed'?'Speed Change':'Diameter Change'}
r: ${EL.ratio.textContent}
Q2: ${EL.q2.textContent} ${EL.q2u.textContent}
H2: ${EL.h2.textContent} ${EL.h2u.textContent}
P2: ${EL.p2.textContent} ${EL.p2u.textContent}`;
    navigator.clipboard?.writeText(txt).then(()=>{
      EL.note.style.color='#16a34a'; EL.note.textContent='Results copied.'; setTimeout(()=>{EL.note.textContent=''; EL.note.style.color='';},1400);
    }).catch(()=>{ EL.note.style.color='#b45309'; EL.note.textContent='Copy failed. Select and copy manually.'; });
  }

  // === Excel export (live formulas; unit strings aligned: m3h/m3s/Ls/gpm) ===
  function exportExcel(){
    const s = last || {};
    const modeStr = s.mode==='diam' ? 'Diameter Change' : 'Speed Change';

    const A = [
      ['Pump Affinity Law Calculator','','','',''],
      ['','','','',''],
      ['Mode', modeStr,'','',''],

      ['n1 (rpm)', s.n1||'','','',''],
      ['D1 (value)', s.d1||'','Unit', s.d1u||'mm',''],
      ['Q1 (value)', s.q1||'','Unit', s.q1u||'m3h',''],
      ['H1 (value)', s.h1||'','Unit', s.h1u||'m',''],
      ['P1 (value)', s.p1||'','Unit', s.p1u||'kW',''],

      ['','','','',''],
      ['Target (Change to)','','','',''],
      ['n2 (rpm; Speed Change)', s.mode==='speed'?(s.n2||''):'','','',''],
      ['D2 (value; Diameter Change)', s.mode==='diam'?(s.d2||''):'','Unit', s.mode==='diam'?(s.d2u||'mm'):'',''],

      ['','','','',''],
      ['Conversions (auto)','','','',''],
      ['D1_m','','','',''],
      ['D2_m','','','',''],
      ['Q1_m3h','','','',''],
      ['H1_m','','','',''],
      ['P1_kW','','','',''],

      ['','','','',''],
      ['Ratio r','','','',''],
      ['r (by mode)','','','',''],

      ['','','','',''],
      ['Outputs (base units)','','','',''],
      ['Q2 (m3/h)','','','',''],
      ['H2 (m)','','','',''],
      ['P2 (kW)','','','',''],

      ['','','','',''],
      ['Reported in same units as inputs','','','',''],
      ['Q2 (same unit as Q1)','','','Unit',''],
      ['H2 (same unit as H1)','','','Unit',''],
      ['P2 (same unit as P1)','','','Unit',''],

      ['','','','',''],
      ['Source: chemicalengineeringsite.in','','','','']
    ];

    const ws = XLSX.utils.aoa_to_sheet(A);
    ws['!cols'] = [{wch:34},{wch:18},{wch:10},{wch:12},{wch:14}];
    ws['!freeze'] = { xSplit:1, ySplit:9 };

    // Helper: find row index by matching the label in column A
    function rowOf(label){
      for (const addr in ws){
        if (!/^[A-Z]+[0-9]+$/.test(addr)) continue;
        const c = ws[addr];
        if (addr.startsWith('A') && c && c.v === label) {
          return parseInt(addr.replace(/^[A-Z]+/,''),10);
        }
      }
      return null;
    }
    const setB = (r, f) => ws['B'+r] = {t:'n', f};

    // Find rows
    const rMode = rowOf('Mode');

    const rN1  = rowOf('n1 (rpm)');
    const rD1  = rowOf('D1 (value)');
    const rQ1  = rowOf('Q1 (value)');
    const rH1  = rowOf('H1 (value)');
    const rP1  = rowOf('P1 (value)');

    const rN2  = rowOf('n2 (rpm; Speed Change)');
    const rD2  = rowOf('D2 (value; Diameter Change)');

    const rD1m = rowOf('D1_m');
    const rD2m = rowOf('D2_m');
    const rQ1h = rowOf('Q1_m3h');
    const rH1m = rowOf('H1_m');
    const rP1k = rowOf('P1_kW');

    const rR   = rowOf('r (by mode)');

    const rQ2b = rowOf('Q2 (m3/h)');
    const rH2b = rowOf('H2 (m)');
    const rP2b = rowOf('P2 (kW)');

    const rQ2u = rowOf('Q2 (same unit as Q1)');
    const rH2u = rowOf('H2 (same unit as H1)');
    const rP2u = rowOf('P2 (same unit as P1)');

    // --- Conversions (B-column formulas) ---
    setB(rD1m, `B${rD1}*IF(D${rD1}="mm",1/1000,IF(D${rD1}="cm",1/100,IF(D${rD1}="m",1,IF(D${rD1}="inch",0.0254,""))))`);
    setB(rD2m, `IF(B${rD2}="", "", B${rD2}*IF(D${rD2}="mm",1/1000,IF(D${rD2}="cm",1/100,IF(D${rD2}="m",1,IF(D${rD2}="inch",0.0254,"")))))`);

    /* FIXED: compare with m3h/m3s (no slash) */
    setB(rQ1h, `B${rQ1}*IF(D${rQ1}="m3h",1,IF(D${rQ1}="m3s",3600,IF(D${rQ1}="Ls",3.6,IF(D${rQ1}="gpm",0.227124707,""))))`);
    setB(rH1m, `B${rH1}*IF(D${rH1}="m",1,IF(D${rH1}="ft",0.3048,""))`);
    setB(rP1k, `B${rP1}*IF(D${rP1}="kW",1,IF(D${rP1}="HP",0.745699872,""))`);

    // --- Ratio r ---
    setB(rR, `IF(B${rMode}="Diameter Change", IF(B${rD2m}<=0,"", IF(B${rD1m}<=0,"", B${rD2m}/B${rD1m})), IF(B${rN1}<=0,"", IF(B${rN2}<=0,"", B${rN2}/B${rN1})))`);

    // --- Outputs (base units) ---
    setB(rQ2b, `IF(B${rR}="","", B${rQ1h}*B${rR})`);
    setB(rH2b, `IF(B${rR}="","", B${rH1m}*POWER(B${rR},2))`);
    setB(rP2b, `IF(B${rR}="","", B${rP1k}*POWER(B${rR},3))`);

    // --- Reported in same units as inputs ---
    /* FIXED to use m3h/m3s */
    setB(rQ2u, `IF(B${rQ2b}="","", B${rQ2b}*IF(D${rQ1}="m3h",1,IF(D${rQ1}="m3s",1/3600,IF(D${rQ1}="Ls",1/3.6,IF(D${rQ1}="gpm",1/0.227124707,"")))))`);
    ws['E'+rQ2u] = { t:'s', f:`IF(D${rQ1}="","",D${rQ1})` };

    setB(rH2u, `IF(B${rH2b}="","", B${rH2b}*IF(D${rH1}="m",1,IF(D${rH1}="ft",1/0.3048,"")))`);
    ws['E'+rH2u] = { t:'s', f:`IF(D${rH1}="","",D${rH1})` };

    setB(rP2u, `IF(B${rP2b}="","", B${rP2b}*IF(D${rP1}="kW",1,IF(D${rP1}="HP",1/0.745699872,"")))`);
    ws['E'+rP2u] = { t:'s', f:`IF(D${rP1}="","",D${rP1})` };

    // Make the source clickable
    const lastRow = Math.max(...Object.keys(ws).filter(k=>/^[A-Z]+\d+$/.test(k)).map(k=>+k.replace(/^[A-Z]+/,'')));
    ws['A'+lastRow] = { t:'s', v:'Source: chemicalengineeringsite.in', l:{ Target:'https://chemicalengineeringsite.in/' } };

    const wb = XLSX.utils.book_new();
    XLSX.utils.book_append_sheet(wb, ws, 'Affinity Laws');

    const ts = new Date().toISOString().slice(0,19).replace(/[:T]/g,'-');
    XLSX.writeFile(wb, 'pump_affinity_law_'+ts+'.xlsx');
  }

  // === Wire-up ===
  EL.calc.addEventListener('click', calculate);
  EL.reset.addEventListener('click', resetAll);
  EL.copy.addEventListener('click', copyResults);
  EL.export.addEventListener('click', exportExcel);
  ['pal-n1','pal-d1','pal-q1','pal-h1','pal-p1','pal-n2','pal-d2'].forEach(id=>{
    const node=$(id); if(!node) return;
    node.addEventListener('keydown', e=>{ if(e.key==='Enter'){ e.preventDefault(); calculate(); } });
  });

  // Init
  updateModeUI();
  clearOutputs();
})();
</script>
</body>
</html>




<p></p>
<p>The post <a href="https://chemicalengineeringsite.in/centrifugal-pump-affinity-law-calculator/">Centrifugal Pump Affinity Law Calculator</a> appeared first on <a href="https://chemicalengineeringsite.in">Chemical Engineering Site</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Pump Specific Speed Calculator</title>
		<link>https://chemicalengineeringsite.in/pump-specific-speed-calculator/</link>
					<comments>https://chemicalengineeringsite.in/pump-specific-speed-calculator/#respond</comments>
		
		<dc:creator><![CDATA[chemicalengineeringsite]]></dc:creator>
		<pubDate>Fri, 29 Aug 2025 12:00:00 +0000</pubDate>
				<category><![CDATA[Calculators]]></category>
		<category><![CDATA[Centrifugal Pumps.]]></category>
		<category><![CDATA[Pump]]></category>
		<category><![CDATA[Pump Specific Speed]]></category>
		<guid isPermaLink="false">https://chemicalengineeringsite.in/?p=3873</guid>

					<description><![CDATA[<p>Pump Specific Speed Calculator Enter pump speed, flow rate, and head. Calculates metric nq and US Ns, with impeller type &#038; application. Export to Excel with live formulas. Pump Speed rpm Flow Rate m³/sm³/hL/sgpm Total Head mft Calculate &#x1f4ca; Export Excel Reset Copy Specific Speed (metric nq) – Specific Speed (US Ns) – Impeller Type [&#8230;]</p>
<p>The post <a href="https://chemicalengineeringsite.in/pump-specific-speed-calculator/">Pump Specific Speed Calculator</a> appeared first on <a href="https://chemicalengineeringsite.in">Chemical Engineering Site</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<!-- Pump Specific Speed Calculator + Excel Export -->
<div id="psc" class="psc-card" role="region" aria-label="Pump Specific Speed Calculator">
  <div class="psc-header">
    <h3 class="psc-title">Pump Specific Speed Calculator</h3>
    <p class="psc-sub">Enter pump speed, flow rate, and head. Calculates metric n<sub>q</sub> and US N<sub>s</sub>, with impeller type &#038; application. Export to Excel with live formulas.</p>
  </div>

  <form class="psc-form" onsubmit="return false;">
    <div class="psc-grid">
      <label class="psc-field">
        <span>Pump Speed</span>
        <div class="psc-inline">
          <input id="psc-n" type="number" step="any" min="0" placeholder="e.g., 2900" required />
          <span class="psc-unit">rpm</span>
        </div>
      </label>

      <label class="psc-field">
        <span>Flow Rate</span>
        <div class="psc-inline">
          <input id="psc-q" type="number" step="any" min="0" placeholder="e.g., 120" required />
          <select id="psc-q-unit" aria-label="Flow unit">
            <option value="m3s">m³/s</option>
            <option value="m3h" selected>m³/h</option>
            <option value="Ls">L/s</option>
            <option value="gpm">gpm</option>
          </select>
        </div>
      </label>

      <label class="psc-field">
        <span>Total Head</span>
        <div class="psc-inline">
          <input id="psc-h" type="number" step="any" min="0" placeholder="e.g., 40" required />
          <select id="psc-h-unit" aria-label="Head unit">
            <option value="m" selected>m</option>
            <option value="ft">ft</option>
          </select>
        </div>
      </label>
    </div>

    <div class="psc-actions">
      <button type="button" id="psc-calc" class="psc-btn">Calculate</button>
      <button type="button" id="psc-export" class="psc-btn psc-btn-ghost" title="Export Excel with formulas"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4ca.png" alt="📊" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Export Excel</button>
      <button type="button" id="psc-reset" class="psc-btn psc-btn-ghost">Reset</button>
      <button type="button" id="psc-copy" class="psc-btn psc-btn-ghost" title="Copy results">Copy</button>
    </div>
  </form>

  <div class="psc-results" aria-live="polite">
    <div class="psc-result">
      <div class="psc-result-label">Specific Speed (metric n<sub>q</sub>)</div>
      <div class="psc-result-value"><span id="psc-nq">–</span></div>
    </div>
    <div class="psc-result">
      <div class="psc-result-label">Specific Speed (US N<sub>s</sub>)</div>
      <div class="psc-result-value"><span id="psc-ns">–</span></div>
    </div>
    <div class="psc-result">
      <div class="psc-result-label">Impeller Type</div>
      <div class="psc-result-value"><span id="psc-type">–</span></div>
    </div>
    <div class="psc-result">
      <div class="psc-result-label">Typical Application</div>
      <div class="psc-result-value"><span id="psc-app">–</span></div>
    </div>
    <div id="psc-note" class="psc-note"></div>
  </div>

  <details class="psc-details">
    <summary>Formula &#038; unit notes</summary>
    <ul>
      <li>Metric: <code>nq = n · sqrt(Q[m³/s]) / H[m]^(3/4)</code></li>
      <li>US: <code>Ns = n · sqrt(Q[gpm]) / H[ft]^(3/4)</code></li>
      <li>Classification by <em>metric nq</em> (editable in Excel):
        <ul>
          <li><strong>Radial</strong>: nq &lt; 30 (high head, low flow)</li>
          <li><strong>Mixed</strong>: 30 ≤ nq &lt; 80 (medium head/flow)</li>
          <li><strong>Axial</strong>: nq ≥ 80 (low head, very high flow)</li>
        </ul>
      </li>
    </ul>
  </details>

  <footer class="psc-footer">
    <small>Credit: <a href="https://chemicalengineeringsite.in/" target="_blank" rel="noopener">chemicalengineeringsite.in</a></small>
  </footer>
</div>

<style>
  .psc-card{--b:#e6eef6;--t:#0f172a;--muted:#475569;--a:#2563eb;--bg:#ffffff;max-width:860px;margin:1.25rem auto;padding:1.25rem;border:1px solid var(--b);border-radius:16px;background:var(--bg);box-shadow:0 6px 20px rgba(2,6,23,.06)}
  .psc-title{margin:.25rem 0;font-size:1.25rem;color:var(--t)}
  .psc-sub{margin:0;color:var(--muted)}
  .psc-form{margin-top:.75rem}
  .psc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
  @media (max-width:860px){.psc-grid{grid-template-columns:1fr}}
  .psc-field{display:flex;flex-direction:column;gap:6px}
  .psc-field span{font-weight:600;color:var(--t)}
  .psc-inline{display:flex;gap:8px;align-items:center}
  .psc-field input,.psc-field select{width:100%;padding:.6rem .7rem;border:1px solid var(--b);border-radius:10px;background:#fff;color:var(--t)}
  .psc-unit{color:var(--muted)}
  .psc-actions{display:flex;gap:10px;margin-top:.75rem;flex-wrap:wrap}
  .psc-btn{border:1px solid var(--a);background:var(--a);color:#fff;border-radius:999px;padding:.55rem .9rem;font-weight:600;cursor:pointer}
  .psc-btn-ghost{background:#fff;color:var(--a)}
  .psc-results{margin-top:1rem;border-top:1px dashed var(--b);padding-top:.9rem}
  .psc-result{display:flex;justify-content:space-between;align-items:center;margin:.35rem 0}
  .psc-result-label{color:var(--muted)}
  .psc-result-value{font-size:1.1rem;font-weight:700;color:var(--t)}
  .psc-note{margin-top:.4rem;color:#b45309}
  .psc-details{margin-top:.6rem}
  .psc-footer{margin-top:.6rem;color:var(--muted)}
</style>

<!-- SheetJS for Excel export -->
<script src="https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"></script>

<script>
(function(){
  const $ = id => document.getElementById(id);
  const EL = {
    n: $('psc-n'),
    q: $('psc-q'),
    qUnit: $('psc-q-unit'),
    h: $('psc-h'),
    hUnit: $('psc-h-unit'),
    btnCalc: $('psc-calc'),
    btnReset: $('psc-reset'),
    btnCopy: $('psc-copy'),
    btnExport: $('psc-export'),
    nq: $('psc-nq'),
    ns: $('psc-ns'),
    type: $('psc-type'),
    app: $('psc-app'),
    note: $('psc-note')
  };

  // Unit conversions
  function to_m3s(val, unit){
    switch(unit){
      case 'm3s': return val;
      case 'm3h': return val / 3600;
      case 'Ls':  return val / 1000;
      case 'gpm': return (val * 0.003785411784) / 60; // gpm -> m3/s
      default:    return NaN;
    }
  }
  function to_gpm(val, unit){
    switch(unit){
      case 'gpm': return val;
      case 'm3s': return (val * 60) / 0.003785411784;
      case 'm3h': return (val / 3600) * 60 / 0.003785411784;
      case 'Ls':  return (val / 1000) * 60 / 0.003785411784;
      default:    return NaN;
    }
  }
  function to_m(val, unit){ return unit==='ft' ? val * 0.3048 : val; }
  function to_ft(val, unit){ return unit==='m' ? val / 0.3048 : val; }

  function round(v, dp=2){
    if (!Number.isFinite(v)) return '–';
    const f = Math.pow(10, dp);
    return (Math.round(v * f) / f).toFixed(dp);
  }

  function classify_nq(nq){
    if (!Number.isFinite(nq)) return {type:'–', app:'–'};
    if (nq < 30) return {type:'Radial-flow (centrifugal)', app:'High head, low flow; closed/Francis impeller'};
    if (nq < 80) return {type:'Mixed-flow', app:'Medium head and flow; mixed-flow impeller'};
    return {type:'Axial-flow (propeller)', app:'Low head, very high flow; propeller/Kaplan'};
  }

  function calc(){
    const n = Number(EL.n.value);
    const q = Number(EL.q.value);
    const h = Number(EL.h.value);

    if (![n,q,h].every(x => Number.isFinite(x) && x > 0)) {
      EL.nq.textContent = '–';
      EL.ns.textContent = '–';
      EL.type.textContent = '–';
      EL.app.textContent  = '–';
      EL.note.textContent = 'Enter positive values for all inputs.';
      return;
    }

    const Q_m3s = to_m3s(q, EL.qUnit.value);
    const Q_gpm = to_gpm(q, EL.qUnit.value);
    const H_m   = to_m(h, EL.hUnit.value);
    const H_ft  = to_ft(h, EL.hUnit.value);

    if (![Q_m3s, Q_gpm, H_m, H_ft].every(Number.isFinite) || H_m<=0 || H_ft<=0) {
      EL.nq.textContent = '–';
      EL.ns.textContent = '–';
      EL.type.textContent = '–';
      EL.app.textContent  = '–';
      EL.note.textContent = 'Check unit selections.';
      return;
    }

    const nq = n * Math.sqrt(Q_m3s) / Math.pow(H_m, 0.75);
    const Ns = n * Math.sqrt(Q_gpm) / Math.pow(H_ft, 0.75);

    EL.nq.textContent = round(nq, 2);
    EL.ns.textContent = round(Ns, 0);

    const {type, app} = classify_nq(nq);
    EL.type.textContent = type;
    EL.app.textContent  = app;

    EL.note.textContent = '';

    // save for export
    window.__psc_state = {
      n, q, h, qUnit: EL.qUnit.value, hUnit: EL.hUnit.value, nq, Ns, type, app
    };
  }

  function reset(){
    EL.n.value = '';
    EL.q.value = '';
    EL.h.value = '';
    EL.qUnit.value = 'm3h';
    EL.hUnit.value = 'm';
    ['nq','ns','type','app'].forEach(k => EL[k].textContent = '–');
    EL.note.textContent = '';
    window.__psc_state = null;
  }

  function copyResults(){
    const txt = `Specific Speed (nq metric): ${EL.nq.textContent}
Specific Speed (Ns US): ${EL.ns.textContent}
Impeller Type: ${EL.type.textContent}
Application: ${EL.app.textContent}`;
    navigator.clipboard?.writeText(txt).then(()=>{
      EL.note.style.color = '#16a34a';
      EL.note.textContent = 'Results copied to clipboard.';
      setTimeout(()=>{ EL.note.textContent=''; EL.note.style.color=''; }, 1600);
    }).catch(()=>{
      EL.note.style.color = '#b45309';
      EL.note.textContent = 'Copy failed. You can select and copy manually.';
    });
  }

  // ---- Excel export with live formulas ----
  function exportExcel(){
    const s = window.__psc_state || {};
    // Build rows (formulas rely on unit strings in C4 and C5)
    const data = [
      ['Pump Specific Speed Calculator','','','',''],
      ['Inputs','','','',''],
      ['Speed, n (rpm)', s.n ?? '', '', '', ''],
      ['Flow, Q (value)', s.q ?? '', 'Unit', s.qUnit ?? 'm3h', ''],
      ['Head, H (value)', s.h ?? '', 'Unit', s.hUnit ?? 'm', ''],
      ['','','','',''],
      ['Conversions (auto from units)','','','',''],
      // Q_m3s
      ['Q in m³/s', {t:'n', f:'B4*IF(D4="m3/s",1,IF(D4="m3/h",1/3600,IF(D4="Ls",1/1000,IF(D4="gpm",0.003785411784/60,""))))'},'','',''],
      // H_m
      ['H in m', {t:'n', f:'B5*IF(D5="m",1,IF(D5="ft",0.3048,""))'},'','',''],
      // Q_gpm
      ['Q in gpm', {t:'n', f:'B4*IF(D4="gpm",1,IF(D4="m3/s",60/0.003785411784,IF(D4="m3/h",(1/3600)*(60/0.003785411784),IF(D4="Ls",(1/1000)*(60/0.003785411784),""))))'},'','',''],
      // H_ft
      ['H in ft', {t:'n', f:'B5*IF(D5="ft",1,IF(D5="m",1/0.3048,""))'},'','',''],
      ['','','','',''],
      ['Outputs','','','',''],
      ['Specific Speed (metric nq)', {t:'n', f:'IF(OR(B3<=0,B8<=0,B9<=0),"", B3*SQRT(B8)/POWER(B9,0.75))'}, '', '', ''],
      ['Specific Speed (US Ns)', {t:'n', f:'IF(OR(B3<=0,B10<=0,B11<=0),"", B3*SQRT(B10)/POWER(B11,0.75))'}, '', '', ''],
      ['Impeller Type (by nq)', {t:'s', f:'IF(B13="","",IF(B13<30,"Radial-flow (centrifugal)",IF(B13<80,"Mixed-flow","Axial-flow (propeller)")))'}, '', '', ''],
      ['Typical Application', {t:'s', f:'IF(B13="","",IF(B13<30,"High head, low flow; closed/Francis impeller",IF(B13<80,"Medium head and flow; mixed-flow impeller","Low head, very high flow; propeller/Kaplan")))'}, '', '', ''],
      ['','','','',''],
      ['Source: chemicalengineeringsite.in','','','','']
    ];

    const ws = XLSX.utils.aoa_to_sheet(data);
    ws['!cols'] = [{wch:34},{wch:18},{wch:10},{wch:14},{wch:10}];

    // Make the source clickable
    const lastRow = data.length + 0; // already 1-indexed properly by aoa_to_sheet
    const srcCell = `A${lastRow}`;
    ws[srcCell] = { t:'s', v:'Source: chemicalengineeringsite.in', l:{ Target:'https://chemicalengineeringsite.in/' } };

    // Freeze panes (keep titles/inputs visible)
    ws['!freeze'] = { xSplit: 1, ySplit: 7 };

    const wb = XLSX.utils.book_new();
    XLSX.utils.book_append_sheet(wb, ws, 'Specific Speed');

    const ts = new Date().toISOString().slice(0,19).replace(/[:T]/g,'-');
    XLSX.writeFile(wb, `pump_specific_speed_${ts}.xlsx`);
  }

  // Wire up
  EL.btnCalc.addEventListener('click', calc);
  EL.btnReset.addEventListener('click', reset);
  EL.btnCopy.addEventListener('click', copyResults);
  EL.btnExport.addEventListener('click', exportExcel);

  // Auto-calc on Enter
  ['psc-n','psc-q','psc-h'].forEach(id=>{
    document.getElementById(id).addEventListener('keydown', e=>{
      if (e.key === 'Enter'){ e.preventDefault(); calc(); }
    });
  });
})();
</script>
<!-- /Pump Specific Speed Calculator + Excel Export -->

<p>The post <a href="https://chemicalengineeringsite.in/pump-specific-speed-calculator/">Pump Specific Speed Calculator</a> appeared first on <a href="https://chemicalengineeringsite.in">Chemical Engineering Site</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://chemicalengineeringsite.in/pump-specific-speed-calculator/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
