\documentstyle[twoside,12pt,freqn]{sreport}

\begin{document}
%
\input{../include/setup}
\newcommand{\PROGRAM}{POSABA}
%
\author{Amy P. Gilkey}
\division{Applied Mechanics Division III}
\title{\caps{\PROGRAM} -- \\
An \caps{ABAQUS} to \caps{SEACO} Database Translator}
\maketitle

\chapter{Introduction} \label{chap:intro}

\caps{\PROGRAM} translates the output of the finite element program
\caps{ABAQUS} \cite{bib:abaqus} into the \caps{SEACO} database format
\cite{bib:seaco}. The \caps{SEACO} format is the format used by the
Engineering Analysis Department plot programs such as DETOUR
\cite{bib:detour}.

\caps{ABAQUS} allows 8-node 2D elements and 20-node 3D elements, but the
plot programs expect 4-node 2D elements and 8-node 3D elements.
\caps{\PROGRAM} transforms any 8-node 2D element into four 4-node
elements and any 20-node 3D element into eight 8-node elements. Any
multi-node 1D element is transformed into 2-node elements. There is also
an option to transform 4-node 2D elements into four 4-node elements.

The 2D and 3D transformations are shown in Figures 1a and 1b. The solid
lines show the original elements. The dashed lines show the elements
that are generated. The circled nodes are nodes which are generated for
the transformation.

The 8-node 2D element is broken into four 4-node elements by adding a
center node. To transform a 4-node 2D element into four 4-node elements,
a node is added at the center of each side of the element, and then the
8-node transformation is performed. A side node generated by the 4-node
transformation may be shared by an adjacent element.

The 20-node 3D element is broken into eight 8-node elements by adding
seven nodes: one at the center of each side and one at the center of the
element. A generated center side node may be shared by an adjacent
element.

\newpage \addtocounter{page}{1}

\chapter{\caps{ABAQUS} to \caps{SEACO}} \label{chap:abasea}

The \caps{ABAQUS} database format is described in
Appendix~\ref{appx:abaqus}, and the \caps{SEACO} database format is
described in Appendix ~\ref{appx:seaco}. This section describes how a
\caps{ABAQUS} database is translated into the \caps{SEACO} format.

The \caps{SEACO} title is copied from the \caps{ABAQUS} header record
(1922). The creation information is ``\caps{\PROGRAM}'' with the date
and time \caps{\PROGRAM} is run. The modification information is blank.

The \caps{SEACO} database requires names for the coordinates and the
variables, which the \caps{ABAQUS} database does not supply. The
coordinates are named ``1'', ``2'' and ``3'' to be consistent with the
variable names. The variable names are generated from the variable
record types, and are explained under Variable Naming.

