Instability in time or spatial domain? Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » Instability in time or spatial domain? « Previous Next »

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

Issue Ho (ih1209)
Member
Username: ih1209

Post Number: 4
Registered: 12-2004
Posted on Friday, January 19, 2007 - 10:21 am:   

Attached please find the script and the data file required to run this 1D time-dependent diffusion problem. I used version 4.2.16

Indicated in the “SELECT” section, I tried two cases of solver control just to remove oscillation in the solution. It happened that increasing grid works while others do not. How come the adaptive grid isn’t functioning as it should?

If you try the same script using version 5.0.12 (student version), it gives an error and stops. Apparently it has trouble reading in the table. Why the same table input would fail in version 5?
application/octet-stream1D time-dependent diffusion
P_Ar-int.pde (1.3 k)
text/plaintable input
TableInAr-int.txt (10.0 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 736
Registered: 06-2003
Posted on Friday, January 19, 2007 - 02:35 pm:   

1.
You are looking at a log plot. The two levels of your variable differ by five orders of magnitude, and the oscillations you are seeing are on this order as well. Flexpde tracks errors as a fraction of the peak range, so in order to preserve accuracy of values like 1e-5 you will need an ERRLIM less than about 1e-7.
Once you establish an error range that includes the levels you want to see, the regridder will try to resolve your initial values. However, Since you know ahead of time that there is a jump in the initial values, you will get better resolution if you declare what you know by requiring a tiny spacing at the jump. You can do this by putting closely spaced points in your boundary trace.

A better way to preserve accuracy over the wide dynamic range you seem to want is to use the log of concentration as your system variable.

2.
An error was introduced into the table reader when it was rewritten for version 5. The reader tries to store both the real and integer values of each number read. The computer cannot store integers greater than 2e9, so if the table values are greater than this value, an error will result.

We will fix this in the next maintenance release, but in the meantime, you can work around it by removing the E+14 from your data values and multiplying it back in when you read the table:
Ndata=1.0e14*table('TableInAr-int.txt')
Top of pagePrevious messageNext messageBottom of page Link to this message

Issue Ho (ih1209)
Member
Username: ih1209

Post Number: 5
Registered: 12-2004
Posted on Saturday, January 20, 2007 - 12:41 am:   

Thank you for the explanation and suggestions.

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