|
[Sponsors] |
January 31, 2019, 03:24 |
Coefficient of Pressure (Cp) for NACA 0012
|
#1 |
Member
Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 9 |
Hi OpenFOAM Users,
I was trying to validate my NACA 0012 simulation case using OpenFOAM (Version 5.0x). I created Mesh on Pointwise and successfully run this simulation and compared results of (Coefficient of Lift and Drag ) with experimental results that I got from NAS Technical Report: NAS-2016-01. The Inputs parameters were as follow: (1): Free Stream Velocity = 45 m/s (2): Mach Number = 0.13 (3): Free Stream Pressure ( (101325 pa) and Temperature (300 k ) (4): Density of air = 1.225 (5): Kinematic Viscosity = 1.4607*10^-5 (6): Reynolds Number = 3.0807 *10^6 (7): Turbulence model used: Spalart-Allmaras (8): Solver : simpleFoam I was trying to calculate the Coefficient of Pressure (Cp) by adding a function in the controlDict file. The solver runs perfectly without any error. But when I plot the results for Cp, I am getting this type of graph (Attached here.). The Cp values do not look correct. I tried it in many ways but the Cp results are same. Can anybody give me their valuable suggestion where I am doing a mistake? (2): Second thing I would like to find that when I use a function that I placed in the controlDict file to find Cl and Cd and the solver runs and putting all the values of Lift and Drag coefficients in the postProcess Folder. But in this case when I am adding lines in the controlDict file to calculate Cp. It is only putting a new text file in each time directory having name static(p)_coeff, meaning that it's not creating any postProcess folder as I have before for calculating the Cl and Cd. I am attaching here the controlDict, Boundary conditions, and Residual graph. I will be very thankful to you. Cp.jpg Residuals.png p and u Boundary Conditions.tar.gz controlDict.tar.gz |
|
February 1, 2019, 01:05 |
|
#2 |
Member
Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 9 |
Can anybody give their valuable suggestion on this topic. I will really appreciate you as I am still learning OpenFOAM.
|
|
February 1, 2019, 09:14 |
|
#3 |
Senior Member
|
Hi,
For next time, please put the contents of P U and controlDict between CODE tags, than people do not have to download and unzip files. Takes much less time. I copied your functions part here: Code:
functions { pressure1 { type pressure; functionObjectLibs ("libfieldFunctionObjects.so"); //source wall; //sourceName airfoil; patch ("airfoil") log yes; outputControl outputTime; outputInterval 1; enabled yes; calcTotal no; calcCoeff yes; pRef 0; rhoInf 1.125; pInf 101325; UInf (52 0 0); } } // ************************************************************************* // I think this may work to get reasonable results: Code:
functions { pressure1 { type pressure; functionObjectLibs ("libfieldFunctionObjects.so"); log yes; outputControl outputTime; outputInterval 1; enabled yes; calcTotal no; calcCoeff yes; pRef 0; rhoInf 1.125; pInf 0; UInf 52; } } // ************************************************************************* // |
|
February 3, 2019, 02:33 |
|
#4 |
Member
Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 9 |
Thanks a lot, Tom for your quick reply. I will keep your suggestions in mind when I will ask any question so that it will take less time to read and respond.
I inserted this function and it works. I still have few doubts about using this function that you corrected in the last message. (1) : As you told me that the function will not create any postProcess Folder as it will create the new file name "static(p)_coeff" in each time directory. This "static(p)_coeff" file has Cp for all the boundaries that I defined in the p and U files. I need Cp values only for the Airfoil patch, though this file has the Cp values for the airfoil. Is there any way I can define the patch over which I want to find out the Cp values lets say Airfoil. (2) : Why did we define (pInf = 0 ) insted of (pInf = 101325) ? (3): How can I plot the data from the last time directory for the Cp values for the AirfoilUpper and AirfoilLower patch? (4) : Is it possible to add more than one functionObject in the controlDict file as I was trying to calculate the Cp and (Cl, Cd). But I was only getting the values of the Cp not for Cl and Cd. I am attching my P, U and controlDict files here. |
|
February 3, 2019, 02:36 |
|
#5 |
Member
Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 9 |
functions
{ pressure1 { type pressure; functionObjectLibs ("libfieldFunctionObjects.so"); log yes; writeControl timeStep; writeInterval 50; //outputControl outputTime; //outputInterval 1; enabled yes; calcTotal no; calcCoeff yes; pRef 0; rhoInf 1.125; pInf 0; UInf (52 0 0); } forces { type forceCoeffs; libs ("libforces.so"); writeControl timeStep; writeInterval 1; patches ("airfoil"); rho rhoInf; log true; rhoInf 1.225; liftDir (-0.1736 0.9848 0); dragDir (0.9848 0.1736 0); CofR (0.25 0 0); pitchAxis (0 0 1); magUInf 52; lRef 1; Aref 1; } } |
|
February 3, 2019, 02:37 |
|
#6 |
Member
Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 9 |
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { airfoilLower { type zeroGradient; } airfoilUpper { type zeroGradient; } farfield { type freestreamPressure; value uniform 0; } frontAndback { type empty; } } // ************************************************** *********************** // |
|
February 3, 2019, 02:39 |
|
#7 |
Member
Gurpreet Singh
Join Date: Jan 2017
Posts: 36
Rep Power: 9 |
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (51.21 9.0297 0); boundaryField { airfoilLower { type noSlip; } airfoilUpper { type noSlip; } farfield { type freestream; freestreamValue uniform (51.21 9.0297 0); value uniform (51.21 9.0297 0); } frontAndback { type empty; } } // ************************************************** *********************** // |
|
February 4, 2019, 12:07 |
|
#8 | ||||
Senior Member
|
Hi,
Next time please also use CODE TAGS (the # symbol in the toolbar when editing) and put everything in one message so we do not need to scroll through everything. Please re-read my original answer as some of the questions you give are already answered there. Quote:
Quote:
Quote:
Quote:
Code:
Functions { object1 { type X; } object2 { type Y; } } |
|||||
Tags |
coefficient of pressure, naca0012, openfoam, pressure, simplefoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Domain Reference Pressure and mass flow inlet boundary | AdidaKK | CFX | 75 | August 20, 2018 06:37 |
Periodic flow using Cyclic - comparison with Fluent | nusivares | OpenFOAM Running, Solving & CFD | 30 | December 12, 2017 06:35 |
Pressure coefficient | Giuseppe | FLUENT | 2 | July 26, 2015 04:19 |
error message | cuteapathy | CFX | 14 | March 20, 2012 07:45 |
lid-driven cavity in matlab using BiCGStab | Don456 | Main CFD Forum | 1 | January 19, 2012 16:00 |