<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arash Kabiri</title>
    <description>The latest articles on DEV Community by Arash Kabiri (@arashkabiri).</description>
    <link>https://dev.to/arashkabiri</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4004623%2F6dcbe806-be1f-44a6-99a2-d515d90ba1c5.png</url>
      <title>DEV Community: Arash Kabiri</title>
      <link>https://dev.to/arashkabiri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arashkabiri"/>
    <language>en</language>
    <item>
      <title>I Built a Tribology Expert System from Scratch — No Frameworks, No Backend, Just Vanilla JavaScript</title>
      <dc:creator>Arash Kabiri</dc:creator>
      <pubDate>Fri, 26 Jun 2026 23:19:28 +0000</pubDate>
      <link>https://dev.to/arashkabiri/i-built-a-tribology-expert-system-from-scratch-no-frameworks-no-backend-just-vanilla-javascript-5gad</link>
      <guid>https://dev.to/arashkabiri/i-built-a-tribology-expert-system-from-scratch-no-frameworks-no-backend-just-vanilla-javascript-5gad</guid>
      <description>&lt;p&gt;Industrial tribology failures — wear, friction, and lubrication problems — cost billions annually. Yet diagnosing a failed bearing or selecting the right lubricant requires expertise spanning mechanical engineering, material science, and fluid dynamics.&lt;/p&gt;

&lt;p&gt;Most engineers don't have instant access to a senior tribologist. Instead, they rely on manually searching through thousand-page reference books, scattered spreadsheets, and trial-and-error that extends downtime from hours to days.&lt;/p&gt;

&lt;p&gt;I experienced this firsthand as a mechanical engineering graduate. The knowledge existed — in Stachowiak &amp;amp; Batchelor's &lt;em&gt;Engineering Tribology&lt;/em&gt;, the definitive reference in the field — but accessing it during an urgent failure was slow, error-prone, and frustrating.&lt;/p&gt;

&lt;p&gt;So I asked myself: what if the textbook could think?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: TEA — Tribology Expert Advisor
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://stvflwers-alt.github.io/tribology/" rel="noopener noreferrer"&gt;TEA&lt;/a&gt; is a fully functional web-based decision-support system that digitizes the entire diagnostic workflow of a senior lubrication engineer.&lt;/p&gt;

&lt;p&gt;It guides users through a 4-step adaptive process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Problem Definition&lt;/strong&gt; — What failed? How urgent is it? Is it a new design, a breakdown, or preventive monitoring?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Material &amp;amp; Surface Analysis&lt;/strong&gt; — 20 mechanical and thermal properties per component, surface roughness, wear pattern identification, and microstructure analysis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lubrication System Design&lt;/strong&gt; — Regime recommendation from 10 options, diagnostic checklist with 19 failure modes, and supply equipment specification&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lubricant Selection &amp;amp; Film Analysis&lt;/strong&gt; — Viscosity calculation using two methods, full EHL film thickness analysis, flash temperature calculation, wear synergism detection, and root cause analysis&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At the end, it generates a comprehensive report covering everything from recommended lubricant grade to replacement intervals and condition monitoring parameters.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a href="https://stvflwers-alt.github.io/tribology/" rel="noopener noreferrer"&gt;stvflwers-alt.github.io/tribology&lt;/a&gt;&lt;br&gt;
👉 &lt;strong&gt;Source Code:&lt;/strong&gt; &lt;a href="https://github.com/stvflwers-alt/tribology" rel="noopener noreferrer"&gt;github.com/stvflwers-alt/tribology&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Technical Challenge: Pure Logic, No Shortcuts
&lt;/h2&gt;

&lt;p&gt;The system has zero dependencies. No React. No Python backend. No database. Just vanilla JavaScript, HTML, and CSS — all calculations performed client-side in the browser.&lt;/p&gt;

