intepol_pressure
v0.1.1
Published
Inteplore pressure loads from CFD to solid FEM model
Downloads
2
Readme
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();