CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

OpenFOAM Aerofoil Simulation

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By DLuo

Reply
 
LinkBack Thread Tools Display Modes
Old   March 25, 2014, 03:19
Default OpenFOAM Aerofoil Simulation
  #1
New Member
 
Join Date: Mar 2014
Posts: 3
Rep Power: 3
Puglin is on a distinguished road
Hi all,

I'm new to CFD-Online and, in truth, pretty new to CFD as a whole. I'm working in OpenFOAM for a project I'm doing at university, and as part of it, I'm looking at obtaining the lift and drag forces on a NACA0012 aerofoil using OpenFOAM. I tried using simpleFoam with a Spallart-Almaras solver but it yielded vastly incorrect results, so I'm trying a kOmegaSST solver instead. Basically, I tried just modifying the Spallart-Almaras case (removing the NuTilda file in the 0 directory and replacing it with a k and an omega file, altering controlDict, etc.) but when I try to run the solver, it gets to the fourth iteration and throws up the following (rather spectacular) error:

Quote:
Time = 4

smoothSolver: Solving for Ux, Initial residual = 0.721055, Final residual = 71344, No Iterations 1000
smoothSolver: Solving for Uy, Initial residual = 0.709464, Final residual = 24969.4, No Iterations 1000
GAMG: Solving for p, Initial residual = 1, Final residual = 0.0942618, No Iterations 6
time step continuity errors : sum local = 5.66465e+15, global = -2.35246, cumulative = -2.35246
smoothSolver: Solving for omega, Initial residual = 1, Final residual = 0.0947651, No Iterations 10
smoothSolver: Solving for k, Initial residual = 0.576515, Final residual = 0.0004799, No Iterations 1
ExecutionTime = 103.48 s ClockTime = 105 s

forces forces output:
sum of forces:
pressure : (-1.27121e+26 -2.70109e+27 1.83089e+06)
viscous : (-2.37414e+18 8.26257e+17 -251.479)
porous : (0 0 0)
sum of moments:
pressure : (1.35054e+27 -6.35603e+25 -1.7049e+27)
viscous : (-4.13128e+17 -1.18707e+18 5.68715e+17)
porous : (0 0 0)

forceCoeffs forceCoeffs output:
Cm = -8.52449e+24
Cd = -6.35603e+23
Cl = -1.35054e+25
Cl(f) = -1.52772e+25
Cl(r) = 1.77176e+24

Time = 5

smoothSolver: Solving for Ux, Initial residual = 0.719788, Final residual = 2.27616e+12, No Iterations 1000
smoothSolver: Solving for Uy, Initial residual = 0.705087, Final residual = 1.31092e+13, No Iterations 1000
#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 in "/lib/x86_64-linux-gnu/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::lduMa trix::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::dict ionary const&) at ??:?
#7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#8
at ??:?
#9
at ??:?
#10 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11
at ??:?
Floating point exception
I'm very new to this, so I have absolutely no idea what I've done wrong. Also, I'm more than happy to upload as many files as necessary-- I've refrained thus far as I'm not sure on the etiquette around here.

Thanks!
Puglin is offline   Reply With Quote

Old   March 27, 2014, 05:54
Default
  #2
New Member
 
Syed Zahid
Join Date: Mar 2014
Location: Bangalore, Karnataka, INDIA
Posts: 5
Rep Power: 3
zahid is on a distinguished road
Dear Puglin

Please check your mesh and try again as your simulation shows a diverging nature.
zahid is offline   Reply With Quote

Old   August 19, 2014, 00:20
Default
  #3
Member
 
D L
Join Date: Jun 2012
Posts: 32
Rep Power: 5
DLuo is on a distinguished road
What you're running into is a printstack error; the values that are getting computed are beyond the limitations of a "double" type variable so it throws an error and kicks you out. There are lots of reasons for this: Mesh, schemes, Initial conditions, etc. Unlike other aerospace codes which do a reasonable way of finding their way back to a reasonable solution, OF in my experience is notoriously unforgiving.
Some things you might try, if you've got a converged Spalart-Almaras run already (assuming decomposed), you could do a reconstructPar and then add in the new k and omega variables with proper initialization.
Or you could always run it through potentialFoam before invoking simpleFoam.
Also doublecheck your fvSchemes and fvSolution. Use the simpleFoam airfoil test case as a template.
Regarding correlation values for Cl and Cd, I've found the out-of-the-box turbulence models work fairly well in predicting Cl but Cd can be as much 50% high for low reynolds numbers (6e6 or less). Then again SA and kOmega (even k-epsilon) in most commercial codes perform the same way.

OpenFoam is a bit finicky with aerospace type work. I'd suggest starting here for a good mesh.
http://turbmodels.larc.nasa.gov/naca0012_val.html
There's also some nice reading material there.
elvis likes this.
DLuo is offline   Reply With Quote

Old   August 19, 2014, 06:36
Default
  #4
New Member
 
Join Date: Mar 2014
Posts: 3
Rep Power: 3
mzzmrt is on a distinguished road
Possibly a mesh problem. checkMesh

What is the y+ value?

What is the aoa? If large, mesh resolution is more important.

Keep working with sa model first because it is much more stable and easier to converge than komegasst for this kind of problem.

And check your initial boundary conditions. Under normal circumstances openfoam can easily converge and correctly solve this problem. getting the correct drag or stall is a little harder though...
mzzmrt is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM mesh generation of an aerofoil Thomas Jacob OpenFOAM Meshing & Mesh Conversion 26 June 23, 2015 15:28
Solidification simulation with OpenFOAM James OpenFOAM 5 June 26, 2012 02:33
diesel Engine simulation in OpenFOAM karam OpenFOAM Running, Solving & CFD 1 March 1, 2011 10:46
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07
transonic simulation with OpenFoam Shyam Main CFD Forum 0 June 12, 2008 02:39


All times are GMT -4. The time now is 16:04.