# Slip Wall Boundary Condition

*The Slip Wall boundary condition allows flow to slip tangentially along a surface but not penetrate it, providing a frictionless boundary representation where shear stresses are zero.*

---

## Available Options

| *Option* | *Description* | *Applicable* |
|------------|----------------------------------|----------|
| **Assigned surfaces** | Geometric boundaries to apply the slip wall condition | always |

---

## Detailed Descriptions

### Assigned surfaces

*Specifies the geometric boundaries to which the slip wall boundary condition is applied.*

- **Accepted types:** Surface, GhostSurface, GhostCircularPlane
>**Notes:** 
>- Can reference surfaces by name or pattern. 
>- Compatible with the `AutomatedFarfield` feature. 

## Key properties

- Zero normal velocity (no flow through the boundary)
- Zero shear stress (tangential velocity can vary freely)
- No boundary layer formation
- No viscous effects at the wall
- Unlike a moving wall, a slip wall has no defined velocity but allows tangential flow with zero friction.

```{important}
Forces on slip-wall boundaries are NOT included in the total-forces or surface-forces results.
```

---

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

**Comparison with Other Boundary Types**

- **Slip Wall vs. Regular Wall:**
  - Slip wall: Zero shear stress, no boundary layer
  - Regular wall: No-slip condition, develops boundary layer
  - Regular wall requires fine mesh resolution near surface
  
- **Slip Wall vs. Symmetry:**
  - Slip wall: Zero normal flow, zero shear stress
  - Symmetry: Zero normal flow, mirrored flow field
  - Symmetry enforces additional constraints on flow variables
  
- **Slip Wall vs. Moving Wall:**
  - Slip wall: No defined velocity, allows tangential flow with zero friction
  - Moving wall: Defined velocity, enforces no-slip condition at the specified velocity

</details>

---

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

- **What's the difference between a slip wall and a symmetry boundary?**  
  > Both prevent flow crossing the boundary, but:
  > - Slip wall only enforces zero normal velocity and zero shear stress
  > - Symmetry enforces mirroring of all flow variables across the boundary
  > - Slip wall can be applied to any surface, while symmetry is only appropriate for actual planes of symmetry

- **How does a slip wall affect aerodynamic forces?**  
  > A slip wall:
  > - Will correctly capture pressure forces
  > - Will NOT capture any viscous/friction forces
  > - Will typically underestimate drag (sometimes significantly)
  > - May overestimate lift due to absence of boundary layer effects like separation

- **Is a slip wall the same as an Euler wall?**  
  > Yes, a slip wall is sometimes called an Euler wall because it's consistent with Euler equations (inviscid flow equations). Both terms refer to a frictionless wall condition.

- **Can I mix slip walls and no-slip walls in the same simulation?**  
  > Yes, you can use slip walls for some boundaries and regular no-slip walls for others. This is common when some surfaces (like main bodies) need accurate viscous modeling while others (like far-field boundaries) don't.

</details>

---

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

```{seealso}
Python API:

- {py:class}`~flow360.SlipWall`
```

```python
# Example of applying a slip wall boundary condition
slip_wall = fl.SlipWall(
    name="frictionless_surface",
    entities=volume_mesh["frictionless_surfaces"]
)

# Example of external aerodynamics with mixed boundary types
def create_mixed_boundaries():
    return [
        # Main body with viscous effects
        fl.Wall(
            name="main_body",
            entities=volume_mesh["body_surfaces"],
            use_wall_function=fl.WallFunction()
        ),
        # Ground plane modeled as slip wall
        fl.SlipWall(
            name="ground_plane",
            entities=volume_mesh["ground_plane"]
        ),
        # Far-field boundary
        fl.Freestream(
            name="farfield",
            entities=volume_mesh["farfield"]
        )
    ]

# Example of simplified internal flow
def create_simplified_internal_flow():
    return [
        # Main flow passage with slip walls
        fl.SlipWall(
            name="passage_walls",
            entities=volume_mesh["passage_walls"]
        ),
        # Inlet condition
        fl.Inflow(
            name="inlet",
            entities=volume_mesh["inlet"],
            total_temperature=300 * fl.u.K,
            velocity_direction=(1, 0, 0),
            spec=fl.TotalPressure(value=150000 * fl.u.Pa)
        ),
        # Outlet condition
        fl.Outflow(
            name="outlet",
            entities=volume_mesh["outlet"],
            spec=fl.Pressure(value=101325 * fl.u.Pa)
        )
    ]
```

</details> 