|
[Sponsors] |
Could you tell me about the gradU needed when determining the frictional drag? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 22, 2024, 07:00 |
Could you tell me about the gradU needed when determining the frictional drag?
|
#1 |
New Member
Join Date: Nov 2022
Posts: 11
Rep Power: 4 |
Line 242 of force.cpp is used to calculate the frictional drag using the laminar flow model in OpenFOAM.
line 242 of force.cpp -rho()*laminarT.nu*dev(twoSymm(fvc::grad(U))) The fvc::grad(U) included in this expression is postProcess -func “grad(U)” is the same as the one calculated by postProcess -func “grad(U)”? Thank you in advance. |
|
August 23, 2024, 09:13 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Should be yes. The postProcess uses a pre-defined file. Hence we execute the grad function object which indeed does the following (gradTemplate.C):
Code:
template<class Type> bool Foam::functionObjects::grad::calcGrad() { typedef GeometricField<Type, fvPatchField, volMesh> VolFieldType; typedef GeometricField<Type, fvsPatchField, surfaceMesh> SurfaceFieldType; if (foundObject<VolFieldType>(fieldName_, false)) { return store ( resultName_, fvc::grad(lookupObject<VolFieldType>(fieldName_)), mesh_.changing() && mesh_.cache(resultName_) ); } else if (foundObject<SurfaceFieldType>(fieldName_, false)) { return store ( resultName_, fvc::grad(lookupObject<SurfaceFieldType>(fieldName_)), mesh_.changing() && mesh_.cache(resultName_) ); } return false; }
__________________
Keep foaming, Tobias Holzmann |
|
August 25, 2024, 19:56 |
|
#3 |
New Member
Join Date: Nov 2022
Posts: 11
Rep Power: 4 |
Hello
Thank you very much. I now have a better understanding of "grad". |
|
August 27, 2024, 05:34 |
|
#4 |
New Member
Join Date: Nov 2022
Posts: 11
Rep Power: 4 |
grad(U) derived by postProcess -func “grad(U)” and fvc::grad(U) in the source code had an average error of about 2.9 times when comparing values
It would be great if you could tell me why this is.... |
|
August 27, 2024, 07:20 |
|
#5 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
How you compare the data? How are you checking the grad from source code (what ever you mean here).
Make sure you have the same discretization schemes active
__________________
Keep foaming, Tobias Holzmann |
|
August 27, 2024, 21:36 |
|
#6 |
New Member
Join Date: Nov 2022
Posts: 11
Rep Power: 4 |
We modified force.c and force.h in
HTML Code:
src/functionObjects/forces/forces Then, after the analysis was finished, gradU was derived with Code:
postProcess -func “grad(U)” The above two gradUs were compared. |
|
Tags |
gradu, openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SMALL, GREAT and ROOTVSMALL - what is that? | Dommy | OpenFOAM Running, Solving & CFD | 7 | February 20, 2020 10:12 |
Why is there a great difference between numeca and cfx???? | sukiska | Fidelity CFD | 0 | October 12, 2011 11:21 |
Help needed with Cornell's Gambit airfoil tutorial | AW | FLUENT | 6 | February 26, 2010 23:42 |
Installing Open Foam and needed packages on shared disk for cluster environment | k3di | OpenFOAM Installation | 1 | July 8, 2009 08:06 |
Help needed with laminar couette flow boundary conditions | bengt | OpenFOAM Running, Solving & CFD | 0 | March 19, 2009 09:25 |