# README

## Overview

This MATLAB script compares the mesh convergence of **three selected Tweel cases** on the same plots.

Each input `.mat` file is expected to contain a table with convergence results, including:

- mesh
- deflection
- maximum stress

---

## What the script does

The script:

1. Loads three `.mat` files
2. Searches for the first table found in each file
3. Identifies the columns corresponding to:
   - mesh
   - deflection
   - maximum stress
4. Sorts the data by mesh size or mesh label
5. Plots all three cases together for comparison

---

## Output

The script generates two figures:

1. **Deflection vs Mesh**
2. **Maximum Stress vs Mesh**

Each plot contains the three selected cases:

- Case 1 – Best overall
- Case 2 – Most critical
- Case 3 – Lightest feasible

---

## Required files

- `TAB_tweel_convergence.mat`
- `TAB_tweel_conv_caso2.mat`
- `TAB_tweel_conv_caso3.mat`

---

## Purpose

This script is used to visually compare the **mesh convergence behavior** of the three most relevant wheel design cases, in terms of:

- vertical deflection
- maximum stress