<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Stankotorg LLC]]></title><description><![CDATA[Stankotorg LLC]]></description><link>https://stankotorg.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Dec 2026 19:54:34 GMT</lastBuildDate><atom:link href="https://stankotorg.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[A small Python log for band-saw coolant concentration and makeup additions]]></title><description><![CDATA[A metal-cutting band saw usually runs an emulsion or a solution in the cut to carry heat away, lubricate the tooth, and flush chips out of the gullets. The…]]></description><link>https://stankotorg.hashnode.dev/a-small-python-log-for-band-saw-coolant-concentration-and-makeup-additions</link><guid isPermaLink="true">https://stankotorg.hashnode.dev/a-small-python-log-for-band-saw-coolant-concentration-and-makeup-additions</guid><category><![CDATA[Python]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[engineering]]></category><category><![CDATA[#manufacturing]]></category><dc:creator><![CDATA[info]]></dc:creator><pubDate>Wed, 25 Nov 2026 12:22:57 GMT</pubDate><content:encoded><![CDATA[<p>A metal-cutting band saw usually runs an emulsion or a solution in the cut to carry heat away, lubricate the tooth, and flush chips out of the gullets. The useful question in the sump is not "what percentage does everyone use?" but "what does this label ask for, and is that mix still there?" A short log and two mixing formulae can answer that without inventing a universal target.</p>
<p>Concentration belongs with band speed, feed, and tooth pitch as part of the cutting regime. A mix that is too lean will not cool or lubricate <a href="https://stankotorg.ru/">bimetal band saw blades</a> as the supplier intended; a mix that is too rich wastes concentrate and can leave a sticky residue. The functions below take the label range and the refractometer factor from you. They do not invent a factory-wide percentage.</p>
<h2>From a refractometer reading to a percentage</h2>
<p>Many metalworking fluids are checked with a handheld refractometer. The instrument shows a scale reading (often in degrees Brix), which is not, by itself, the volume-percent concentration. The datasheet usually gives a factor for that fluid and that type of scale:</p>
<pre><code class="language-text">estimated % = reading × factor
</code></pre>
<p>The factor is a property of the product, not a constant of nature: two coolants can share a Brix reading and still have different concentrations. Use the factor printed for the fluid in the tank, or the maker's chart if there is no single factor. A zero reading on clean water is a useful instrument check. Tramp oil on the prism or a worn unit will move the reading even when the mix has not changed, so treat a surprise as a prompt to clean and sample again, not as an automatic makeup dose.</p>
<h2>How much concentrate or water to add</h2>
<p>Treat the percentages as volume fractions and assume the tank volume <code>V</code> is known in litres. If the current concentration is <code>C</code> and you want <code>T</code> (both as fractions, so 9% is <code>0.09</code>), then:</p>
<pre><code class="language-text">to raise the mix, add concentrate  x = V (T − C) / (1 − T)
to lower the mix, add water        w = V (C / T − 1)
</code></pre>
<p>Both results are in litres. The first identity is a mass-balance (new concentrate is the old amount plus <code>x</code>, new volume is <code>V + x</code>); the second keeps the concentrate amount fixed and dilutes it. If <code>T</code> equals <code>C</code>, both additions are zero. A function pointed the wrong way raises <code>ValueError</code> instead of inventing a negative dose. The identities assume volume percent. If the maker specifies a weight percent, weigh the addition. After you add, circulate the sump and measure again.</p>
<h2>The code</h2>
<pre><code class="language-python">def concentration_from_refractometer(reading, factor):
    if reading &lt; 0 or factor &lt;= 0:
        raise ValueError("reading cannot be negative; factor must be positive")
    return reading * factor


def _as_fractions(volume_l, current_pct, target_pct):
    if volume_l &lt;= 0:
        raise ValueError("volume_l must be positive")
    current, target = current_pct / 100.0, target_pct / 100.0
    if not (0 &lt;= current &lt; 1.0) or not (0 &lt; target &lt; 1.0):
        raise ValueError("percentages out of range")
    return current, target


