Initial value input using a table Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » Initial value input using a table « Previous Next »

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

Jaspreet (ftjin)
Member
Username: ftjin

Post Number: 5
Registered: 02-2006
Posted on Friday, March 10, 2006 - 02:19 pm:   

I am solving a 2D equation in cylindrical co-ords. R is the horizontal radial axis and Z is the vertical depth axis. The unknown variable 'U' varies with Z only. The initial condition is a set of values of 'U' varying with Z.I am attaching the table text file which shows the 'U' values. I have looked at several example import/export problems, which show how a table needs to be input, but none seem to be implementing initial values in form of tables.
Any suggestions regarding the syntax for 'Table input' for initial values would be appreciated.
I am using FlexPDE version 5.0.
text/plainInital values in a text file
table.txt (0.1 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 561
Registered: 06-2003
Posted on Friday, March 10, 2006 - 03:20 pm:   

See "Table File Format" in the Help Index for the required format for table files. (Hint: list the Z coordinates in a block and then the data values in a block).

See also the example "Samples | Misc | Import-Export | Table.pde" and the associated table file "Table.tbl".

Once having fixed the table format, import the table as the initial value of U:

INITIAL VALUES
U = TABLE("table.txt")

Alternatively, you can import the table to a parameter and use the parameter to set the initial values:

DEFINITIONS
U0 = TABLE('table.txt')
INITIAL VALUES
U = U0
....
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 562
Registered: 06-2003
Posted on Friday, March 10, 2006 - 03:25 pm:   

PS:
If the solution depends only on Z, you don't need 2D. You can eliminate the R coordinate and use 1D.

Only if you have a boundary condition different from Natural(u)=0 on the sides do you need to consider the R coordinate.
Top of pagePrevious messageNext messageBottom of page Link to this message

Jaspreet (ftjin)
Member
Username: ftjin

Post Number: 6
Registered: 02-2006
Posted on Friday, March 10, 2006 - 06:18 pm:   

I have followed your instructions. However, even wiht the attached table format, I am getting an error saying that 'illegal' characters were found.

0.1 K
TableRE.txt
"Initial values"

Anysuggestions about the format I have used to fill in the text table?
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 563
Registered: 06-2003
Posted on Saturday, March 11, 2006 - 01:23 pm:   

Your attached file seems not to be downloadable. Please send it to me direct or imbed it in the text of a new post.
Top of pagePrevious messageNext messageBottom of page Link to this message

Jaspreet (ftjin)
Member
Username: ftjin

Post Number: 7
Registered: 02-2006
Posted on Saturday, March 11, 2006 - 09:41 pm:   

Here is the table I was trying to enter.
data
z u
10 -.22
9 -.22
8 -.2193
7 -.218
6 -.215
5 -.212
4 -.207
3 -.200
2 -.15
1 -.08
0 0
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 564
Registered: 06-2003
Posted on Sunday, March 12, 2006 - 03:19 pm:   

See "Table File Format" in the Help Index for the required format for table files. (Hint: list the Z coordinates in a block and then the data values in a block).

See also the example "Samples | Misc | Import-Export | Table.pde" and the associated table file "Table.tbl".

I'll give you another hint. The table format you want is (just like in the examples):

z 11
0 1 2 3 4 5 6 7 8 9 10
data { u }
0 -0.08 -0.15 -0.2 -0.207 -0.212 -0.215 -0.218 -0.2193 -0.22 -0.22
Top of pagePrevious messageNext messageBottom of page Link to this message

Jaspreet (ftjin)
Member
Username: ftjin

Post Number: 10
Registered: 02-2006
Posted on Tuesday, April 04, 2006 - 08:54 pm:   

My program was running fine, however, it suddenyl pops up a mesage 'Undefined name' and highlights the '0' in the Z 11 column.No further simulation is carried out. Any reason why this is happening, even when I have defined all arameters and axes correctly?
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 577
Registered: 06-2003
Posted on Tuesday, April 04, 2006 - 11:12 pm:   

Unless I see the script and table I can't guess.
You can send them directly to me at rgnelson@pdesolutons.com
Top of pagePrevious messageNext messageBottom of page Link to this message

Jaspreet (ftjin)
Member
Username: ftjin

Post Number: 11
Registered: 02-2006
Posted on Thursday, April 06, 2006 - 02:18 pm:   

Robert:
As suggested by you, I am using the Richard's equation that is mentioned in the sample problems. The only change I am making if to the inital h values. I am using the attached input table. The problem in this case is 1 D.
However, when I press the execution button, I get the same error on the inpout text file.

0 K
Table.txt
"Input h "
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 578
Registered: 06-2003
Posted on Thursday, April 06, 2006 - 02:40 pm:   

Names must be delimited by spaces from adjoining numbers.
Z11 is not a name that is defined in your script.
You want a space, so that the name and number are distinct:
Z 11

Top of pagePrevious messageNext messageBottom of page Link to this message

Jaspreet (ftjin)
Member
Username: ftjin

Post Number: 12
Registered: 02-2006
Posted on Thursday, April 06, 2006 - 03:48 pm:   

Robert:
My program stops exctuing because the time step falls below 1E-9. I have lloked in the example problems, but don;t seeem to find a way to reduce the time step further.
Any suggestions?
Top of pagePrevious messageNext messageBottom of page Link to this message

Jaspreet (ftjin)
Member
Username: ftjin

Post Number: 13
Registered: 02-2006
Posted on Monday, April 10, 2006 - 08:41 pm:   

Robert:
My program stops exctuing because the time step falls below 1E-9. I have looked in the example problems, but don;t seeem to find a way to reduce the time step further.
Any suggestions?
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 581
Registered: 06-2003
Posted on Tuesday, April 11, 2006 - 04:21 pm:   

FlexPDE time integration is based on the assumption that the time behavior of each variable can be approximated by a quadratic interpolation.

At the beginning of the run, FlexPDE cuts and retries the first timestep until this quadratic assumption appears to be satisfied.

If this starting timestep is cut to less than 1e-9 times the initial timestep value (provided by you or guessed by FlexPDE) then the run is halted.

This behavior can be an indication that the initial and boundary conditions are inconsistent and that there is no time interval over which the solution is quadratic. This might happen if you have some equations that lack time derivatives and cannot be made consistent with other evolution equations. Sometimes it can happen if all equations are evolution equations, but are inconsistent.

The cutoff timestep can also be reached if your initial timestep request is much too large for the actual system response.

You control the initial timestep in the TIME section:
TIME t1 TO t2 BY dt

Try a much smaller initial timestep. If this doesn't work, you probably have inconsistent inital and boundary conditions.

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