
[Sponsors] 
Solution of Stokes Equations in 3D in Structured Grids  Pv Coupling 

LinkBack  Thread Tools  Search this Thread  Display Modes 
June 20, 2020, 10:11 
Solution of Stokes Equations in 3D in Structured Grids  Pv Coupling

#1 
New Member
Rafael March
Join Date: Mar 2020
Posts: 5
Rep Power: 6 
Hello,
I need to develop a code to solve Stokes Equations in 3D in cubic geometries (structured grid, uniform mesh spacing). My code needs to take a pressure gradient in one direction as a BC (pinlet=p1, poutlet=p0) and noslip BC's in the other 4 faces of the cubic geometry. I started to develop this code in Python, using a staggered grid FV approach; pressure at the center of the FV cells, ux velocities at the faces normal to the x direction and so on. My code gives strange results, which has made me wonder if I am considering the correct approach to solve such system. I am currently assembling a system of equations that considers [p, ux, uy] as unknowns and solving it in "one go". That is, I build a matrix and solve the linear system, which gives me the solution. The degrees of freedom are coupled through Stokes equations and continuity equation, but the coupling is "solved" by assembling the coefficients to the matrix. However, whenever I research numerical codes and books on NavierStokes equations, they usually give a couple of strategies to treat the pressurevelocity coupling, typically "guess and correct" approaches, where you guess a pressure field, and correct it iteratively to satisfy continuity (e.g. SIMPLE, SIMPLEC, PISO). These approaches are usually formulated in the NavierStokes context, but Stokes equations have the same type of pressurevelocity coupling; they just don't have the nonlinear inertia term. So I assume these strategies would be applicable to Stokes equations as well. So my question to the community is: Is there something "wrong" with my approach to solve Stokes equations in one go, implicitly, by solving one linear system? Or do I need to consider iterative methods to treat the pressurevelocity coupling? Thank you! Rafael March. 

June 20, 2020, 12:04 

#2  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,857
Rep Power: 73 
Quote:
First of all, any bug in a code can be always present. But I want to ask you what is your goal. If I understand correctly, you just want to solve a viscous steady laminar flow problem in a square duct, isn't that? 

June 21, 2020, 09:31 

#3 
New Member
Rafael March
Join Date: Mar 2020
Posts: 5
Rep Power: 6 
I might or might not have a bug, this is more of a conceptual question.
Yes, right now I would like to solve Stokes in a cubic duct. The code will then be extended from this point to inclue StokesDarcyBrinkman models, that is, modelling "freeflow" combined with porous media flow. So I need to solve Stokes first. Thank you, Rafael. 

June 21, 2020, 11:05 

#4  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,857
Rep Power: 73 
Quote:
In Stokes flows, the equations are linearized in a very simple form like Lap v = f in your case you have the Poisson problem (with homogenouse Dirichlet conditions) for the streamwise velocity component that balances the action of the pressure difference. Numerically you have to solve an elliptic equation, for example using a standard iterative method. Thus, I don't understand why you compare to the standard methods for the NSE that are differently based. 

Tags 
development, numerical methods, pressure and velocity, stokes flow, structured grids 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Block coupling three equations using foam extend 4.1  ELwardi  OpenFOAM Programming & Development  2  March 19, 2019 11:35 
Solving nonlinear coupled equations using blockmatrix solver (OpenFOAM3.1ext)  Rolanzo  OpenFOAM Running, Solving & CFD  0  April 12, 2018 21:49 
Coupled Solution of the RANS turbulence equations  sfigato  OpenFOAM Programming & Development  0  September 14, 2014 09:59 
Exact solution  Euler equations  jakubstary  Main CFD Forum  9  May 6, 2013 19:14 
need help on solution to Stokes equations  Yuksel Onsoy  Main CFD Forum  3  November 2, 2000 06:54 