Re: Runge-Kutta question



Tom <flurboglarf@xxxxxxxxxxxxxx> in
<1182401698.518232.114510@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

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,
[...]
but the kinks are of course there and cause the solution to misbehave
in various ways

I understand that you introduce the phase transition by introducing
a discontinuity (or even singularity) in the C(p,T). But then your
equation does not need to have an analytical solution (that's the
point of phase transitions) and, therefore, a numerical solution goes crazy.
Try regularizing the heat capacity by replacing the jump with a steep,
but continuous rise, or by replacing the singularity with a sharp, but
finite peak, whichever is applicaple. Your ODE will then have an analytical
solution but will be prone to numerical instability. You will need to decrease
the integration step to really small values. Alternatively, consider using
an implicit method; I recommend the latter.
--
Pawel
And is there honey still for tea?
.



Relevant Pages

  • Re: How to deal with such ODE with fortran?
    ... I have to an integrate different ODE for each kp. ... without causing confusion in the recursive procedure. ... RHscalls P, but the subroutine doing integration only ... I am not familiar with this kind of equation, so I am now writing codes ...
    (comp.lang.fortran)
  • Re: How to deal with such ODE with fortran?
    ... I have to an integrate different ODE for each kp. ... without causing confusion in the recursive procedure. ... RHscalls P, but the subroutine doing integration only ... available literature for suitable numerical methods? ...
    (comp.lang.fortran)
  • Re: How to solve a stiff ODE system?
    ... Unable to meet integration ... The ode system of mine is as follows: ... I still don't quite follow you: how should I switch to a second order ... apply this procedure to my ODE system? ...
    (sci.math)
  • Re: How to solve a stiff ODE system?
    ... Unable to meet integration ... The ode system of mine is as follows: ... the recombination coefficient of bipolar charge. ... apply this procedure to my ODE system? ...
    (sci.math)
  • Re: Runge-Kutta question
    ... order) integration of an ODE of the form dT/dp=CT used to ... problem seems to arise when I try to introduce phase transitions, ... but the kinks are of course there and cause the solution to misbehave ... RWTH - Aachen University ...
    (sci.math.num-analysis)