Highlighted

Limitations in PCH Files

Phenom
Phenom

Hello experts,

 

I have a question about PCH File(in my case for NX NASTRAN 10, SimCenter 10, but I think it's global)

according to

 

CAE-Simulation-Simcenter-Nastran-Forum/Order-of-stresses-in-pch-file-in-nastran

 

As far I understand @PeterE and @JimB correctly about "Chapter 7 : Item Codes" of the QRG (quick reference guide) I found the following:

1. The amount of ASCII characters in a line is limited with 80.

2. At the end of line there is written the line number beginning from end in a reverse manner. See below (In my case I export strain energy and energy density. )

 

$TITLE   =                                                                     1
$SUBTITLE=                                                                     2
$LABEL   = WALK-I                                                              3
$ELEMENT STRAIN ENERGIES                                                       4
$REAL OUTPUT                                                                   5
$SUBCASE ID =           1                                                      6
         1              2.796221E-03      1.715247E-04      9.770435E-03       7
         2              4.560721E-03      2.797620E-04      1.260825E-02       8
         3              3.329242E-03      2.042211E-04      1.013217E-02       9
         4              1.759930E-03      1.079569E-04      6.165583E-03      10
...
    197197              5.128426E-05      4.132509E-06      2.713107E-04 1380433
    197198              3.183690E-03      2.565431E-04      4.584587E-03 1380434
    197199              1.734559E-02      1.397715E-03      5.507048E-03 1380435
>>>>> 99999999 <<<< LIMIT???

 

So my question is:

What happens when the number of lines exceed 99'999'999? Will the line be splitted automatically into two sub lines and the fourth parameter will be placed in that new line like for displacements or stresses? - Or is there an ERROR?

 

$TITLE   =                                                                     1
$SUBTITLE=                                                                     2
$LABEL   = LC1_FX_SCHUB                                                        3
$DISPLACEMENTS                                                                 4
$REAL OUTPUT                                                                   5
$SUBCASE ID =           1                                                      6
        87       G      1.629659E+00     -2.945256E-03     -1.814055E-01       7
-CONT-                  0.000000E+00      0.000000E+00      0.000000E+00       8
        88       G      1.441063E+00     -3.940322E-03     -1.789713E-01       9
-CONT-                  0.000000E+00      0.000000E+00      0.000000E+00      10
        89       G      1.256296E+00     -4.810100E-03     -1.743457E-01      11
...

I want to extract large models in that way and I don't know if there comes a big problem when my models exceed this line number. Analysis time and file size is huge so to know it before would be good.

 

I can reach that limit with 10 million elements and 10 load cases in a simulation. Did someone check it already in his or her examinations?

 

When I export stress values in that form the number of lines per element can "explode" so that limitation starts with less elements, because complete nodal tensor or GAUSS tensor is plotted (nearly 65 lines per element, see here for one element in my case).

 

$TITLE   =                                                                    72
$SUBTITLE=                                                                    73
$LABEL   = LC1_FX_SCHUB                                                       74
$ELEMENT STRESSES                                                             75
$REAL OUTPUT                                                                  76
$SUBCASE ID =           1                                                     77
$ELEMENT TYPE =          67                                                   78
       184                 0        GAUS                       8              79
-CONT-                     0              8.231374E+02      5.849525E+01      80
-CONT-                  8.400540E+02      9.990455E-01     -1.376890E-02      81
-CONT-                  4.145500E-02      2.486899E+04      7.488725E+04      82
-CONT-                 -6.590631E+02      2.617707E+02     -7.478630E+04      83
-CONT-                  4.141024E-02     -3.520148E-03     -9.991360E-01      84
-CONT-                 -7.477104E+04      1.041370E+03     -6.607181E+02      85
-CONT-                  1.390294E-02      9.998990E-01     -2.946615E-03      86
-CONT-                   460              1.127902E+03      1.194135E+02      87
-CONT-                  1.149210E+03      9.961156E-01     -1.086016E-02      88
-CONT-                  8.738335E-02      2.943127E+04      8.965706E+04      89
-CONT-                 -2.355343E+02      1.845681E+02     -8.919721E+04      90
-CONT-                  8.736603E-02     -2.059988E-03     -9.961741E-01      91
-CONT-                 -8.918618E+04      9.812511E+02     -2.458047E+02      92
-CONT-                  1.099862E-02      9.999389E-01     -1.103177E-03      93
-CONT-                   398              1.127902E+03      1.194135E+02      94
-CONT-                  1.150345E+03      9.984162E-01     -1.599663E-02      95
-CONT-                  5.393742E-02      2.006074E+04      6.018503E+04      96
-CONT-                 -1.166057E+03      3.389734E+02     -6.016171E+04      97
-CONT-                  5.385218E-02     -5.712526E-03     -9.985326E-01      98
-CONT-                 -6.014408E+04      9.812511E+02     -1.170864E+03      99
-CONT-                  1.628128E-02      9.998557E-01     -4.842025E-03     100
-CONT-                   360              5.487193E+02     -2.422989E+00     101
-CONT-                  5.645865E+02      9.998666E-01     -1.616062E-02     102
-CONT-                  2.354182E-03      2.012779E+04      6.006252E+04     103
-CONT-                 -7.880061E+02      3.389734E+02     -6.016187E+04     104
-CONT-                  2.262179E-03     -5.708955E-03     -9.999811E-01     105
-CONT-                 -6.014408E+04      9.812511E+02     -7.860778E+02     106
-CONT-                  1.617376E-02      9.998531E-01     -5.671635E-03     107
-CONT-                   452              5.487193E+02     -2.422989E+00     108
-CONT-                  5.594482E+02      9.999402E-01     -1.093303E-02     109
-CONT-                 -3.798874E-04      2.969470E+04      8.925813E+04     110
-CONT-                 -4.466550E+02      1.845681E+02     -8.919729E+04     111
-CONT-                 -4.026491E-04     -2.079795E-03     -9.999978E-01     112
-CONT-                 -8.918618E+04      9.812511E+02     -4.462712E+02     113
-CONT-                  1.093221E-02      9.999381E-01     -2.084073E-03     114
-CONT-                   493              1.099402E+03      1.194135E+02     115
-CONT-                  1.123707E+03      9.959405E-01     -1.217486E-02     116
-CONT-                  8.918638E-02      2.948944E+04      8.979265E+04     117
-CONT-                 -2.355343E+02      1.845681E+02     -8.934599E+04     118
-CONT-                  8.916789E-02     -2.054755E-03     -9.960145E-01     119
-CONT-                 -8.933220E+04      1.101489E+03     -2.460489E+02     120
-CONT-                  1.230959E-02      9.999238E-01     -9.608075E-04     121
-CONT-                   459              1.099402E+03      1.194135E+02     122
-CONT-                  1.125990E+03      9.983376E-01     -1.788378E-02     123
-CONT-                  5.479293E-02      2.016279E+04      6.045356E+04     124
-CONT-                 -1.166057E+03      3.389734E+02     -6.044333E+04     125
-CONT-                  5.469934E-02     -5.681404E-03     -9.984867E-01     126
-CONT-                 -6.042170E+04      1.101489E+03     -1.171016E+03     127
-CONT-                  1.816802E-02      9.998239E-01     -4.693728E-03     128
-CONT-                   415              5.165263E+02     -2.422989E+00     129
-CONT-                  5.364401E+02      9.998326E-01     -1.806602E-02     130
-CONT-                  2.900978E-03      2.023106E+04      6.032958E+04     131
-CONT-                 -7.880061E+02      3.389734E+02     -6.044353E+04     132
-CONT-                  2.798739E-03     -5.681893E-03     -9.999799E-01     133
-CONT-                 -6.042170E+04      1.101489E+03     -7.860905E+02     134
-CONT-                  1.808214E-02      9.998207E-01     -5.630380E-03     135
-CONT-                   479              5.165263E+02     -2.422989E+00     136
-CONT-                  5.300278E+02      9.999249E-01     -1.225659E-02     137
-CONT-                 -1.390655E-04      2.975411E+04      8.939196E+04     138
-CONT-                 -4.466550E+02      1.845681E+02     -8.934608E+04     139
-CONT-                 -1.645261E-04     -2.076318E-03     -9.999978E-01     140
-CONT-                 -8.933220E+04      1.101489E+03     -4.462717E+02     141
-CONT-                  1.225627E-02      9.999227E-01     -2.078179E-03     142

 

Who can help? - Best wishes, Michael

| Production: NX10; Development: VB, TCL/TK, FORTRAN; Testing: NX12 | engelke engineering art GmbH, Germany | 2019-07-08
| Kudos for good posts! And if my post answers your question, please mark it as an "Accepted Solution". Kick Off (2015-09-14)On the Map (2016-10-21)1st Gear 2018 (2018-02-19)5th Birthday! (2018-02-25)Popular (100, ‎2018-10-30)Prolific (100, 2019-02-27)Philosopher (500, ‎2019-02-28)Problem Solver (50, 2019-06-25)

7 REPLIES 7

Re: Limitations in PCH Files

Valued Contributor
Valued Contributor

Hi Michael

I am not absolutely sure what happens, but it doesn't corrupt the data if you only consider the first 72 characters of each line. I think your biggest problem will be file size. Once you get bigger than 2Gb, there are few editors which allow you open the file.

I have a converter script for windows  to convert a punch file to a csv file which Excel can open. It concatenates all the contiuation lines onto a single line. See 

https://community.plm.automation.siemens.com/t5/CAE-Simulation-Simcenter-Nastran-Forum/Reading-PCH-f....

 

Regards

Peter

Re: Limitations in PCH Files

Phenom
Phenom

Peter, thank you for answering.

I want to extract the result with python to transfer parts of it to another software. I hope the other software has "no problem" with my extracted file. My new file will contain only reduced parts of results so I hope, there is no problem.

 

As a test I did create a FE-model of a cube with 10 million elements to enforce the problem. Solving is still in progress.

 

Best wishes, Michael

| Production: NX10; Development: VB, TCL/TK, FORTRAN; Testing: NX12 | engelke engineering art GmbH, Germany | 2019-07-08
| Kudos for good posts! And if my post answers your question, please mark it as an "Accepted Solution". Kick Off (2015-09-14)On the Map (2016-10-21)1st Gear 2018 (2018-02-19)5th Birthday! (2018-02-25)Popular (100, ‎2018-10-30)Prolific (100, 2019-02-27)Philosopher (500, ‎2019-02-28)Problem Solver (50, 2019-06-25)

Re: Limitations in PCH Files

Phenom
Phenom

So I've found out what happens. And it's so obvious if one thinks in programmers intellectual world of FORTRAN:

I guess the PCH export is so old that it's written in FORTRAN Smiley Wink

 

Question: What happens if an integer value with 9 digits should be written into  format only with 8 digits?

Answer: It doesn't work, in FORTRAN it yields ******** in stead of 123456789

 

See here:

$TITLE   =                                                                     1
$SUBTITLE=                                                                     2
$LABEL   = P_1MPA                                                              3
$ELEMENT STRESSES                                                              4
$REAL OUTPUT                                                                   5
$SUBCASE ID =           1                                                      6
$ELEMENT TYPE =          39                                                    7
         1                 0        GRID                       4               8
-CONT-                     0              4.121312E-03     -1.335961E-03       9
-CONT-                  5.593346E-03     -6.700594E-01      9.579002E-03      10
-CONT-                 -7.422457E-01      3.346098E-01      1.016858E+00      11
-CONT-                  4.380359E-03     -9.533267E-03     -1.012514E+00      12
-CONT-                  7.423073E-01      9.386629E-03     -6.699938E-01      13
-CONT-                 -1.012331E+00     -9.726683E-03      3.090998E-03      14
-CONT-                 -5.493123E-04      9.999101E-01      1.340016E-02      15
-CONT-                     1              4.121312E-03     -1.335961E-03      16
-CONT-                  5.593346E-03     -6.700594E-01      9.579002E-03      17
...
...
...
-CONT-                 -6.782308E-04     -5.089284E-03     -9.534883E-0199999990
-CONT-                  9.998699E-01      5.341496E-03      1.522077E-0299999991
-CONT-                 -9.534607E-01      5.888067E-04     -2.323834E-0299999992
-CONT-                 -5.331212E-03      9.999855E-01     -7.161741E-0499999993
    277790                 0        GRID                       4        99999994
-CONT-                     0             -3.541789E-02      3.941673E-0499999995
-CONT-                 -2.402303E-03      1.196464E-02      2.727954E-0499999996
-CONT-                 -9.999284E-01      3.311159E-01      9.370469E-0199999997
-CONT-                 -2.418681E-03     -3.332406E-03     -9.555229E-0199999998
-CONT-                  9.999223E-01      3.496237E-03      1.196553E-0299999999
-CONT-                 -9.555112E-01     -2.523800E-04     -3.542255E-02********
-CONT-                 -3.499250E-03      9.999939E-01      2.309429E-04********
-CONT-                 24940             -3.541789E-02      3.941673E-04********
-CONT-                 -2.402303E-03      1.196464E-02      2.727954E-04********
-CONT-                 -9.999284E-01      3.311159E-01      9.370469E-01********
-CONT-                 -2.418681E-03     -3.332406E-03     -9.555229E-01********
...

So reading only the first 72 digits as relevant information and ignoring the rest is a good way to deal with.

Nevertheless it's really old standard to put line number into line at end. It makes the files larger than necessary because of the storage needs of blank characters and the line number itself has no additional benefit. Bearing in mind that there are model configurations which "devastate" the format of line numbers at the end.

 

Last information about the model / file itself:

My model consists of

- 1'249'994 linear tetrahedrons with 4 grid points and

- the punch file (PCH file) provides two result types "strain energy" and "stress".

 

Dealing with :

- 2 subcases the PCH-File has 92'499'582 lines and with

- 3 subcases the total number of lines is 138'749'373.

So there are 46'249'791 lines per loadcase.

 

File size in GB is for

- 2 subcases: PCH-File: 7.06 GB, OP2-File: 1.4 GB, F06-File (check for correct interpretation of values): 5.3 GB

- 3 subcases: PCH-File: 11.1 GB, OP2-File: 1.9 GB, F06-File (check for correct interpretation of values): 8.0 GB

Both DAT-Files: 0.096 GB = 96 MB

 

Very last information about structure of stress output  (plot of first element in F06):

0     P_1MPA                                                                                                 SUBCASE 1              
 
                   S T R E S S E S   I N    T E T R A H E D R O N   S O L I D   E L E M E N T S   ( C T E T R A )
0                CORNER        ------CENTER AND CORNER POINT STRESSES---------       DIR.  COSINES       MEAN                   
  ELEMENT-ID    GRID-ID        NORMAL              SHEAR             PRINCIPAL       -A-  -B-  -C-     PRESSURE       VON MISES 
0         1           0GRID CS  4 GP
0                CENTER  X   4.121312E-03  XY  -1.335961E-03   A   5.593346E-03  LX-0.67 0.01-0.74   3.346098E-01    1.016858E+00
                         Y   4.380359E-03  YZ  -9.533267E-03   B  -1.012514E+00  LY 0.74 0.01-0.67
                         Z  -1.012331E+00  ZX  -9.726683E-03   C   3.090998E-03  LZ-0.00 1.00 0.01
0                     1  X   4.121312E-03  XY  -1.335961E-03   A   5.593346E-03  LX-0.67 0.01-0.74   3.346098E-01    1.016858E+00
                         Y   4.380359E-03  YZ  -9.533267E-03   B  -1.012514E+00  LY 0.74 0.01-0.67
                         Z  -1.012331E+00  ZX  -9.726683E-03   C   3.090998E-03  LZ-0.00 1.00 0.01
0                     2  X   4.121312E-03  XY  -1.335961E-03   A   5.593346E-03  LX-0.67 0.01-0.74   3.346098E-01    1.016858E+00
                         Y   4.380359E-03  YZ  -9.533267E-03   B  -1.012514E+00  LY 0.74 0.01-0.67
                         Z  -1.012331E+00  ZX  -9.726683E-03   C   3.090998E-03  LZ-0.00 1.00 0.01
0                     3  X   4.121312E-03  XY  -1.335961E-03   A   5.593346E-03  LX-0.67 0.01-0.74   3.346098E-01    1.016858E+00
                         Y   4.380359E-03  YZ  -9.533267E-03   B  -1.012514E+00  LY 0.74 0.01-0.67
                         Z  -1.012331E+00  ZX  -9.726683E-03   C   3.090998E-03  LZ-0.00 1.00 0.01
0                     4  X   4.121312E-03  XY  -1.335961E-03   A   5.593346E-03  LX-0.67 0.01-0.74   3.346098E-01    1.016858E+00
                         Y   4.380359E-03  YZ  -9.533267E-03   B  -1.012514E+00  LY 0.74 0.01-0.67
                         Z  -1.012331E+00  ZX  -9.726683E-03   C   3.090998E-03  LZ-0.00 1.00 0.01

As @JimB  already mentioned in other articles before the specific stress values of tensor and cosine values of principle stresses are plotted for center of element and all nodes. It's good looking in F06 but what a muddle in PCH!

 

So, that's it. Best wishes, Michael

| Production: NX10; Development: VB, TCL/TK, FORTRAN; Testing: NX12 | engelke engineering art GmbH, Germany | 2019-07-08
| Kudos for good posts! And if my post answers your question, please mark it as an "Accepted Solution". Kick Off (2015-09-14)On the Map (2016-10-21)1st Gear 2018 (2018-02-19)5th Birthday! (2018-02-25)Popular (100, ‎2018-10-30)Prolific (100, 2019-02-27)Philosopher (500, ‎2019-02-28)Problem Solver (50, 2019-06-25)

Re: Limitations in PCH Files

Valued Contributor
Valued Contributor

Hi Michael

In some solutions of MSC Nastran, the line numbering in the pch file is not consistent either. The line number is repeated twice in the header, so it is best to ignore them.

Have you considered skinning your tet meshed structure with shell membrane elements, and then only asking for the stress output for the CTRIA6 elements? This reduces the stress output dramatically, since generally the peak stress will not be in the interior of the structure, unless you have contact analysis.

Linear tets? Not great results unless your mesh is very fine.

Peter

Re: Limitations in PCH Files

Phenom
Phenom

Hi Peter, yes you are right in all points. But sometimes the world is more complicate. Best wishes, Michael

| Production: NX10; Development: VB, TCL/TK, FORTRAN; Testing: NX12 | engelke engineering art GmbH, Germany | 2019-07-08
| Kudos for good posts! And if my post answers your question, please mark it as an "Accepted Solution". Kick Off (2015-09-14)On the Map (2016-10-21)1st Gear 2018 (2018-02-19)5th Birthday! (2018-02-25)Popular (100, ‎2018-10-30)Prolific (100, 2019-02-27)Philosopher (500, ‎2019-02-28)Problem Solver (50, 2019-06-25)

Re: Limitations in PCH Files

Siemens Phenom Siemens Phenom
Siemens Phenom

You can remove the line numbers from the punch file by setting system cell 560/PCHLN to 1:

 

In the input deck:

NASTRAN PCHLN=1
NASTRAN SYSTEM(560)=1

On the command line or in the rcf file:

sys(560)=1

https://docs.plm.automation.siemens.com/tdoc/scnastran/2019_1/help/#uid:index_QRG:id512276:id511186:...

Re: Limitations in PCH Files

Phenom
Phenom

JimB, thank you for answering.

After inserting "NASTRAN SYSTEMCELL(560)=1" into "File Management Section" of solution the line numbers vanished from PCH file, good to know:2019-02-27_144927.png

 

 

Thank you for that. But that didn't reduce the size of file as the lines kept their number of characters = 80.

Only the mistakable numbers of line were gone.

 

So ignoring the characters from position 73 - 80 in each line is the easiest way.

Best wishes, Michael

| Production: NX10; Development: VB, TCL/TK, FORTRAN; Testing: NX12 | engelke engineering art GmbH, Germany | 2019-07-08
| Kudos for good posts! And if my post answers your question, please mark it as an "Accepted Solution". Kick Off (2015-09-14)On the Map (2016-10-21)1st Gear 2018 (2018-02-19)5th Birthday! (2018-02-25)Popular (100, ‎2018-10-30)Prolific (100, 2019-02-27)Philosopher (500, ‎2019-02-28)Problem Solver (50, 2019-06-25)