# Input File for Three Dimensional Highway Bridge

```/*
*  ======================================================================
*  Two Span Continuous Composite Beam (100-100ft)
*
*  This analysis assumes that the neutral axis of concrete deck coincides
*  with the top girder flange.
*
*  Written By : Wane-Jang Lin                              June-July 1995
*  ======================================================================
*/

print "*** DEFINE PROBLEM SPECIFIC PARAMETERS \n\n";

NDimension         = 3;
NDofPerNode        = 6;
MaxNodesPerElement = 4;

StartMesh();

print "*** GENERATE GRID OF NODES FOR FE MODEL \n\n";

girder   = 2;

span     = 100 ft;
spacing  = 8 ft + 4 in;
slab     = 7 in;
height   = 36.17 in - 1.1 in;
flange   = 12.03 in;

div_L    = 10;
div_S    = 4;
delta_L  = span/div_L;
delta_S  = spacing/div_S;
delta_f  = flange/2;
delta_h  = height/2;

section_no = 2*div_L + 1;
nodes_per_girder = 6;
nodes_per_section = nodes_per_girder*girder + (2*div_S+1) - girder;

node = 0;
x = 0 in;
for( i=1 ; i <= section_no ; i=i+1 ) {
x  =  delta_L*(i-1);
for( j=1 ; j <= girder ; j=j+1 ) {
y    = -spacing/2 + spacing*(j-1);
AddNode( node+1, [ x, (y-delta_f),  delta_h ] );
AddNode( node+2, [ x,          y ,  delta_h ] );
AddNode( node+3, [ x, (y+delta_f),  delta_h ] );
AddNode( node+4, [ x, (y-delta_f), -delta_h ] );
AddNode( node+5, [ x,          y , -delta_h ] );
AddNode( node+6, [ x, (y+delta_f), -delta_h ] );
node = node + nodes_per_girder;
}
yy = spacing/2;
for( j=1 ; j<=(2*div_S+1) ; j=j+1 ) {
y = -spacing + delta_S*(j-1);
if( (y!=yy) && (y!=-yy) ) {
node = node + 1;
AddNode( node, [ x, y, delta_h ] );
}
}
}

print "*** ATTACH ELEMENTS TO GRID OF NODES \n\n";

elmtno = 0;
a = 0;
b = 0 + nodes_per_section;
for( i=1 ; i < section_no ; i=i+1 ) {
for( j=1 ; j<=girder ; j=j+1 ) {
AddElmt( elmtno+1, [ a+1, b+1, b+2, a+2 ],"girder_flange_attr" );
AddElmt( elmtno+2, [ a+2, b+2, b+3, a+3 ],"girder_flange_attr" );
AddElmt( elmtno+3, [ a+2, b+2, b+5, a+5 ],"girder_web_attr" );
AddElmt( elmtno+4, [ a+4, b+4, b+5, a+5 ],"girder_flange_attr" );
AddElmt( elmtno+5, [ a+5, b+5, b+6, a+6 ],"girder_flange_attr" );
elmtno = elmtno + nodes_per_girder - 1;
a = a + nodes_per_girder;
b = b + nodes_per_girder;
}
a = a + 1;
b = b + 1;
for( j=1 ; j<=girder ; j=j+1 ) {
AddElmt( elmtno+1, [   a,   b, b+1, a+1 ], "deck_attr" );
c = b - (girder+1-j)*nodes_per_girder - 3*(j-1);
d = a - (girder+1-j)*nodes_per_girder - 3*(j-1);
AddElmt( elmtno+2, [ a+1, b+1,   c,   d ], "deck_attr" );
a = d;
b = c;
AddElmt( elmtno+3, [   a,   b, b+1, a+1 ], "deck_attr" );
AddElmt( elmtno+4, [ a+1, b+1, b+2, a+2 ], "deck_attr" );
a = a + 2;
b = b + 2;
c = c + (girder+1-j)*nodes_per_girder + (3*j-2) + 1;
d = d + (girder+1-j)*nodes_per_girder + (3*j-2) + 1;
AddElmt( elmtno+5, [   a,   b,   c,   d ], "deck_attr" );
AddElmt( elmtno+6, [   d,   c, c+1, d+1 ], "deck_attr" );
elmtno = elmtno + 6;
a = d + 1;
b = c + 1;
}
}

print "*** DEFINE ELEMENT, SECTION AND MATERIAL PROPERTIES \n\n";

ElementAttr("girder_flange_attr") { type     = "SHELL_4NQ";
section  = "girder_flange";
material = "STEEL3";
}
ElementAttr("girder_web_attr")    { type     = "SHELL_4NQ";
section  = "girder_web";
material = "STEEL3";
}
ElementAttr("deck_attr")   { type     = "SHELL_4NQ";
section  = "deck";
material = "concrete";
}

SectionAttr("girder_flange")      { thickness = 1.100 in; }
SectionAttr("girder_web")         { thickness = 0.680 in; }
SectionAttr("deck")        { thickness = 7 in; }
MaterialAttr("concrete")   { poisson   = 0.3;
yield     = 0.85*(4000 psi);
E         = (29000 ksi)/8;
}

print "*** SET UP BOUNDARY CONDITIONS \n\n";

/* [a] hinged support  */
bc_hs = [ 1, 1, 1, 1, 0, 0 ];

/* [b] roller support  */
bc_rs = [ 0, 1, 1, 1, 0, 0 ];

for ( i=1 ; i<=girder ; i=i+1 ) {
node = nodes_per_girder*(i-1) + 5;
FixNode(node, bc_hs);
node = node + div_L*nodes_per_section;
FixNode(node, bc_rs);
node = node + div_L*nodes_per_section;
FixNode(node, bc_rs);
}

print "*** SPECIFY EXTERNALLY APPLIED POINT LOADS \n\n";

girder_weight = 170 lbf/ft;

Fx = 0 lbf;    Fy = 0 lbf;
Mx = 0 lbf*in; My = 0 lbf*in; Mz = 0 lbf*in;

/* [1] load for corner nodes of deck  */

nodal_load = [Fx, Fy, Fz, Mx, My, Mz];
node = nodes_per_girder*girder + 1;
node = node + nodes_per_section*(section_no-1);
node = node + 2*div_S - girder;
node = node - nodes_per_section*(section_no-1);

/* [2.1] load for edge nodes along x-direction  */

nodal_load = [Fx, Fy, Fz, Mx, My, Mz];
node = nodes_per_section + nodes_per_girder*girder + 1;
for( i=2 ; i < section_no ; i=i+1 ) {
node = node + nodes_per_section;
}

/* [2.2] load for edge nodes along y-direction  */

/* node 16 */
nodal_load = [Fx, Fy, Fz, Mx, My, Mz];
node = nodes_per_girder*girder + div_S;
node = node + nodes_per_section*(section_no-1);

/* node 14, 15, 17, 18 */

nodal_load = [Fx, Fy, Fz, Mx, My, Mz];
node = nodes_per_girder*girder + 1;
for( i=1 ; i<=2 ; i=i+1 ) {
node = node + nodes_per_section*(section_no-1);
}

/* node 1, 3, 7, 9 */

nodal_load = [Fx, Fy, Fz, Mx, My, Mz];
node = 0;
for( i=1 ; i<=2 ; i=i+1 ) {
node = node + nodes_per_section*(section_no-1);
}

/* node 2, 8 */

nodal_load = [Fx, Fy, Fz, Mx, My, Mz];
node = 0;
for( i=1 ; i<=2 ; i=i+1 ) {
node = node + nodes_per_section*(section_no-1);
}

/* [3] load for middle nodes  */

/* node 35... */

nodal_load = [Fx, Fy, Fz, Mx, My, Mz];
node = nodes_per_girder*girder + div_S;
for( i=2 ; i < section_no ; i=i+1 ) {
node = node + nodes_per_section;
}

/* node 33, 34, 36, 37... */

nodal_load = [Fx, Fy, Fz, Mx, My, Mz];
node = nodes_per_girder*girder + 1;
for( i=2 ; i < section_no ; i=i+1 ) {
node = node + nodes_per_section;
}

/* node 20, 22, 26, 28... */

nodal_load = [Fx, Fy, Fz, Mx, My, Mz];
node = 0;
for( i=2 ; i < section_no ; i=i+1 ) {
node = node + nodes_per_section;
}

/* node 21, 27... */

nodal_load = [Fx, Fy, Fz, Mx, My, Mz];
node = 0;
for( i=2 ; i < section_no ; i=i+1 ) {
node = node + nodes_per_section;
}

/* [4] load for girder weight */

/* end node 2, 8 */

Fz = -girder_weight*delta_L/2;
nodal_load = [Fx, Fy, Fz, Mx, My, Mz];
node = 0;
for( i=1 ; i <= 2 ; i=i+1 ) {
node = node + nodes_per_section*(section_no-1);
}

/* middle node 21, 27... */

Fz = -girder_weight*delta_L;
nodal_load = [Fx, Fy, Fz, Mx, My, Mz];
node = 0;
for( i=2 ; i < section_no ; i=i+1 ) {
node = node + nodes_per_section;
}

/*
*  =====================================
*  Compile and Print Finite Element Mesh
*  =====================================
*/

EndMesh();
PrintMesh();

/*
*  ===================================
*  Compute Mass and Stiffness Matrices
*  ===================================
*/

print "\n*** COMPUTE AND PRINT STIFFNESS AND EXTERNAL LOAD MATRICES \n\n";

SetUnitsType("US");

stiff = Stiff();

/*
*  =======================
*  Static Analysis Problem
*  =======================
*/

print "\n*** STATIC ANALYSIS PROBLEM \n\n";