CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Aref of force coefficients in OF

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By giammy92

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 28, 2016, 18:29
Default Aref of force coefficients in OF
  #1
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
Hi foamers,
i would like to know if OF calculates by itself Aref doing lref*depth = 1 in 2D case or if reads Aref that i have put in file force coefficients.
I'm asking that because i have found right force coefficients only after i have changed depth of mesh at 1, while before depth was about 1.2
giammy92 is offline   Reply With Quote

Old   April 29, 2016, 05:25
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

To answer this question, you can take a look into $FOAM_SRC/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C. Constructor is:

Code:
Foam::forceCoeffs::forceCoeffs
(
...
)
:
    ...
    Aref_(0.0)
{
    read(dict);
    ...
}
I.e. Aref is set to 0 and then read from dictionary like this:

Code:
void Foam::forceCoeffs::read(const dictionary& dict)
{
    if (active_)
    {
        forces::read(dict);

        ...
        dict.lookup("Aref") >> Aref_;
    }
}
So, no, forceCoeffs function object does not calculate Aref.
alexeym is offline   Reply With Quote

Old   April 29, 2016, 08:21
Default
  #3
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
strange, because i have put in force coefficients dictionary Aref=lref*1 but in my mesh i hadn't 1 for depth. When i have changed depth to 1 i have had correct results
giammy92 is offline   Reply With Quote

Old   April 29, 2016, 09:36
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Well, your 20% (changing depth from 1.2 to 1) error in coefficient values can be caused by anything but Aref: lRef, CofR, mesh, schemes, boundary conditions, convergence, etc.
alexeym is offline   Reply With Quote

Old   April 29, 2016, 14:00
Default
  #5
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
Now i'm repeating simulation with change of depth on mesh 2D, keeping Aref unchanged
giammy92 is offline   Reply With Quote

Old   April 29, 2016, 18:05
Default
  #6
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
I have repeated same simulation with same bc, schemes and solution but only changing depth of mesh from 1 to 2, keeping same Aref in force coefficients dictionary, but my results are increased exctacly of a factor 2!
That means that Aref depends from depth of mesh and not from value added in dictionary, but the strange thing is that i would be expected force coefficients halved and not doubled!!
ordinary likes this.
giammy92 is offline   Reply With Quote

Old   April 30, 2016, 05:03
Default
  #7
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Here is the code:

Code:
// lift, drag and moment
coeffs[0] = (totForce & liftDir_)/(Aref_*pDyn);
coeffs[1] = (totForce & dragDir_)/(Aref_*pDyn);
coeffs[2] = (totMoment & pitchAxis_)/(Aref_*lRef_*pDyn);
Aref and lRef are constants, pDyn is

Code:
scalar pDyn = 0.5*rhoRef_*magUInf_*magUInf_;
and depend on configuration (either rhoRef_ is constant read from configuration, or rho field read from simulation results).

totForce is

Code:
Field<vector> totForce(force_[0] + force_[1] + force_[2]);
force_ array is inherited from forces class and is calculated (depending on configuration actual calculation code varies):

Code:
// Normal force = surfaceUnitNormal*(surfaceNormal & forceDensity)
vectorField fN
(
    Sfb[patchI]/sA
   *(
	Sfb[patchI] & fD.boundaryField()[patchI]
    )
);

// Tangential force (total force minus normal fN)
vectorField fT(sA*fD.boundaryField()[patchI] - fN);

//- Porous force
vectorField fP(Md.size(), vector::zero);
As you can see normal and tangential forces depend on areas of the faces (Sfb array) of the patch, where you calculate force coefficient. And these areas depend on "mesh depth" in 2D case.
alexeym is offline   Reply With Quote

Old   April 30, 2016, 07:24
Default
  #8
Senior Member
 
Join Date: Mar 2016
Posts: 133
Rep Power: 10
giammy92 is on a distinguished road
Yes, i have already guessed,thank you anyway for your reply
giammy92 is offline   Reply With Quote

Reply


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
ActuatorDiskExplicitForce in OF2.1. Help be_inspired OpenFOAM Programming & Development 10 September 14, 2018 12:12
Sectional force coefficients tfuwa OpenFOAM Post-Processing 1 June 27, 2013 07:49
[OpenFOAM] spatial distribution of force coefficients in paraview&openfoam kkpal ParaView 1 April 21, 2013 08:15
[General] spatial distribution of force coefficients in paraview&openfoam kkpal ParaView 0 April 17, 2013 05:43
Force can not converge colopolo CFX 13 October 4, 2011 23:03


All times are GMT -4. The time now is 18:40.