# Analytical solution to validate code

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

 July 22, 2010, 06:55 Analytical solution to validate code #1 Senior Member   Join Date: Apr 2009 Posts: 118 Rep Power: 9 Hi I'm trying to validate my code written in spherical coordinates with some small analytical test cases. I've already tested it with pure diffusion (in spherical coordinates). But now I want to test it with a pure convection. The equation I'm interested in solving is (spherically symmetric, only radial dependence required) where is the radial velocity and is the scalar variable. This is different to the linear advection equation since I'm not assuming that the velocity is constant. Does anyone know how I could obtain an analytical solution to the above equation or would it be better to just check it with a linear advection equation?

 July 22, 2010, 10:28 #2 Senior Member   Join Date: Nov 2009 Posts: 411 Rep Power: 11 You should be able to obtain an analytical solution if for example you take as being constant. Or you can try to assume an analytical variation for this, say: =1/ Once you've picked an expression in r for you can differentiate and try to find solutions of the form: = F(r)T(t) If you are lucky you should be able to find a series solution for your function. Do

 July 22, 2010, 19:38 #3 New Member   Peter Join Date: Apr 2009 Posts: 4 Rep Power: 9 Not to be too nit-picky but I think technically you are verifying your code. One really powerful tool for code verification is the method of manufactured solutions. Two good articles to get started are: P. J. Roache, Code Verification by the Method of Manufactured Solutions, Journal Fluids Engineering, Vol 124 pp4-10 March 2002 K. Salari and P. Knupp, Code Verification by the Method of Manufactured Solutions, Sandia Report SAND2000-1444, June 2000 Good luck.

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post hjasak OpenFOAM Running, Solving & CFD 170 March 2, 2016 05:20 Newbie Main CFD Forum 3 August 20, 2004 03:17 Suman Kumar Main CFD Forum 7 July 15, 2003 14:05 Dr. Yazid Bindar Main CFD Forum 27 July 18, 2000 00:18 Juan Carlos GARCIA SALAS Main CFD Forum 39 November 1, 1999 15:34

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