data import Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » data import « Previous Next »

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

Jens Baumann (max)
New member
Username: max

Post Number: 1
Registered: 07-2004
Posted on Thursday, July 15, 2004 - 02:31 am:   

Hello,

we use version 3.10a. Our problem is how to import data. In our case we need to import the relation mue (relative permeability) as a function of H (the applied magnetic field).

Is it possible to prpepare/use a table which contains "a value versus another value" and not "values versus coordinates"? Or do we need to interpolate the measured data?

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

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 188
Registered: 06-2003
Posted on Thursday, July 15, 2004 - 03:41 pm:   

A TABLE in FlexPDE can define any data relation you want, with one, two or three independent variables. The coordinate names listed in the TABLE file determine the dependency. These names must correspond with quantities defined in your PDE script, but may be anything you want, and need not be spatial coordinates. See "TABLE FILE FORMAT" in the Help Index.

In your case, you need a table file that lists "H" as the name of the first (and presumably only) coordinate. The assignment of the data field to "mue" can be done in the PDE script with the definition
mue = TABLE("filename")
or with the TABLEDEF statement.
See "Table Input Function" in the Help Index.
Top of pagePrevious messageNext messageBottom of page Link to this message

John Michopoulos (johnm)
New member
Username: johnm

Post Number: 2
Registered: 10-2004
Posted on Tuesday, November 09, 2004 - 03:51 pm:   

How can one import Parameter values (in the DEFINITIONS and INITIAL VALUES sections) that do not depend on space, from an external file or/and process?

The application requires the import (to flexPDE) of C1, C2 and C3 constants that are generated by abother process.

Do we use three calls of the type:
C1 = TABLE("coeff_C1.tbl")
C2 = TABLE("coeff_C2.tbl")
C3 = TABLE("coeff_C3.tbl")
which requires 3 files (one for each constant) or ther is a better way to do it? If that's the case how should the 1x1 table file look like?

Or there is another way of doing this?

Thank you immensely for your help!

Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 255
Registered: 06-2003
Posted on Tuesday, November 09, 2004 - 07:32 pm:   

The easiest way is probably to use the #include facility. Write your external file in a syntax acceptable to FlexPDE and put an
#include "filename"
in your script.

For example, if a file named "coefs.inc" contains the text:
C1=309
c2=91
c3=4

Then in your script, put
#include "coefs.inc"
in the definitions section.

You could also build table files of 2x2 points (1x1 intervals) with points spread to cover the entire domain. But the #include is easier and cheaper.

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