Re: Runge-Kutta question
- From: Helmut Jarausch <jarausch@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Jun 2007 11:28:35 +0200
Tom wrote:
Hi,
I am stuck with what first seemed a straightforward Runge-Kutta (4th
order) integration of an ODE of the form dT/dp=C(p,T) T used to
describe an adiabat; T and p are temperature and pressure,
respectively, and C(p,T) are p,T-dependent material parameters. The
problem seems to arise when I try to introduce phase transitions,
which induce kinks in the adiabat, i.e. T is continuous, but its
derivative is not, although the jumps are not always large. I can
calculate how dT/dp has to be modified in the regions of phase
transformation, which are of finite and sometimes substantial width,
but the kinks are of course there and cause the solution to misbehave
in various ways, depending on how narrow the region is. Is there a
recommended way of dealing with such kinks, or in other words, do I
have to integrate piecewise, and how do I do that best?
Try to solve only up to the point in time where C is not smooth.
Then do any modifications on C and restart at that point in time
until the next time where C is not smooth, and so on.
E.g. in Scilab (www.scilab.org) there is a function ode_root
where you can specify a (nonlinear) condition for stopping the
integration.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
.
- References:
- Runge-Kutta question
- From: Tom
- Runge-Kutta question
- Prev by Date: Re: Runge-Kutta question
- Next by Date: Re: Runge-Kutta question
- Previous by thread: Re: Runge-Kutta question
- Next by thread: Re: Runge-Kutta question
- Index(es):
Relevant Pages
|