ODE Solver in FlexPDE Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » ODE Solver in FlexPDE « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Mohammad Rahmani (mrahmani)
Member
Username: mrahmani

Post Number: 4
Registered: 10-2004
Posted on Sunday, November 07, 2004 - 12:57 am:   

Dear Robert,
Would you please drop a note about the ODE solver in FlexPDE. Has it the capability to handle the stiff problems. Can it solve DAE set of equations.
In the provided texbooks and helps there is a little
about ODE solver.

The other question is, I frequently encountered set of PDEs accompanying a coupled ODE. For example consider the following case:

U: -div(grad(U))+F(Psi)*U*V=0
V: -div(grad(V))+G(Psi)*V*U=0
Psi: dt(Psi)=H(Psi,U,V)

Where F, G, and H represent function symbols.
FlexPDE simply solve the above set but I don't understand how it treats the last ODE. Normally I
leave the BC for the last ODE to the FlexPDE defaults (Natural()=0).

Thanks in advance
Mohammad
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 251
Registered: 06-2003
Posted on Sunday, November 07, 2004 - 02:24 am:   

1. FlexPDE is well suited to solving stiff systems and differential-algebraic equations (DAE's). Solution in time uses a second-order fully-implicit two-step Backward Difference Formula (BDF, Gear method). The initial step is formed using one and two overlapped first-order steps, repeated at smaller timesteps until second-order error is less than the prescribed ERRLIM. FlexPDE does not have an "ODE solver" as a separate package, but uses the same time evolution procedure for all time-dependent problems.

2. In your example system, the second-order backward difference formula is applied to the third equation in time, and all three equations are solved simultaneously for the values at the end of each timestep. Newton's method is used if the equations are nonlinear.
(In a case like yours, where some of the equations have no time derivatives, only the time-differential equations are analyzed for timestep control.)

All the equations are discretized in space using Galerkin finite element methods. This can allow spatial oscillation in the third equation, because in the absence of spatial derivatives, many oscillatory distributions can result in valid spatial integrals for the last equation.
I recommend adding a small diffusion term to the last equation to serve as a damping to spatial oscillation. This diffusion term should be chosen to damp spatial frequencies larger than the reciprocal cell size. (See the Tech Note "Smoothing Operators in PDE's" in the online Help).
Top of pagePrevious messageNext messageBottom of page Link to this message

Mohammad Rahmani (mrahmani)
Member
Username: mrahmani

Post Number: 6
Registered: 10-2004
Posted on Sunday, November 07, 2004 - 03:29 am:   

Dear Robert,
Thank you very much for this comprehensive
explanation. That's great, so we can solve stiff
ODE sets in FlexPde.
I saw your previeous recomendations about adding
diffusional terms to 1D problems nad now here for time-dependent ODE.
Just to be sure, what is the order of error if the
mentioned fictitious diffusion term added to PDE or ODE? I appreciate if you give me a measure.

Thanks
Mohammad

Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 253
Registered: 06-2003
Posted on Sunday, November 07, 2004 - 05:08 pm:   

I know of no simple way to evaluate the error incurred by inclusion of a diffusion damping term. This will depend on the characteristics of the problem.

The diffusion term is a low-pass filter on frequency components of the Fourier expansion of the solution. The error will therefore depend on the energy content of these high-spatial-frequency components. To the extent that high-frequency components generated by numerical errors are spurious, the error is negligible. In cases of steep propagating fronts, the error could be substantial.

Nevertheless, my Tech Note on the subject allows you to relate the chosen damping to the meaningful spatial frequencies in your problem. As long as your chosen damping frequency is higher than any useful spatial-frequency components in the solution, you should be safe. Bear in mind that the error introduced is of a similar kind to the error introduced by the discrete mesh approximation to the solution.

A pragmatic, empirical approach says to try smaller damping until the solution doesn't change.

Top of pagePrevious messageNext messageBottom of page Link to this message

Mohammad Rahmani (mrahmani)
Member
Username: mrahmani

Post Number: 7
Registered: 10-2004
Posted on Monday, November 08, 2004 - 12:55 am:   

Dear Robert,
Thanks for the useful comments.

/Mohammad

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration