Zero Gradient - Boundary Condition

Zero Gradient - Boundary Condition   Description

Zero Gradient is a part of the Neumann, or Second-Type boundary conditions. It sets the gradient of any quantity to zero at the domain boundary:

\[\nabla \phi \cdot \vec{n} = 0\]

In simpler terms, the Zero Gradient extrapolates a quantity (such as temperature, velocity, pressure, or any turbulent quantity) from the nearby area to the boundary. When the equation is discretized, this condition ensures that the value at the boundary is effectively equal to the value at the nearest cell center to the boundary patch.

This condition is most often used at the outlet of computational domains under the assumption of fully developed flow. If the flow is not fully developed, a phenomenon known as backflow may occur. If so, the other boundary condition is recommended - Inlet Outlet.

Zero Gradient - Boundary Condition   Understanding of Zero Gradient

The essence of the Zero Gradient can be explained with the 1D case. Let’s consider the following discretization for the spacial derivatives:

\[\frac{\partial \phi}{\partial x} \approx \frac{\phi_{i+1} - \phi_{i}}{\Delta x}\]

By denoting the value of the quantity at the boundary as \(\phi_{i+1}\) and the value inside the domain as \(\phi_{i}\), the discretization of 1D Zero Gradient condition leads to:

\[\frac{\partial \phi}{\partial x} \approx \frac{\phi_{i+1} - \phi_{i}}{\Delta x} = 0 \rightarrow \phi_{i+1} = \phi_{i}\]

From the above consideration, it is clear the Zero Gradient enforces results value at the boundary to be equal to the closest value inside the domain.

Zero Gradient - Graphical Representation

The Zero Gradient means that the normal gradient of velocity at the boundary is zero. This implies that the velocity profile at the exit ouf of the domain (red profile) is extrapolated from the interior to the boundary (green profile) without changing its slope. At the outlet, this condition helps in avoiding artificial disturbances by allowing the flow to exit smoothly.

Zero Gradient Boundary Condition
Figure 1. Zero Gradient Boundary Condition

Zero Gradient in Channel Flow

The animation above demonstrates how the Zero Gradient works in practice using a channel flow simulation. The animation and graphs show the development of the velocity profile along the channel at different cross-sections located at 0.25L, 0.5L, 0.75L, the inlet, and the outlet, where L represents the total length of the channel. As the flow develops, the velocity profile gradually becomes parabolic. By 0.75L, the velocity profile has already stabilized. The Zero Gradient allows the velocity profile to smoothly extend from the interior to the boundary without any disturbances.

Zero Gradient - Boundary Condition   Application & Physical Interpretation

The Zero Gradient is commonly used in computational fluid dynamics (CFD) simulations. It is especially prevalent in cases where the gradient of a field variable (like pressure, temperature, velocity, or turbulent properties) at a boundary is assumed to be zero, indicating no change across the boundary. This condition is typically applied at outlets or far-field boundaries where the flow is expected to have negligible spatial variation or is fully developed.

Zero Gradient in Aerodynamics applications

Example applications: car, aircraft aerodynamics, wind tunnel experiment

This problem can be solved by using the simpleFoam (solver). This solver has two basic independent variables: pressure and velocity. Additionally, one can define turbulence-related variables. The Zero Gradient is used for the pressure variable at the inlet of the computational domain which allows the pressure to adjust to the velocity profile.

Additionally, the Zero Gradient is applied to the pressure at the walls to ensure zero mass flux across the wall. It is important to note, that when the body forces appear in the equations of motion, such as gravity force, Fixed Flux Pressure should be used. This boundary condition adjusts the gradient accordingly and provides a more stable solution compared to Zero Gradient.

Example Boundary Conditions set for Aerodynamics applications
PhysicsVelocityPressure

Velocity Inlet

Surface Normal Fixed Value

Zero Gradient

Wall

No-Slip

Zero Gradient

Outflow

Zero Gradient

Zero Gradient

Example usage of Zero Gradient for Aerodynamics applications in SimFlow
TutorialDescription

Catalytic Converter

Demonstrates modeling a porous medium by simulating flow through a catalytic converter using the Darcy-Forchheimer porosity model, with coordinate-dependent inlet velocity and second-order velocity discretization (Linear Upwind) for increased accuracy.

Von Karman Vortex Street

Simulates the formation of a Von Kármán vortex street in 2D water flow around a cylinder, demonstrating parametrization at each modeling stage.

Zero Gradient in VoF (Volume of Fluid) applications

Example applications: free surface flows, ship hull calculations, sloshing, ship hydrodynamics, wave impact on structures

Problems that require resolving the sharp interface between two fluids, such as water and air, can be calculated using the interFoam (solver). The phase fraction, represented by \(\alpha\), differentiates between the fluids. The Zero Gradient boundary condition can be applied, for example, on the hull of the ship. The boundary condition applied to the walls simply reflects if the hull is "wetted" by water or surrounded by air.

Example Boundary Conditions set for VoF applications
PhysicsVelocityPressurePhases \(\alpha\)

Wall

No-Slip

Zero Gradient

Zero Gradient

Two Phases Inlet

Variable Height Inlet

Fixed Flux Pressure

Zero Gradient

Example usage of Zero Gradient for VoF applications in SimFlow
TutorialDescription

Dam Break

Simulation of free surface flow with a Volume of Fluid approach, analyzing the multiphase immiscible flow of water and air through a dam.

Zero Gradient in Buoyancy Driven Flows applications

Example applications: room ventilation, room heating, electronic cooling, atmospheric flows

When the flow is driven by buoyancy force, which arises from the density variation, the buoyantSimpleFoam (solver) can be used for such a problem. The Zero Gradient applied to the temperature at a boundary, implies that there is no temperature gradient at that boundary. This means that heat transfer through conduction is zero across the boundary because the rate of heat transfer is proportional to the temperature gradient (Fourier’s law of heat conduction). In a practical sense, this can mimic the behavior of an adiabatic or insulated boundary where no heat is lost or gained through the wall.

Example Boundary Conditions set for Buoyancy Driven Flows applications
PhysicsVelocityPressureThermal T

Pressure Outlet

Pressure Inlet-Outlet Velocity

Fixed Value

Zero Gradient

Example usage of Zero Gradient for Buoyancy Driven Flows applications in SimFlow
TutorialDescription

Heat Exchanger

Simulation of heat transfer between hot and cold regions in a heat exchanger with separate flows, using thermal resistance to model conduction through a single boundary

Zero Gradient - Boundary Condition   How to apply Zero Gradient in SimFlow

The definition of boundary conditions in SimFlow is both simple and intuitive. To specify the Zero Gradient boundary condition, the user must navigate to the Boundary Conditions panel, select the appropriate boundary, and choose the correct option from the drop-down menu.

For both, scalars and vectors, the user has to choose from the drop-down menu Zero Gradient option.

Zero Gradient definition for pressure p in SimFlow
Figure 2. Zero Gradient definition for pressure p in SimFlow

Zero Gradient - Boundary Condition   Zero Gradient - Alternatives

In this section, we propose boundary conditions that are alternative to Zero Gradient. While they may fulfill similar purposes, they might be better suited for a specific application and provide a better approximation of physical world conditions.

Zero Gradient - Alternatives
Boundary ConditionDescription

Fixed Gradient

belongs to the Neumann boundary conditions, but instead of zero gradient, the condition assumes the existence of some fixed gradient.

Inlet Outlet

similar to Zero Gradient but with an additional feature, which prevents so-called backflows

Fixed Flux Pressure

similar to Zero Gradient but should be used for pressure on the wall, when body forces appear in the solution