Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,7 +8,58 @@ sdk_version: 5.47.0
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
-
short_description:
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
+
short_description: Thin-walled cylinder calculator with LLM explanations.
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# 📚 LLM Explainer: Thin-Walled Cylinder Calculator
|
| 15 |
+
|
| 16 |
+
This Hugging Face Space provides a **first-principles calculator** for thin-walled closed-end pressure vessels.
|
| 17 |
+
It combines **deterministic mechanics** with a **lightweight language model** that explains the results in plain language.
|
| 18 |
+
|
| 19 |
+
## 🔧 Features
|
| 20 |
+
|
| 21 |
+
- **Deterministic Mechanics**
|
| 22 |
+
Implements the classic thin-wall hoop-stress model to compute maximum permissible internal pressure.
|
| 23 |
+
|
| 24 |
+
- **Validation Checks**
|
| 25 |
+
Automatically detects when the thin-wall assumptions (0.5% ≤ t/Do ≤ 10%) are violated.
|
| 26 |
+
|
| 27 |
+
- **LLM Explanations**
|
| 28 |
+
A tiny local LLM provides clear, TA-style explanations of the results in plain English.
|
| 29 |
+
|
| 30 |
+
- **Interactive Gradio UI**
|
| 31 |
+
Enter vessel geometry and material properties, compute results, and get both numerical tables and natural-language narratives.
|
| 32 |
+
|
| 33 |
+
## 📊 What It Computes
|
| 34 |
+
|
| 35 |
+
- Maximum permissible internal pressure, **p_allow [MPa]**
|
| 36 |
+
- von Mises stress at p_allow
|
| 37 |
+
- Predicted elastic diameter growth Δd [mm]
|
| 38 |
+
- Predicted elastic length growth ΔL [mm]
|
| 39 |
+
- Applicability verdict (thin-wall check)
|
| 40 |
+
|
| 41 |
+
## 🚀 Usage
|
| 42 |
+
|
| 43 |
+
1. Enter the following parameters:
|
| 44 |
+
- Outer diameter **Do [m]**
|
| 45 |
+
- Wall thickness **t [m]**
|
| 46 |
+
- Length **L [m]**
|
| 47 |
+
- Yield strength **Sy [MPa]**
|
| 48 |
+
- Elastic modulus **E [GPa]**
|
| 49 |
+
- Poisson’s ratio **ν [-]**
|
| 50 |
+
|
| 51 |
+
2. Click **Compute**.
|
| 52 |
+
- A results table is generated.
|
| 53 |
+
- A concise explanation is provided by the LLM.
|
| 54 |
+
|
| 55 |
+
3. Try the built-in examples:
|
| 56 |
+
- ✅ Valid thin-wall cylinder
|
| 57 |
+
- ⚠️ Too thick (fails upper bound check)
|
| 58 |
+
|
| 59 |
+
## 📜 License
|
| 60 |
+
|
| 61 |
+
MIT License – see [LICENSE](./LICENSE).
|
| 62 |
+
|
| 63 |
+
## 📬 Contact
|
| 64 |
+
|
| 65 |
+
Feel free to reach out for questions or suggestions: **aslann@cmu.edu**
|