&lt;p&gt;This was intentional. I wanted to prove that engineering logic alone, properly structured, can deliver a production-grade expert system without the overhead of modern frameworks.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's Inside
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;80+ JavaScript modules&lt;/strong&gt; — each representing a specific decision point, question, or calculation step&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adaptive routing&lt;/strong&gt; — questions dynamically change based on previous answers, exactly like a real engineering consultation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full Hertzian contact mechanics&lt;/strong&gt; — point and line contact stress calculations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EHL film thickness&lt;/strong&gt; — Hamrock-Dowson and Grubin formulas with proper dimensionless parameter classification&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flash temperature analysis&lt;/strong&gt; — Blok-Jaeger theory with thermal regime detection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;19-point lubrication system diagnostic checklist&lt;/strong&gt; — each with textbook-referenced solutions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;9 wear pattern families&lt;/strong&gt; — automatically mapped to 13 failure mechanisms&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Material compatibility matrix&lt;/strong&gt; — lubricant versus seals, bearings, and coatings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internationalization&lt;/strong&gt; — English and Farsi supported via JSON locale files, any language can be added without code changes&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Hardest Part
&lt;/h3&gt;

&lt;p&gt;The real challenge wasn't writing the formulas — it was building the decision logic.&lt;/p&gt;

&lt;p&gt;A tribologist doesn't just plug numbers into equations. They ask follow-up questions. They eliminate possibilities. They apply conservative triage when safety data is missing.&lt;/p&gt;

&lt;p&gt;Modeling that adaptive reasoning in pure JavaScript, with no AI or ML shortcuts, meant designing a state machine that handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Conservative triage logic&lt;/strong&gt;: if a user answers "I don't know" to safety-critical questions, the system assumes the worst case&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Special condition overrides&lt;/strong&gt;: six conditions — fire risk, vacuum, precision requirements, start-stop cycles, maintenance-free operation, and ultra-high temperature — that override the normal lubrication regime selection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wear synergism detection&lt;/strong&gt;: the combined effect of corrosion and abrasion that can cause failure within hours, even with contamination levels below 0.01%&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Engineering logic is a form of software architecture.&lt;/strong&gt;&lt;br&gt;
The four-step workflow in Stachowiak and Batchelor's textbook mapped surprisingly well to a state machine pattern. Good engineering thinking is already structured thinking.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Vanilla JS can go much further than people think.&lt;/strong&gt;&lt;br&gt;
No framework means zero build steps, instant deployment, and complete control. For a domain-heavy tool like this, a framework would have added complexity, not reduced it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The gap between domain expertise and software is where value lives.&lt;/strong&gt;&lt;br&gt;
There are thousands of JavaScript developers. There are thousands of tribologists. There are very few people who can do both.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;TEA is currently in beta — fully functional through all four steps, but edge cases and unusual input combinations may surface bugs.&lt;/p&gt;

&lt;p&gt;Planned improvements include more language translations, an extended bearing database, PDF export for reports, and potentially a backend for saving and comparing analyses.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters
&lt;/h2&gt;

&lt;p&gt;I'm a mechanical engineer who believes that deep domain expertise should be accessible — not locked behind years of specialized training or buried in thousand-page textbooks.&lt;/p&gt;

&lt;p&gt;TEA is my attempt to package what I've learned into something useful for maintenance teams, R&amp;amp;D engineers, and anyone dealing with machinery reliability.&lt;/p&gt;

&lt;p&gt;If you work in mechanical engineering, maintenance, or reliability, I'd love your feedback. Try the live demo, break it, and tell me what you think.&lt;/p&gt;

&lt;p&gt;And if you're hiring someone who can bridge deep engineering knowledge with practical software execution — let's talk.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Arash Kabiri&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Mechanical Engineer | Tribology | Intelligent Systems&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://linkedin.com/in/arash-kabiri-b09773418" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; | &lt;a href="https://github.com/stvflwers-alt" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; | &lt;a href="mailto:stv.flwers@gmail.com"&gt;stv.flwers@gmail.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>opensource</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