def concentrate_to_add_litres(volume_l, current_pct, target_pct):
    current, target = _as_fractions(volume_l, current_pct, target_pct)
    if target &lt; current:
        raise ValueError("target is below current; add water instead")
    return 0.0 if target == current else volume_l * (target - current) / (1.0 - target)


def water_to_add_litres(volume_l, current_pct, target_pct):
    current, target = _as_fractions(volume_l, current_pct, target_pct)
    if target &gt; current:
        raise ValueError("target is above current; add concentrate instead")
    return 0.0 if target == current else volume_l * (current / target - 1.0)
</code></pre>
<p>The test file wraps each reading with the product, factor, label range, and tank volume, and reports whether the estimate still sits inside that label range.</p>
<h2>Worked examples</h2>
<p>The numbers in this section are an example label, not a standard. Suppose one emulsion's datasheet gives a working range of 6–10% and a refractometer factor of 1.8, and the tank holds 80 litres.</p>
<pre><code class="language-python">concentration_from_refractometer(5.0, 1.8)  # 9.0
concentration_from_refractometer(4.0, 1.8)  # 7.2
concentration_from_refractometer(3.0, 1.8)  # 5.4
</code></pre>
<p>A reading of 5.0 is 9%, inside that label range; 4.0 is 7.2%, still inside; 3.0 is 5.4%, below this label's 6% minimum. The same readings would mean something else with a different factor, which is why the factor travels with the product name in each log row.</p>
<p>If the 80 litre tank is at 9% and you want 10%:</p>
<pre><code class="language-python">concentrate_to_add_litres(80.0, 9.0, 10.0)
# 0.8888888888888896   which is 8/9 litres
</code></pre>
<p>That float is <code>80 * 0.01 / 0.90</code> in binary floating point; the addition does bring 80 litres at 9% to 10%. If the tank has crept up to 12% after water evaporated, and you want 10% again:</p>
<pre><code class="language-python">water_to_add_litres(80.0, 12.0, 10.0)
# 15.999999999999996   litres, i.e. 16
</code></pre>
<p>Calling <code>concentrate_to_add_litres</code> to go from 12% down to 10%, or <code>water_to_add_litres</code> from 9% up to 10%, raises <code>ValueError</code>. Pick the function that matches the direction, then measure again after the sump has mixed.</p>
<h2>Tests</h2>
<p>Nine unit tests were run (<code>python3 -m unittest test_coolant_log.py -v</code>). They check the three sample concentrations, the <code>8/9</code> L and <code>16</code> L doses (and that they land on the target), a zero addition when current equals target, and <code>ValueError</code> on a wrong-direction request, a bad volume, factor, or reading, an empty product name, and a reversed label range. The run was:</p>
<pre><code class="language-text">Ran 9 tests in 0.000s

