CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Solving Stokes Flows in OpenFOAM (https://www.cfd-online.com/Forums/openfoam-solving/182687-solving-stokes-flows-openfoam.html)

wildfire230 January 16, 2017 15:39

Solving Stokes Flows in OpenFOAM
 
Hi all,

I am interested in solving Stokes flows (zero Reynolds number) using OpenFOAM. It's my understanding that there are several different ways to do this, for example you can just delete for example fvm::div(phi, U) from the UEqn in icoFoam and recompile and have a Stokes flow solver. However, I've noticed that doing so, the amount of time to converge is still a function of viscosity nu, which I would not expect. Are there other changes that need to be made to for example icoFoam in order to accurately solve zero Reynolds number flows, or better yet, what would be the optimum approach for solving steady state Stokes flows using OpenFOAM, i.e. time resolution is not important.

I would appreciate any help.

arjun January 16, 2017 21:29

Quote:

Originally Posted by wildfire230 (Post 633494)
Hi all,

I am interested in solving Stokes flows (zero Reynolds number) using OpenFOAM. It's my understanding that there are several different ways to do this, for example you can just delete for example fvm::div(phi, U) from the UEqn in icoFoam and recompile and have a Stokes flow solver. However, I've noticed that doing so, the amount of time to converge is still a function of viscosity nu, which I would not expect. Are there other changes that need to be made to for example icoFoam in order to accurately solve zero Reynolds number flows, or better yet, what would be the optimum approach for solving steady state Stokes flows using OpenFOAM, i.e. time resolution is not important.

I would appreciate any help.

You can not use implicit urf for momentum in case of stokes flow that typically openfoam etc use.
This greatly affect your simulation time. You have to use urf = 1 and depend on explicit urf.

This comes with stability problems but a lower value of explicit urf would help.

wildfire230 January 16, 2017 21:40

Hi arjun, thanks for the message. I'm not sure I fully understand, I did not know there were implicit and explicit under relaxation factors. I have only used under relaxation with simpleFoam. Do you mean that the best solution is to modify simpleFoam and eliminate the convection terms there? Could you please explain the difference between explicit and implicit urf?

Thanks again.

arjun January 16, 2017 21:58

Quote:

Originally Posted by wildfire230 (Post 633517)
Hi arjun, thanks for the message. I'm not sure I fully understand, I did not know there were implicit and explicit under relaxation factors. I have only used under relaxation with simpleFoam. Do you mean that the best solution is to modify simpleFoam and eliminate the convection terms there? Could you please explain the difference between explicit and implicit urf?

Thanks again.

Basically diagonal is scaled by urf in case of implicit urf. So the equation becomes diagonally dominant. This makes linear system converge fast.

I know it is implicit because all these solvers apply it in implicit form.

wildfire230 January 16, 2017 22:07

Thanks, so if you wanted to solve a steady Stokes flow problem would you use simpleFoam?

arjun January 16, 2017 22:39

Quote:

Originally Posted by wildfire230 (Post 633520)
Thanks, so if you wanted to solve a steady Stokes flow problem would you use simpleFoam?

The point is in case of viscous flow momentum equation is Poisson equation. That does not like that type of urf.

You can solve stokes problem with simpleFOAM as the convective part will be calculated to be insignificant. Whole thing will be difficult to converge.

wildfire230 January 16, 2017 22:57

That makes sense. So which solver would you use?

arjun January 16, 2017 23:33

Quote:

Originally Posted by wildfire230 (Post 633525)
That makes sense. So which solver would you use?

You can use simpleFOAM, just use urf = 1.

Also find out if you can have explicit urf, if it is available use a smaller value like 0.7 or so.

palarcon March 12, 2018 10:04

Quote:

Originally Posted by arjun (Post 633529)
You can use simpleFOAM, just use urf = 1.

Also find out if you can have explicit urf, if it is available use a smaller value like 0.7 or so.

I'm also interested in this problem, but I want to construct a solver using (as a base) only the stokes flow, is there any possibility of having a solver considering only the stokes flow? or is it necessary to develop it from scratch?, something like taking the icofoam solver and adapt it with the SIMPLE algorithm?


All times are GMT -4. The time now is 09:42.