Re: Runge-Kutta question
- From: PFG <gora@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 21 Jun 2007 09:27:02 +0200
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?
.
- References:
- Runge-Kutta question
- From: Tom
- Runge-Kutta question
- Prev by Date: Runge-Kutta question
- Next by Date: Re: Runge-Kutta question
- Previous by thread: Runge-Kutta question
- Next by thread: Re: Runge-Kutta question
- Index(es):
Relevant Pages
|