- #1
Vrbic
- 407
- 18
Hello,
I have a problem with a solution of PDEs. I understand it is impossible to find my problem but some hint how to look at such problem would be very useful. I have to say it is my first encounter with a numerical solution of PDEs, so be patient with my description.
I have a code (in Fortran but I think it isn't important) for the solution of 5 tied up first order non-linear partial differential equations. I solve hydrodynamical equations (dependent on time) for some compact object. It works for some boundary and initial conditions but if I "rescale it" and I change (decrease) initial mass, i.e. I change all initial function and also the size of step (not a number of steps, but IT is probably important), the results with increasing time aren't smooth. I mean, the code works perfectly from the beginning but after some time most points of all function look very good, but few, let's say 5%, starts to look like noise.
All dif. eqs. are expected as difference eqs. and solved step by step. My idea is that the problem is in numerical differentiation. It is done by definition: F'(x)=(F(x+h)-F(x))/h. I tried to change to "two" steps and "five" steps algorithm of differentiation but it was worse. Even for the condition if it works.
If anyone have some points, hints or where starts to find a problem. Please let me know.
Thank you all.
I have a problem with a solution of PDEs. I understand it is impossible to find my problem but some hint how to look at such problem would be very useful. I have to say it is my first encounter with a numerical solution of PDEs, so be patient with my description.
I have a code (in Fortran but I think it isn't important) for the solution of 5 tied up first order non-linear partial differential equations. I solve hydrodynamical equations (dependent on time) for some compact object. It works for some boundary and initial conditions but if I "rescale it" and I change (decrease) initial mass, i.e. I change all initial function and also the size of step (not a number of steps, but IT is probably important), the results with increasing time aren't smooth. I mean, the code works perfectly from the beginning but after some time most points of all function look very good, but few, let's say 5%, starts to look like noise.
All dif. eqs. are expected as difference eqs. and solved step by step. My idea is that the problem is in numerical differentiation. It is done by definition: F'(x)=(F(x+h)-F(x))/h. I tried to change to "two" steps and "five" steps algorithm of differentiation but it was worse. Even for the condition if it works.
If anyone have some points, hints or where starts to find a problem. Please let me know.
Thank you all.