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/)
-   -   potentialDyMFoam / Problem with pressure calculation (-writep) (https://www.cfd-online.com/Forums/openfoam-solving/191198-potentialdymfoam-problem-pressure-calculation-writep.html)

Tasos August 3, 2017 08:17

potentialDyMFoam / Problem with pressure calculation (-writep)
 
Hi everyone,

I am using the potentialDyMFoam solver of foam-extend 3.2 and foam extend 4.0 (created by Prof. Hrvoje Jasak). More specifically, I am using this solver in order to simulate a forced vertical oscillation of a 2D cylinder, in potential flow.

When I am running "potentialDyMFoam" (pressure IS NOT calculated) the solver is converging normally:

Code:

Time = 1

PCG:  Solving for cellDisplacementx, Initial residual = 0, Final residual = 0, No Iterations 0
DICPCG:  Solving for cellDisplacementy, Initial residual = 0.0502561, Final residual = 9.27588e-10, No Iterations 127
volume continuity errors : volume = 116.804, max error = 1.07036e-12, sum local = 2.65343e-15, global = 1.96865e-18
Mesh Courant Number mean: 0.000229086 max: 0.00593496
GAMG:  Solving for p, Initial residual = 1, Final residual = 8.89102e-05, No Iterations 8
GAMG:  Solving for p, Initial residual = 0.0151871, Final residual = 1.29303e-06, No Iterations 8
GAMG:  Solving for p, Initial residual = 0.00250083, Final residual = 2.00244e-07, No Iterations 11
GAMG:  Solving for p, Initial residual = 0.000674892, Final residual = 5.50806e-08, No Iterations 10
GAMG:  Solving for p, Initial residual = 0.000193343, Final residual = 1.81462e-08, No Iterations 11
GAMG:  Solving for p, Initial residual = 6.34931e-05, Final residual = 8.87798e-09, No Iterations 9
continuity error = 2.49032e-16
Interpolated U error = 1.16813e-07
mag(U): max: 0.776043 min: 0.021953
ExecutionTime = 40.03 s  ClockTime = 40 s

Volume: new = 116.804 old = 116.804 change = 9.09495e-13 ratio = -7.77156e-15

On the other hand, when I am running "potentialDyMFoam -writep", in order to calculate the pressure, the initial residuals do not converge as you can see below:

Code:

Time = 1

PCG:  Solving for cellDisplacementx, Initial residual = 0, Final residual = 0, No Iterations 0
DICPCG:  Solving for cellDisplacementy, Initial residual = 0.0502561, Final residual = 9.27588e-10, No Iterations 127
volume continuity errors : volume = 116.804, max error = 1.07036e-12, sum local = 2.65343e-15, global = 1.96865e-18
Mesh Courant Number mean: 0.000229086 max: 0.00593496
GAMG:  Solving for p, Initial residual = 1, Final residual = 7.43826e-05, No Iterations 8
GAMG:  Solving for p, Initial residual = 0.982517, Final residual = 7.27178e-05, No Iterations 8
GAMG:  Solving for p, Initial residual = 0.531479, Final residual = 4.16867e-05, No Iterations 10
GAMG:  Solving for p, Initial residual = 0.423949, Final residual = 3.57022e-05, No Iterations 12
GAMG:  Solving for p, Initial residual = 0.676612, Final residual = 4.46229e-05, No Iterations 10
GAMG:  Solving for p, Initial residual = 0.563837, Final residual = 3.98159e-05, No Iterations 12
continuity error = 7.71835e-13
Interpolated U error = 1.16813e-07
mag(U): max: 0.776043 min: 0.021953
Using reference patch 4 with mag(U) = 0.493921 p + 0.5*U^2 = 0.150531
ExecutionTime = 40.01 s  ClockTime = 40 s

Volume: new = 116.804 old = 116.804 change = 9.09495e-13 ratio = -7.77156e-15

I really don't understand why in the first case the initial residuals are converging while in the second case they are not. As I understand the pressure is calculated directly from the velocity ( which is calculated from the velocity potential) and for this reason, no pressure iteration is required. So I assume that especially in the first case, the pressure iteration is actually velocity potential iteration.

I would like to ask you if you have experienced the same thing and if yes which might be the reason.

Feel free to ask more details about my case.
Thank you a lot in advance,
Tasos.


All times are GMT -4. The time now is 18:41.