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

Tuning a code for accuracy

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 7, 2011, 01:49
Default Tuning a code for accuracy
  #1
New Member
 
Felipe Hernandez
Join Date: Apr 2011
Posts: 13
Rep Power: 14
Petrov is on a distinguished road
I've been trying to test my code against the taylor-green vortex, and I am having problems getting an accurate solution. What is happening is that in the first few time iterations, the velocities wiggle around, and then settle down. After that, the decay in the magnitude of the velocity/pressure seems decent.

According to http://www.mech.eng.unimelb.edu.au/p...2/Niclasen.pdf, I could be getting errors on the order of E-4 after 1000 iterations with a time step of E-5. Instead, I find errors on the order of E-2 after only a few iterations. Furthermore, reducing the time step does not always improve the accuracy.

I'll list some of the specs of my program, and if you see something that could be causing the problem, that would help a lot.
Elements:
- 20x20 grid for this test
- quadratic velocity/linear pressure
Matrix Solver:
- biCGSTAB
- Gauss-Siedel preconditioner
epsilon for solution error: E-25
Time Iteration (this is where the problem probably lies!)
- discrete pressure correction method, as described in http://ta.twi.tudelft.nl/users/vuik/.../fem_notes.pdf, page 76

The problem is not serious enough to completely disqualify my code, as it produces the correct results qualitatively. (It can produce a karman street, calculated drag coefficients are in the right order of magnitude, pressure drops occur where you'd expect them, high viscosity in a pipe gives parabolic profile, etc.)
Petrov is offline   Reply With Quote

Old   August 9, 2011, 18:52
Default
  #2
Senior Member
 
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20
cfdnewbie is on a distinguished road
Hello Petrov,
I've done many TG-computations, but only with an explicit time scheme. I guess for such an unsteady problem, the scheme of choice would be explicit instead of implicit, so I can't really help you here. If you have verified your spatial discretization before, I'd guess your implicit solver has problems with the unsteadiness of the flow....

do you have any means of switching to an explicit time integrator?
cfdnewbie is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
The FOAM Documentation Project - SHUT-DOWN holger_marschall OpenFOAM 242 March 7, 2013 13:30
How to make code run in parallel? cwang5 OpenFOAM Programming & Development 1 May 30, 2011 05:47
Open Source Vs Commercial Software MechE OpenFOAM 28 May 16, 2011 12:02
Error in CFX Solver Leuchte CFX 5 November 6, 2010 07:12
Small 3-D code Zdravko Stojanovic Main CFD Forum 2 July 19, 2010 11:11


All times are GMT -4. The time now is 22:34.