OK
</code></pre>
<h2>Caveats</h2>
<p>Copy the factor and the allowed range from the coolant you actually poured, every time you change brand or grade. Do not reuse the 6–10% and 1.8 figures above as a shop standard; they were only a worked example. Sample after circulation, not from a stagnant corner. If the maker says "water first, then concentrate," follow that on a fresh tank. The log will not warn you about smell, rust, or a broken pump. Those need a look at the machine.</p>
<p>Source: <em>Metal-Cutting Band Saw Blades</em> (publisher — Stankotorg), DOI <a href="https://doi.org/10.5281/zenodo.23297044">https://doi.org/10.5281/zenodo.23297044</a></p>
]]></content:encoded></item><item><title><![CDATA[A Python helper to check band-saw bend radius against the wheels and a contour cut]]></title><description><![CDATA[A band-saw blade spends its life bending around the wheels and, on a contour saw, also bending in the plane of the cut. Two geometry checks come up before…]]></description><link>https://stankotorg.hashnode.dev/a-python-helper-to-check-band-saw-bend-radius-against-the-wheels-and-a-contour-cut</link><guid isPermaLink="true">https://stankotorg.hashnode.dev/a-python-helper-to-check-band-saw-bend-radius-against-the-wheels-and-a-contour-cut</guid><category><![CDATA[#manufacturing]]></category><category><![CDATA[Python]]></category><category><![CDATA[engineering]]></category><dc:creator><![CDATA[info]]></dc:creator><pubDate>Wed, 25 Nov 2026 10:58:35 GMT</pubDate><content:encoded><![CDATA[<p>A band-saw blade spends its life bending around the wheels and, on a contour saw, also bending in the plane of the cut. Two geometry checks come up before you order or mount a blade: is the backing thick enough to be stiff, but not so thick that the wheels work it too hard, and is the blade narrow enough to follow the tightest radius in the drawing? Both can be turned into small, testable functions. The numbers below are common published guidelines, not a substitute for the blade or machine maker's data.</p>
<h2>Thickness versus wheel diameter</h2>
<p>Each time the band wraps a wheel of diameter <code>D</code>, a blade of thickness <code>t</code> is bent to a radius <code>R = D/2</code>. For a thin strip the outer-fibre bending strain is</p>
<pre><code class="language-text">ε ≈ t / (2R) = t / D
</code></pre>
<p>A larger <code>D/t</code> means less strain in the backing on every revolution, and therefore less fatigue at the weld and in the gullets. A smaller ratio does the opposite: the band is flexed more severely, and cracks appear sooner.</p>
<p>A common published rule of thumb is that the wheel diameter should be about <strong>1000 times</strong> the blade thickness, or equivalently that thickness should not exceed <code>D/1000</code>. Several blade and tool makers state this figure as a starting guide. It is a guideline, not a law: many production metal-cutting saws run a thicker bimetal band than <code>D/1000</code> would allow, because the machine and the blade were designed together. Always check the maker's data for that blade and that saw. The helper below only reports the ratio, the implied strain, and whether the 1000:1 test (or another limit you pass in) is met.</p>
<h2>Blade width versus minimum contour radius</h2>
<p>For a straight cutoff, a wider blade is usually better: it has more beam stiffness and tracks straighter. For a contour cut the blade must flex sideways, and width becomes the limit on how tight a radius you can follow. Forcing a wide blade around too small a radius can twist the teeth in the guides, wander, or pull the band off the wheels.</p>
<p>Maker charts for minimum cut radius versus width are not identical. One widely published table, used here as a starting check and originally given in inches, is:</p>
<pre><code class="language-text">width     1/8"   3/16"   1/4"   3/8"   1/2"   5/8"   3/4"   1"
min. R    3/16"  5/16"   5/8"   1-1/2" 2-1/2" 4"     5-1/2" 7"
</code></pre>
<p>Use the <strong>widest</strong> standard width that can still follow the tightest radius on the job, then confirm against the blade maker's own chart.</p>
<h2>The code</h2>
<pre><code class="language-python">INCH = 25.4
DEFAULT_MIN_D_OVER_T = 1000.0

# Common published contour guide (inches → mm). Other charts differ.
CONTOUR_GUIDE_MM = {
    w * INCH: r * INCH
    for w, r in (
        (1 / 8, 3 / 16),
        (3 / 16, 5 / 16),
        (1 / 4, 5 / 8),
        (3 / 8, 1.5),
        (1 / 2, 2.5),
        (5 / 8, 4),
        (3 / 4, 5.5),
        (1, 7),
    )
}

def diameter_to_thickness_ratio(wheel_d_mm, thickness_mm):
    if wheel_d_mm &lt;= 0 or thickness_mm &lt;= 0:
        raise ValueError("dimensions must be positive")
    return wheel_d_mm / thickness_mm

def bending_strain(thickness_mm, wheel_d_mm):
    """Approximate outer-fibre strain: ε ≈ t/D."""
    if thickness_mm &lt;= 0 or wheel_d_mm &lt;= 0:
        raise ValueError("dimensions must be positive")
    return thickness_mm / wheel_d_mm

def wheel_guideline(wheel_d_mm, thickness_mm, min_ratio=DEFAULT_MIN_D_OVER_T):
    ratio = diameter_to_thickness_ratio(wheel_d_mm, thickness_mm)
    return {
        "ratio": ratio,
        "meets_guideline": ratio &gt;= min_ratio,
        "approx_strain": bending_strain(thickness_mm, wheel_d_mm),
        "max_thickness_mm": wheel_d_mm / min_ratio,
    }

