|
[Sponsors] |
Ruge Kutta programming question for unsteady flow |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 5, 2011, 07:19 |
Ruge Kutta programming question for unsteady flow
|
#1 |
Senior Member
Join Date: Jun 2010
Posts: 111
Rep Power: 15 |
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. |
|
|
|
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 19: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 |