CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

Runge Kutta for unsteady flow

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

LinkBack Thread Tools Display Modes
Old   August 2, 2011, 06:28
Default Runge Kutta for unsteady flow
Senior Member
Join Date: Jun 2010
Posts: 107
Rep Power: 7
Hooman is on a distinguished road

I am writing a code to solve an unsteady flow problem and I need to use the Runge Kutta methods for my time stepping scheme. I am having problems understanding what the code should do. The variables vary with time (t) and space (x). Am I right in saying that for each t the variables are evaluated at all x's? So I need a loop for the space variation inside a time loop?

I hope my question is clear. Any hints would be appreciated.

Thank you in advance.
Hooman is offline   Reply With Quote

Old   August 2, 2011, 07:29
New Member
Join Date: Apr 2011
Posts: 23
Rep Power: 6
panou is on a distinguished road
Yes , you need a spatial loop inside time. The Runge-Kutta scheme as other which exist (simple euler..) march the each DOF(variable) at time. Therefore each variable (at nodes for the case of finite dif or element or volume at finite element or volume respectively) you must apply the time runge kutta scheme so that you find the all variables at next time.

In the case of explicit Runge-kutta scheme this is obvious. In implicit used with same manner.
panou is offline   Reply With Quote

Old   August 3, 2011, 08:58
Senior Member
Join Date: Jun 2010
Posts: 107
Rep Power: 7
Hooman is on a distinguished road
Thanks. I had another question regarding Runge Kutta, I was looking at the Matlab help and the ODE solver in there. Looking at the first example:

function dy = rigid(t,y)
dy = zeros(3,1); % a column vector
dy(1) = y(2) * y(3);
dy(2) = -y(1) * y(3);
dy(3) = -0.51 * y(1) * y(2);
options = odeset('RelTol',1e-4,'AbsTol',[1e-4 1e-4 1e-5]);
[T,Y] = ode45(@rigid,[0 12],[0 1 1],options);

I have my equations almost in this form now, apart from the fact that y (or my variables) also vary with x. So I was wondering if each y i.e. y(1) , y(2) ... could be column vectors themselves containing the variations of y for each element or cell centre?

Thanks very much.
Hooman is offline   Reply With Quote


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
Flow meter Design CD adapco Group Marketing CD-adapco 3 June 21, 2011 08:33
Mass flow and U-Mom flow in CFX Zhihua Xie CFX 0 September 3, 2007 09:49
transform navier-stokes eq. to euler-eq. pxyz Main CFD Forum 37 July 7, 2006 08:42
2N Storage runge kutta Vasanth Main CFD Forum 3 August 2, 2005 10:44
Runge Kutta Method CFDtoy Main CFD Forum 12 May 22, 2005 13:00

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