The coordinates of the original nodes are copied from the \caps{ABAQUS}
nodal coordinate records (1901). The coordinates of the generated nodes
are the average of the coordinates of the original nodes that define the
new nodes. The center node of the 8-node 2D transformation (\#9 in
Figure 1a) is defined by the eight original nodes (\#1..\#8). The side
nodes added for the 4-node 2D transformation (\#4..\#8) are defined by
the two nodes on the side. For example, the coordinates of node \#5 are
the average of the coordinates of nodes \#1 and \#2. The side nodes of a
20-node 3D element (\#21..\#26 in Figure 1b) are defined by the eight
nodes on the side. For example, the coordinates of node \#21 are the
average of the coordinates of nodes \#1, \#12, \#4, \#20, \#8, \#16,
\#5, and \#17. The center node (\#27) is defined by the original twenty
nodes (\#1..\#20). The generated nodes are added to the end of the
original node list, so that the node numbers of the original nodes do
not change.

The connectivity of the elements is read from the \caps{ABAQUS} element
connectivity records (1900). The element type from the record determines
the dimension of the element. Any element transformations are done and
the new element connectivity is written to the \caps{SEACO} database.
The new elements replace the original elements and result in the
elements being renumbered. The \caps{SEACO} database requires that all
elements have the same number of nodes. Blank nodes in the connectivity
array are filled with the element's nodes. For example, the connectivity
of a 4-node element with nodes 1-2-3-4 becomes 1-2-3-4-4-3-2-1 when
filled to eight nodes.

The element materials are not supplied by the \caps{ABAQUS} database.
They may be supplied by the user (using the \cmd{MATERIAL} command).

The time for each time step is copied from the total time in the
\caps{ABAQUS} time record (2000) at the start of each time step. If more
than one time record is found for a time step, the last time is written
to the database.

The nodal variables at the original nodes are read from the
\caps{ABAQUS} nodal variable records (51..1000). The variables at the
generated nodes are the average of the variables at the original nodes
that define the new nodes (as described for the coordinates).

The element variables at the original elements are read from the
\caps{ABAQUS} element variable records (1..50). The variables for the
generated elements are read from the input variables at the appropriate
integration points. The \caps{ABAQUS} Manual has a diagram of the
positions of the integration points for each element type. If a
non-transformed element has more than one integration point, the
variables for the element are averaged over all the points.

There are no global variables.

\section{Variable Naming} \label{abasea:varnam}

The variables that are to be written to the \caps{SEACO} database are
found by scanning the entire \caps{ABAQUS} database for all the variable
records. The variables that are selected may be limited with the
\cmd{EVARS} and \cmd{NVARS} commands. Each variable is assigned a name
and a position in the \caps{SEACO} database variable array. It is
assumed that each time step has the same variables. If a variable is
missing from the \caps{ABAQUS} database, the output variable is set to
zero.

The element and nodal variables are assigned names according to the
record types associated with the variables. These names can be changed
by the code sponsor.

Element variables may include a section number for shell type variables.
The section number is included in the name only if any section number of
the variable is greater than one. All shell sections from the
\caps{ABAQUS} file are stored. The element records that have been named
are:
\begin{center} \begin{tabular}{||c|l|l|l||}
\hline
Record   & Name      & Section   & Variable \\
\hline
11       & \cmd{SIG\param{n}}      & \cmd{SIG\param{n}S\param{ss}}
& Stress components \\
12       & \cmd{INV\param{n}}      & \cmd{INV\param{n}S\param{ss}}
& Stress invariants \\
14       & \cmd{ENRGYDY\param{n}}  & \cmd{ENDY\param{n}S\param{ss}}
& Energy densities \\
21       & \cmd{EPS\param{n}}      & \cmd{EPS\param{n}S\param{ss}}
& Total strain components \\
else     & \cmd{R\param{rr}X\param{n}}
& \cmd{R\param{rr}X\param{n}S\param{ss}} & \\
\hline
\end{tabular} \end{center}
where \param{n} is the number of the variable in the record, and
\param{ss} is the section number, and \param{rr} is the record type.

The nodal records that have been named are:
\begin{center} \begin{tabular}{||c|l|l||}
\hline
Record   & Name      & Variable \\
\hline
51       & \cmd{SIG\param{n}}      & Stress components at nodes \\
55       & \cmd{EPS\param{n}}      & Plastic strains at nodes \\
101      & \cmd{DISP\param{n}}     & Displacements \\
102      & \cmd{VEL\param{n}}      & Velocities \\
103      & \cmd{ACCEL\param{n}}    & Accelerations \\
104      & \cmd{FORCE\param{n}}    & Residual/reaction forces \\
201      & \cmd{TEMP\param{n}}     & Temperatures \\
300+     & \cmd{EIG\param{rrr}X\param{n}}  & Eigenvector \\
else     & \cmd{R\param{rrr}X\param{n}} & \\
\hline
\end{tabular} \end{center}
where \param{n} is the number of the variable in the record and
\param{rrr} is the record type.

Note that element record types 51 through 100 are actually nodal
variables.
%%%They have a special first variable named ``\cmd{SECT}'',
%%%which is the section point.

\chapter{Command Input} \label{chap:command}

The user may direct the processing by entering commands to set
processing parameters.

\input{../include/cominput}

\cmddef{\cmdverb{DO4NOD}
   \cmd{ON} or \cmd{OFF} \default{\cmd{OFF}}
} {
\cmd{DO4NOD} indicates whether 4-node elements should be broken up into
four 4-node elements as is done with 8-node elements (if \cmd{ON}) or
left as 4-node elements (if \cmd{OFF}).
}

\cmddef{\cmdverb{EVARS}
   selected element variable record types
      \default{all element variable records}
} {
\cmd{EVARS} limits the selected element variable records. The element
variables are taken only from selected record types. Element variable
records that are not selected are ignored.

The element variable record types are listed in the \caps{ABAQUS} Manual
Section 10. A parameter of ``\cmd{ALL}'' selects all known element
variable records. The range notation is allowed on the records. The
effect of multiple \cmd{EVARS} commands is cumulative.
}

\cmddef{\cmdverb{NVARS}
   selected nodal variable record types
      \default{all nodal variable records}
} {
\cmd{NVARS} functions exactly the same as the \cmd{EVARS} command for
nodal variable records.
}

\cmddef{\cmdverb{MATERIAL}
} {
\cmd{MATERIAL} signals the start of the element material settings. The
settings follow on the next lines. The \cmd{END} command ends the
material settings.

On each line following the \cmd{MATERIAL} command, the material number
is given, followed by the elements that are of that material. The range
notation is allowed on the elements. All elements must be listed.

The default is one material for all elements.
}

\cmddef{\cmdverb{END}
} {
The \cmd{END} command ends the command input.
}

\chapter{Output} \label{chap:output}
%
%%% \errmsg produces an error message with explanation
\newcommand{\errmsg}[2]{
   {\sf #1}
   \topicbegin \negmedskip {#2} \topicend
   }

\caps{\PROGRAM} first scans the \caps{ABAQUS} file for initial
information such as the number of nodes and the variable records. The
database is then rewound and the element connectivity and the nodal
coordinates are read. The new elements and nodes are generated and
written to the new \caps{SEACO} database. \caps{\PROGRAM} displays
information about the input database and the generated elements, etc.
The element and nodal variables are then read, and the values for each
time step are written to the \caps{SEACO} database. \caps{\PROGRAM}
displays the number of time steps written.

\section{Command Errors} \label{output:cmderr}

The following error messages may appear when the user is entering the
user parameters. If any error occurs, the command may be ignored.

\errmsg{ERROR - ``\param{verb}'' is an invalid command}
{
The command {verb} is invalid.
}

\errmsg{ERROR - List of selected items is too long \\
ERROR - List is too long}
{
Too many items are specified in a command.
}

\errmsg{ERROR - Expected key number, not ``\param{item}'' \\
ERROR - Expected ``TO'', not ``\param{item}'' \\
ERROR - Expected TO key number, not ``\param{item}'' \\
ERROR - Expected ``BY'', not ``\param{item}'' \\
ERROR - Expected ``BY'' key number, not ``\param{item}'' \\
ERROR - Starting key number \param{start} \verb|>| ending \param{end} \\
ERROR - Starting key number \param{start} \verb|<| ending \param{end}
with negative step \\
ERROR - Key number \param{n} \verb|>| maximum \param{max} \\
ERROR - Maximum key number \param{n} \verb|<| minimum \param{min} \\
ERROR - Negative or zero key number \param{n} \\
ERROR - Invalid ``BY'' key number \param{n}}
{
A range was expected. The range must be of the form ``\param{n$_{1}$}'' or
``\cmd{\param{n$_{1}$}~TO~\param{n$_{2}$}}'' or
``\cmd{\param{n$_{1}$}~TO~\param{n$_{2}$}~BY~\param{n$_{3}$}}''. At least one
value must be specified by the range. If the upper limit of the range is
greater than the maximum value, it is changed to the maximum without a
message. The \cmd{BY} value may be any non-zero integer.
}

\errmsg{ERROR - Material reassigned for element \param{elem},
\param{oldmat} =\verb|>| \param{mat} \\
ERROR - Material for elements \param{\param{n$_{1}$}} to
\param{\param{n$_{2}$}} not given, assume material 1}
{
The element grouping for the \cmd{MATERIAL} command must assign one and
only one material to each element.
}

\section{\caps{ABAQUS} Database Errors} \label{output:dberr}

The following error messages appear when an unexpected condition is
found in the \caps{ABAQUS} database. Unless otherwise noted, the message
appears only during the second pass.

\errmsg{WARNING - NO ELEMENTS in database \\
WARNING - NO ELEMENT CONNECTIVITY in database \\
WARNING - NO NODES in database \\
WARNING - NO NODAL COORDINATES in database \\
WARNING - NO ELEMENT VARIABLES in database \\
WARNING - NO NODAL VARIABLES in database}
{
The listed items do not appear in the \caps{ABAQUS} database. This
message appears during the first pass.
}

\errmsg{WARNING - TOO MANY COORDINATES, \param{n} decreased to 3}
{
The maximum number of coordinates is 3. This message appears during the
first pass.
}

\errmsg{WARNING - OVER \param{max} ELEMENT VARIABLES SELECTED,
record type \param{type} ignored \\
WARNING - OVER \param{max} NODAL VARIABLES SELECTED, record type
\param{type} ignored}
{
The maximum number of variables to be stored is exceeded. All following
record types are ignored. Commands \cmd{EVARS} and \cmd{NVARS} limit the
variable records selected. This message appears during the first pass.
}

\errmsg{WARNING - END OF FILE in ELEMENT CONNECTIVITY \\
WARNING - END OF FILE in NODE COORDINATES \\
WARNING - END OF FILE in ELEMENT VARIABLES \\
WARNING - END OF FILE in NODAL VARIABLES \\
WARNING - END OF FILE before TIME STEPS}
{
An end of file was found while reading the listed records.
}

\errmsg{WARNING - UNKNOWN RECORD \param{type}}
{
An unknown record type was found. The record is ignored. This message
does not appear after the first time step.
}

\errmsg{WARNING - BAD ELEMENT NUMBER in connectivity,
element = \param{n}, max = \param{max}}
{
The element number in the connectivity record (1900) is less than one.
The record is ignored.
}

\errmsg{WARNING - UNKNOWN ELEMENT TYPE \param{type} for element
\param{elem}, assume \param{2or3}D}
{
The listed element type in the connectivity record (1900) is unknown to
\caps{\PROGRAM}. The element is assumed to have the listed dimension and
is handled accordingly. Please contact the code sponsor.
}

\errmsg{WARNING - ELEMENT TYPE \param{type} NOT HANDLED for element
\param{elem}, assume \param{2or3}D}
{
The listed element type in the connectivity record (1900) is not handled
by \caps{\PROGRAM}. The element is assumed to have the listed dimension
and is handled accordingly.
}

\errmsg{WARNING - \# NODES for element \param{elem}, \param{2or3}D,
read \param{n}, expected \param{nexp}}
{
The number of nodes in the connectivity record (1900) is incorrect. For
3D elements, 8 or 20 nodes are expected; for 2D elements, 4 or 8 nodes
are expected. \caps{\PROGRAM} ignores extra nodes if the element is
transformed; otherwise they are kept.
}

\errmsg{WARNING - \# ELEMENTS in connectivity, read \param{n}, expected
\param{nexp}}
{
Either there are two connectivity records (1900) for some elements or
there are no connectivity records for some elements.
}

\errmsg{WARNING - BAD NODE NUMBER in coordinates, node = \param{n}, max
= \param{max}}
{
The node number in the coordinate record (1901) is less than one. The
record is ignored.
}

\errmsg{WARNING - \# COORDINATES for node \param{node},
read \param{n}, expected \param{nexp}}
{
The number of coordinates in the coordinate record (1901) is not equal
to the maximum found for all nodes (up to 3). Extra coordinates are
ignored; missing ones are filled with zero.
}

\errmsg{WARNING - \# NODES in coordinates, read \param{n}, expected
\param{nexp}}
{
Either there are two coordinate records (1901) for some nodes or there
are no coordinate records for some nodes.
}

\errmsg{WARNING - NO TIME IN TIME STEP \param{n}}
{
No time record (2000) was found for this step.
}

\errmsg{WARNING - NO VARIABLES IN TIME STEP \param{n}, time = \param{t}}
{
No variables were saved for this time step.
}

\errmsg{WARNING - BAD ELEMENT NUMBER in variable header,
element = \param{n}, max = \param{max}}
{
The element number in the variable header record (1) is less than one or
greater than the maximum from the connectivity records. The record is
ignored.
}

\errmsg{WARNING - BAD SECTION for element \param{elem},
section = \param{n}, max = \param{max}}
{
The section number in the variable header record (1) is less than one or
greater than 99. The section number is set to zero.
}

\errmsg{WARNING - BAD POINT for element \param{elem},
point = \param{n}, max = \param{max}}
{
The integration point number in the variable header record (1) is less
than one or greater than 27.
}

\errmsg{WARNING - BAD ELEMENT NUMBER in variables,
element = \param{n}, max = \param{max}}
{
The element number from the variable header record was incorrect so the
variable record (2..50) cannot be processed. The record is ignored.
}

\errmsg{WARNING - EXTRA VARIABLES of type \param{type} for element
\param{elem}, ignored}
{
There are extra variables at the end of a variable record (2..50). The
extra variables are ignored.
}

\errmsg{WARNING - MISSING POINTS for element \param{elem},
variables \param{n$_{1}$} to \param{n$_{2}$}, \param{npt} \verb|<|
\param{exppt}}
{
The number of integration points expected is dependent on the element
transformation. There should be at least one integration point for each
new element. This message appears on the first time step only.
}

\errmsg{WARNING - \# ELEMENTS in step \param{s}, read \param{n},
expected \param{nexp}}
{
The number of elements in the variable records is not equal to the
maximum from the connectivity records.
}

\errmsg{WARNING - \# ELEMENT VARIABLES in step \param{s},
read \param{n}, expected \param{nexp}}
{
The number of element variables stored is not equal to the maximum
scanned from all the time steps.
}

\errmsg{WARNING - \# ELEMENT POINTS in step \param{s},
read \param{n}, expected \param{nexp}}
{
The number of integration points expected is dependent on the element
transformation. There should be at least one integration point for each
new element.
}

\errmsg{WARNING - BAD NODE NUMBER in variables, node = \param{n}, max =
\param{max}}
{
The node number in the nodal variable record (51..1000) is less than one
or greater than the maximum from the coordinate records. The record is
ignored.
}

\errmsg{WARNING - EXTRA VARIABLES of type \param{type} for node
\param{node}, ignored}
{
There are extra variables at the end of a variable record (51..1000).
The extra variables are ignored.
}

\errmsg{WARNING - \# NODES in step \param{s}, read \param{n}, expected
\param{nexp}}
{
The number of nodes in the variable records (51..1000) is not equal to
the maximum from the coordinate records.
}

\errmsg{WARNING - \# NODAL VARIABLES in step \param{s},
read \param{n}, expected \param{nexp}}
{
The number of nodal variables stored is not equal to the maximum scanned
from all the time steps.
}

\errmsg{WARNING - MISSING CONNECTIVITY for element \param{elem}, filled
with 0}
{
No connectivity record was read for the element.
}

\section{Miscellaneous Errors} \label{output:miscerr}

\errmsg{NEWXY ERROR (\param{n}): BAD NODE NUMBER \param{bad},
new node \param{node}, ix \param{ix}}
{
Either the connectivity for some element is incorrect or the program is
incorrect. Please contact the code sponsor.
}

\errmsg{RDREC OVERRUN: \# words = \param{n}, record type \param{type}}
{
The \caps{\PROGRAM} file format is incorrect.
}

\errmsg{ELEMENT NAMING FORMAT ERROR for variable \param{n},
record \param{type} \\
\hspace*{\myindent} parameters: \param{n$_{1}$} \param{n$_{2}$} \ldots\ \\
NODE NAMING FORMAT ERROR for variable \param{n}, record \param{type} \\
\hspace*{\myindent} parameters: \param{n$_{1}$} \param{n$_{2}$} \ldots}
{
The variables may be named incorrectly. Please contact the code sponsor.
}

\errmsg{FATAL ERROR - Dynamic allocation problem}
{
There is a problem with the dynamic memory. The memory allocated for
program execution usually needs to be increased. If not, please contact
the code sponsor.
}

\errmsg{PROGRAM ERROR - \param{msg} - call code sponsor}
{
Errors messages of this form should never appear. If one does, please
contact the code sponsor.
}

\chapter{Executing \caps{\PROGRAM}} \label{chap:exec}

The details of executing \caps{\PROGRAM} are dependent on the system
being used. The system manager of any system that runs \caps{\PROGRAM}
should provide a supplement to this manual that explains how to run the
program on that particular system.

\section{Execution Files} \label{exec:files}

The table below summarizes \caps{\PROGRAM}'s file usage.

\begin{center} \begin{tabular}{||l|c|c|c||}
\hline
\multicolumn{1}{||c}{Description} &
\multicolumn{1}{|c}{Unit Number} &
\multicolumn{1}{|c}{Type} &
\multicolumn{1}{|c||}{File Format} \\
\hline
User command input & standard input & input & Section~\ref{chap:command}
\\
User output & standard output & output & ASCII \\
ABAQUS database & 8 & input & Appendix~\ref{appx:abaqus} \\
SEACO database & 11 & input & Appendix~\ref{appx:seaco} \\
Scratch file & 20 & scratch & binary \\
\hline
\end{tabular} \end{center}

All files must be connected to the appropriate unit before
\caps{\PROGRAM} is run. Each file (except standard input and output) is
opened with the name retrieved by the \caps{EXNAME} routine of the
\caps{SUPES} library.

\section{Special Software}

\caps{\PROGRAM} is written in ANSI \caps{FORTRAN}-77 \cite{bib:f77},
with the exception of the following system-dependent features:
\setlength{\itemsep}{\medskipamount} \begin{itemize}
\item the OPEN options for the \caps{SEACO} database file.
\end{itemize}

\caps{\PROGRAM} uses the following software packages:
\setlength{\itemsep}{\medskipamount} \begin{itemize}
\item the \caps{ABAQUS} library package which opens and reads the
\caps{ABAQUS} database and
\item the Engineering Analysis Department \caps{SUPES} \cite{bib:supes}
(Software Utility Package for Engineering Sciences) which includes
dynamic memory allocation, a free-field reader, and \caps{FORTRAN}
extensions.
\end{itemize}

\setlength{\itemsep}{\bigskipamount}
\begin{thebibliography}{99}
%
\bibitem{bib:abaqus}
{\em \caps{ABAQUS} User's Manual}, Version 4, July 1982.
%
\bibitem{bib:posadi}
Mary R. Sagartz,
``POSADI - A Post Processor for ADINA,''
SAND83-1052, \SNLA, May 1983.
%
\input{../include/refseaco}
%
\bibitem{bib:detour}
Amy P. Gilkey and Dennis P. Flanagan,
``DETOUR - A Deformed Mesh / Contour Plot Program,''
SAND86-0914, \SNLA, July 1987.
%
\input{../include/reff77}
%
\input{../include/refsupes}
%
\end{thebibliography}

\appendix

\chapter{The \caps{ABAQUS} Output File Format} \label{appx:abaqus}

The \caps{ABAQUS} file format is described in the \caps{ABAQUS} Manual
Section 10. However, the manual is unclear as to the order of the record
types. This appendix defines the assumed record order determined by
examining actual \caps{ABAQUS} output files. These assumptions are
incorporated in \caps{\PROGRAM}, and if incorrect they may involve
program changes.

If the program encounters a record of an unexpected type, a warning is
printed and the record is ignored. Records that are out of order may
confuse the program.

The header records are in the following order:
\setlength{\itemsep}{\medskipamount} \begin{itemize}
\item a version record (1921) and a heading record (1922);
\item a series of element connectivity records (1900), which may not be
in numerical order;
\item a series of nodal coordinate records (1901), which may not be in
numerical order;
\item a start time steps record (1902), which does not occur once each
step as the manual implies;
\item an end time step record (2001).
\end{itemize}

A series of time steps follow. The records for a time step are in the
following order:
\setlength{\itemsep}{\medskipamount} \begin{itemize}
\item a times record (2000);
\item an output set request record (1911), which is ignored;
\item a series of element variable records (1..50), which may not be in
numerical order, but all variables for one element are together;
\item a series of nodal variable records (51..1000), which may not be in
numerical order, and all variables for a node may not be together;
\item an end time step record (2001).
\end{itemize}

\include{../include/appxseaco}

\end{document}
