FEATool Multiphysics  v1.12
Finite Element Analysis Toolbox
Postprocessing

The last step in the simulation process is postprocessing and visualization. FEATool automatically switches to postprocessing mode after a solution has been computed. Alternatively, one can press the mode button to manually switch to postprocessing mode.

The toolbar button and corresponding menu option opens the Postprocessing Settings dialog box which controls various postprocessing options explained in the section below.

Images or snapshots of the current plot can be exported and saved in jpeg or png formats by using the toolbar button. In the corresponding dialog box exporting and sharing results to Facebook, LinkedIn, and Twitter is also supported.

share_image_50.png

The and buttons allow exporting the currently visualized postprocessing data as ParaView Glance (VTP) and Plotly web plots, respectively. These types of web plots can be conveniently be inspected, manipulated, exported, and shared via the web. An internet connection may be required to access and download the corresponding web reader, and the exported plot data might be required to be loaded into the viewer manually.

The Post menu allows for switching to Postprocessing Mode, opening the Postprocessing Settings... dialog box, and advanced postprocessing options such as subdomain and boundary integration, and export and interfacing with external tools as explained in the section below.

Postprocessing Settings

The visualization options in Postprocessing Settings dialog box shown in the following figure include choosing pre-defined or entering user defined custom expressions for surface, height, contour, slice, arrow, and deformation plots. Moreover, there are options for choosing the solution to display (for time dependent solutions), selecting or excluding which cells to display, and setting the min and max plot scale limits, and switching the colorbar on and off. The postprocessing options are explained in more detail below.

gui_post_50.png

Note that as is usual in FEATool postprocessing expressions accept general expressions involving dependent variables, space dimensions, constants, and mathematical operators. Complex expressions such as v+ux+sin(2*pi*y) where u and v are dependent variables (so that ux is the derivative in the x-direction), are perfectly valid.

Surface Plot

Surface plots allows visualization of both predefined postprocessing expressions and user defined ones on the domain surface. To use the surface plot option check the corresponding check box and enter the expression to visualize.

post_surf_50.png

For convenience, clicking on a 2D surface plot will evaluate the surface expression at the corresponding point and print the evaluated value.

Height Expression

In two dimensions the height expression option is available which scales a surface plot in the z-direction with the computed value of the height expression. To use the height expression option check the corresponding check box.

post_height_50.png

Contour Plot

Two dimensional problems also allow for contour or isoline plots. To use the contour plot option check the corresponding check box and select or enter an expression for the contour values. The contour values can be specified in the Contour levels edit field, either as an integer for the number of contours, or a space separated vector to specify fixed values for the contour levels.

post_contour_50.png

Iso Plot

Similarly to contour plots, three dimensional problems allow for isosurface plots. To use the isosurface plot option check the corresponding check box and select or enter an expression for the isosurface values. The iso plot values can be specified in the Iso levels edit field, either as an integer for the number of isosurfaces, or a space separated vector to specify fixed values for the iso levels.

post_iso_50.png

Slice Plot

Three dimensional problems also allow for slice plots which are surface plots perpendicular to the coordinate axes. To use the slice plot option check the corresponding check box and select or enter a slice expression. The Slice positions can be prescribed as a single integer signifying the number of equally spaced slices, or a space separated list indicating the exact position of each slice for the chosen axis.

post_slice_50.png

Arrow Plot

Arrow plots are available in two and three dimensions. To use arrow plots check the corresponding check box and select or enter expressions for the vector field defining the direction of the arrows.

post_arrow_50.png

Deformation Plot

Deformation plots are available in two and three dimensions and deforms the geometry and surface related plots correspondingly. To use the deformation plot, check the corresponding check box and select or enter expressions for the vector field defining the direction of the deformation. The deformation scale factor allows for tuning of the deformation scale in relation to the geometry size.

post_deform_50.png

General Settings

General settings allow for selecting Solution time (or Eigenvalue/frequency for eigenvalue problems) if several solutions are available as with time-dependent problems. Moreover, with Cell selection one can limit the postprocessing to a certain subset of cells by entering a logical expression. For example, the cell selection expression x>0 would only plot cells on the positive x-axis. Colormap selects a colormap to use, the Colorbar check box toggles the colorbar on and off, and the Limits vector indicates and prescribes the minimum and maximum values of the colorbar range. In 3D a Transparency slider is also available to control the opacity of the plots.

Advanced Postprocessing

The Post menu allows for the following advanced postprocessing options.

Min/Max Evaluation

Evaluates the minimum and maximum values for expressions on subdomains or boundaries. The Evaluation Expression can either be selected from a list of predefined postprocessing expressions, or entered as a user defined custom expression in the corresponding edit field. The Solution Number/Time can also be selected if more than one is present. In the Selection edit field a space separated list of Subdomains or Boundaries is specified for which the minima and maximia should be evaluated. The numerical Integration Rule prescribes how many evaluation points should be used for each grid cell in the evaluation process. The result will be printed in the Evaluation Result field as well as the command log in the main GUI.

post_minmax_50.png

Point/Line Evaluation

Allows both pre and user-defined expressions to be evaluated on single points or lines. Coordinates for the evaluation points can be entered as space separated vectors for each space dimension in the corresponding edit fields. The Solution Number/Time to evaluate can be selected in the drop-down listbox. The result will be printed in the Evaluation Result field as well as the command log in the main GUI. By selecting one or more of the Boundaries in the left hand side listbox, evaluation points at the boundaries will automatically be used.

post_pleval_50.png

Boundary/Subdomain Integration

Integration of postprocessing expressions over subdomains Subdomain Integration... (calling intsubd) and boundaries Boundary Integration... (calling intbdr) can be performed by selecting the corresponding menu options. The integration dialog box allows for selecting predefined postprocessing or entering user defined expressions in the Integration Expression edit field. Numerical Integration Rule, Solution Number/Time, and Subdomain/Boundary: to integrate over can also be set. The result will be printed in the Integration Result field as well as the command log in the main GUI.

post_bsint_50.png

Exporting Results

Simulation and postprocessing data can be exported to CSV, General Mesh Viewer (GMV), and ParaView (VTK) and (VTP) formats through the corresponding Export Results... menu options in the FEATool GUI. The current postprocessing expression will be evaluated in the grid points and exported in the chosen format (see the section on coefficient and expressions for a description of valid postprocessing expressions).

To export data manually one can also make use of the evalexpr function and the MATLAB Command Line Interface (CLI). To do this, first export the problem struct from the GUI to the main MATLAB workspace by selecting Export > FEA Problem Struct To Main Workspace from the File menu. Then call evalexpr to create a temporary variable with data to export, for example

c_data = { 'x', 'y', 'u', 'ux', '2*sin(u*x)^2' };
n_data = length(c_data);
p = fea.grid.p;
n_p = size(p,2);
data = zeros(n_p,n_data);
for i=1:n_data
  data(:,i) = evalexpr( c_data{i}, p, fea );
end

The data can now be saved and exported to a file with the MATLAB save command (for example save('-ascii','mydata.txt','data')).

Command Reference

The following functions can be used on the command line for postprocessing and visualization.

FunctionDescription
export_csvExport CSV postprocessing data
impexp_gmvExport GMV postprocessing data
impexp_vtpExport ParaView VTP data format
impexp_vtkExport ParaView VTK data format
plotbdrPlot and visualize boundaries
plotedgPlot and visualize edges (3D)
plotsubdPlot and visualize subdomains
postplotPostprocessing and visualization function
postextrudeExtrude 2D fea data for 3D postprocessing
postrevolveRevolve axisymmetric 2D fea data for 3D postprocessing
princseCalculate principal stresses