1.1.6 • Published 2 years ago

f06parser v1.1.6

Weekly downloads
7
License
-
Repository
-
Last release
2 years ago

f06parser

Parsering .f06 data files of Nastran software.

Main Methods

  • open( filePath )
  • setPath( filePath )
  • close()
  • get( typeName, elementID )
  • findPage( reg )

Installation

f06parser requires Node.js v4+ to run.

$ npm install f06parser

Example

var Parser = require("f06parser");

var myParser = new Parser();

//  Open f06 file 
myParser.open("./section.f06");

var dataType = "ElementProperty";
var elementID = 20054936;
var result = myParser.get( dataType, elementID );
console.log(JSON.stringify(result, null, " "));
myParser.close(); 

Results:

open(): new path
Mon Jan 00 2000  
Parsing result file: ./section.f06.
{
 "ID": "  20054936",
 "propID": " 5120412",
 "mtlID": "        13",
 "thickness": "  8.0000E-01 ",
 "area": " 4.8043E+01",
 "volum": "  3.8434E+01",
 "strctMass": "  3.0363E-07",
 "non_strMass": "  0.0000E+00",
 "totalMass": "    3.0363E-07"
}
f06Parser:  ./section.f06   closed.

Description of f06.json

The f06 files store the result data of FEM analysis proceed by Nastran. The data are organized into pages. Each of the pages contains a page title line, data entry title lines, data lines and a page end line. Various analysis result items have similar formate, thus we can parser the result data with uniform process.

The items of f06.json include the formate of the data page of .f06 file.
For example, the Displacement item, as shown in following, describes the formate of displacement vector page:

	"Displacement": {
		"PageStartTitle": "D I S P L A C E M E N T   V E C T O R",
		"PageEndTitle":"   PAGE  ", 
		"TitleLineNumber": 2,
		"DtatLineCount": 1,
		"DataLineFormat":{
			"ID": { "Start": 0, "End":14},
			"TYPE": { "Start": 15, "End":24},
			"T1": { "Start": 25, "End":39},
			"T2": { "Start": 40, "End":54}, 
			"T3": { "Start": 55, "End":69}, 
			"R1": { "Start": 70, "End":84}, 
			"R2": { "Start": 85, "End":99}, 
			"R3": { "Start": 100, "End":114}
		}
	}

Its title line contains "D I S P L A C E M E N T V E C T O R". We can found the string," PAGE ", at the end line of the page. The data entry title section takes two lines. Each piece of displacement vector uses only one line. The formate of the data line is presented as above, for example, the ID of the displacement is stored in the first 14 sapces.

1.1.6

2 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago