Stokes
Steady Stokes
- class flatiron_tk.physics.steady_stokes.Continuity(mesh, tag='u', q_degree=4, **kwargs)[source]
Bases:
PhysicsProblem
- class flatiron_tk.physics.steady_stokes.Momentum(mesh, tag='u', q_degree=4, **kwargs)[source]
Bases:
PhysicsProblem
- class flatiron_tk.physics.steady_stokes.OnPoint(point_location, eps)[source]
Bases:
objectA class to define a point in space for applying boundary conditions.
- class flatiron_tk.physics.steady_stokes.SteadyStokes(mesh)[source]
Bases:
MultiphysicsProblemA class to represent the steady Stokes equations. Supers MultiphysicsProblem.
Parameters:
mesh: The mesh to use for the problem.
- flux(h)[source]
Computes the flux of the Stokes problem.
Parameters:
h: The flux vector. physics_tag: The tag to identify the physics problem.
Returns:
The flux form.
- get_kinematic_viscosity()[source]
Get the kinematic viscosity for the Stokes problem.
Returns:
The kinematic viscosity value or function.
- get_stabilization_constant()[source]
Compute the stabilization constant for the Stokes problem.
Returns:
The stabilization constant.
- set_bcs(multiphysics_bc_dict)[source]
Overload the set_bcs from the multphysics problem to set the boundary conditions for the Stokes problem. The boundary conditions on pressure must be handled separately.
Parameters:
multiphysics_bc_dict: A dictionary containing the boundary conditions for each physics problem.
- set_body_force(body_force)[source]
Set the body force for the Stokes problem.
Parameters:
body_force: The body force value or function.
- set_element(u_family, u_degree, p_family, p_degree)[source]
Set the element for the Stokes problem.
Parameters:
u_family: The family of the velocity element. u_degree: The degree of the velocity element. p_family: The family of the pressure element. p_degree: The degree of the pressure element. mesh: The mesh to use.
This class solves the Stokes flow problem which is the linearized form of the Navier-Stokes equation
Strong formulation
Momentum equation
Continuity
where \(\textbf{u}\) and p are the velocity and pressure field respectively with the constants \(\nu\) is the kinematic viscosity. Note that pressure here is the scaled pressure. True pressure \(p_{true} = p/\rho\) where \(\rho\) is the density. \(\textbf{b}\) is the external body force
Boundary conditions
Fixed value boundary condition
(pseudo) Traction boundary condition
Weak formulation
The weak formulation is stated as follows:
For the velocity trial function
and the corresponding test function
And the pressure space
for external body force \(\textbf{b}\) and surface traction \(\textbf{t}\), find \(\textbf{u} \in \mathcal{U}\) and \(p \in \mathcal{Q}\) with the corresponding test functions \(\textbf{w} \in \mathcal{W}\) and \(q \in \mathcal{Q}\) such that