|
[Sponsors] |
February 18, 2022, 08:54 |
Need Help - PostProcessing Drag coefficient
|
#1 |
New Member
Daria
Join Date: Feb 2022
Posts: 3
Rep Power: 4 |
Sorry guys, I'd like to ask you how to get a plot like this one for the drag coefficient:
Is there some funcObjects that i ve to load from OpenFOAM or i can make this plot through paraview. In the latter case, how can i make it? |
|
March 8, 2022, 12:07 |
|
#2 |
Member
Join Date: Mar 2018
Posts: 33
Rep Power: 8 |
Paste this in your controldict:
Coefficients { type forceCoeffs; libs ("libforces.so"); writeControl timeStep; writeInterval 1; patches (Airfoil); rho rhoInf; rhoInf 1025; // your fluid density liftDir (0 1 0); // direction of lift. In this case it is y direction dragDir (1 0 0); pitchAxis (0 0 1); CofR (9.75 10 0); // center of rotation. log true; magUInf 2; // inlet velocity lRef 1; // airfoil lenght Aref 0.1; //airfoil area } You can also use paraview, but it takes more effort, so I suggest you try the functionObject I pasted. |
|
March 26, 2022, 10:19 |
|
#3 |
New Member
Daria
Join Date: Feb 2022
Posts: 3
Rep Power: 4 |
thank you for your reply!
could you tell me the name of the function object so that i can import this each time i need it?? Update: i think i got it, i've just modified the "forceCoeffs" file uncommentin the bin section and picking a certain number of samples along the car. do you think it is a good solution? |
|
March 28, 2022, 04:01 |
|
#4 |
Member
Join Date: Mar 2018
Posts: 33
Rep Power: 8 |
Oh I initially misunderstood you and thought you needed a total drag value. If you want a plot, I dunno how to get that with function objects. Also I do not know how to edit source code
BUT. Paraview can plot it probably. For example, if you wish to get drag pressure coefficients: 1- Select the mesh region of the airfoil, in pipeline browser->file.foam->properties->mesh region 2- use filter "generate surface normals" 3- you can use the glyph filter to view the normals if you want 4- Calculator => (p)*Normals_X/(0.5*rhoInf*(URef^2)*ARef); Normals_x for Cd, Normals_y for Cl. Now you have cd along the curves. 5- Since it is cumulative, now you gotta somehow sum them along the lines. Easiest way I figure: export the step 4 results and postprocesss them in excel or whatever. 6- you need to do the same thing for parasite drag. |
|
March 28, 2022, 04:03 |
|
#5 |
Member
Join Date: Mar 2018
Posts: 33
Rep Power: 8 |
Oh I initially misunderstood you and thought you needed a total drag value. If you want a plot, I dunno how to get that with function objects. Also I do not know how to edit source code
BUT. Paraview can plot it probably. For example, if you wish to get drag pressure coefficients: 1- Selecciono the mesh region of the airfoil, in pipeline browser->archivo.foam->properties->mesh region 2- use filtro generate surface normals 3- you can use the glyph filter to view the normals if you want 4- Calculator => (p)*Normals_X/(0.5*rhoInf*(URef^2)*ARef); Normals_x for Cd, Normals_y for Cl. Now you have cd along the curves. 5- if you want cumulative drag, now you gotta somehow sum them along the lines. Easiest way I figure: export the step 4 results and postprocesss them in excel or whatever. 6- you need to do the same thing for parasite drag. Mod SOS: I double posted accidentally, please delete. |
|
Tags |
drag coefficient, openfoam, paraview, plot, postprocess |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Drag Force Ratio for Flat Plate | Rob Wilk | Main CFD Forum | 40 | May 10, 2020 05:47 |
Finding Drag Force from Skin Friction | Rob Wilk | Main CFD Forum | 0 | May 8, 2020 07:04 |
problem with saving drag coefficient | colopolo | FLUENT | 5 | April 12, 2013 11:59 |
Calculation of Drag Coefficient, Help Please | teek22 | CFX | 1 | April 26, 2012 19:41 |