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

Looking for good Test Cases for Code Validation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 28, 2013, 16:33
Default Looking for good Test Cases for Code Validation
  #1
New Member
 
Megan
Join Date: Jan 2013
Location: Hampton Roads VA
Posts: 13
Rep Power: 13
Spacegirl1923 is on a distinguished road
Hello all, and thanks in advance for any help you can offer.

I have just finished up writing a pretty basic 2-D Euler solver and I think I have worked out the obvious bugs. But I would like to run some validation tests and plan to add on some DG methods and maybe upgrade eventually to NS.

So what I need help with is-- What kind of validation tests are good to run? Currently I have ran a cylinder, NACA0012 airfoil, and a channel with a bump. The pressure, velocities etc all look fairly good, visually they are what I would expect and I am thinking about adding in a section to calculate the coefficient of pressure on the surfaces to just verify the actual numbers. What else can I throw at my code? What other things should I be looking for? I really want to put this through the ringer before I add in more complicated parts so please anything that would really test it would be awesome!

Thanks again!
Spacegirl1923 is offline   Reply With Quote

Old   August 28, 2013, 16:44
Default
  #2
Senior Member
 
cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 20
cfdnewbie is on a distinguished road
Hello Megan,
before starting with some "real world" test cases, the most important way to test your code is by the method of manufactured solution. You will find a lot of information about this on google. In brief, you choose any given (smooth) solution to your equation, plug it in, compute the residual and use that as a source term. By doing that, you can test you formal order of accuracy of your code for both space and time and ensure the correct order of convergence. Inspection by eye is not sufficient, since you can never tell the the difference between a 3rd and 4th order solution without actually computing the errors. This is especially important if you want to add DG functionality.

Hope this helps!
Cheers
cfdnewbie is offline   Reply With Quote

Old   August 28, 2013, 16:56
Default
  #3
Member
 
Join Date: Jul 2013
Posts: 56
Rep Power: 13
Alex C. is on a distinguished road
In the case your code is transient and compressible, an easy case to setup is the Sod Shock Tube.

It is a 1D case, but it is a good practice to run it in 2D or 3D. There are exact solution for the case, which makes validation very easy.

If you code does not handle transient or compressible flow, then you'll need to go with something else. Injecting an analytic solution to verify your residuals is a very good suggestion in order to validate what you did.

Congrats for the home-code!
Alex C. is offline   Reply With Quote

Old   August 28, 2013, 19:21
Default
  #4
New Member
 
Megan
Join Date: Jan 2013
Location: Hampton Roads VA
Posts: 13
Rep Power: 13
Spacegirl1923 is on a distinguished road
Great! Thank you both for the suggestions I will look into them.

So as far as the method of manufactured solution, how difficult is it to either find or write a code to generate the source terms needed for verification? If I understand correctly from briefly reading about it you are essentially adding in source terms which you expect to also see in the error at the end of the solve? As far as order of accuracy I guess I'm not sure how that has to do with validation of the code? Currently the cylinder grid I've evaluated has 4 levels of refinement and using the L2Norm I can back out the order of accuracy, but I don't see how that tells me if the algorithm I've coded is correct? What am I missing in this? Thanks!

I have run a similar 1-D code through the various shock problems for validation but I had not thought to try it on the 2-D code... how does one 'two-dimensionalize' the sod shock tube problem?

Thanks again for all the help, I'm a little new at this so I appreciate it a ton!

Megan
Spacegirl1923 is offline   Reply With Quote

Old   August 28, 2013, 22:17
Default
  #5
Member
 
Join Date: Jul 2013
Posts: 56
Rep Power: 13
Alex C. is on a distinguished road
Quote:
Originally Posted by Spacegirl1923 View Post
how does one 'two-dimensionalize' the sod shock tube problem?
You setup a rectangle, and initialize the domain to have a pressure discontinuity at the normal section in the middle. The easiest boundaries in my opinion is to setup symmetry plane at every boundaries, and to stop the time marching before the shock reflexion occurs on the tube extremities.

An other way is to set pressure inlet on the side of high pressure, and pressure outlet on the side of low pressure. Therefore you can simulate longer than the reach of the shock to the boundary, but once the shock has passed, you will only have a growing velocity toward infinity (Poiseuille flow without viscosity)

Last edited by Alex C.; August 29, 2013 at 09:58.
Alex C. is offline   Reply With Quote

Reply

Tags
code testing, euler equations, validations


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
STANDARD TEST CASES FOR CFD-CODE VALIDATION PRAVEEN CHANDRASHEKAR Main CFD Forum 8 September 19, 2018 06:01
ERCOFTAC validation test cases dogan OpenFOAM Verification & Validation 4 June 26, 2013 06:38
CFX-Pre problem, pls help!!! cth_yao CFX 0 February 17, 2012 01:52
Aug 2006 Focus Area: Validation and test cases Jonas Larsson CFD-Wiki 3 March 14, 2008 06:02
Test Cases for Turbomachine Code Validation Apurva Shukla Main CFD Forum 7 August 12, 1999 14:10


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