def min_radius_for_width(width_mm, table=None, tol_mm=0.15):
    table = CONTOUR_GUIDE_MM if table is None else table
    for w, r in table.items():
        if abs(w - width_mm) &lt;= tol_mm:
            return r
    raise KeyError(f"width {width_mm} mm is not in the guide table")

def max_width_for_radius(radius_mm, table=None):
    table = CONTOUR_GUIDE_MM if table is None else table
    if radius_mm &lt;= 0:
        raise ValueError("radius must be positive")
    ok = [w for w, r in table.items() if r &lt;= radius_mm]
    return max(ok) if ok else None
</code></pre>
<h2>Worked examples</h2>
<p>Why thickness, wheel diameter and blade width are chosen together is discussed in the reference material at <a href="https://stankotorg.ru/">https://stankotorg.ru/</a>. The values below were printed by running the functions.</p>
<p>A 1000 mm wheel and a 1.0 mm blade sit exactly on the guideline:</p>
<pre><code class="language-python">wheel_guideline(1000, 1.0)
# ratio 1000.0, meets_guideline True, approx_strain 0.001, max_thickness_mm 1.0
</code></pre>
<p>A 400 mm wheel with a 1.3 mm bimetal blade, a combination you will actually see on metal cutoff saws, falls well below 1000:1:</p>
<pre><code class="language-python">wheel_guideline(400, 1.3)
# ratio 307.6923076923077, meets_guideline False
# approx_strain 0.0032500000000000003, max_thickness_mm 0.4
</code></pre>
<p>That result does not mean the blade is illegal; it means this conservative thickness rule is not met, so you should go to the saw and blade maker rather than treat <code>0.4 mm</code> as the only allowable gauge. A 500 mm wheel with a 0.9 mm blade gave a ratio of <code>555.5555555555555</code> and also failed the default 1000:1 test. Passing a different <code>min_ratio</code> is the hook for a maker's own limit.</p>
<p>Contour checks, using the table above:</p>
<pre><code class="language-python">min_radius_for_width(6.35)    # 1/4 in  →  15.875 mm
min_radius_for_width(12.7)    # 1/2 in  →  63.5 mm
min_radius_for_width(6.35) &lt;= 16   # True
min_radius_for_width(6.35) &lt;= 10   # False
max_width_for_radius(20)      # 6.35 mm  (1/4 in)
max_width_for_radius(40)      # 9.524999999999999 mm  (3/8 in)
max_width_for_radius(4)       # None  — tighter than the 1/8 in row
max_width_for_radius(63.5)    # 12.7 mm  (1/2 in)
</code></pre>
<p>The <code>9.524999999999999</code> value is just <code>3/8 * 25.4</code> in binary floating point; it is the 3/8 inch row, whose guideline radius is 1.5 in (38.1 mm).</p>
<h2>Tests</h2>
<p>A short <code>unittest</code> file checks the identities above, the 400 mm × 1.3 mm case, the contour lookups, <code>None</code> when the radius is tighter than the narrowest row, <code>KeyError</code> on an unknown width, and <code>ValueError</code> on non-positive inputs. The run was:</p>
<pre><code class="language-text">Ran 11 tests in 0.000s

