|
[Sponsors] |
April 28, 2016, 18:29 |
Aref of force coefficients in OF
|
#1 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
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 |
|
April 29, 2016, 05:25 |
|
#2 |
Senior Member
|
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); ... } Code:
void Foam::forceCoeffs::read(const dictionary& dict) { if (active_) { forces::read(dict); ... dict.lookup("Aref") >> Aref_; } } |
|
April 29, 2016, 08:21 |
|
#3 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
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
|
|
April 29, 2016, 09:36 |
|
#4 |
Senior Member
|
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.
|
|
April 29, 2016, 14:00 |
|
#5 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
Now i'm repeating simulation with change of depth on mesh 2D, keeping Aref unchanged
|
|
April 29, 2016, 18:05 |
|
#6 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
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!! |
|
April 30, 2016, 05:03 |
|
#7 |
Senior Member
|
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); Code:
scalar pDyn = 0.5*rhoRef_*magUInf_*magUInf_; totForce is Code:
Field<vector> totForce(force_[0] + force_[1] + force_[2]); 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); |
|
April 30, 2016, 07:24 |
|
#8 |
Senior Member
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
Yes, i have already guessed,thank you anyway for your reply
|
|
|
|
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 |