# README – Quadratic_Loc_rig.m

## Purpose
This script performs a parametric study of a rigid cylindrical wheel moving on soft lunar regolith.  
It evaluates wheel-soil interaction, computes forces and moments from a quadratic stress distribution, and stores the results in a MATLAB table.

## What the script does
For each combination of:
- wheel diameter,
- wheel width,
- number of wheels,
- slip ratio,
- vehicle velocity,
- vehicle mass,

the script:
1. computes the wheel load,
2. solves the vertical equilibrium to determine contact geometry,
3. builds quadratic normal and shear stress distributions,
4. integrates stresses to obtain forces and moments,
5. computes motion resistances,
6. evaluates drawbar pull, drive torque, and drive power,
7. stores all results in a table,
8. appends the results to a saved `.mat` database.

## Main outputs
The final table `TAB` contains:
- geometry and operating conditions,
- contact angles and sinkage,
- stress peaks,
- forces and moments,
- resistances,
- drive torque and power,
- average pressure,
- total contact angle.

The script also computes a simple figure of merit:
- normalized drawbar pull,
- normalized drive power,
- combined `FoM`.


## Required external functions
This script depends on external functions:
- `Ww_fun`
- `vertical_load`
- `coeff_quad_fun`
- `Force_quad_fun`
- `Resistence_fun`

## Comparison model

The quadratic model is saved in the File Comparison model,
 togheter with the uniform model in order to be analysed.