CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Drag Force from Forces Function different from Paraview

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Yann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 26, 2018, 11:12
Default Drag Force from Forces Function different from Paraview
  #1
Member
 
Ed O'Malley
Join Date: Nov 2017
Posts: 30
Rep Power: 9
edomalley1 is on a distinguished road
Hi -



I've noticed an interesting issue - when I use OpenFoam to do runtime drag force calculations, they are different than when I calculate them in Paraview. At the same time step, OpenFoam calculates the force to be 2.28N and Paraview gets 1.83N.


In Paraview, after loading the case I do Extract Block on the geometry, then Extract Surface, then Generate Surface Normals, including cell normals. Then Calculator using cell normals, p*Normals_X, then Integrate Variables and display the Cell Normals attribute.


In OpenFoam, here is my forcesIncompressible file. This is a Spalart-Allmaras DDES simulation using pisoFoam. Any idea what is going on and which one (if any) is accurate?



Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
-------------------------------------------------------------------------------
Description
    Calculates pressure and viscous forces over specified patches for a case
    where the solver is incompressible (pressure is kinematic, e.g. m^2/s^2).

\*---------------------------------------------------------------------------*/

#includeEtc "caseDicts/postProcessing/forces/forcesIncompressible.cfg"

rhoInf      1.225;    // Fluid density
patches     (Shoe1);
outputControl timeStep;
outputInterval 250;
CofR        (0.03 0 0.03);
pitchAxis   (0 1 0);

// ************************************************************************* //
edomalley1 is offline   Reply With Quote

Old   November 30, 2018, 05:00
Default
  #2
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Hi!


OF calculates the viscous forces too. But I think in paraview you miss this component.
simrego is offline   Reply With Quote

Old   December 10, 2018, 13:21
Default
  #3
Member
 
Ed O'Malley
Join Date: Nov 2017
Posts: 30
Rep Power: 9
edomalley1 is on a distinguished road
Quote:
Originally Posted by simrego View Post
Hi!


OF calculates the viscous forces too. But I think in paraview you miss this component.
That's true but OF breaks out viscous forces separately from pressure forces. I'm comparing just pressure forces in the x direction.
edomalley1 is offline   Reply With Quote

Old   December 13, 2018, 10:15
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,198
Rep Power: 27
Yann will become famous soon enough
Hello,

pisoFoam, as many other incompressible solvers is based on the kinematic pressure, which is basically the pressure normalized by density:

P=p / \rho _{\infty}

You can make sure of that by checking the pressure dimensions in the p file. It should be either m2/s2 if the solver use kinematic pressure or kg/(m.s2) for regular pressure.
E.g in pisoFoam:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];
When post-processing in paraview, you need to calculate p*rhoInf to get the actual pressure value.
Using the example you gave in your initial post, it would be something like 1.83*1.225=2.24N, which is closer to what openFoam computes.

I don't know what can cause the remaining difference. Write precision ? Interpolation somewhere in the process ? For such thing I usually just load the patch(es) I want to work with in paraView so I don't use extract block and extract surface filters.
edomalley1 likes this.
Yann is offline   Reply With Quote

Old   December 14, 2018, 00:44
Default
  #5
Member
 
Ed O'Malley
Join Date: Nov 2017
Posts: 30
Rep Power: 9
edomalley1 is on a distinguished road
Great, thanks!
edomalley1 is offline   Reply With Quote

Reply

Tags
drag, forces


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
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 12:04
FLUENT: how to record drag force at every time step? qiulan FLUENT 4 March 20, 2017 22:22
Wrong forces coming from forces function object in controlDict Jason_Duguay OpenFOAM Post-Processing 0 April 13, 2016 10:07
Force vectors for drag during sweeping motion aamer FLUENT 0 April 18, 2011 09:17
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 05:37


All times are GMT -4. The time now is 07:45.