--- 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**