CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

PimpleFoam - oscillating forces and drag coefficient

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2018, 06:30
Default PimpleFoam - oscillating forces and drag coefficient
  #1
Member
 
Cristina Hernandez
Join Date: May 2018
Posts: 35
Rep Power: 4
crizpi21 is on a distinguished road
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 non-orthogonality 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
Attached Images
File Type: png drag_coeff_plot.png (69.1 KB, 70 views)
File Type: jpg residuals_p.jpg (62.6 KB, 59 views)
Attached Files
File Type: txt checkMesh_case1.txt (3.5 KB, 20 views)
File Type: txt checkMesh_case2.txt (3.5 KB, 10 views)
crizpi21 is offline   Reply With Quote

Old   July 2, 2018, 02:47
Default
  #2
Senior Member
 
Join Date: Sep 2013
Posts: 269
Rep Power: 16
Bloerb will become famous soon enough
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.
Bloerb is offline   Reply With Quote

Old   July 2, 2018, 06:47
Default
  #3
Member
 
Cristina Hernandez
Join Date: May 2018
Posts: 35
Rep Power: 4
crizpi21 is on a distinguished road
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:
Originally Posted by Bloerb View Post
Both of your results are most likely incorrect though, since your residuals are still way to high.
What would you suggest as a reasonable value for residuals?

Quote:
Originally Posted by Bloerb View Post
The first question is hence...what Reynolds number are you solving at? Which turbulence model, what are your fvSchemes and fvSolution settings.
I am solving for Reynolds 3*10^4 and using komegaSSTSAS as turbulence model. My fvSchemes and fvSolution files are attached (they are based on FOAM tutorials).

I hope you can have a look and give me feedback about it.

Thanks in advance,

Cristina
Attached Files
File Type: txt fvSolution.txt (1.4 KB, 9 views)
File Type: txt fvSchemes.txt (1.4 KB, 11 views)
crizpi21 is offline   Reply With Quote

Old   July 2, 2018, 11:53
Default
  #4
Senior Member
 
Join Date: Sep 2013
Posts: 269
Rep Power: 16
Bloerb will become famous soon enough
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
Lets start with something that should converge. Try the following changes:
Code:
    nCorrectors     4;
    nNonOrthogonalCorrectors 1;
and
Code:
    div(phi,U)      bounded Gauss upwind;
Since to my knowledge kOmegaSSTSAS is an LES model you should make sure your maxCo in your controlDict or your timeStep is small enough. E.g below a courant number of 0.2.

If that shows better results you could try less diffusive schemes. E.g limitedLinear, linearUpwind, or LUST
Bloerb is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drag coefficient too high at flow around a cyclinder Gunni OpenFOAM Running, Solving & CFD 17 October 31, 2019 02:18
Calculation of lift and drag coefficients on airfoil CoolHersheys OpenFOAM Post-Processing 3 October 10, 2018 09:11
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 Post-Processing 1 March 7, 2012 09:43
coefficient of lift and drag forces nkiru FLUENT 9 August 14, 2008 01:00


All times are GMT -4. The time now is 17:34.