惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
C
Check Point Blog
G
Google Developers Blog
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
有赞技术团队
有赞技术团队
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
D
Docker
Hugging Face - Blog
Hugging Face - Blog
The GitHub Blog
The GitHub Blog
博客园 - 三生石上(FineUI控件)
A
About on SuperTechFans
Recent Announcements
Recent Announcements
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
阮一峰的网络日志
阮一峰的网络日志
Stack Overflow Blog
Stack Overflow Blog
Vercel News
Vercel News

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I Built a Tribology Expert System from Scratch — No Frame...
Arash Kabiri · 2026-06-27 · via DEV Community

Arash Kabiri

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.

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.

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

So I asked myself: what if the textbook could think?

The Solution: TEA — Tribology Expert Advisor

TEA is a fully functional web-based decision-support system that digitizes the entire diagnostic workflow of a senior lubrication engineer.

It guides users through a 4-step adaptive process:

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

At the end, it generates a comprehensive report covering everything from recommended lubricant grade to replacement intervals and condition monitoring parameters.

👉 Live Demo: stvflwers-alt.github.io/tribology
👉 Source Code: github.com/stvflwers-alt/tribology

The Technical Challenge: Pure Logic, No Shortcuts

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.

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.

What's Inside

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

The Hardest Part

The real challenge wasn't writing the formulas — it was building the decision logic.

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.

Modeling that adaptive reasoning in pure JavaScript, with no AI or ML shortcuts, meant designing a state machine that handles:

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

What I Learned

1. Engineering logic is a form of software architecture.
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.

2. Vanilla JS can go much further than people think.
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.

3. The gap between domain expertise and software is where value lives.
There are thousands of JavaScript developers. There are thousands of tribologists. There are very few people who can do both.

What's Next

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

Planned improvements include more language translations, an extended bearing database, PDF export for reports, and potentially a backend for saving and comparing analyses.

Why This Matters

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.

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

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.

And if you're hiring someone who can bridge deep engineering knowledge with practical software execution — let's talk.


Arash Kabiri
Mechanical Engineer | Tribology | Intelligent Systems

LinkedIn | GitHub | stv.flwers@gmail.com