OK
</code></pre>
<h2>Caveats</h2>
<p>Measure <code>D</code> on the running surface of the drive wheel, including any tyre, and <code>t</code> on the backing, not over the teeth. The 1000:1 figure is a common guideline; check the maker's data, especially on a metal-cutting saw that was specified with a thicker band. The contour table is one widely published chart and is aimed at curved cutting; for a straight cutoff, use the widest blade the machine can tension properly. Neither function knows about tooth pitch, set, speed, or feed.</p>
<p>Source: <em>Metal-Cutting Band Saw Blades</em> (publisher — Stankotorg), DOI <a href="https://doi.org/10.5281/zenodo.23297044">https://doi.org/10.5281/zenodo.23297044</a></p>
]]></content:encoded></item><item><title><![CDATA[Picking a band saw tooth pitch with the "teeth in the cut" rule, in Python]]></title><description><![CDATA[Choosing a tooth pitch for a bandsaw blade looks like a lookup-table problem, but most tables are built on one simple rule: keep a sensible number of teeth…]]></description><link>https://stankotorg.hashnode.dev/picking-a-band-saw-tooth-pitch-with-the-teeth-in-the-cut-rule-in-python</link><guid isPermaLink="true">https://stankotorg.hashnode.dev/picking-a-band-saw-tooth-pitch-with-the-teeth-in-the-cut-rule-in-python</guid><category><![CDATA[Python]]></category><category><![CDATA[#manufacturing]]></category><category><![CDATA[Math]]></category><dc:creator><![CDATA[info]]></dc:creator><pubDate>Wed, 25 Nov 2026 08:11:25 GMT</pubDate><content:encoded><![CDATA[<p>Choosing a tooth pitch for a bandsaw blade looks like a lookup-table problem, but most tables are built on one simple rule: keep a sensible number of teeth engaged in the material at all times. Too few teeth and each one takes a shock load and can strip; too many and the gullets pack with chips before they leave the cut. A common working range is roughly <strong>3 to 24 teeth in the cut</strong>, with about 6–12 being comfortable for general sawing.</p>
<p>That rule is easy to turn into code, which makes it handy for a quick sanity check before ordering.</p>
<h2>Teeth in the cut</h2>
<p>Tooth pitch is usually given in TPI (teeth per inch). For a cut length <code>w</code> in millimetres, the number of teeth engaged is:</p>
<pre><code>teeth = w / 25.4 * TPI
</code></pre>
<p>For a solid bar the cut length changes as the blade moves through it, so a rough approximation is to take about 70% of the diameter as an "effective" width for round stock (an assumption you can tune), and the wall thickness (times two, for both walls) for tubes and profiles. For the full picture, see a reference on <a href="https://stankotorg.ru/kniga-metal-cutting-band-saw-blades.htm">band saw blade selection</a>; real recommendations also adjust for material and blade type.</p>
<h2>The code</h2>
<pre><code class="language-python">STANDARD_TPI = [2, 3, 4, 6, 8, 10, 14, 18, 24]

def teeth_in_cut(width_mm: float, tpi: float) -&gt; float:
    return width_mm / 25.4 * tpi

def suggest_tpi(width_mm: float, target=(6, 12), limits=(3, 24)):
    """Return standard TPI values that keep engaged teeth within limits,
    best match to the target range first."""
    lo, hi = limits
    ok = [t for t in STANDARD_TPI if lo &lt;= teeth_in_cut(width_mm, t) &lt;= hi]
    mid = sum(target) / 2
    return sorted(ok, key=lambda t: abs(teeth_in_cut(width_mm, t) - mid))
</code></pre>
<h2>Trying it</h2>
<pre><code class="language-python">&gt;&gt;&gt; suggest_tpi(0.7 * 60)      # 60 mm round bar, ~42 mm effective
[6, 4, 3, 8, 2, 10, 14]
&gt;&gt;&gt; suggest_tpi(2 * 3)         # tube with 3 mm walls, 6 mm in cut
[24, 18, 14]
&gt;&gt;&gt; suggest_tpi(200)           # 200 mm solid section
[2, 3]
</code></pre>
<p>The 60 mm bar lands on 6 TPI (about 9.9 teeth engaged) with 4 TPI (about 6.6) close behind, the thin-walled tube needs a fine 24 TPI (about 5.7 teeth), and for a 200 mm section only 2 or 3 TPI stay under the limit, which matches the general advice to go coarse on large solids.</p>
<h2>Caveats</h2>
<ul>
<li>Variable-pitch blades (e.g. 5/8 or 10/14 TPI) are the norm in production; treat the average TPI as the input.</li>
<li>Material matters: hard alloys and stainless often want a slightly finer pitch and lower speed.</li>
<li>Bundles and stacked profiles change the effective width; measure what the blade actually sees.</li>
<li>This is a sanity check, not a replacement for the blade maker's recommendation.</li>
</ul>
<p>Source: <em>Metal-Cutting Band Saw Blades</em> (publisher — Stankotorg), DOI <a href="https://doi.org/10.5281/zenodo.23297044">https://doi.org/10.5281/zenodo.23297044</a></p>
]]></content:encoded></item></channel></rss>