Docsity

Lab 3: Creating Lists and Formatting Numbers in TK Solver - Prof. Michael T. Helm, Lab Reports of Engineering

Toggle sidebar
bg1
14
Lab 3
TK Sheets (Continued)
Objectives
• To become familiar with Unit Sheet, Format Sheet, and MathLook Window.
• To learn about running an existing program and a new program.
Lists
In simple terms, a list comprises of number of input or output values for a variable. These values could be
numeric or symbolic. In TK Solver, input lists can be entered or filled. The Lists Sheet contains all lists that
have been created.
How to create a list?
Lists can be created using following methods:
• By entering ‘L’ in the Status field of the Variables Sheet or a Variable Subsheet. By default, list
will be given same name as the variable name itself.
• Click on the Lists Sheet, and enter a name to create a new list.
• By entering a list name in the Domain List or the Range List field of a list function subsheet.
Formatting Numbers in TK
1. In TK solver, a separate format can be created for each variable. Basically, there are two sheets
associated with the format: Format Sheet and Format Subsheet. There are two formats which are
generally used: finan (financial) and eng (engineering).
2. Double click on Formats Sheet, under Name, enter finan, and in comments column, enter
Format used for financial models.
3. Right click on finan, Format Subsheet will open. The information to be filled is as below:
• Comment. Additional information about the format.
• Numeric Notation. This is a dropdown list of four types: General, Scientific, Decimal,
and Engineering.
• Significant Digits. Number of digits to be displayed.
• Decimal Places. Number of decimal places.
• Padding. Blank Spaces to the right to be filled. Options are zero, blank, and none.
• Display Leading Zero. Options: Yes or No.
• +/- Notation. Default is ‘-Only.’
• Prefix. Symbol preceding the numerical value, e.g., $ sign.
• Suffix. Symbol to be used after the numeric value, e.g., units.
• Justifications. Options are Left, Right, or Center.
• Left Margin Width. Number of blank spaces. Default value is zero.
• Right Margin Width. Number of blank spaces to the right. Default value is zero.
• Symbolic Value Format. The field controls the display of symbolic values. Single quote
is the default value.
pf3
pf4

Partial preview of the text

Download Lab 3: Creating Lists and Formatting Numbers in TK Solver - Prof. Michael T. Helm and more Lab Reports Engineering in PDF only on Docsity!

Lab 3 TK Sheets (Continued) Objectives

  • To become familiar with Unit Sheet, Format Sheet, and MathLook Window.
  • To learn about running an existing program and a new program.

Lists In simple terms, a list comprises of number of input or output values for a variable. These values could be numeric or symbolic. In TK Solver, input lists can be entered or filled. The Lists Sheet contains all lists that have been created.

How to create a list? Lists can be created using following methods:

  • By entering ‘L’ in the Status field of the Variables Sheet or a Variable Subsheet. By default, list will be given same name as the variable name itself.
  • Click on the Lists Sheet, and enter a name to create a new list.
  • By entering a list name in the Domain List or the Range List field of a list function subsheet.

Formatting Numbers in TK

  1. In TK solver, a separate format can be created for each variable. Basically, there are two sheets associated with the format: Format Sheet and Format Subsheet. There are two formats which are generally used: finan (financial) and eng (engineering).
  2. Double click on Formats Sheet , under Name, enter finan , and in comments column, enter Format used for financial models.
  3. Right click on finan, Format Subsheet will open. The information to be filled is as below:
    • Comment. Additional information about the format.
    • Numeric Notation. This is a dropdown list of four types: General, Scientific, Decimal, and Engineering.
    • Significant Digits. Number of digits to be displayed.
    • Decimal Places. Number of decimal places.
    • Padding. Blank Spaces to the right to be filled. Options are zero, blank, and none.
    • Display Leading Zero. Options: Yes or No.
    • +/- Notation. Default is ‘-Only.’
    • Prefix. Symbol preceding the numerical value, e.g., $ sign.
    • Suffix. Symbol to be used after the numeric value, e.g., units.
    • Justifications. Options are Left, Right, or Center.
    • Left Margin Width. Number of blank spaces. Default value is zero.
    • Right Margin Width. Number of blank spaces to the right. Default value is zero.
    • Symbolic Value Format. The field controls the display of symbolic values. Single quote is the default value.

Lab Exercise We want to develop a table consisting of four columns: first column, interest rate (I); second column, loan amount (L), and interest payment (IP). Let us assume that all these numbers have been worked out for us and we want to develop a table to show specific attributes. The sequence is as follows:

  • Create three lists: I, L, IP. Use the values shown in the figure below (the screenshot below).
  • Fill in the Formats Sheet and create two formats: Interest and Dollar.
  • Fill in two Format Subsheets as shown in the screenshot figure on the next page.
  • Create a table named table_1 with lists I, L, IP.
  • Use ‘Interest Format’ for ‘I’ and Dollar format for ‘L’ and ‘IP’.
  • Click on the Tables dropdown menu on the toolbar and then click on table_1 to display the table. Does it look like the one shown in the figure?

LAB ASSIGNMENT 3

Leave the work from the exercise above so that you can turn in evidence of your work in the report you will create below:

Run Tutorial 3 from TK Solver ‘Help Menu.’

Problem to solve: The flow rate through a triangular weir is given by the equation:

2.^2.^5 /^2

.tan

Q C^8 gH

= ^ θ

Q=Flow Rate (ft^3 /sec) C 2 =Constant (0.593) Θ = Notch angle (degrees) H = Height of water (ft) = 3 ft g = Acceleration due to gravity (32.2 ft/sec^2 )

Develop a TK model for the flow rate through a triangular weir. Draw a plot of flow rate Q as a function of the notch angle as θ is varied from 20o^ to 60o^ in increments of 2 degrees. Plot θ along x-axis and Q along y-Axis. Note that if θ is in degrees, you need to use tand in TKSolver rather than tan which is in radians. Note that Q will need to be set as a list on the Variable Sheet. Note also that the list theta will have to be set as an input list on the Variable Sheet. You can use either the word theta or the symbol θ for your variable, but it has to be the same every where you use it in this model.

Use the Report Wizard to generate a report that has your name, Lab 3, and includes in the following order: the Rule Sheet, the Variable Sheet, only the two Lists that you use in this last part of the problem (theta and Q), your table from the first part of the lab exercise, and a Plot of your results from the Lab Assignment problem above. Turn in your report before you leave.

Water Surface