CMS-Flow Output files: Difference between revisions

From CIRPwiki
Jump to navigation Jump to search
m (Rdchlmeb moved page CMS Output files to CMS-Flow Output files: Better description)
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
__TOC__
Output from CMS can be either ASCII or binary (XMDF binary for now).  On Windows machines the default output type is XMDF and on Linux machines the default is ASCII.  These can be changed with extra directions in the parameter file on Windows, but not for Linux.  This is because Linux does not work with XMDF.
=Parameter File Directives of Output Type=
The following cards are the best way to specify output type in CMS.  Simply add the card to the parameter file (.cmcards) or specify the option in the SMS interface.
<pre>
OUTPUT_FILE_TYPE          XMDF | ASCII  !(choose either XMDF or ASCII)
</pre>
=ASCII Output Files=
=ASCII Output Files=
ASCII Output files from CMS are in the form of three different files listed below.  These file types were chosen because they are supported in SMS and can be read in directly.
ASCII Output files from CMS are in the form of three different files listed below.  These file types were chosen because they are supported in SMS and can be read in directly.
Line 7: Line 18:


==SUPER files (*.sup)==
==SUPER files (*.sup)==
(Adapted for CMS from the SMS Wiki)
(Adapted for CMS from the SMS Wiki)<br>
Super files can still be opened in SMS. These contain a 2D scatter point file and the corresponding ASCII CMS Solution data file.
Super files can still be opened in SMS. These contain a 2D scatter point file and the corresponding ASCII CMS Solution data file.


Line 13: Line 24:


A sample of the file format for a super file is shown below. The first line in the file is the SUPER card, which identifies the file as a super file. Each of the other cards shown are optional. Each of the file cards has a card identifier representing the type of file. The identifier is followed by a file name. The file name should be a complete path if the file is not in the same directory as the super file. Any suffix may be used for the file name.
A sample of the file format for a super file is shown below. The first line in the file is the SUPER card, which identifies the file as a super file. Each of the other cards shown are optional. Each of the file cards has a card identifier representing the type of file. The identifier is followed by a file name. The file name should be a complete path if the file is not in the same directory as the super file. Any suffix may be used for the file name.
*More detailed information on this file can be found on the SMS Wiki: '''[https://www.xmswiki.com/wiki/SMS:SMS_Super_Files_*.sup https://www.xmswiki.com/wiki/SMS:SMS_Super_Files_*.sup].'''


