top of page
Search
coltmitsc

Read Nastran Pch File: Best Practices and Common Errors



Output file created by MSC Nastran, a structural analysis program that enables you to test the integrity of different structures such as spacecraft or buildings; contains different types of data output depending on the card (similar to a command) that is run.




Read Nastran Pch File




An example of a card is XYPUNCH, which will create an output of the X and Y-axis data, e.g., magnitude vs. frequency. The contents of the PCH file created from this card would consist of two types of data. The first type would resemble the .F06 file, with mode shapes, static displacements, and grid point stress data, but in alternate format from the F06 file. The second type of output would display magnitude vs. frequency, which helps plot the response curve in a spreadsheet.


PCH files are used by Microsoft Visual C++ and other software development programs, such as Apple Xcode. PCH files used by Xcode are called Prefix Header files and are typically named "[name]_Prefix.pch."


The FileInfo.com team has independently researched all file formats and software programs listed on this page. Our goal is 100% accuracy and we only publish information about file types that we have verified.


If you have a large model, you can make test_op2 run much, muchfaster. The -c flag disables double-reading of the OP2. By default,test_op2 uses two different read methods (the old method and newmethod) to ensure that results are read in properly. When running thecode, this is turned off, but is turned on for test_op2.


NOTE: Later versions of the IDE may use "pch" rather than "stdafx" in the default names for related files. It may be necessary to substitute pch for stdafx in the instructions below. I apologize. It's not my fault.


