# Runge Kutta for unsteady flow

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

 August 2, 2011, 06:28 Runge Kutta for unsteady flow #1 Senior Member   Join Date: Jun 2010 Posts: 111 Rep Power: 9 Sponsored Links Hi, 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.

 August 2, 2011, 07:29 #2 New Member   aaaaaaaaaaaaaa Join Date: Apr 2011 Posts: 23 Rep Power: 8 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.

 August 3, 2011, 08:58 #3 Senior Member   Join Date: Jun 2010 Posts: 111 Rep Power: 9 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.

 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 CD adapco Group Marketing Siemens 3 June 21, 2011 08:33 Zhihua Xie CFX 0 September 3, 2007 09:49 pxyz Main CFD Forum 37 July 7, 2006 08:42 Vasanth Main CFD Forum 3 August 2, 2005 10:44 CFDtoy Main CFD Forum 12 May 22, 2005 13:00