CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Turbulent flow over NACA0012 airfoil validation case (openfoam.com)

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Luke_M

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 18, 2020, 05:03
Default Turbulent flow over NACA0012 airfoil validation case (openfoam.com)
  #1
New Member
 
Luke
Join Date: Jan 2020
Posts: 1
Rep Power: 0
Luke_M is on a distinguished road
Hello everyone!

I’m trying to recreate a validation case of NACA0012 airfoil exactly how they did it on openfoam.com website:
https://www.openfoam.com/documentati...irfoil-2d.html
They claim that the base for this case is a tutorial case from /incompressible/simpleFoam/airFoil2D so that’s the first thing I copied.

Then I had to download the 3D mesh: (3-D) 2 x 897 x 257 (2 x 513 point on airfoil surface) from this website:
https://turbmodels.larc.nasa.gov/naca0012_grids.html

Standard plot3dToFoam command didn't work, because it was producing an error:
Code:
Create time

Reading 1 blocks
block 0 nx:2 ny:897 nz:257
Reading block points
block 0:
Reading 461058 x coordinates...
Reading 461058 y coordinates...
Reading 461058 z coordinates...
Reading 461058 blanks...


--> FOAM FATAL IO ERROR: 
Attempt to get back from bad stream

file: n0012_897-257.p3dfmt at line 461062.

    From function bool Foam::Istream::getBack(Foam::token&)
    in file db/IOstreams/IOstreams/Istream.C at line 56.

FOAM exiting
So to convert the .p3dfmt file I used a command (which created only one wall "defaultFaces" in boundary file):
Code:
plot3dToFoam -noBlank n0012_897-257.p3dfmt
The message from this command looked like this:
Code:
Create time

Reading 1 blocks
block 0 nx:2 ny:897 nz:257
Reading block points
block 0:
Reading 461058 x coordinates...
Reading 461058 y coordinates...
Reading 461058 z coordinates...
Looking at cell 0 0 0 to determine orientation.
Right-handed block.

Merged points within 2.22045e-16 distance. Merged from 461058 down to 460672 points.
Creating cells
Creating boundary patches
--> FOAM Warning : 
    From function Foam::polyMesh::polyMesh(const Foam::IOobject&, Foam::pointField&&, const cellShapeList&, const faceListList&, const wordList&, const wordList&, const Foam::word&, const Foam::word&, const wordList&, bool)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 595
    Found 460672 undefined faces in mesh; adding to default patch.
Writing polyMesh
End
After that I used a command:
Code:
autoPatch -overwrite 15
which produced a message:
Code:
Create time

Create polyMesh for time = 0

Mesh read in = 0.91 s


Feature:15
minCos :0.965926

Assigned 512 faces to patch auto0
Assigned 229376 faces to patch auto1
Assigned 229376 faces to patch auto2
Assigned 512 faces to patch auto3
Assigned 896 faces to patch auto4

End
Then I edited the files as best as I can to match the guidelines on openfoam.com website. After editing I used standard commands:
Code:
decomposePar
simpleFoam
I ran simulation on OpenFoam v7 and v1612+ and both of them produce an error at Time=459 or 463 or 471. The error looks like this:

Code:
Time = 471

smoothSolver:  Solving for Ux, Initial residual = 0.403553, Final residual = 0.00133943, No Iterations 52
smoothSolver:  Solving for Uz, Initial residual = 0.423146, Final residual = 0.00205817, No Iterations 40
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib64/libc.so.6"
#3  Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:?
#4  Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:?
#5  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
#7  Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#8  Foam::fvMatrix<double>::solve() at ??:?
#9  ? at ??:?
#10  __libc_start_main in "/lib64/libc.so.6"
#11  ? at ??:?
Floating point exception (core dumped)
From the infromation I gathered it seems that this error comes when there is some expression dividing value by zero.

EDIT: Nvm, I figured it out. Turned out I messed up my BC .
Jack Sun likes this.

Last edited by Luke_M; January 21, 2020 at 11:55.
Luke_M is offline   Reply With Quote

Old   July 5, 2021, 18:45
Default
  #2
GDS
New Member
 
GS
Join Date: Sep 2018
Posts: 21
Rep Power: 7
GDS is on a distinguished road
I am trying to run this same case. Can you explain how to edit the files created by autoPatch? I cannot find any useful documentation on how to use this utility.
GDS 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
Validation: Turbulent Channel Flow, pisoFoam, LES Xiaoyu Yang OpenFOAM Running, Solving & CFD 23 December 19, 2019 11:51
SA-DDES Validation laminar or turbulent flow? Davide95 OpenFOAM Running, Solving & CFD 0 November 23, 2018 14:50
About Some Concepts:Laminar flow, turbulent flow, steady flow and time-dependent flow Jing Main CFD Forum 8 October 5, 2018 17:02
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 14:53
Turbulent Channel validation case - Pressure gradient ZviH Main CFD Forum 2 July 8, 2015 16:11


All times are GMT -4. The time now is 23:49.