
[Sponsors] 
Code Programming: Problems with skewed cells at transient calculations 

LinkBack  Thread Tools  Display Modes 
March 27, 2014, 12:43 
Code Programming: Problems with skewed cells at transient calculations

#1 
New Member
Join Date: Feb 2013
Posts: 5
Rep Power: 6 
Hello everybody,
I implemented an own RANS code in Matlab with the following main specifications:
Everything appears to work fine on orthogonal grids. But when I want to calculate an unsteady solution (CFL between 1 and 1000) on a nonorthogonal grid I get nonphysical results preferably in skewed cells (max 10° deviation from 90°). Since one week I am trying to figure out the problem but now I have no more idea where to search the error. So here is my question: Did anybody else have a similar problem and could give me hint? As all the necessary parameters (control volume, contravariant velocity components from previous/initial time step) seem to be ok, there must be a fundamental fault in my understanding of the equations. Thank you very much in advance! Corby 

March 27, 2014, 22:05 

#2 
Senior Member
Join Date: Jul 2009
Posts: 244
Rep Power: 11 
Have you done a uniform flow check (turn off boundary conditions, initialize the flowfield to uniform values, run the solver) to see if the solver maintains a uniform flow? Discretization of the grid metrics can show up as a mass source if done incorrectly.


March 28, 2014, 05:01 

#3 
New Member
Join Date: Feb 2013
Posts: 5
Rep Power: 6 
Thanks for reply!
I checked the uniform flow case according to your proposal. The flow stays uniform inside the numerical accuracy limits, i.e. maximum deviation from 1 is 1e29. Other orthogonal test cases showed reasonable results. I think I would have noticed if there is a bug in the metrics implementation that can be seen also on orthogonal cases. I have the idea, that the bug must be hided in the way I perform the velocity interpolation on the curvilinear grid which is not obvious for me at all. Until now I did not find literature on this topic that is not written by a mathematician, i.e. comprehensible by an engineer and CFD dummy like me. However, my implemented interpolation method that is also necessary for the steady calculation (fluxes on staggered grid cell borders) seems to work well. 

March 29, 2014, 20:47 

#4 
Senior Member
Join Date: Jul 2009
Posts: 244
Rep Power: 11 
If you are using a staggered grid, then what velocities are you interpolating?


March 31, 2014, 04:18 

#5 
New Member
Join Date: Feb 2013
Posts: 5
Rep Power: 6 
In general you have to interpolate the velocities from the previous iteration to calculate the fluxes at the borders of the staggered grid cells for the momentum equations. For nonorthogonal meshes an "exact" interpolation is quite tricky. Here, I simply calculated the weighted linear interpolation based on the distance to the next resprective node. With curvilinear coordinates the direction of the coordinate axis and thus the contravariant velocity components change. As the direction of the mid point must be somewhere in between the simple linear interpolation of the contravariant velocity values does not seem to be catastrophically wrong. It seems to work well for the steady case.
But for transient calculations you have to introduce the interpolation implicitly into the matrix to be solved. Here, it is necessary to interpolate the second velocity component (in 2D) on the node where you evaluate the momentum of the first velocity component. For example, for the momentum along xi (horizontal) you consider the respective cell where the vertical components along eta are (unfortunately) stored on the corners. Since you actually need them on the cell centre one has to inpolate. This is at least my view of things. So the chosen interpolation method (if there are really several) implicitly affects the solution only through the transient term. Even if I revisited my understanding of the equations and my implemented discretisation several times, I cannot understand, why the transient solution is locally wrong at skewed cells where the flow is unphysically deviated. 

Tags 
curvilinear, nonorthogonal, skew, transient, unsteady 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
snappyhexmesh remove blockmesh geometry  philipp1  OpenFOAM Running, Solving & CFD  2  December 12, 2014 11:58 
Highly Skewed Cells  chrisoturner  FLUENT  7  July 22, 2010 06:43 
ghost cells in axisymmetric problems  ma  Main CFD Forum  2  May 17, 2004 13:52 
Difference between steady and transient problems  Jianping Zhang  Main CFD Forum  9  April 14, 2003 06:17 
memory problems with a code on unix  vince  Main CFD Forum  2  November 5, 2002 04:48 