CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Solution of Stokes Equations in 3D in Structured Grids - P-v Coupling

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2020, 09:11
Default Solution of Stokes Equations in 3D in Structured Grids - P-v Coupling
  #1
New Member
 
Rafael March
Join Date: Mar 2020
Posts: 5
Rep Power: 6
rafaelmarch3 is on a distinguished road
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 no-slip 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 Navier-Stokes equations, they usually give a couple of strategies to treat the pressure-velocity 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 Navier-Stokes context, but Stokes equations have the same type of pressure-velocity 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 pressure-velocity coupling?


Thank you!
Rafael March.
rafaelmarch3 is offline   Reply With Quote

Old   June 20, 2020, 11:04
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,813
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by rafaelmarch3 View Post
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 no-slip 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 Navier-Stokes equations, they usually give a couple of strategies to treat the pressure-velocity 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 Navier-Stokes context, but Stokes equations have the same type of pressure-velocity 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 pressure-velocity coupling?


Thank you!
Rafael March.



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?
FMDenaro is offline   Reply With Quote

Old   June 21, 2020, 08:31
Default
  #3
New Member
 
Rafael March
Join Date: Mar 2020
Posts: 5
Rep Power: 6
rafaelmarch3 is on a distinguished road
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 Stokes-Darcy-Brinkman models, that is, modelling "free-flow" combined with porous media flow. So I need to solve Stokes first.



Thank you,

Rafael.
rafaelmarch3 is offline   Reply With Quote

Old   June 21, 2020, 10:05
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,813
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by rafaelmarch3 View Post
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 Stokes-Darcy-Brinkman models, that is, modelling "free-flow" combined with porous media flow. So I need to solve Stokes first.



Thank you,

Rafael.



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.
FMDenaro is offline   Reply With Quote

Reply

Tags
development, numerical methods, pressure and velocity, stokes flow, structured grids


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 10:35
Solving non-linear coupled equations using blockmatrix solver (OpenFOAM-3.1ext) Rolanzo OpenFOAM Running, Solving & CFD 0 April 12, 2018 20:49
Coupled Solution of the RANS turbulence equations sfigato OpenFOAM Programming & Development 0 September 14, 2014 08:59
Exact solution - Euler equations jakubstary Main CFD Forum 9 May 6, 2013 18:14
need help on solution to Stokes equations Yuksel Onsoy Main CFD Forum 3 November 2, 2000 05:54


All times are GMT -4. The time now is 01:05.