Exporting Data to Other Applications

<< Click to Display Table of Contents >>

Navigation:  User Guide >

Exporting Data to Other Applications

Previous pageReturn to chapter overviewNext page

FlexPDE supports several mechanisms for exporting data to other applications or visualization software.  

The EXPORT Qualifier

The simplest method is to append the modifier "EXPORT" (or "PRINT") to a plot command.  In this case, the plot data will be written to a text file in a predefined format suitable for importing to another FlexPDE problem using the TABLE input function.  For ELEVATIONS or HISTORIES, the output will consist of a list of the times or X-, Y- or Z- coordinates of the data followed by a list of the data values (see the description of the TABLE input function).  For 2D plots, a regular rectangular grid will be constructed, and the data written in TABLE input format.

The FORMAT String

The format of the text file created by the EXPORT modifier may be controlled by the inclusion of the modifier FORMAT "string".  

If this modifier appears together with the EXPORT or PRINT modifier, then the file will contain one text line for each data point in the grid.  The contents of the line will be exactly that specified by the string.  

All characters except "#" will be copied literally into the output line.

"#" will be interpreted as an escape character, and various options will be selected by the character following the "#":  

#x, #y, #z and #t will print the value of the spatial coordinates or time of the data point;  

#1 through #9 will print the value of the corresponding element of the plot function list;

#b will write a tab character;  

#r will cause the remainder of the format string to be repeated for each plot function in the plot list;  

#i inside a repeated string will print the value of the current element of the plot function list.  

 

In all cases of FORMATTED export, a header will be written containing descriptive information about the origin of the file.  This header will be delimited by "{" and "}".  In 2D grids, table points which are outside the problem domain will also be bracketed by "{" and "}" and marked as "exterior".  If these commenting forms are unacceptable to the importing application, then the data files must be manually edited before import.

TABLE Output

The TABLE plot command may also be used to generate tabular export.  This command is identical to a CONTOUR command with an EXPORT qualifier, except that no graphical output is generated.  The FORMAT "string" qualifier may also be used with TABLE output.
 

Transferring Data to another FlexPDE problem

FlexPDE supports the capability of direct transfer of data defined on the Finite Element mesh.  The TRANSFER output function writes the current mesh structure and the requested data values to an ASCII text file.  Another FlexPDE problem can read this file with the TRANSFER input function.  The transferred data will be interpolated on the output mesh with the Finite Element basis of the creating problem.  The TRANSFER input mesh need not be the same as the computation mesh, as long as it spans the necessary area.

The data format of the TRANSFER file is similar to the TECPLOT file described below.  The TRANSFER file, however, maintains the quadratic or cubic basis of the computation, while the TECPLOT format is converted to linear basis.  Since this is an ASCII text file, it can also be used for data transfer to user-written applications.  The format of the TRANSFER file is described in the Problem Descriptor Reference chapter "Transfer File Format"

 

Output to Visualization Software

FlexPDE can export solution data to third-party visualization software.  Data export is requested by what is syntactically a PLOT command, with the type of plot (such as CONTOUR) replaced by the format selector.  Two formats are currently supported, CDF and TECPLOT.  

CDF
 

CDF(arg1 [,arg2,…] ) selects output in netCDF version 3 format. CDF stands for "common data format", and is supported by several software products including SlicerDicer (www.visualogic.com ).  Information about CDF, including a list of software packages supporting it, can be viewed at the website www.unidata.ucar.edu/packages/netcdf .

CDF data are constrained to be on a regular rectangular mesh, but in the case of irregular domains, parts of the rectangle can be absent.  This regularity implies some loss of definition of material interfaces, so consider using a ZOOMed domain to resolve small features.  

The CDF "plot" statement can be qualified by ZOOM or "ON SURFACE" modifiers, and its density can be controlled by the POINTS modifier.  For global control of the grid size, use the statement "SELECT CDFGRID=n", which sets all dimensions to n.  The default gridsize is 50.

Any number of arguments can be given, and all will be exported in the same file.  The output file is by default "<problem>_<sequence>.cdf", but specific filenames can be selected with the FILE modifier.

 

TECPLOT

TECPLOT(arg1 [,arg2,…] ) selects output in TecPlot format.  TecPlot is a visualization package which supports finite element data format, and so preserves the material interfaces as defined in FlexPDE.  No ZOOM or POINTS control can be imposed.  The full computation mesh is exported, grouped by material number.  TecPlot can selectively enable or disable these groups.  Any number of arguments can be given, and all will be exported in the same file.  The output file is by default "<problem>_<sequence>.dat", but specific filenames can be selected with the FILE modifier.

Information about TecPlot can be viewed at www.amtec.com .

 

VTK

VTK(arg1 [,arg2,…] ) selects output in Visual Tool Kit format. VTK is a freely available library of visualization software, which is beginning to be used as the basis of many visualization packages.  The file format can also be read by some visualization packages that are not based on VTK, such as VisIt (www.llnl.gov/visit).  The format preserves the mesh structure of the finite element method, and so preserves the material interfaces as defined in FlexPDE.  No ZOOM or POINTS control can be imposed.  The full computation mesh is exported.  Particular characteristics of the visualization system are outside the control of FlexPE.  Any number of arguments can be given, and all will be exported in the same file.  The output file is by default "<problem>_<sequence>.vtk", but specific filenames can be selected with the FILE modifier.

The VTK format supports quadratic finite element basis directly, but not cubic.  To export from cubic-basis computations, use VTKLIN.

VTKLIN(arg1 [,arg2,…] ) produces a VTK format file in which the native cells of the FlexPDE computation have been converted to a set of linear-basis finite element cells.  

Information about VTK can be viewed at public.kitware.com/VTK/.

Examples:

Samples | Usage | Import-Export | Export.pde

Samples | Usage | Import-Export | Export_Format.pde

Samples | Usage | Import-Export | Export_History.pde

Samples | Usage | Import-Export | Transfer_Export.pde

Samples | Usage | Import-Export | Transfer_Import.pde

Samples | Usage | Import-Export | Table.pde

 


Note:

Reference to products from other suppliers does not constitute an endorsement by PDE Solutions Inc.