intepol_pressure

0.1.1 • Public • Published

Example

//
// Applying pressure loads
//
//  Version 2020-08
//   Apply pressure loads on CQUAD4 element

//
// Module
const fs = require('fs');  
const path = require("path");
var BDFParser = require("bdfparser-js");
// var NodeHash = require("nodehash-js");
const LineByLine = require('readlinesyn'); 
const Match = require('intepol_pressure'); 
var presDataHash = require("nodehash-js"); 


// Global variables
var bdf = new BDFParser(); 
var bdffile = path.join(__dirname, "./data/base_body_face.bdf");
var newbdfFile = path.join(__dirname, "./new.bdf");


// var presDataHash = new NodeHash();
var pressureHashJsonFile = path.join(__dirname, "./data/wing-pressure.json");
// presDataHash.openJSONFile(pressureHashJsonFile); 

var pressureDataFile_ZC = path.join(__dirname, "./wing/M6-ZC.dat");
var pressureDataFile_HCW = path.join(__dirname, "./wing/M6-HCW.dat");

var matcher = new Match();

matcher._presDataHash._X_Mult = 50;
matcher._presDataHash._Y_Mult = 50;
matcher._presDataHash._Z_Mult = 50; 
//
// Methods 
function testMatch(){
    console.log( "Open ", bdffile );      
    matcher.openBdfFile( bdffile ); 

    matcher.openPressureFile(pressureDataFile_HCW); 
    matcher.openPressureFile(pressureDataFile_ZC);
 

    // Constraints
     matcher.constraint();  

    // Pressure load 
    // matcher.checkcquad4(); 
    matcher.checkCtria(); 

    matcher.saveBdf( newbdfFile );
}
 
//
testMatch();

Readme

Keywords

Package Sidebar

Install

npm i intepol_pressure

Weekly Downloads

1

Version

0.1.1

License

none

Unpacked Size

18 kB

Total Files

3

Last publish

Collaborators

  • cocoonyang