# f06parser

> A module for parsering Nastran .f06 result data file

Latest version **1.1.6** (published 2022-04-05) · 0 weekly downloads

## Install

```sh
npm install f06parser
pnpm add f06parser
yarn add f06parser
bun add f06parser
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.6 |
| Published | 2022-04-05 |
| First published | 2020-02-11 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 568.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Chunfeng Yang |
| Maintainers | cocoonyang |
| Keywords | .f06, Nastran |

## Links

- npm: https://www.npmjs.com/package/f06parser
- npm.io page: https://npm.io/package/f06parser

## Dependencies (1)

- [readlinesyn](https://npm.io/package/readlinesyn.md) 0.3.2

## Recent versions

- 1.1.6 (latest) — 2022-04-05
- 1.0.3 — 2020-02-14
- 1.0.2 — 2020-02-11

## README

# 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](https://nodejs.org/) 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.

---
_Source: https://npm.io/package/f06parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
