Program: xs v0.90 beta
Date: 31-Oct-01
Platform: TI-89 graphing calculator, AMS 2.05
Language: TI-Basic
Author contact: beezaur@hotmail.com
Description: Calculates properties of composite sections made of polygons and circles with multiple materials.
Copyright © 2001 R. Scott Pollock
This document contains the following sections:
This program (xs) is distributed as freeware under the terms of the GNU General Public License (GPL). The program is distributed free of charge with no warranty whatsoever, and no guarantee of suitability for any purpose. The full text of the license is available at www.gnu.org.
Changed programs based on any version of xs shall not indicate that R. Scott Pollock is the sole author. In other words, give credit where credit is due, but do not give the impression that I am responsible for your work.
This program may contain flaws that cause it to give incorrect or misleading results. Under no circumstances should it be relied upon exclusively for engineering analysis or design. Checks should be made by proven methods. This program is by no means a substitute for formal training in the area of structural or material mechanics. Formal engineering training is a prerequisite for interpretation of the program's results. I may have missed something, so don't ever let this or any calculator program do your thinking for you!
xs provides an environment in which to calculate section properties of shapes defined by simple polygons, i.e. shapes that can be defined by a series of connected straight lines that do not cross. Each shape can be assigned its own modulus of elasticity E or can be declared to be a void (hole) through one of the other shapes. Round reinforcing bars can be added individually or in groups and can be used as circular members or voids.
Results include the transformed area (if the section has more than one E), the centroid location, and various section properties such as area moments of inertia, radii of gyration, etc.
Uses of the program include section analysis for structural problems, stability analysis for dams and retaining walls, and finding the area bounded by a set of survey points. If E is taken as mass density, the center of gravity can be found for sections made of different materials. If area is taken as force, the centroid of irregular loadings can be found. The mathematics involved is common to a wide range of applications.
The program itself sets no limits on the number or configuration of shapes. Theoretically, you could calculate the section properties of a doubly reinforced hollow concrete beam made of three types of concrete with composite fiberglass/aluminum flanges, a copper plate on top, and a stainless steel water pipe running through the middle. Given measurements and materials, you could also calculate the radius of gyration of your kitchen sink. I don't know why you'd want to, but you could.
The program checks inputs to some extent, but making it "bad value-proof" would require too much code. It is left to the user to assure the validity of inputs. For example, it is possible to specify a void that is outside of its solid shape or define a shape whose perimeter crosses itself. Please use the plot feature to check for these errors!
It is also possible to put undefined variables in the matrices defining the sections. For example, the undefined variables x and y ( ...[x,y]... ) can be included in an input, but calculations will not yield correct results. The program only checks that inputs are matrices and are of a valid dimension. It does not currently check that all inputs can be evaluated to real numbers.
Remember: garbage in, garbage out!
If a single piece of reinforcement bar (rebar) is specified by itself, i.e. to calculate the area properties of a circle, the bar cannot have the same elastic modulus (E) of the containing material. A bar by itself should have E of 1 (or whatever real value) and a "containing material" E of 0. If both E's are the same, no calculations are possible because of the way the modular ratio, n, is handled. Similarly, a circular void can be specified with a bar of E=0 which is contained in a material with some positive value for E. Again, both E's cannot be the same.
Since this is a beta (test) release, bugs may exist. If you find and can verify one, please notify me so I can fix it. I don't want a buggy program any more than you do, probably less. Send a complete description of the inputs, your calculator and program version, mode settings, and the outputs to me via e-mail as listed above.
version 0.90 beta, 31-Oct-01: None (first public release).
Unzip the files to your desired computer directory and sent the program to your calculator with Graph Link or some other linking program. The name of the program in the calculator is "xs," so typing "xs()" on the command line starts the program. The first time you run xs, it will take a few seconds before actually starting. Subsequent sessions will begin without this delay. A main screen is then displayed that gives you options for inputting your shapes, viewing what you have loaded, calculating, and viewing a few reference features.
Three inputs are possible:
From the input tab (F1), choose "add shape." This prompts you to supply the (x,y) points that describe the perimeter of the shape. The points must be in order, but can traverse the shape in either direction, clockwise or counterclockwise without affecting the results. Shape and void inputs must be matrices with 2 columns and at least 3 rows. The last point need not be identical to the first. Valid formats are as follows:
You can either enter the matrix "longhand" or supply the name of a variable that contains a matrix. It is strongly suggested that you store matrices in variables for two reasons: a) you can't edit inputs in the program, and b) using a stored matrix allows calculations on a section by itself, e.g. to calculate self-weight of a beam, as well as in various combinations with other shapes.
The modulus of elasticity for the section is requested after the perimeter. Use the real value, or a number that is proportional to other E's used. E is needed is to calculate the "n" ratio E1/E2 for each section.
Add a void as you would a shape, supplying the associated (containing) shape's E.
Reinforcement bars (rebar) are specified in a similar manner with a 3-column matrix. Each row contains one bar's centroidal coordinates and its diameter. The program uses the net E for rebar, so it is not necessary to separately define holes for material that the rebar displaces. The matrix must have at least one row and should be formatted in one of the following ways:
The view tab (F2) contains methods to check your input. "data" displays the number of each shape, void, and rebar groups specified. "plot" draws the entered sections on the graph screen and is probably the best way to check that your entries have a valid geometry.
Above left is a bulb-tee bridge section, right is my kitchen sink.
The calculate tab (F3) provides the option to calculate the area properties of all sections entered. If only one section of a matched set is desired, as in finding the gross concrete area for a reinforced concrete member, you must first assure that the desired section is the ONLY one entered. Sections can be "unloaded" by selecting "clear all" from the input menu. This is one reason to put your matrices in variables ahead of time.
Results are displayed on the screen, but not written to a global variable. You can change this by deleting the name "final" from the list of local variables declared at the beginning of the program. This will leave the list variable "final" in your current folder with the following entries:
{transformed area, centroid x, centroid y, Ix, Iy}
Similarly, deleting "rslt" from the local declaration writes individual section properties to a global variable. rslt is a matrix that contains the following information for each shape (including individual bars):
[[actual area, centroid x, centroid y, Ix, Iy, E]...]
One import fact is that the polar moment of inertia about the centroid, Izc, is generally not the same as the torsional constant, sometimes referred to as J. J is only equal to Izc for an axially symmetric shape like a circular shaft. The torsional constant can be a very difficult quantity to calculate, and methods vary based on the nature of the material.
The misc tab (F4) provides miscellaneous information such as an explanation of the variables I use, formulas for section properties, and information about the program.
"We learn by doing," a former supervisor used to say, so an example follows.
A trick with the rebar input type is used to calculate the properties of a pipe. If a piece of rebar is entered by itself, the bar's E can be taken as one, while E for the containing material (air or some fluid) is zero. Another bar can be entered as a void by specifying the bar E as zero and the containing material's E as one.
Consider a pipe with a diameter of 2 m and a wall thickness of 0.1 m. Both the solid and void parts can be entered using "rebar" as follows:
[F1] 3 [0,0,2] [ENTER] 1 [ENTER] 0 [ENTER]
[F1] 3 [0,0,1.8] [ENTER] 0 [ENTER] 1 [ENTER]
Now choose [F2] 2 to see a plot and verify that the geometry is what you want.
Choose [F3] 1 to calculate the area properties. Results can be viewed again later by choosing [F2] 3.
Consider a reinforced concrete beam, 12 inch wide by 24 in deep, with a 6 by 15 inch void in the upper part and four #4 (.5 in dia) reinforcing bars 3 inches from the bottom, 2 inches on center. The concrete is normal weight and has a design strength of 4000 psi.
An important point here is that unless you are dealing with prestressed concrete or a normally reinforced concrete member BEFORE it cracks, the neutral axis must be calculated using other methods than available here. In the cracked state, all concrete below the neutral axis disregarded for elastic properties. I plan on adding this feature later, but for now the program will NOT find a normally reinforced concrete beam's neutral axis after service load cracking.
One item to input is the concrete perimeter, defined by the following (x,y) points:
(0,0), (12,0), (12,24), (0,24)
Only four points are needed. If you trace the points in order, you will notice that the shape is not closed. The program checks for this and compensates. You can also start at any one of the points and proceed in either direction without affecting the sign of the area. Store the matrix in the variable "t31" as follows:
[[0,0][12,0][12,24][0,24]] -> t31
Likewise, the void is stored in the variable "t32":
[[3,6][9,6][9,21][3,21]] -> t32
The last component is the rebar group. Store each bar's centroid and diameter as a matrix in a variable as follows:
[[3,3,.5][5,3,.5][7,3,.5][9,3,.5]] -> t33
Now start the program by typing "xs()" on the command line. If this is the first time you start the program, a few seconds' delay will precede the actual program. This is a one-time delay.
Press [F1] and select "add shape." You can either enter the matrix longhand if you're not worried about using it later, or enter the name of the variable. Type "t31" and press [ENTER]. Some checking and minor calculations are done during the slight delay, which can be several seconds for complex shapes.
Next the program asks for the modulus of elasticity. The ACI building code specifies an elastic modulus E in psi for normal weight concrete of
E = 57,000*Sqrt(fc'),
where Sqrt means "square root of" and fc' is the design strength of the concrete in psi. Type
57*Sqrt(4000)
for E in ksi (because we like to use units that no one else knows), and press [ENTER].
Now input the void by pressing [F1] 2. Type "t32" to get the void's matrix and press [ENTER]. This void is contained in the shape defined above, so enter the same value for E, 57*Sqrt(4000).
Next choose [F1], "add rebar" and type "t33" to input the rebar group. When prompted, enter the elastic modulus for steel, 29x10^3 ksi, and the elastic modulus for the material that contains the rebar (concrete), 57*Sqrt(4000).
Now all parts of the composite section are defined. Verify the number of each type of shape by selecting "data" from the view tab: [F2], 1. Each category should have "1" displayed. press [ENTER] to return to the main screen. If the wrong number of shapes is defined, clear everything out by pressing [F1], 4 and start over.
It is also a good idea to check the geometry of your composite section by plotting it. Press [F2], 2, then [ENTER] when done.
Any time after the shapes have been input, area properties may be calculated. Pressing [F3], 1 starts the calculation, which takes about eight seconds for this example. The following results are displayed:
The results can be reviewed at a later time by choosing [F2] 3. Many more digits are displayed than are reasonable - concrete's actual strength may vary by 1000 psi or more in the actual product. Realistically, even 2 digits is more accurate than can be known for actual structural loadings. Still, some applications need the digits, so here they are.
All properties are for the transformed section, where all shapes have been made into equivalent concrete shapes with concrete's E. For example, the actual area is 198 in^2, not 203.5 as shown. If only one E value was used, no transformation would be done, and the "transformed" area would be the actual area. Clearing all inputs with [F1], 4 and recalculating without rebar gives the actual area of the concrete, which is used for determining the beam's self-weight:
(198in^2)*(1ft^2/144in^2)*(150lbs/ft^3)=206.25lb/ft,
which is the weight of the beam per linear foot.
Incidentally, if you can't remember the moduli for rebar and concrete, just use the suggested values of 8 for rebar and 1 for concrete. The actual ratio Es to Ec in this example is 8.04; the results given with 8 and 1 are within 0.02% of those with actual E values.
The goal with this version is to get a test version out and either eliminate bugs or establish that there are none. Once that is done, more elaborate capabilities can be added. For example:
Bug fixes in this version will result in version changes below 1.0. Once xs is proven reliable, version 1.0 will be released.
Linux is power!