In step one, you compile a stub file (In VS200x it's usually called stdafx.cpp. Newer versions use pch.cpp.). This stub file indirectly includes only the headers you want precompiled. Typically, one small header (usually stdafx.h or pch.hpp) lists standard headers such as and , and this is then included in the stub file. Compiling this creates the .pch file.


In step 2, your actual source code includes the same small header from step 1 as the first header. The compiler, when it encounters this special header, reads the corresponding .pch file instead. That means it doesn't have to (re)compile those standard headers every time.


In your case, it seems step 1 fails. Is the stub file still present? In your case, that would probably be xxxxx.cpp. It must be a file that's compiled with /Yc:xxxxx.pch, since that's the compiler flag to indicate it's step 1 of the PCH process. If xxxxx.cpp is present, and is such a stub file, then it's probably missing its /Yc: compiler option.


Yes it can be eliminated with the /Yc options like others have pointed out but most likely you wouldn't need to touch it to fix it. Why are you getting this error in the first place without changing any settings? You might have 'cleaned' the project and than try to compile a single cpp file. You would get this error in that case because the precompiler header is now missing. Just build the whole project (even if unsuccessful) and than build any single cpp file and you won't get this error.


VS screwed (mine is 2019 ;( ).Go ahead and choose "not using precompiled headers" as other guys are pointing out then open the project file (vcxproj) with any text editor, and delete the outlined two entries in two places. Enjoy cleaning up the mess!As a matter of fact, the 'pch.h' entry in the vcxproj file you see it below, you will ever find it in VS properties' interfaces.


I was searching for the iOS PCH file having the same problem, if you got here like me too, the solution that I've found is by clearing derived data; Close Simulator(s), go to xCode prefs -> locations -> go to the derived data file path, close xCode, delete the files in the derived data folder, re launch and cheers :)


I managed to create this problem for myself because I wanted to use a pch.h and pch.cpp file from different directories. So, I deleted the two files from my project and then added them as existing files from somewhere else. Big mistake as precompiled header files can no longer be found.


The BDF reader/writer supports 406 cards including coordinatesystems. Card objects have methods to access data such as Mass, Area, etc.The BDF writer writes a small field formatted file, but makes full use ofthe 8-character Nastran field. The OpenMDAO BDF parametrization syntaxis also supported.


The OP2 reader/writer supports static/transient results, which unless youanalyzing frequency response data should be good enough. It also supportsOP2/F06 Writing for most of the objects. Results include: displacement,velocity, acceleration, temperature, eigenvectors, eigenvalues, SPC forces,MPC forces, grid point forces, load vectors, applied loads, strain energy,as well as stress and strain.


Select category: File I/O Miscellaneous conversion functions CSV file functions DBF I/O XML I/O Spreadsheet I/O user functions for MS-Excel Spreadsheet I/O user functions for OpenOffice.org Calc Spreadsheet utility functions Spreadsheet function test scripts


The punch file method may be used to extract the mass & stiffness matrices from Nastran models. The format is awkward since zero terms are not stored. Also the matrices are assumed to be symmetric, and the upper triangular portion above the diagonal is not stored.


All files required for the installation of this version reside in the folders named "BETA_CAE_Systems_v23.0.1" and are dated as of October 14, 2022. These files should replace any pre-releases or other files downloaded prior to that date. The distribution of this version of our pre- and post-processing suite is packaged in one, single, unified installation file, that invokes the respective installer and guides the procedure for the installation of the required components.


For interfacing with test data files, several interfaces are available, including an interface with the de factor industry standard Universal Files (see hereafter). Commands are available to interface with standard general purpose program like MS Excel and Matlab. Interfaces with any text or binary file can be easily custom-developped using FEMtools Script.


The Universal File Format is an ASCII or binary formatted file used by most test systems. The FEMtools interface program reads and writes ASCII files containing the most commonly used Universal File datasets.The Universal File test data interface is a standard component ofFEMtools Framework and does not require a dedicated license.


The ARTeMIS interface enables to import from and export to ARTeMIS configuration files (CFG) and associated time history files. UsingFEMtools Modal Parameter Estimation add-on, it can be used to do operational modal analysis with data stored and imported in the natice ARTeMIS format. Using the export function, a test model and time history data can be read by ARTeMIS for additional method to perform operational modal analysis.The ARTeMIS test data interface is a standard component ofFEMtools Framework and does not require a dedicated license.


This interface imports the test mesh and the operational shapes from a Polytec scanning file (svd files). The script uses the Polytec File Access COM object to extract the data from the measurement file. The File Access COM object can be downloaded from the Polytec website and has to be installed before the Polytec SVD interface can be used.The Polytec SVD test data interface is a standard component of FEMtools Framework and does not require a dedicated license.


The FEMtools interface program with the ABAQUS general purpose finite element program imports and exports FEM data, and imports element matrices, mode shapes, and operational shapes. The supported file types are the ABAQUS input file, and FIL, ODB and SIM results files.


The FEMtools interface program with the ANSYS general-purpose finite element code uses the ASCII formatted CDB file to read or write the FE model definition. Element structural matrices and modal data are imported through ANSYS binary files EMAT and RST respectively.


The LS-DYNA interface program provides two-way communication between data files generated by the LS-DYNA program and the FEMtools database.The interface program reads LS-DYNA input data files and results files that contain element matrices and modal data (resonance frequencies, shapes).For dynamic analysis, sensitivity analysis by re-analysis and automated model updating purposes, FEMtools uses a driver script to run LS-DYNA as an external solver.


Interfacing with the MSC.Nastran and NX Nastran general purpose finite element programs is based on the formatted Bulk Data File for FEM geometry and element properties and binary OUTPUT2 files created with the PARAM, POST, -5 command are used to interface element matrices and shapes (static, modal normal or complex). Punch files are used to import FRF data but can also be used to import modes. Bulk Data can be read or written, OUTPUT2 and punch files are read-only.The Nastran interface and driver program can also be used with NE/Nastran.


The SAP2000 interface program has 2 operating modes: (i ) reads FE model definition and mode shapes from SAP2000 s2k input files, and (ii) using the SAP2000 OAPI library to communicate with SAP2000. With the OAPI interface, bidirectional communication is supported and allows for piloting SAP2000 from FEMtools to perform FE analysis, pretest analysis, correlation analysis, sensitivity analysis and model updating.


Interfacing with the MSC.Marc finite element program is based on the Marc input file (.dat) and results file (.t19). The input file is an ASCII file that contains the definition of the FE model, including materials, boundary conditions, and lumped masses. The results file is also an ASCII file from which mode shapes, and element stiffness and mass matrices are read.


While developing my own fatigue FEA-post-processor called PragTic (www.pragtic.com), I have got to a crossroad. PragTic have used quite sophisticated method for import of FEA data from formatted ASCII files, which allowed import of files from ABAQUS, ANSYS or COSMOS, with not that much problems. But, well it is definitely slower and e.g. for ANSYS more cumbersome. Also, it prevents adequate work with results on shells, because the information there gets too complicated (3D) due to existence of results on bottom and top sides of the element. 2ff7e9595c


1 view0 comments

Recent Posts

See All

Comments


bottom of page