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

Ruge Kutta programming question for unsteady flow

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

LinkBack Thread Tools Display Modes
Old   August 5, 2011, 07:19
Default Ruge Kutta programming question for unsteady flow
Senior Member
Join Date: Jun 2010
Posts: 107
Rep Power: 7
Hooman is on a distinguished road
I am trying to code a 1D unsteady flow problem using Runge Kutta for time stepping. I am using ODE functions in Maltab. 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
Runge Kutta for unsteady flow Hooman Main CFD Forum 2 August 3, 2011 08:58
Air Flow within a Wind Tunnel Question Paul Kleinmeulman FLUENT 3 January 12, 2005 20:09
Free surface flow simulation question Jane Luo FLUENT 1 April 23, 2004 04:26
Flow visualization vs. Calculated flow patterns Francisco Saldarriaga Main CFD Forum 1 August 2, 1999 23:18
Question on 3D potential flow Adrin Gharakhani Main CFD Forum 13 June 21, 1999 05:18

All times are GMT -4. The time now is 10:32.