solving pde by method of lines using ode solver
I am trying to solve PDE's by discretizing the space domain equations
using finite difference scheme (method of lines) and solving the
resultant ode's using ode solver ode15s.
I am facing two problems
Warning: Failure at t=3.834179e-13. Unable to meet integration
tolerances without reducing the step size below the smallest value
allowed (1.362174e-27) at time t
Even if I reduce the absolute and relative tolerances, I am not able
to solve this problem
I am trying to look at the time taken by individual expression in the
code using the inbulit utility profile. The ti...Use Runge-Kutta method solve ODE(with code inside)
I'm trying to solve a ODE with RK4 method,but i can't get the solution.
The differential equation of the considered non-linear system is given by:
in which m,c,k1,k2,k3 are all constants
and input u(t) is given by:
t=-511*0.005 sec,.....,512*0.005 sec
I have to obtain the output y(t) using RK4 method,here is my code:
(1) write ode file first(de1.m)
function de=de1(t,Y); % Y is a column vector
global m c k1 k2 k3
y=Y(1,:);v=Y(2,:); ...where can I fine the function.m using newmark method to solve a ODE?
the equation is
M x''+ C x' +K x=f(t)
pls goto http://mail.bris.ac.uk/~aemtak/numint/numint.html
On 21 Dec 04 08:05:10 -0500 (EST), Lijun wrote:
>the equation is
>M x''+ C x' +K x=f(t)
...solving ODE using consistency(solid) and non-consistency numerical methods
please could anyone help me...I am looking for a MATlab code
to solve ODE using consistency(solid) and non-consistency
numerical methods..if anyone has some examples for me I
would be grateful...Thanks
...record second derivative in a function used to solve ODE using ode45
I have a problem with a function used to define a 2nd order nonlinear
ODE for ode45. The function goes like this:
function [Rdot] = km2bode(t,R)
Rdot(1) = R(2);
Rdot(2) = %a complicated expression dependent on some variables, such
as R(1) and R(2).
Rdot = Rdot';
The problem is I need the values of Rdot(2) as the time progresses
later in my calculation. However if I run something like:
options = odeset('RelTol',1e-10,'AbsTol',1e-10);
[T,R] = ode45('km2bode', timespan, [ km.r0 initVelo], options)
The values of Rdot(2) will not be saved...how to use interp1 function for time dependant funcyion in ODE (ODE solved for space points for each time instant)
i have a small problem. i want to solve a set of9 differential equations using MOL for visualization of a field in space and time. i am using interp1 function to insert a time dependant function into a differential equation which is solved by an ODE solver.
below is a part from my code,
if i run the ODE solver for the given number of space points and insert the interp1 function like this, will this work correctly? i have ran my program but i think the result is not correct. i am pasti...Solving an ODE and using interp1
I need to interpolate some data to use in a system of ODEs and then solve the system (using ode45, or similar).
On the MathWorks documentation (see the main page on solving ODEs), they have a solution with the interpolation in the definition of the ODE. I can do this, however, I need to repeatedly call the ODE as part of a (fminsearch) parameter search. I belive that the computation would be faster if the program could do the interpolation once, outside of the ODE, instead of every time the ODE is called.
I've tried several methods of creating a function (or script) that interpolates...using Interpolation to solve ODEs
I have a coupled ODEs,
In:= e1 = x1[t]* (-27 + 4 x1[t]^2) - 4 (1 + x1[t]^2)* y1'[t];
In:= e2 = y1[t] *(-27+ 4 (x1[t]^2 + y1[t]^2)) + 4 (1 + x1[t]^2 +
Given the initial values of x1 and y1,we can use NDSolve command
to solve them
Now I want to solve them using another way( Because they are the
simplest cases. The actually form I have to deal with can not be
At first I generate the data for the fist part of right hand side(RHS)
of e1 as
I...How to use ODE 15s to solve this equation.
Could someone please elaborate on how to use ODE 15s or 45 for this differential equation?
(1/beta) *(d alpha/dT) = ln A*(1-alpha)- (E/RT)
I have the value of alpha and E as a function of a.
I need to generate graph of alpha Vs Temperature and d alpha/dT versus Temperature.
On 6/24/2012 7:59 PM, Sriraam wrote:
> Could someone please elaborate on how to use ODE 15s or 45 for this differential equation?
> (1/beta) *(d alpha/dT) = ln A*(1-alpha)- (E/RT)
> I have the value of alpha and E as a function of a.
> I need to generate graph of alpha Vs Tempera...