Navigation:  Technical Notes >

Technical Notes |      Exporting Data to Other Applications

Print this Topic Previous pageReturn to chapter overviewNext page

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

 

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 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>.

1)All characters except "#" will be copied literally into the output line.
2)"#" will be interpreted as an escape character, and the output will be selected by the single character following the "#":  #x, #y, #z or #t will print the value of the spatial coordinate or time of the data point;  #1 through #9 will print the value of the indicated element in the plot function list; #b will print a taB character;  #r will cause the remainder of the format string to be repeated for each element of the plot function list;  #i in a repeated string will print the value of the current element of the plot function list.  See the example problems "Export_Format" and "Export_History" listed at the end of this section for use of the FORMAT modifier.

 

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 version 2.09 introduces 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.

 

Output to Visualization Software

 

FlexPDE version 2.06 introduces the capability of exporting 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(arg2 [,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(arg2 [,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 which 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 FlexPDE.  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.

 

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.

 

 


Page url: index.html?texporting.html