Importing irregular field data Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » Importing irregular field data « Previous Next »

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

Victor Bense (indiana)
Junior Member
Username: indiana

Post Number: 3
Registered: 01-2005
Posted on Thursday, June 16, 2005 - 01:59 pm:   

I would like to import a set of field data (points) that are irregularly spaced, and keep these points as nodes in the mesh. Is it correct that this can only be done with field data on a regular grid (field data will hardly ever like that), using the table function. Hence, a point set like this (x, y, value) cannot be imported?? as I get the message that coordinates must be monotonic.

2519203 5656006 70.03
2534540 5624067 141.26
2534692 5623754 143.27
2534806 5624280 139.17
2534875 5624043 140.95
2535160 5624262 138.45

The manual says:"FlexPDE can accept (import) and generate (export) non-analytic data through external one, two, or three dimensional table files. This feature is useful for modeling systems where experimental data is available and for interfacing with other software programs."

thanks

Victor Bense
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 383
Registered: 06-2003
Posted on Thursday, June 16, 2005 - 04:58 pm:   

The only ways to force the mesh to incorporate specific points are:

1) include them as points in a boundary path or "feature". In this case, they must be ordered along the path, and not randomly scattered. You can make this specification in an external file and #include it into your script, but the format must conform to FlexPDE script syntax.

2) use a set of FIXED POINTS (this only works in 2D).

In either case, you could set POINT VALUE() boundary conditions at the points, but this will not invoke any interpolation of values along the path.

Point values frequently do not work as you expect. Many equations will allow some form of pole structure in the solution, so the point value does not carry the general solution to the specified level, but instead forms a spike.

You could define the coordinates and data independently in ARRAYS and load them with a REPEAT, as for example the following:


definitions
xt=array(0,1,2,3,4) { the x-coordinates }
yt=array(-4,-2,0,2,4){ the y-coordinates }
ut=array(1,2,3,4,5) { the data values }
{ some interpolation arithmetic: }
dist(i)=sqrt((x-xt[i])^2+(y-yt[i])^2)
delta(i)=sqrt((xt[i+1]-xt[i])^2+(yt[i+1]-yt[i])^2)
interp(i) = ut[i]+(ut[i+1]-ut(i))*dist(i)/delta(i)
...
boundaries
...
feature "path" start (xt[1],yt[1])
repeat i=1 to 4
value(u)=interp(i)
line to (xt[i+1],yt[i+1])
endrepeat

Notice that while this seems a bit messy, it is completely general, as you can set it up to apply any kind of boundary condtions you want, for as many variables as you want, and with any kind of curve interpolation. What you originally asked for required FlexPDE to make a lot of assumptions about what you wanted, and no provision for modifying the defaults.

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