# Cylinder

*A cylinder is a three-dimensional geometric shape with a circular cross-section, defined by its center, axis direction, height, and radius.*

## Available Options

| *Option* | *Description* | *Applicable* |
|----------|---------------|--------------|
| [**Name**](#name) | Identifier for the cylinder | always |
| [**Center**](#center) | Three-dimensional coordinates of the center point | always |
| [**Axis**](#axis) | Direction vector defining the cylinder orientation | always |
| [**Radius**](#radius) | Distance from central axis to outer surface | always |
| [**Inner radius**](#inner-radius) | Distance from central axis to inner surface | always |
| [**Height**](#height) | Length along the central axis | always |


## Detailed Descriptions

### Name

*Identifier for the cylinder volume entity.*

- **Required**
>**Note:** Names are not required to be unique, but using descriptive unique names is recommended.

### Center

*Three-dimensional coordinates (X, Y, Z) defining the center point of the cylinder.*

- **Required**
- **Units:** Length
>**Note:** The center is located at the midpoint of the cylinder's height.

### Axis

*Direction vector (X, Y, Z) defining the orientation of the cylinder's central axis.*

- **Required**
>**Notes:**
>  - The vector is normalized internally
>  - The height extends equally in both directions from the center along this axis

### Radius

*The distance from the central axis to the outer cylindrical surface.*

- **Required**
- **Units:** Length

### Inner radius

*The distance from the central axis to the inner cylindrical surface, creating a hollow cylinder (annulus).*

- **Default:** `0` (solid cylinder)
- **Units:** Length
>**Notes:**
>  - Set to 0 for a solid cylinder
>  - Must be less than the radius
>  - Use non-zero values to create donut-shaped (annular) volumes
>  - For a cylinder assigned to a [BET disk](../../02.simulation-setup/03.flow-solver/03.physics/04.bet-disk.md) or an [actuator disk](../../02.simulation-setup/03.flow-solver/03.physics/05.actuator-disk.md), mesh nodes inside the inner radius receive no disk force, see {ref}`Inner radius in the knowledge base <bet_inner_radius>`

### Height

*The total length of the cylinder along its central axis.*

- **Required**
- **Units:** Length
>**Note:** The cylinder extends height/2 in each direction from the center along the axis.

---

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

- **How do I create a hollow cylinder?**
  > Set the inner radius parameter to a value greater than 0 and less than the outer radius.

- **Where is the center located relative to the cylinder?**
  > The center is at the geometric center of the cylinder, midway along its height.

</details>

---

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

```{seealso}
{py:class}`~flow360.Cylinder`
```

```python
import flow360 as fl

# Solid cylinder for a rotor disk
rotor_cylinder = fl.Cylinder(
    name="rotor_zone",
    center=(0, 0, 0) * fl.u.m,
    axis=(0, 0, 1),
    outer_radius=1.5 * fl.u.m,
    height=0.2 * fl.u.m
)

# Hollow cylinder (annulus) excluding a hub
annular_cylinder = fl.Cylinder(
    name="propeller_zone",
    center=(0, 0, 0) * fl.u.inch,
    axis=(1, 0, 0),
    outer_radius=12 * fl.u.inch,
    inner_radius=2 * fl.u.inch,
    height=3 * fl.u.inch
)
```

</details>

