# Axisymmetric Refinement

*Axisymmetric refinement creates structured-like mesh with cylindrical bias, ideal for rotating machinery, propellers, and axisymmetric flow features, providing optimal resolution for circumferential and radial flow patterns.*

---

## Available Options

| *Option* | *Description*                  |
|------------|----------------------------------|
| **Spacing axial** | Mesh spacing along cylinder axis |
| **Spacing radial** | Mesh spacing in radial direction |
| **Spacing circumferential** | Mesh spacing in circumferential direction |
| **Assigned cylinders** | Target cylindrical regions for refinement |

---

## Detailed Descriptions

### Spacing Axial

*Defines the mesh spacing along the cylinder axis.*

- **Required**
- **Example:** `0.02 m`
>**Note:** Critical for capturing axial flow features and gradients.

### Spacing Radial

*Specifies the mesh spacing in the radial direction.*

- **Required**
- **Example:** `0.01 m`
>**Note:** Important for resolving radial flow patterns and boundary layer development.

### Spacing Circumferential

*Controls the mesh spacing in the circumferential direction.*

- **Required**
- **Example:** `0.015 m`
>**Note:** Essential for capturing rotational effects and circumferential variations.

### Assigned cylinders

*Identifies the axisymmetric regions where axisymmetric refinement will be applied.*

- **Required**
>**Notes:** 
>  - Must reference valid entities in the geometry.
>  - Assign the entities by selecting from the list using the + button or select graphically in the viewer region.
>  - Definition through **Axisymmetric volumes** is available only while using the **beta mesher**

---

<details>
<summary><h3 style="display:inline-block"> 💡 Tips</h3></summary>

- Match circumferential and radial spacing for optimal quality
- Use 20+ axial layers for strong gradients
- Consider tip Mach number for propeller applications
- Ensure sufficient resolution for tip vortices

</details>

---

<details>
<summary><h3 style="display:inline-block"> ❓ Frequently Asked Questions</h3></summary>

- **What happens if axisymmetric refinements overlap?**  
  > Axisymmetric refinements cannot overlap. Each axisymmetric region must be defined so that it does not intersect another axisymmetric refinement.

</details>

---

<details>
<summary><h3 style="display:inline-block"> 🐍 Python Example Usage</h3></summary>

```{seealso}
Python API:
- {py:class}`~flow360.AxisymmetricRefinement`
```

```python
import flow360 as fl

# Propeller region refinement
prop_ref = fl.AxisymmetricRefinement(
    name="propeller_region",
    entities=[prop_cylinder],
    spacing_axial=0.02 * fl.u.m,
    spacing_radial=0.01 * fl.u.m,
    spacing_circumferential=0.015 * fl.u.m
)

# High-resolution rotor region
rotor_ref = fl.AxisymmetricRefinement(
    name="rotor_region",
    entities=[rotor_cylinder],
    spacing_axial=0.01 * fl.u.m,  # Finer for better gradient resolution
    spacing_radial=0.005 * fl.u.m,  # Finer for tip vortex capture
    spacing_circumferential=0.01 * fl.u.m  # Finer for better circumferential resolution
)
```
</details> 