TINTEGRAL question? Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » TINTEGRAL question? « Previous Next »

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

Kevin Ellwood (ikevin)
Member
Username: ikevin

Post Number: 10
Registered: 06-2003
Posted on Friday, October 24, 2003 - 02:21 pm:   

Hello

I have a reaction diffusion problem and I need to keep track of the total amount of a particular species that has reacted at each spatial location. I thought I could simply compute something like:

total=tintegral(source)

where soucre is a function of the solution. It doesn't seem to work.

The next thing that I tired was to add an additional problem variable called "total" and I solved the additional equation:

total: dt(total) = source

with the initial condition of "total=0.0". It worked and I got the expected answer but the solution was slower and time stepping was affected.

My question is this - Is there a really good way to compute the time integral of a solution dependent quantity?

I did expect the "tintegral()" to work. I noticed in the example samples|misc|tintegral.pde that that a similar calcultion was made. It has

tsource = time_integral(vol_integral(source))

which works. I tried to add

tsource2 = time_integral(source)

and exame the results using:

contour(tsource2)

The results are incorrect -- tsource2 ends up with a constant value that seems to have little meaning. Should I have expected tintegral() to work?

Thanks
Kev
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 51
Registered: 06-2003
Posted on Friday, October 24, 2003 - 02:44 pm:   

The TINTEGRAL function as currently implemented is a scalar function. It cannot create a field of values (we will generalize this someday).

In the example you reference, time_integral(vol_integral(source)) is a scalar. time_integral(source) is not, because source is a function of position and is therefore a field quantity.

Your approach of adding the variable "total" is the right one. The only problem is that it interacts with a characteristic of the finite element method.

The FE method creates a discretized approximation of the PDE by integrating the PDE over the space surrounding a node. As long as there are derivatives in the PDE (ie, it really is a PDE), this couples the nodal values in a way that leads (usually) to a unique solution. When there are no derivatives, then many oscillatory solutions will satisfy the integrated equations. This allows instabilities to grow and crash the timestep control.

The solution is to include a small artificial diffusion term in any "point" equation which contains no derivatives. Change your equation to
dt(total) = fuzz*div(grad(total)) + source.

Use "fuzz" on the order of D^2/tc, where D is a spatial range over which smearing is allowed, and tc is a characteristic signal propagation time across that distance. (See Help | Tech Notes | Smoothing Operators in PDE's)

The div(grad()) operator can be viewed as a low-pass filter function that damps high frequency oscillations.

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