# Seed point volume

*A seed point volume is a volume zone defined by one or more interior seed points rather than by enclosing surfaces. The mesher runs a flood fill from the seed point(s) to identify the region they sit in and meshes it as a separate zone. This is convenient for cavities bounded by many baffles, where listing every enclosing surface would be impractical.*

## Available Options

| *Option* | *Description* | *Applicable* |
|----------|---------------|--------------|
| [**Name**](#name) | Identifier for the seed point volume | always |
| [**Seed point**](#seed-point) | Interior point(s) that flood-fill to define the zone | always |
| [**Axes**](#axes) | Two orthogonal vectors defining principal directions | always |


## Detailed Descriptions

### Name

*Identifier for the seed point volume entity.*

- **Required**
>**Note:** The volume zone name in the solver matches the seed point volume name.

### Seed point

*The interior point(s) used to identify the volume zone. Add a point with the `+` button; each point is entered as X, Y, Z coordinates with a length unit. Use the eye icon to toggle its visibility in the 3D scene and the trash icon to remove it.*

- **Required**
- **Units:** Length
>**Notes:**
>  - Place each seed point inside the region you want meshed as its own zone
>  - The number of seed points allowed per volume depends on the surface mesher:
>    - With the **Geometry AI** surface mesher, a single seed point volume may carry several seed points, which the flood fill merges into one zone (useful when baffles split a region into several compartments)
>    - With **snappy**, each seed point volume must carry exactly one seed point
>  - With **snappy**, avoid placing a seed point on round (integer) coordinates, which can cause the *snappyHexMesh* utility to fail

### Axes

*Two orthogonal vectors defining the principal directions for the volume.*

- **Optional**
- **Default:** Not specified
>**Notes:**
>  - Required when using the volume with porous media models that have directional (anisotropic) properties
>  - The two axes must be orthogonal (perpendicular) to each other
>  - The third axis is automatically computed to complete the right-handed coordinate system

---

```{important}
Seed point volumes require the **Geometry AI** surface mesher or **snappy**; they are not supported with the beta surface mesher or the legacy mesher. With the **Geometry AI** workflow, a setup using seed point volumes is restricted to a single *custom zones* container that holds only seed point volumes (it cannot be combined with enclosing-surface custom volumes, nor with a second *custom zones* container). The **snappy** workflow has no such restriction.
```

---

```{seealso}
- For the underlying meshing behaviour (flood fill, per-mesher seed-count rules, and the Geometry AI single-zone limitation), see the {doc}`Volume Mesher user guide </user_guide/Meshing/VolumeMesher>`.
- Seed point volumes are turned into mesh zones through a [Custom zones](../../02.simulation-setup/02.mesh/04.custom-zones.md) configuration.
```

---

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

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

```python
import flow360 as fl

# A single internal fluid zone identified by one seed point
fluid = fl.SeedpointVolume(
    name="fluid",
    point_in_mesh=[(0.234, 0.18172, 2.1324) * fl.u.m],
)

# A zone carrying several seed points (Geometry AI flood-fills them into one zone)
radiator = fl.SeedpointVolume(
    name="radiator",
    point_in_mesh=[
        (2040.53452, -405.234, 395.34243) * fl.u.mm,
        (2040.53452, 405.234, 395.34243) * fl.u.mm,
    ],
)
```

</details>
