-
Notifications
You must be signed in to change notification settings - Fork 15
File formats
A Serafin file contains a mesh (nodes and triangular elements) with a set of variables (at least one) and eventually multiple frames. It is used for 2D and 3D Telemac results and the geometry file.
The description of the Telemac documentation is written below:
This is a binary file. The records are listed below:
- A record containing the title of the study (72 characters) and a 8 characters string indicating the type of format (SERAFIN or SERAFIND)
- A record containing the two integers NBV(1) and NBV(2) (number of linear and quadratic variables, NBV(2) with the value of 0 for Telemac, as quadratic values are not saved so far),
- NBV(1) records containing the names and units of each variable (over 32 characters),
- A record containing the integers table IPARAM (10 integers, of which only the 6 are currently being used),
- if IPARAM (3) ≠ 0: the value corresponds to the x-coordinate of the origin of the mesh,
- if IPARAM (4) ≠ 0: the value corresponds to the y-coordinate of the origin of the mesh,
- if IPARAM (7) ≠ 0: the value corresponds to the number of planes on the vertical (3D computation),
- if IPARAM (8) ≠ 0: the value corresponds to the number of boundary points (in parallel),
- if IPARAM (9) ≠ 0: the value corresponds to the number of interface points (in parallel),
- if IPARAM (8) or IPARAM(9) ≠ 0: the array IPOBO below is replaced by the array KNOLG (total initial number of points). All the other numbers are local to the sub-domain, including IKLE.
- if IPARAM (10) = 1: a record containing the computation starting date,
- A record containing the integers NELEM,NPOIN,NDP,1 (number of elements, number of points, number of points per element and the value 1),
- A record containing table IKLE (integer array of dimension (NDP,NELEM) which is the connectivity table. N.B.: in TELEMAC-2D, the dimensions of this array are (NELEM,NDP)),
- A record containing table IPOBO (integer array of dimension NPOIN); the value of one element is 0 for an internal point, and gives the numbering of boundary points for the others,
- A record containing table X (real array of dimension NPOIN containing the abscissae of the points),
- A record containing table Y (real array of dimension NPOIN containing the ordinates of the points),
Next, for each time step, the following are found:
- A record containing time T (real),
- NBV(1)+NBV(2) records containing the results tables for each variable at time T.
See BlueKenue documentation for more details.
3D Point sets (ASCII file with X, Y, Z coordinates).
2D Line sets (open and/or closed).
3D Line sets (open and/or closed).
Association of a geometry and some attributs.
Supported shapefile types:
- Points set: Point, PointZ, PointM, MultiPoint, MultiPointZ, MultiPointM
- Lines set:
- open: Polyline, PolylineZ, PolylineM
- closed: Polygon, PolygonZ, PolygonM
A custom XML export (close to LandXML standard) is provided for 2D Serafin. It can be used as an intermediate file to build a TIN (Triangulated Irregular Network) with ArcMap.
The file below is an extract of a LandXML generated with a single variable and a single frame:
<?xml version="1.0" ?>
<!-- Title: Malpasset dam break -->
<!-- 3D Coordinates (Northing Easting Elevation) with triangular elements connectivity table -->
<LandXML version="1.2" xmlns="http://www.landxml.org/schema/LandXML-1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.landxml.org/schema/LandXML-1.2 http://www.landxml.org/schema/LandXML-1.2/LandXML-1.2.xsd">
<Units>
<Metric linearUnit="meter" areaUnit="squareMeter" volumeUnit="cubicMeter"/>
</Units>
<Surfaces>
<Surface name="H at frame 1/1">
<Definition surfType="TIN">
<Pnts>
<P id="1">6559274.549 960476.774 -1.2356e-04</P>
<-- [...] -->
</Pnts>
<Faces>
<F id="1">1 3 8</F>
<-- [...] -->
</Faces>
</Definition>
</Surface>
</Surfaces>
</LandXML>
2D and 3D Serafin files can be written in VTK (Visualization Toolkit library).
Only ASCII files are supported (binaries are not yet implemented).