|
[Sponsors] |
Flow Over Cylinder - Question about PARDISO Solver and Fortran |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 7, 2020, 23:43 |
Flow Over Cylinder - Question about PARDISO Solver and Fortran
|
#1 |
Member
Yusuf Elbadry
Join Date: Sep 2018
Posts: 65
Rep Power: 7 |
Dear All,
I have a question regards my Solver, I have build a FORTRAN code to solve the incompressible viscous N--S equations. at first I used dgetrf and dgetri to get the inverse of the pressure matrix and solve the pressure system by matrix multiplication. all went well and good, after that I tried to include the PARDISO solver so I can save memory when I use a very large grid. so I am solving the pressure system by PARDISO instead of dgetrf and dgetri and matrix multiplication. I compared the results at the first few time steps and it was identical, and tried that too at time step =100,1000,5000 and the solution was identical too. the problem appears when the time steps increases, it is like there is a cumulative error which increase with time. my grid is 20Dx10D , Re=200, Epsilon = 0.05, dt=0.005 there is a sample of the results in attachments. I can see the difference in numbers grows with time steps and I dont know why, although the solution was identical at the first time steps so there is no mathematical problem in the code. |
|
May 7, 2020, 23:45 |
|
#2 |
Member
Yusuf Elbadry
Join Date: Sep 2018
Posts: 65
Rep Power: 7 |
Boundary condition
inlet (u=1,v=0) upper and lower ( v=0) exit ( P at the midline point = 0 ) Initial Coniditons : from inlet |
|
May 8, 2020, 01:42 |
|
#3 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Difficult to say what the problem could be.
I would address the fact you wrote "the inverse of the pressure matrix". In principle, the pressure matrix is singular, how do you treat this issue? |
|
May 8, 2020, 05:31 |
|
#4 |
Senior Member
|
Seems like a good case for doing a verification as opposed to a validation:
1) pick up an unsteady case with analytical solution (stokes, taylor vortex, etc.) 2) solve it with different grids and constant CFL, maybe at multiple CFL numbers 3) For each CFL and each grid-time step combination use both solvers 4) Compare both results with the analytical ones Nothing can beat this at spotting problems and if differences are always below the threshold of the numerical error you can maybe try again with a grid-time step-CFL combination that will bring it below the differences you see. At this point, either the differences will go further down or they won't. But, beside this, I would maybe first try the following: 1) set up a test with a matrix A like the one from your pressure equation. If you work in 2D, parameterize it with both dx and dy and make different attempts with different values 2) assign yourself a solution x (say, all ones) and compute the resulting rhs = Ax 3) solve the system with both solvers using A and rhs 4) compare results x and try to find out what's wrong and where 5) If it turns out that it is not your fault, just pick the one solver that actually works for you and maybe submit the test to the developers of the one that doesn't |
|
May 8, 2020, 10:11 |
|
#5 |
Member
Yusuf Elbadry
Join Date: Sep 2018
Posts: 65
Rep Power: 7 |
I put the BC before getting the Inverse, I get the inverse once outside the time loop.
|
|
May 8, 2020, 10:14 |
|
#6 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
||
May 8, 2020, 10:27 |
|
#7 | |
Member
Yusuf Elbadry
Join Date: Sep 2018
Posts: 65
Rep Power: 7 |
Quote:
attached for example the result at specific point after 2 time steps |
||
May 8, 2020, 10:28 |
|
#8 |
Member
Yusuf Elbadry
Join Date: Sep 2018
Posts: 65
Rep Power: 7 |
||
May 8, 2020, 10:34 |
|
#9 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
||
May 8, 2020, 11:12 |
|
#10 | |
Member
Yusuf Elbadry
Join Date: Sep 2018
Posts: 65
Rep Power: 7 |
Quote:
I am using Finite Element ( Galerkin Least Squares ) so I had to use a stabilization parameter in the continuity as attached for the second question, how do I know ? |
||
May 8, 2020, 14:31 |
|
#11 |
Member
Yusuf Elbadry
Join Date: Sep 2018
Posts: 65
Rep Power: 7 |
I will solve the lid driven cavity problem and check what is happening, may bw something appear and tell me what is going on
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Incompressible fluid flow solver | tchitchas | Main CFD Forum | 16 | December 14, 2017 18:37 |
Memory protection in OpenFOAM / combinig with FORTRAN | botp | OpenFOAM Programming & Development | 2 | February 15, 2016 12:25 |
CEL and fortran for multiphase flow | andyyuan | CFX | 0 | September 22, 2015 01:26 |
multi-dimensional dynamic array allocation for multi-block solver using fortran | mano | Main CFD Forum | 4 | June 25, 2012 21:01 |
2-D Euler Solver for compressible flow in Matlab | Volkan | Main CFD Forum | 1 | October 28, 2007 01:40 |