Skip to content

HOWTO read from an interpolated TECPLOT file

Andrea Lani edited this page Mar 3, 2017 · 46 revisions

COOLFluiD allows for starting a simulation from TECPLOT files. To this end, two TECPLOT files, both in unstructured point-based format, are normally required:

  • .plt file having the mesh and solution for the full domain (for the moment, only one ZONE is supported)
  • .surf.plt file having the mesh and solution corresponding to the boundary nodes, divided in multiple zones.

The following example illustrates the related user-defined settings.

The given mesh/solution will be converted and then read as CFmesh file: Simulator.SubSystem.MeshCreator = CFmeshFileReader

A file named "input.CFmesh" will be read: Simulator.SubSystem.CFmeshFileReader.Data.FileName = input.CFmesh

Herein, the file path is either local (i.e. inside the directory from which you are running or ./) or relative to the COOLFluiD base directory. For instance: ../../RESULTS/input.CFmesh would mean that ../../ corresponds to the COOLFluiD base directory.

A given "input.plt" will be converted to "input.CFmesh": Simulator.SubSystem.CFmeshFileReader.convertFrom = Tecplot2CFmesh

The following two options define the conversion to a Finite Volume CFmesh format: Simulator.SubSystem.CFmeshFileReader.Tecplot2CFmesh.Discontinuous = true Simulator.SubSystem.CFmeshFileReader.Tecplot2CFmesh.SolutionOrder = P0

The TECPLOT file is in point-based format: Simulator.SubSystem.CFmeshFileReader.Tecplot2CFmesh.HasBlockFormat = false

The names of the boundary zones defined in the .surf.plt file are specified: Simulator.SubSystem.CFmeshFileReader.Tecplot2CFmesh.SurfaceTRS = Wall Inlet Outlet

The names of the variables to be read in both the .plt and .surf.plt are specified (note that the coordinates "x0" "x1" "x2" must not appear explicitly here):
Simulator.SubSystem.CFmeshFileReader.Tecplot2CFmesh.ReadVariables = "p" "u" "v" "T"

The number of element types is given (but only 1 is supported for now): Simulator.SubSystem.CFmeshFileReader.Tecplot2CFmesh.NbElementTypes = 1

The flag option SkipSolution used be set to true if only the mesh (no solution) was to be read. However, this flag does not exists anymore. When the user specifies a list of variables for ReadVariables, it is assumed that those will be read. However, as before, this is not enough to actually restart the simulation from those variables: the flag corresponding to a restart mode must be activated for the corresponding solver. For instance, in the case of Finite Volume you have to set: Simulator.SubSystem.CellCenterFVM.Restart = true

In general, data inside .plt and .surf.plt must have the same exact precision, since nodes will be matched by position between the two files. The precision of the floating data to be read can be rounded up using the following option (default value is 8): Simulator.SubSystem.CFmeshFileReader.Tecplot2CFmesh.Precision = 9

SOLUTION INTERPOLATION

COOLFluiD allows for specifying a donor TECPLOT solution mesh/file from which the solution will be interpolated onto the target mesh (i.e. the mesh corresponding to the input.plt in our example above) by using the following option:

Simulator.SubSystem.CFmeshFileReader.Tecplot2CFmesh.InterpolateFrom = donor.plt

Also in this case, the file path is either local (./ can be prepended) or relative to the COOLFluiD base directory. The interpolation will be accomplished by self-generating and running a TECPLOT macro (interpolate.mcr) that will create a .plt for the interpolated full domain and a .allsurf.plt file including all the boundary nodes in one single zone. The latter is needed by the TECPLOT-to-CFmesh conversion algorithm in order to ease the node matching between boundaries and full domain. To this end, it is assumed that the same boundary nodes will appear inside the interpolated .plt and .allsurf.plt with the same exact precision, therefore allowing for a full coordinate match.

An example of usage of interpolation and TECPLOT-to-CFmesh conversion is given in this CFcase example for a 3D magnetospheric simulation. This testcase defines two SubSystems: SubSystemA converts a given mesh from Gambit to CFmesh format and writes out the corresponding .plt and .surf.plt TECPLOT files; SubSystemB reads in the previously generated TECPLOT files, interpolates (via a TECPLOT macro) from the given solution file (on a coarser mesh) onto the new (finer) mesh and then simulates a solar wind/ Earth magnetosphere interaction starting from the interpolated solution on the finer mesh.

NOTE: currently the code assumes that there is a TECPLOT executable named tec360. If that's not the case, the easiest fix is to create a soft link to the your tecplot executable with that name.

Contacts

Home

Gallery

HOWTO

2019 NASA Ames presentation

2014 NASA Ames presentation


parallel computations of complex problems

Parallel mesh decomposition


Scalability in large scale simulation

High-performance computing (strong scaling on NASA Pleiades for 1/2 billion-cells 3D grid)


Modeling of high-speed reacting flows and plasma

Chemically reacting flows and plasma


Numerical Schlieren of turbulent flow on wing computed with RDS-LES

Complex all-speed flow simulations

Clone this wiki locally