Merge and output
When the parts are built, the script enters the Merge phase, chooses a tolerance under which coincident nodes become one, chooses a file format, and writes. This chapter covers the four tolerance commands and what they report, how nodes and elements are numbered, the write command and the naming of its files, and the layout of the five formats James writes: its own neutral text file, Exodus II, and the LS-DYNA keyword, Abaqus and DYNA3D decks.
Entering the Merge phase
merge ends the open part, if there is one, and puts the session in the Merge phase. The commands that choose a tolerance, choose a format, name a file and write belong there, and the tolerance, format and name commands are also legal earlier. The one move out of the Merge phase is a new part: a block or cylinder there starts a part and returns the session to the Part phase. A second merge is an error.
Entering the phase merges nothing and writes nothing. A tolerance command only records its tolerance. The merge happens at a write, over the parts that the write covers, and the file is made then. Only write makes a file.
The tolerance commands
Four commands set the tolerance. They differ in which nodes they consider and in whether James reports what it merged.
| Command | Nodes considered | Report |
|---|---|---|
| t | every node of the covered parts | none |
| tp | every node of the covered parts | yes |
| st | surface nodes only | none |
| stp | surface nodes only | yes |
Each takes one real number, in the length units of the mesh. They are legal in the Control, Part and Merge phases.
What the merge does
James applies these rules at every write.
- Two nodes merge when the distance between them is less than the tolerance. A distance exactly equal to the tolerance does not merge. A tolerance of zero or below merges nothing, which is how a script restores a mesh that an earlier tolerance merged.
- Only the last tolerance command read before a
writegoverns that write. Earlier ones, of any of the four commands, have no effect on it. Atfollowed by anstpmerges surface nodes under thestpalone. - The merge always starts from the nodes as the parts built them. It is never chained onto the result of a previous merge.
- James visits the nodes in the order of their numbers before merging. Each node merges into the closest node that has already survived and lies within the tolerance. Of two survivors at the same distance, it takes the one with the lower number. A node with no such survivor survives.
- The survivor of a group is therefore its first-defined node, the one with the lowest number before merging. A survivor keeps its own position. The nodes that merge into it do not move it.
- The rule is not transitive. A chain of three nodes, each 0.9 of the tolerance from the next, leaves two nodes: the second merges into the first, and the third is too far from the first and stays.
- A surface node lies on a face of an active element that has no active element across it in the same part. That covers the six outer faces of a part and every face that
deordeiexposed. Two parts that touch each have the touching face on their own side, so both count. Both nodes of a pair must be surface nodes. A node on the inner side of an element whose outer face is exposed is not one. - A node that no active element uses never merges, under any of the four commands, whether James writes it or not.
- A
writethat no tolerance command precedes merges nothing.
Put the tolerance well above the gap you want to close and well below the size of an element. James compares against strictly less, and a tolerance near an element’s size collapses it.
The merge on two blocks
The script examples/two-blocks.tg, which make test runs, joins two blocks that share a face:
c Two blocks of 3 x 3 x 3 nodes sharing the face x = 1. The stp command
c merges the nine nodes of the shared face and reports what it merged:
c 54 nodes become 45.
c
c james two-blocks.tg --format exodus -o two-blocks.exo
block 1 3;1 3;1 3;0 1;0 1;0 1;
endpart
block 1 3;1 3;1 3;1 2;0 1;0 1;
endpart
merge
stp .001
write
Each block has 3 by 3 by 3 nodes, 27 each, and they share the face x = 1. The comment lines give the command line, which names the format with --format because the script has none. The nine nodes of the shared face merge, so 54 nodes become 45. James prints the report that examples/two-blocks.diag.txt holds:
two-blocks.tg:11:1: note: 9 nodes were deleted by tolerancing
two-blocks.tg:11:1: note: 9 nodes merged between parts 1 and 2
The report is described below.
What a chain of close nodes does
The script tests/golden/011-merge-chain/input.tg sets three cubes in a row, each 0.009 along x from the one before, under a tolerance of 0.01:
c Three unit cubes, each 0.9 of the tolerance along x from the one before.
c The second merges into the first; the third is 1.8 tolerances from the
c first and the second did not survive, so it stays: 24 nodes become 16,
c where a rule that merged through a chain would leave 8.
block 1 2;1 2;1 2;0 1;0 1;0 1;
endpart
block 1 2;1 2;1 2;.009 1.009;0 1;0 1;
endpart
block 1 2;1 2;1 2;.018 1.018;0 1;0 1;
endpart
merge
tp .01
neutral
write
Each of the second cube’s eight nodes is 0.009 from the matching node of the first cube, which is less than 0.01, so all eight merge into the first cube’s. Each of the third cube’s nodes is 0.018 from the matching node of the first cube, which is more than 0.01, and the second cube’s nodes did not survive, so the third cube’s nodes stay. The 24 nodes become 16. A rule that followed the chain would leave 8. James prints the report that tests/golden/011-merge-chain/input.diag.txt holds:
input.tg:12:1: note: 8 nodes were deleted by tolerancing
input.tg:12:1: note: 8 nodes merged between parts 1 and 2
The report
Under a governing tp or stp, James reports the merge in note lines. A note is not a warning and does not count in the summary, and errmod does not hide it. The report has two kinds of line.
N nodes were deleted by tolerancing: always one line, the number of nodes before the merge less the number after. A merge that finds nothing prints0 nodes were deleted by tolerancing.N nodes merged between parts A and B: one line for each pair of parts that merged any node.Ais the part number of the surviving node andBthe part number of the merged one, withAno larger thanB. A merge inside one part hasAequal toB. The lines come in order ofB, thenA.
A count of one reads 1 node was deleted and 1 node merged. The part numbers in these lines are the numbers of the script, counted from one. Use the per-pair lines to see that a pair of parts joined: a pair you expected and do not see is a pair whose tolerance was too small.
James prints the report after it has written and closed the file, so a write that fails prints no report, and every line is located at the governing tolerance command. t and st print no report. A write shares the merge and the report of the write just before it when it covers the same parts under the same governing tolerance. Only the previous write’s mesh is reused.
Golden case 012-merge-cylinder-seam merges the two faces of a ring, at 0 and at 360 degrees, inside one part. Its report reads 9 nodes were deleted by tolerancing and 9 nodes merged between parts 1 and 1.
When a merge collapses an element
A merge can leave an element with two or more corners on one node. James writes such an element as it is and does not drop it. If every one of the element’s eight corner triple products vanishes, the element has zero volume, and James warns, once for each part that has any. A hexahedron with a collapsed edge, which is how a wedge is built, keeps its volume and raises nothing.
The script tests/golden/014-merge-zero-volume/input.tg collapses a thin element:
c Two elements stacked in z, the upper one 0.0005 thick, under a tolerance
c of 0.001: the upper element's top face merges into its bottom face. The
c element is written as it is, with its four nodes twice, and warned about.
block 1 2;1 2;1 2 3;0 1;0 1;0 1 1.0005;
endpart
merge
t .001
neutral
write
The upper element is 0.0005 thick, and the tolerance of 0.001 merges its top face into its bottom face. The element is written with its four nodes twice. James prints the warning that tests/golden/014-merge-zero-volume/input.diag.txt holds:
input.tg:7:1: warning: part #0 has 1 element with zero volume after merging
james: 0 errors, 1 warning
The number after part # is the part’s position counted from zero, while the report’s part numbers count from one. A one-part script has part #0 and parts 1 and 1.
Numbering
James numbers nodes by one rule, and elements by the same rule with a material level.
- Part order: the parts in the order the script made them.
- Within a part,
k, thenj, theni, withichanging fastest.
Node numbers before the merge follow that rule over the nodes James writes. By default those are the nodes that at least one active element references. A node of a block that de or dei deleted, with no active element beside it, is skipped and takes no number. The flag --write-unref-nodes writes every node of every part instead. The flag adds nodes and changes nothing else: an unreferenced node never merges, so the elements, the merges and the survivors are the same in both modes, and only the numbers shift. Golden case 005-butterfly-all-nodes is the part of case 004-butterfly written with the flag, 845 nodes where the default writes 525.
A part that writes no node at all under the default, such as a part with no active element, raises a warning that names the flag. A part that only loses the nodes of its deleted regions raises none, since that is what a deletion means.
After a merge the node numbers are dense. The survivors are numbered 1 upward in the order of their numbers before the merge, and the numbers of the merged nodes leave no gaps. A node that was number 6 before the merge becomes number 5 when the node before it merged away.
Element numbers follow the same rule with one more level: part order, then the material number ascending within the part, then k, j, i over the part’s active elements of that material. A part whose elements all have one material, the usual case, is numbered as its nodes are, and a part with two materials holds its elements of the lower number first. The elements of one part with one material are therefore a run of consecutive numbers, which the Exodus II file uses as a block and the Abaqus file as a set. A merge never removes an element, so elements need no compaction. Each element keeps its place and has some of its corners repointed to survivors.
In the file of golden case 006-merge-two-blocks, which merges the two blocks of examples/two-blocks.tg, part 1 holds nodes 1 to 27 and elements 1 to 8. The nine nodes of part 2 on the shared face took the numbers of the part 1 nodes they merged into. Part 2’s remaining 18 nodes are numbered 28 to 45 and its elements 9 to 16. Element 9, the first of part 2, lists the nodes 3, 28, 30, 6, 12, 34, 36 and 15: four of its corners are part 1’s nodes on the shared face.
nerl, which chooses another numbering, is refused. James has this one rule, and the compatibility chapter says what a later version may offer in its place.
Materials
Every element carries a material number, a positive integer that labels it in every file James writes. It need not name any material model. mate sets a part’s default, mt gives a number to the elements of a region of the part, and mti is mt with an index progression. A part no command touches has material 1. Nothing in the part reads the number: the merge and the writers do.
The neutral file carries the number on every element line. The Exodus II file groups the elements of a part by material, one element block for each part and material. The solver decks carry the number on each element and write a placeholder material for every number the mesh uses. The sections below describe each file.
Writing the files
write makes one file. It takes no argument. It needs the Merge phase (E1100) and a format (E1101).
The format
Five commands choose the format, and the command line can too.
| Chosen by | Format |
|---|---|
neutral, or --format neutral | James’s own plain-text neutral file |
exodusii, or --format exodus | Exodus II |
lsdyna keyword, or --format lsdyna | LS-DYNA keyword deck |
abaqus, or --format abaqus | Abaqus input file |
dyna3d, or --format dyna3d | DYNA3D input deck |
The format commands are legal in the Control, Part and Merge phases. A format command in the script wins over --format, which is only a fallback for a script that names none. The later of two format commands governs. A second command that names a different format, before any write has used the first, warns (E1104). A format command after a write chooses the next write’s format, so one script can write a mesh in more than one format: golden cases 006-merge-two-blocks, 017-lens and 019-materials do. Every other format selector of the original language is refused (E0100), and lsdyna fixed is refused by name (E1105).
comment and verbatim are accepted and discarded. They have no effect on any file.
The file name
The name of a file comes from mof if the script gave one, then from the -o flag, then it is trugrdo. A mof in the script governs over -o.
The first write under a name uses the name as it stands. The second write under the same name appends .0001, the third .0002, and so on. James counts each name on its own, so a mof to a new name starts a new count, and a mof back to an earlier name continues that name’s count. A write never overwrites a file that an earlier write of the same run made.
The script tests/corpus/141-write-suffix-per-name/input.tg writes four files:
block 1 2;1 2;1 2;0 1;0 1;0 1;
endpart
merge
neutral
write
write
mof other.out
write
mof trugrdo
write
The first write makes trugrdo. The second makes trugrdo.0001. After mof other.out, the third makes other.out. After mof trugrdo, the fourth returns to the first name and makes trugrdo.0002.
If James cannot open a file for writing, it says so and leaves any file already there as it was. If a write fails partway, in any format, James deletes the part-written file, so no truncated mesh is left behind.
The neutral format
The neutral format is James’s own. It is a plain dump of the merged mesh and is not the neutral file of any other program. Every field has a fixed width, so a file compares byte for byte. The file has these lines, in this order.
| Line | Content |
|---|---|
| 1 | james neutral 3, the format and its version |
| 2 | title and the title of the write, or title alone when the script has no title |
| 3 | nodes N elements M parts P with the counts of this file |
| one per node | the node number, then x, y and z |
| one per element | the element number, the part number, the material number, the kind, hex8 or shell4, then the corner nodes: eight for a hex, four for a shell followed by its four corner thicknesses |
| last | end |
A node line is written with the format (i10, 3(1x, es24.15e3)): the number right-aligned in ten columns, then each coordinate preceded by one space, in scientific notation with fifteen digits after the point and a three-digit exponent that keeps its E, in 24 columns. A hex line is written with (i10, 1x, i10, 1x, i10, 1x, a6, 8(1x, i10)) and a shell line with (i10, 1x, i10, 1x, i10, 1x, a6, 4(1x, i10), 4(1x, es24.15e3)): the element number, the part number, the material number, the kind right-aligned in six columns and the corner numbers, eight for a hex and four for a shell, each in ten columns after one space; a shell line ends with its four corner thicknesses, each in 24 columns after one space.
The node lines come in node-number order and the element lines in element-number order, so the numbers run 1 upward with no gaps. The part number on an element line is the part’s number in the script, counted from one, and the material number is the one the material commands gave the element. P is the number of parts the write covers. The file has no units line, since a script carries no units. Version 1 of the format, which James wrote before 0.4.0, had no material column, and version 2, which it wrote before 0.6.0, had no kind column; the first line tells them apart.
The first lines and two later lines of the file of golden case 006-merge-two-blocks, tests/golden/006-merge-two-blocks/expected.neutral.txt, are:
james neutral 3
title
nodes 45 elements 16 parts 2
1 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000
Those are the header and node 1. The element lines start at line 49. The first one is:
1 1 1 hex8 1 2 5 4 10 11 14 13
The corner order of an element
The eight corners follow one order, the same one the Exodus II HEX8 element uses. The corners 1 to 4 are the k face of the cell, counterclockwise as seen from the k + 1 side. The corners 5 to 8 are the k + 1 face in the same order. For the cell (i, j, k) the corners are n1 = (i, j, k), n2 = (i+1, j, k), n3 = (i+1, j+1, k) and n4 = (i, j+1, k), and n5 to n8 are the same points with k + 1.
n8 ---------- n7
/| /|
/ | / | the k + 1 face: n5 n6 n7 n8
n5 ---------- n6 |
| n4 -------|-- n3
| / | / the k face: n1 n2 n3 n4
|/ |/
n1 ---------- n2
i runs to the right, j runs away from you, k runs up
The element on line 49 of golden case 006 lists, after its number, its part 1, its material 1 and its kind hex8, the corners 1, 2, 5, 4, 10, 11, 14 and 13. Node 2 is one step along i from node 1, node 4 one step along j, and node 10 one step along k, so the list follows the figure. An element whose list gives a negative volume is inverted, and shaping says how to read the warning.
The corner order of a shell
A shell’s four corners follow the index directions of its partition’s plane, as the parts chapter gives them, and the right-hand rule over them is the shell’s normal; n reverses a shell by swapping its second and fourth corners, and the file lists the corners as reversed. The four thicknesses after the corners belong to the corners in that order. The first element of golden case 030-shell-octant, tests/golden/030-shell-octant/expected.neutral.txt, is the shell on the i partition, whose corners cycle j then k, with no thickness given:
1 1 1 shell4 1 3 7 5 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000 0.000000000000000E+000
Within a part the hex elements come first, then the shells, each run by ascending material number, so a mixed part’s element numbers hold its bricks and then its shells.
The Exodus II format
The Exodus II writer needs a build with the netCDF Fortran library. james -v says whether the build has it. A build without it refuses an Exodus write with built without Exodus support, and the neutral writer works in both builds.
The layout was fixed from the Exodus II library’s own source and checked with ncdump. It has not been opened with another program’s Exodus reader. Read it beside tests/golden/006-merge-two-blocks/expected.exodus.txt, which is the ncdump text of the second file that golden case writes.
- File. A netCDF classic file in the 64-bit-offset variant, the library’s large-model form, which stores the coordinates as three variables.
- Global attributes.
api_versionandversion, both the float 9.06.floating_point_word_size8,file_size1,maximum_name_length32 andint64_status0.title, the title of the write cut to 80 characters. A longer title raises a warning that it was cut, and a write with no title stores the empty title. - Dimensions.
len_string33,len_line81,four4,len_name256,time_stepunlimited with no record,num_dim3,num_nodes,num_elem,num_el_blkandnum_qa_rec1. For blockn,num_el_in_blk<n>andnum_nod_per_el<n>, 8 for aHEX8block and 4 for aSHELL4block, and for aSHELL4blocknum_att_in_blk<n>, 4. A dimension whose length would be zero is left out with the variables that use it. - Variables.
time_whole(time_step).coordx,coordyandcoordz, each(num_nodes)of doubles.coor_names(num_dim, len_name), holdingx,yandz.eb_status(num_el_blk), all 1.eb_prop1(num_el_blk), with the attributenameequal toID, holding each block’s number, 1 upward;eb_prop2(num_el_blk), namedPART, holding the block’s part number;eb_prop3(num_el_blk), namedMATERIAL, holding its material number.eb_names(num_el_blk, len_name), empty.connect<n>(num_el_in_blk<n>, num_nod_per_el<n>)of 32-bit integers, with the attributeelem_typeequal toHEX8or, for a shell block,SHELL4. For aSHELL4block, after itsconnect<n>,attrib<n>(num_el_in_blk<n>, num_att_in_blk<n>)of doubles, the four corner thicknesses of each shell, andattrib_name<n>(num_att_in_blk<n>, len_name), holdingthickness1tothickness4.qa_records(num_qa_rec, four, len_string). - Blocks. One block for each part, kind and material: the active elements of one part and one kind that share one material number, in part order, a part’s
HEX8blocks before itsSHELL4blocks, each run by ascending material number, numbered from 1 in that order. The blocks follow the element numbering, so an element’s position in the file is its James element number. A part with one material and one kind has one block, a part with bricks and shells has at least two, and a part with no active element has none. An Exodus II element block is not a James part: thePARTproperty says which part a block belongs to. - No maps. James writes no node map and no element map. A node and an element have the numbers of their positions.
- QA record. It holds
james, the version, an empty date and an empty time. The date is empty so that the same script gives the same bytes every time.
In the golden file, the two blocks of the two-block mesh read num_el_blk = 2, eb_prop1 = 1, 2, eb_prop2 = 1, 2, eb_prop3 = 1, 1 and 8 elements each, and qa_records reads "james", "0.8.0", "" and "". Golden case 019-materials writes a part with three materials and a part with one as four blocks: eb_prop2 = 1, 1, 1, 2 and eb_prop3 = 2, 5, 7, 1. Golden case 034-mushroom-gap writes a HEX8 block of 672 bricks and a SHELL4 block of 112 shells, the second with connect2:elem_type = "SHELL4", num_att_in_blk2 = 4 and the attributes’ names.
The solver decks
Three more formats write the merged mesh as the input deck of a solver: the LS-DYNA keyword deck, the Abaqus input file and the DYNA3D input deck. Each holds the nodes, the elements with their material numbers, and one placeholder material for every material number the mesh uses: a linear elastic material with density 1.0, modulus 1.0 and Poisson’s ratio 0.3, unit-free values nobody mistakes for a material, marked placeholder material N: replace before use in a comment or a title card. The deck runs as written, and you replace the placeholder with the real material before you use it. No deck carries loads, boundary conditions or sets beyond the element sets named below.
No solver or preprocessor has read these files. James holds each golden deck to its neutral file with a reader of its own, tests/tools/check_decks.py, written from the layouts below and not from the writers, and the Abaqus file of the lens example has been read by meshio. The layouts follow the solvers’ public manuals: the LS-DYNA R15 keyword manual, the Abaqus keyword reference and the 1989 DYNA3D user’s manual, the newest with a public text.
Every coordinate is written in scientific notation with a three-digit exponent, so 1e-300 and 1e200 print whole: 13 significant digits in the two fixed-column formats and 17 in the Abaqus file. The title is cut to 80 characters, 72 in DYNA3D, with the warning the Exodus II writer prints. A title whose first character is * or $ is written behind one blank in the LS-DYNA deck, and one whose first character is * in the Abaqus file, so that the reader never takes it for a keyword or a comment. Such a title holds 79 characters.
LS-DYNA keyword
lsdyna keyword, or --format lsdyna. The deck is in the reader’s long format: the first line is *KEYWORD LONG=Y and every field is 20 characters wide. A line starting with $ is a comment, and a $# line before a card names its fields, as LS-PrePost writes them. The file, in order:
*KEYWORD LONG=Y, then$ james <version>: N nodes, M elements, P parts, K materials.*TITLEand one line with the title, empty when the script has none.- For every material number, in ascending order, a
*PART, a*SECTION_SOLIDand a*MAT_ELASTIC, all with the id equal to the material number. The*PARTis headed by the placeholder comment, and its heading card readsplaceholder material N. The section’s element formulation is 1, the constant stress solid. *NODEand one card per node: the number, then x, y and z.*ELEMENT_SOLIDand, for every part with a brick, a comment$ part P: elements A to B, then two cards per element: the element number with its part id, which is the element’s James material number, and the eight corner nodes.*END.
A mesh with shells adds, after the brick materials’ triples, a *PART and a *SECTION_SHELL for every shell block, a part and material that hold shells: the part’s heading reads placeholder material N shells, its pid and secid are the highest material number the mesh uses plus the block’s running number among the shell blocks, its mid is the block’s material, and the section’s formulation is 2, the Belytschko-Tsay shell, with the block’s first element’s four thicknesses on its thickness card, since every element carries its own below; a material no brick uses gets its *MAT_ELASTIC here. After *ELEMENT_SOLID, *ELEMENT_SHELL_THICKNESS and, for every part with a shell, $ part P: shells A to B, then two cards per shell: the element number, its block’s pid and the four corners, then the four corner thicknesses. The counts line counts bricks and shells together, and a deck with no shell is the one 0.5.0 wrote but for its version line.
In an LS-DYNA deck the *PART is the unit a material attaches to, so the deck’s part id is the James material number. The James part survives in the comment that heads its elements and in the element order. The first lines of tests/golden/006-merge-two-blocks/expected.lsdyna.txt are:
*KEYWORD LONG=Y
$ james 0.8.0: 45 nodes, 16 elements, 2 parts, 1 material
*TITLE
*PART
$ placeholder material 1: replace before use
Abaqus input
abaqus, or --format abaqus. The file is free format: keyword lines start with *, values are separated by , , and a comment line starts with **. The file, in order:
*HEADINGand one line with the title, or none when the script has none, then** james <version>: N nodes, M elements, P parts, K materials.*NODEand one line per node: the number, then x, y and z with 17 significant digits.- For every part with an element,
*ELEMENT, TYPE=C3D8, ELSET=PART_Pand one line per element: the number, then the eight corner nodes, in the order C3D8 uses, which is James’s. - For every material number,
*ELSET, ELSET=MAT_Nand the numbers of the elements with that material, in element order, up to 16 to a line. The set is listed outright rather than generated from ranges, so that every reader takes it: a material used by two parts is two runs of numbers, and meshio’s reader takes one range per generated set. - For every material number with a brick, the placeholder comment,
*SOLID SECTION, ELSET=MAT_N, MATERIAL=MAT_Nwith a data line holding,,*MATERIAL, NAME=MAT_N,*DENSITYwith1.0,and*ELASTICwith1.0, 0.3.
A mesh with shells adds, after the C3D8 blocks, *ELEMENT, TYPE=S4, ELSET=PART_P_SHELL for every part with a shell, one line per shell with its four corners; after the MAT_N sets, which hold a material’s bricks alone, a set MAT_N_T1, MAT_N_T2, … per material and distinct thickness, ascending, for the shells whose four corners are equal, and a set MAT_N_TV for those whose corners differ (two thicknesses within 64 units of the last place of the larger count as equal, so a thickness computed alike over a uniform shape is one set, carrying its first shell’s value); after the solid sections, *SHELL SECTION, ELSET=MAT_N_T<k>, MATERIAL=MAT_N with the thickness on its data line and *SHELL SECTION, ELSET=MAT_N_TV, MATERIAL=MAT_N, NODAL THICKNESS, with the placeholder comment and *MATERIAL for a material no brick uses; and, when any MAT_N_TV set exists, one *NODAL THICKNESS table, a line node, thickness per node of those shells, the first corner’s value where the corners at the node agree to that measure and their mean where two shells disagree, which James warns about with the count.
Every element is in exactly one PART_ set and one MAT_ set. The first lines of tests/golden/006-merge-two-blocks/expected.abaqus.txt are:
*HEADING
** james 0.8.0: 45 nodes, 16 elements, 2 parts, 1 material
*NODE
1, 0.0000000000000000E+000, 0.0000000000000000E+000, 0.0000000000000000E+000
DYNA3D
dyna3d, or --format dyna3d. The deck is the fixed 80-column cards of the DYNA3D user manual (the 1993 edition) with the large option, which widens the node and element numbers to eight columns. The title card, the control cards and each material’s first card are padded to 80 columns, with blanks where the manual’s field is a real James does not set and 0 where it is an integer. A card whose remaining fields are blank ends at its last field, which a formatted reader pads: material cards 3 and 4 hold their value alone, cards 5 to 8 are empty lines, and the node and element cards end at their last field. The file, in order:
- The title card: the title in columns 1 to 72, then
88, the input version the deck follows, a blank andlarge, in lower case as the manual requires (0.6.0 and earlier wroteLARGE, which DYNA3D reads as the small format). - Eight control cards. The first counts the materials, the nodes, the solid elements and, in its fifth field, the four-node shells; the third names the coordinate format
E20.0; the rest hold zeros and blanks, so the solver initializes and stops. - One block of eight cards per material number from 1 to the highest the mesh uses, so that the numbers are dense as the manual requires: the number, the type 1 (elastic) and the density; a title card,
placeholder material N: replace before use, orplaceholder material N (unused): replace before usefor a number the script never used; the modulus; Poisson’s ratio; four blank cards. - One card per node: the number in eight columns, a zero, then x, y and z in 20 columns each, then a zero.
- One card per solid element: its number in its class, counted from 1, its material number in five columns, and the eight corner nodes in eight columns each.
A mesh with shells adds a material block per shell block after the dense run, numbered above the highest material by the block’s running number, with the element class field 2, the thin shell, and the title placeholder material N shells (material M): replace before use, since a DYNA3D material block is one element class. The manual requires three cross-section cards of a shell material after its eight, and the block carries them: the section’s title, placeholder section N shells: replace before use; the shear factor 1.0, 2 integration points through the thickness, the printed output option 3 and the Gauss rule 0; and the block’s first shell’s four corner thicknesses with 0.0 for the midsurface as the reference surface. After the solid cards come two cards per shell, numbered from 1 in their class: the number, the block’s material number and the four corners, then the four corner thicknesses, which take precedence over the section card’s, and a beta angle of 0.
The deck has no field for the James part. The elements are in James’s order, part by part. The title card, the first control card and the first node and element cards of tests/golden/006-merge-two-blocks/expected.dyna3d.txt are, with their padding cut:
88 large
1 45 16 0 0 0 0
1 0 0.000000000000E+000 0.000000000000E+000 0.000000000000E+000 0
1 1 1 2 5 4 10 11 14 13
A mesh that does not fit the deck’s fields is refused at the write (E1106): a material number above 99999, more than 99999999 nodes or more than 99999999 elements.
What a write refuses and what it warns about
A write stops the run with an error, exit status 2 for an engine error, in these cases.
- The parts the write covers hold more than 250,000,000 grid nodes, written or not. James counts them before it allocates anything. A part alone may hold at most 100,000,000.
- The file cannot be opened, written or closed. The message names the file.
- The format is Exodus II and the build has no writer.
A write stops the run with an error, exit status 1, when the mesh does not fit the DYNA3D deck’s fields (E1106): a material number above 99999, more than 99999999 nodes or more than 99999999 elements.
A write outside the Merge phase (E1100) or with no format (E1101) is an error that James finds while it reads the script, and the run exits with status 1.
James refuses a part with a coordinate that is not finite (E0417) before any write, and the run exits with status 1. A script that scales a part past the range of a real number, for example with two csca 1e200, stops there, where 0.3.1 wrote NaN or Infinity.
James warns and goes on in these cases.
- An element has zero volume after a merge:
part #P has N elements with zero volume after merging. A shell folded, or collapsed to a line:part #P has N shells folded or collapsed after merging, orpart #P has N shells folded or collapsedwhen no tolerance command ran a merge before the write; a shell collapsed to a triangle is legal and not counted. - A shell has a thickness of zero at any corner, because no command gave it one or an
ssfchord came out zero there:N shells have a corner of zero thickness; thic, th, thi, ssf or ssfi gives one, once per merge, at the write. - Two shells disagree on a node’s thickness in an Abaqus deck’s nodal table:
N nodes of the nodal thickness table take the mean of thicknesses their shells disagree on in <file>. nmeets a shell whose normal is at right angles to the line to the orientation point:part #P has N shell element(s) whose normal is at right angles to the line to the orientation point; each keeps its default side.- A part has some inverted elements:
part #P has N elements with a negative Jacobian. A part inverted as a whole gets a note instead,part #P is inverted; its N elements are written with their corners reordered, and is written right-handed. The shaping chapter explains both. - A part has no active element, so none of its nodes is written without
--write-unref-nodes. - A title is longer than 80 characters, and the file holds its first 80, 79 when the title begins with a keyword character, and 72 in a DYNA3D deck.
The diagnostics reference lists every message.