Brinkman Navier-Stokes

Transient Brinkman Navier-Stokes

class flatiron_tk.physics.transient_brinkman_navier_stokes.TransientBrinkmanNavierStokes(mesh, dt=0.01, theta=0.5, *args, **kwargs)[source]

Bases: SteadyNavierStokes

Transient scalar transport problem. Supers SteadyNavierStokes.

Parameters:
  • mesh (flatiron_tk.mesh) – The mesh on which to solve the problem.

  • dt (float) – The time step size.

  • theta (float, optional) – The theta parameter for the implicit-explicit scheme. Default is 0.5.

  • *args – Additional arguments to pass to the SteadyNavierStokes constructor.

  • **kwargs – Additional arguments to pass to the SteadyNavierStokes constructor.

add_stab()[source]

Add stabilization terms to the weak form for the steady Navier-Stokes problem. This method computes the SUPG and PSPG stabilization terms and adds them to the weak form.

build_function_space()[source]

Build the function space for the transient Navier-Stokes problem.

get_residual()[source]

Compute the residual for the transient Navier-Stokes problem.

Returns:

The residual expression for the transient Navier-Stokes equations.

set_indicator_function(indicator_function)[source]

Set the indicator function for the transient Brinkman-Navier-Stokes problem.

Parameters:

indicator_function: The indicator function value or function.

set_initial_conditions(u_init, p_init)[source]

Set the initial conditions for the transient Navier-Stokes problem.

Parameters:

u_init: dolfinx.fem.Function or dolfinx.fem.Expression

Initial velocity field

p_init: dolfinx.fem.Function or dolfinx.fem.Expression

Initial pressure field

set_midpoint_theta(theta)[source]

Set the midpoint theta parameter for the transient Navier-Stokes problem.

Parameters:

theta: The midpoint theta parameter.

set_permeability(permeability)[source]

Set the permeability for the transient Brinkman-Navier-Stokes problem.

Parameters:

permeability: The permeability value or function.

set_time_step_size(dt)[source]

Set the time step size for the transient Navier-Stokes problem.

Parameters:

dt: The time step size.

set_weak_form(stab=False)[source]

Set the weak form for the transient Navier-Stokes problem.

Parameters:

stab: A boolean indicating whether to include stabilization terms in the weak form.

update_previous_solution()[source]

Update the previous solution with the current solution. This method copies the current solution to the previous solution for the next time step.

This class solves the transient Brinkman Navier Stokes problem. The Brinkman equations are a modification of the Navier-Stokes equations to account for flow in porous media by adding a Darcy drag term to the momentum equation.

Strong formulation

Momentum equation

\[\rho \frac{\partial \textbf{u}}{\partial t} + \rho \textbf{u} \cdot \nabla \textbf{u} = \nabla \cdot \boldsymbol{\sigma} + \textbf{b} + \frac{\mu}{K} \textbf{u}\]

Continuity

\[\nabla \cdot \textbf{u} = 0\]

where \(\textbf{u}\) and p are the velocity and pressure field respectively with the constants \(\rho\) and \(\mu\) are the fluid density and dynamic viscosity respectively.

Boundary conditions

Fixed value boundary condition

\[\textbf{u} = \textbf{u}_D \;\forall \textbf{x} \in \Gamma_D\]

Traction boundary condition

\[\boldsymbol{\sigma} \cdot \hat{\textbf{n}} = \textbf{t} \;\;\forall \textbf{x} \in \Gamma_N\]

Weak formulation

In this implementation, we the mid-point method for time integration. Let \(\mathcal{L}(u, p)\) be the weak formulation obtained in the Steady Navier-Stokes, the weak formulation for the transient problem is

\[0 = \left( \textbf{w}, \frac{\textbf{u}^n - \textbf{u}^{n-1}}{\Delta t} \right) + \theta \left( \mathcal{L}(\textbf{u}^n, p^n) + \textbf{i} \frac{\mu}{\kappa}(\textbf{u}^n, \textbf{w}) \right) + (1-\theta)\left( \mathcal{L}(\textbf{u}^0, p^n) + \textbf{i} \frac{\mu}{\kappa}(\textbf{u}^n, \textbf{w}) \right)\]

Stabilization parameters

Stabilization parameter now has time dependence and is defined as

\[\begin{split}\tau = \left( \left( \frac{1}{\Delta t} \right)^2 + \left(\frac{2|\textbf{u}|}{h}\right)^2 + 9\left(\frac{4\nu}{h^2}\right)^2 \right)^{-0.5} \\\end{split}\]

In this case, we use the same stabilization parameter for both SUPG and PSPG