Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

DMAP for special GEOM3

Status
Not open for further replies.

ReshaCaner

Mechanical
May 15, 2023
6
0
0
US
Given a model with mixed shell and solid elements, is there a way to use DMAP to write a GEOM3 table that only contains the shell elements?
 
Replies continue below

Recommended for you

Elements are not contained in GEOM3 - did you mean GEOM2? If yes, it would be relatively, easy yes. Which shell elements were you considering? The different elements are identified by their type, and shell elements is broad category - do you mean QUAD4, QUAD8, CTRIA3, CTRIA6, etc. - do you want to include the axi-symmetric shells?

DG
 
Thanks for the reply, and my apologies for both the typo and the slow response. You are correct that I meant the GEOM2 table.

This would not include axisymmetric shells. Most of the time it would be QUAD4, so I could start there, but I will eventually need to consider QUAD8, TRIA3, and TRIA6. So, starting with QUAD4, what DMAP modules can I use to write a GEOM2 table that contains just those elements?
 
Short version: Do the opposite, remove the stuff you don’t need. Use MATPRN, DO WHILE-ENDDO, PARAML(DTI) and PARAML(TABDEL).

Long version: I am assuming you are using MSC Nastran, so I may mention some specificities to this code. The basic method is to make a copy of GEOM2 and remove the RECORDs you don’t need.

Create a model that contains some elements, with various types, all the ones you want to retain in your new GEOM2 datablock and some you don’t (so you can test the method works in the general case). Use the MATPRN module to print the GEOM2 datablock to the f06 file.

MATPRN GEOM2 $

You will see in the f06 output a series of RECORDs; each RECORD is a data type that may be stored in GEOM2; most RECORDs are for elements, but not all (e.g. SPOINT records are also stored in GEOM2).

Find the file nddl.dmap (it’s in the /nast/del directory) and load it into your favourite text editor. Search for

DATABLK GEOM2

Then search within this DATABLK for the element types you want, e.g. CQUAD4. Each element type has a unique 3 word descriptor; CQUAD4 is:

RECORD=CQUAD4(2958,51,177),

You will see a 3 word sequence as the first 3 words in the GEOM2 table you output in the f06 file for each element type present in the input file; it will be followed by the data describing the element connectivity (as indicated in the NDDL).
Make a list of the element types you want to KEEP, and particularly the first word in the 3 word sequence (2958 for CQUAD4), so you can program an IF with these values.

Write a DO WHILE to loop over the GEOM2 datablock, and search for the first word in each record that does not match one of the elements you want to keep. Use PARAML with the DTI option to do this. When your IF hits a RECORD that you do NOT want to keep, use the PARAML TABDEL option to delete this RECORD from the table. Loop until all undesired RECORDs are removed.

Things to note:
The PARAML DTI option allows the RECNUM and WRDNUM to be inputs and outputs – pay attention to the S,N, qualifiers just before these variables, as these will help you detect when you have read all the RECORDs.

The PARAML TABDEL option allows WRDNUM=0 to delete the entire RECORD. Be careful, when you do this, the number of RECORDs in the table will be reduced by 1 and you may not need to increment the RECNUM counter to point to the next record.

If you are going to use the GEOM2 datablock for further processing in MSC Nastran, you may need to adjust the trailer words to indicate the absence of the RECORDs you have deleted from the table. Whether this is necessary will depend on which modules are going to use the GEOM2 datablock. If this causes an issue, it is complicated to explain what you need to do to the trailer word(s) in this case, so let’s only go there if we have to.

DG
 
Status
Not open for further replies.
Back
Top