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

Analytical solution to validate code

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 22, 2010, 07:55
Default Analytical solution to validate code
  #1
Senior Member
 
Join Date: Apr 2009
Posts: 118
Rep Power: 17
lost.identity is on a distinguished road
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)

\frac{\partial{\phi}}{\partial{t}}  + \frac{1}{r^2}\frac{\partial}{\partial{r}}(r^2u_r\phi) = 0

where u_r is the radial velocity and \phi 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?
lost.identity is offline   Reply With Quote

Old   July 22, 2010, 11:28
Default
  #2
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 20
DoHander is on a distinguished road
You should be able to obtain an analytical solution if for example you take u_{r} as being constant.

Or you can try to assume an analytical variation for this, say:

u_{r}=1/r^{2}

Once you've picked an expression in r for u_{r} you can differentiate and try to find solutions of the form:

\Phi = F(r)T(t)

If you are lucky you should be able to find a series solution for your function.

Do
DoHander is offline   Reply With Quote

Old   July 22, 2010, 20:38
Default
  #3
ptb
New Member
 
Peter
Join Date: Apr 2009
Posts: 4
Rep Power: 17
ptb is on a distinguished road
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.
ptb 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
Integrated conjugate heat transfer solver in OpenFOAM hjasak OpenFOAM Running, Solving & CFD 172 April 13, 2023 01:42
Analytical Solution of the equation Newbie Main CFD Forum 3 August 20, 2004 04:17
Analytical Solution of 1D Convection Diffusion Eq. Suman Kumar Main CFD Forum 7 July 15, 2003 15:05
Open source CFD code development, possible? Dr. Yazid Bindar Main CFD Forum 27 July 18, 2000 01:18
State of the art in CFD technology Juan Carlos GARCIA SALAS Main CFD Forum 39 November 1, 1999 15:34


All times are GMT -4. The time now is 13:19.