File size: 1,938 Bytes
a7ee058
 
 
 
 
 
 
 
 
 
44e17dd
a7ee058
 
44e17dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
title: Llm Explainer Space
emoji: ๐Ÿ“š
colorFrom: yellow
colorTo: red
sdk: gradio
sdk_version: 5.47.0
app_file: app.py
pinned: false
license: mit
short_description: Thin-walled cylinder calculator with LLM explanations.
---

# ๐Ÿ“š LLM Explainer: Thin-Walled Cylinder Calculator

This Hugging Face Space provides a **first-principles calculator** for thin-walled closed-end pressure vessels.  
It combines **deterministic mechanics** with a **lightweight language model** that explains the results in plain language.

## ๐Ÿ”ง Features

- **Deterministic Mechanics**  
  Implements the classic thin-wall hoop-stress model to compute maximum permissible internal pressure.

- **Validation Checks**  
  Automatically detects when the thin-wall assumptions (0.5% โ‰ค t/Do โ‰ค 10%) are violated.

- **LLM Explanations**  
  A tiny local LLM provides clear, TA-style explanations of the results in plain English.

- **Interactive Gradio UI**  
  Enter vessel geometry and material properties, compute results, and get both numerical tables and natural-language narratives.

## ๐Ÿ“Š What It Computes

- Maximum permissible internal pressure, **p_allow [MPa]**  
- von Mises stress at p_allow  
- Predicted elastic diameter growth ฮ”d [mm]  
- Predicted elastic length growth ฮ”L [mm]  
- Applicability verdict (thin-wall check)

## ๐Ÿš€ Usage

1. Enter the following parameters:
   - Outer diameter **Do [m]**
   - Wall thickness **t [m]**
   - Length **L [m]**
   - Yield strength **Sy [MPa]**
   - Elastic modulus **E [GPa]**
   - Poissonโ€™s ratio **ฮฝ [-]**

2. Click **Compute**.  
   - A results table is generated.  
   - A concise explanation is provided by the LLM.

3. Try the built-in examples:
   - โœ… Valid thin-wall cylinder  
   - โš ๏ธ Too thick (fails upper bound check)  

## ๐Ÿ“œ License

MIT License โ€“ see [LICENSE](./LICENSE).

## ๐Ÿ“ฌ Contact

Feel free to reach out for questions or suggestions: **aslann@cmu.edu**