
[Sponsors] 
PimpleFoam  oscillating forces and drag coefficient 

LinkBack  Thread Tools  Search this Thread  Display Modes 
July 1, 2018, 06:30 
PimpleFoam  oscillating forces and drag coefficient

#1 
Member
Cristina Hernandez
Join Date: May 2018
Posts: 35
Rep Power: 7 
Hi,
I am trying to run a simple case of the flow around a 2D square (side=0.5m) with rounded edges inside a rectangular domain using Pimplefoam solver. My objective is to calculate the drag coefficient at the walls of the square for different radius of curvature of the square. For a particular radius (case1: r=0.2m), my drag coefficient is fairly stable after 40 s. However, if I decrease the radius (case2: r=0.1m), the drag coefficient oscillates a lot around the "mean" value. See attached drag_coeff_plot. [Note that magnitude of drag coefficient in both cases is different since for more rounded edges, Cdrag should be lower] From my understanding, as drag coefficient dependes on forces, which are obtained from pressure, the problem is with pressure calculation. The only thing that I am changing between both cases is the mesh, that has to be adapted for the different radius, so the size of the cells around the square may not be the same. However, I have done "checkMesh" and nonorthogonality and aspect ratio are very similar in both cases. Find attached files. I have also plotted the residuals for p (see residuals_p attached file) and they look a bit different, but I do not know if this could be causing the difference. Can you think about any possible reason why I am obtaining this huge variations in drag coefficient in case2? Maybe I should modify some parameters in my fvSolution and fvSchemes files? I can post them if necessary. Any tip would be helpful, I am really stuck with this. Thanks in advance. Cristina 

July 2, 2018, 02:47 

#2 
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 20 
Your mesh seems fine, but try lowering the skewness. It is a bit high. For the case you are trying to solve you can do a lot better regarding the mesh.
Both of your results are most likely incorrect though, since your residuals are still way to high. If you do not need a logarithmic scale to plot your residuals it is quite likely, that the results aren't convincing. You might want to check your schemes, time step, nCorrectors etc. Even for an unsteady simulation these should be lower. The first question is hence...what Reynolds number are you solving at? Which turbulence model, what are your fvSchemes and fvSolution settings. 

July 2, 2018, 06:47 

#3  
Member
Cristina Hernandez
Join Date: May 2018
Posts: 35
Rep Power: 7 
Hi Bloerb, thanks a lot for your response.
In terms of the mesh, I have generated it using gmsh, my objective was to have a structured quadrangular mesh with finer cells in the region near the square, that is valid for different radius of curvature, but I am not very happy with my solution. Do you have any suggestions on how to create a better mesh for my case? Quote:
Quote:
I hope you can have a look and give me feedback about it. Thanks in advance, Cristina 

July 2, 2018, 11:53 

#4 
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 20 
For meshing you could try cartesian2DMesh from cfMesh. Maybe even blockMesh. The easiest way to test the benefit would be
Code:
generate an stl file of your boundaries. e.g by using your existing mesh. surfaceMeshTriangulate test.stl delete "frontAndback" parts inside the stl run surfaceFeatureEdges on it surfaceFeatureEdges test.stl test.fms copy a meshDict into your system folder and run it on the test.fms file cartesian2DMesh Code:
nCorrectors 4; nNonOrthogonalCorrectors 1; Code:
div(phi,U) bounded Gauss upwind; If that shows better results you could try less diffusive schemes. E.g limitedLinear, linearUpwind, or LUST 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Calculation of lift and drag coefficients on airfoil  CoolHersheys  OpenFOAM PostProcessing  5  September 27, 2021 06:04 
Drag coefficient too high at flow around a cyclinder  Gunni  OpenFOAM Running, Solving & CFD  17  October 31, 2019 02:18 
Incorrect Drag and Drag Coefficient for flow over a cylinder  ozzythewise  Main CFD Forum  8  June 13, 2012 06:24 
Post Processing Drag Coefficient  squanto773  OpenFOAM PostProcessing  1  March 7, 2012 09:43 
coefficient of lift and drag forces  nkiru  FLUENT  9  August 14, 2008 01:00 