{|style="background: #EEEEEE"
{|style="background: #EEEEEE"
Line 44: Line 57:
The super file saves and references the scatter and dataset files.
The super file saves and references the scatter and dataset files.


{|class="wikitable"
*More detailed information on this file can be found on the SMS Wiki: '''[https://www.xmswiki.com/wiki/SMS:2D_Scatter_Point_Files https://www.xmswiki.com/wiki/SMS:2D_Scatter_Point_Files].'''
 
{|style="background: #EEEEEE"
|width="200"|SCAT2D ||/* File type identifier */
|-
|-
|SCAT2D ||/* File type identifier */
|BEGSET ||/* Beginning of cards for scatter point set */  
|-
||BEGSET ||/* Beginning of cards for scatter point set */  
|-
|-
|NAME "name" ||/* Name of scatter point set */  
|NAME "name" ||/* Name of scatter point set */  
Line 89: Line 103:


==ASCII Datasets (*.dat)==
==ASCII Datasets (*.dat)==
(Adapted for CMS from the SMS Wiki)
(Adapted for CMS from the SMS Wiki)<br>
CMS Solution Datasets are stored in ASCII files.  Only one dataset is stored in a single file in either scalar or vector format. For scalar dataset files, one value is listed per vertex, cell, node, or scatter point. For vector dataset files, one set of XY vector components is listed per vertex, cell, node, or scatter point.  If necessary, a set of status flags can be included in the file.  If the status flag is false (0), the corresponding item (node, cell, etc.) is inactive.  If status flags are not included in the file, it is assumed that all items are active.  Dataset files are opened through ''File'' | '''Open''' and are saved when other files are saved such as [[SMS:2D Scatter Point Files|2D scatter point files]] or through the [[SMS:Export Dataset Dialog|''Export Dataset'' dialog]].
CMS Solution Datasets are stored in ASCII files.  Only one dataset is stored in a single file in either scalar or vector format. For scalar dataset files, one value is listed per vertex, cell, node, or scatter point. For vector dataset files, one set of XY vector components is listed per vertex, cell, node, or scatter point.   
 
*More detailed information on this file can be found on the SMS Wiki: '''[https://www.xmswiki.com/wiki/SMS:ASCII_Dataset_Files_*.dat https://www.xmswiki.com/wiki/SMS:ASCII_Dataset_Files_*.dat].'''


===Scalar File Format===
===Scalar File Format===
DATASET              /* File type identifier */
{|style="background: #EEEEEE"
OBJTYPE "scat2d"     /* Type of object data set is associated with */
|width="250"|Dataset ||/* File type identifier */
BEGSCL               /* Beginning of scalar data set */
|-
OBJID id             /* Object id */
| OBJTYPE "scat2d"   ||/* Type of object data set is associated with */
ND numdata           /* Number of data values */
|-
NC numcells         /* Number of cells or elements */
| BEGSCL             ||/* Beginning of scalar data set */
NAME "name"         /* Data set name */
|-
RT_JULIAN           /* The reference time as a Julian number. */
| OBJID id           ||/* Object id */
TIMEUNITS units     /* The time units. (hours, etc)*/
|-
TS istat time       /* Time step of the following data. */
| ND numdata         ||/* Number of data values */
val1                 /* Scalar data values */
|-
val2
| NC numcells       ||/* Number of cells or elements */
.
|-
.  /* Repeat data for [numcells] number of cells.
| NAME "name"       ||/* Data set name */
.
|-
/* Repeat TS card for each time step */
| RT_JULIAN         ||/* The reference time as a Julian number. */
ENDDS               /* End of data set */
|-
| TIMEUNITS units   ||/* The time units. (hours, etc)*/
|-
| TS 0 time     ||/* Time step of the following data. */
|-
| val1               ||/* Scalar data values */
|-
| val2||
|-
| .||
|-
| ||/* Repeat data for [numcells] number of cells.
|-
| .||
|-
| /* Repeat TS card for each time step */||
|-
| ENDDS               ||/* End of data set */
|}


===Vector File Format===
===Vector File Format===
DATASET
{|style="background: #EEEEEE"
OBJTYPE "scat2d"     /* Vector at node/gridnode or element/cell */
|width="250"|Dataset ||/* File type identifier */
BEGVEC              /* Beginning of vector dataset */
|-
OBJID id             /* Object id */
| OBJTYPE "scat2d"   ||/* Type of object data set is associated with */
ND numdata           /* Number of data values */
|-
NC numcells         /* Number of cells or elements */
| BEGVEC            ||/* Beginning of vector data set */
NAME "name"         /* Data set name */
|-
RT_JULIAN reftime    /* The reference time as a Julian number. */
| VECTYPE 0          ||/* Vector at node/gridnode/scatterpoint (0) or element/cell (1) */
TIMEUNITS units     /* The time units. (hours, etc)*/
|-
TS istat time       /* Time step of the following data. */
| OBJID id           ||/* Object id */
vx1 vy1
|-
vx2 vy2
| ND numdata         ||/* Number of data values */
.
|-
.  /* Repeat data for [numcells] number of cells.
| NC numcells       ||/* Number of cells or elements */
.
|-
/* Repeat TS card for each time step */
| NAME "name"       ||/* Data set name */
ENDDS               /* End of data set */
|-
| RT_JULIAN         ||/* The reference time as a Julian number. */
|-
| TIMEUNITS units   ||/* The time units. (hours, etc)*/
|-
| TS 0 time     ||/* Time step of the following data. */
|-
| vx1 vy1           ||/* Scalar data values */
|-
| vx2 vy2 ||
|-
| .||
|-
| ||/* Repeat data for [numcells] number of cells.
|-
| .||
|-
| /* Repeat TS card for each time step */||
|-
| ENDDS               ||/* End of data set */
|}
 
<pre>
DATASET
OBJTYPE "scat2d"
BEGVEC
VECTYPE 0
OBJID 17255
ND  82888
NC  82888
NAME "Current_Velocity"
RT_JULIAN      986157.500
TIMEUNITS hours
TS 0      0.0000
0.00000E+00  0.00000E+00
0.00000E+00  0.00000E+00
0.00000E+00  0.00000E+00
0.00000E+00  0.00000E+00
...
0.00000E+00  0.00000E+00
ENDDS
</pre>
 
=XMDF Output Files=
Section to be added

Latest revision as of 20:55, 20 October 2021

Output from CMS can be either ASCII or binary (XMDF binary for now). On Windows machines the default output type is XMDF and on Linux machines the default is ASCII. These can be changed with extra directions in the parameter file on Windows, but not for Linux. This is because Linux does not work with XMDF.

Parameter File Directives of Output Type

The following cards are the best way to specify output type in CMS. Simply add the card to the parameter file (.cmcards) or specify the option in the SMS interface.

OUTPUT_FILE_TYPE          XMDF | ASCII  !(choose either XMDF or ASCII)

ASCII Output Files

ASCII Output files from CMS are in the form of three different files listed below. These file types were chosen because they are supported in SMS and can be read in directly.

  • SUPER (*.sup) files
  • 2D Scatter Point (*.xy) files
  • ASCII Dataset (*.dat) files

SUPER files (*.sup)

(Adapted for CMS from the SMS Wiki)
Super files can still be opened in SMS. These contain a 2D scatter point file and the corresponding ASCII CMS Solution data file.

If a super file is selected using the File | Open command, each of the files listed in the super file are opened and imported. This makes it possible to quickly read in several files without having to identify each file individually in the file browser.

A sample of the file format for a super file is shown below. The first line in the file is the SUPER card, which identifies the file as a super file. Each of the other cards shown are optional. Each of the file cards has a card identifier representing the type of file. The identifier is followed by a file name. The file name should be a complete path if the file is not in the same directory as the super file. Any suffix may be used for the file name.

SUPER /* File type identifier */
SCAT2D filename /* 2D scatter point file */
DATA filename /* Dataset File */
... /* repeated DATA lines as needed */
DATA filename /* Dataset File */
SUPER
SCAT2D	"Phase2.xy"
DATA    "Phase2_eta.dat"
DATA    "Phase2_vel.dat"

2D Scatter Point Files (*.xy)

(Adapted for CMS from the SMS Wiki) Two-dimensional scatter point sets are stored in 2D scatter point files. The file includes the scatter point locations and requires that functional information be defined in a separate dataset file. An XY coordinate pair defines each point in a scatter point set. The format allows time variant datasets to be associated with scattered data points as well as to organize datasets by allowing the user to assign an ID to the scattered dataset.

The super file saves and references the scatter and dataset files.

SCAT2D /* File type identifier */
BEGSET /* Beginning of cards for scatter point set */
NAME "name" /* Name of scatter point set */
ID id /* ID of scatter point set */
DELEV elev1 /* Default elevation */
IXY np /* Number of points in set, begin point listing */
id1 x1 y1 /* Point id and coordinates, one per line */
id2 x2 y2
.
.
idnp xnp ynp
ENDSET /* End of cards for scatter point set */
SCAT2D
BEGSET
NAME  "Phase2"
ID 17255
DELEV 0.0
IXY  82888
   82888  262744.0000  956221.0000
   82887  262360.0000  956221.0000
   82886  261976.0000  956221.0000
...
       3  256648.0000  937069.0000
       2  256744.0000  936973.0000
       1  256648.0000  936973.0000
ENDSET

ASCII Datasets (*.dat)

(Adapted for CMS from the SMS Wiki)
CMS Solution Datasets are stored in ASCII files. Only one dataset is stored in a single file in either scalar or vector format. For scalar dataset files, one value is listed per vertex, cell, node, or scatter point. For vector dataset files, one set of XY vector components is listed per vertex, cell, node, or scatter point.

Scalar File Format

Dataset /* File type identifier */
OBJTYPE "scat2d" /* Type of object data set is associated with */
BEGSCL /* Beginning of scalar data set */
OBJID id /* Object id */
ND numdata /* Number of data values */
NC numcells /* Number of cells or elements */
NAME "name" /* Data set name */
RT_JULIAN /* The reference time as a Julian number. */
TIMEUNITS units /* The time units. (hours, etc)*/
TS 0 time /* Time step of the following data. */
val1 /* Scalar data values */
val2
.
. /* Repeat data for [numcells] number of cells.
.
/* Repeat TS card for each time step */
ENDDS /* End of data set */

Vector File Format

Dataset /* File type identifier */
OBJTYPE "scat2d" /* Type of object data set is associated with */
BEGVEC /* Beginning of vector data set */
VECTYPE 0 /* Vector at node/gridnode/scatterpoint (0) or element/cell (1) */
OBJID id /* Object id */
ND numdata /* Number of data values */
NC numcells /* Number of cells or elements */
NAME "name" /* Data set name */
RT_JULIAN /* The reference time as a Julian number. */
TIMEUNITS units /* The time units. (hours, etc)*/
TS 0 time /* Time step of the following data. */
vx1 vy1 /* Scalar data values */
vx2 vy2
.
. /* Repeat data for [numcells] number of cells.
.
/* Repeat TS card for each time step */
ENDDS /* End of data set */
DATASET
OBJTYPE "scat2d"
BEGVEC
VECTYPE 0
OBJID 17255
ND  82888
NC  82888
NAME "Current_Velocity"
RT_JULIAN      986157.500
TIMEUNITS hours
TS 0       0.0000
 0.00000E+00  0.00000E+00
 0.00000E+00  0.00000E+00
 0.00000E+00  0.00000E+00
 0.00000E+00  0.00000E+00
...
 0.00000E+00  0.00000E+00
ENDDS

XMDF Output Files

Section to be added