Run an Algorithm: Difference between revisions
No edit summary |
No edit summary |
||
| (10 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
The term ''running an algorithm'' | __NOTOC__ | ||
The term ''running an algorithm''is used here to mean doing a set of calculations: | |||
{{#drawio:algorithm_intro|type=png}} | {{#drawio:algorithm_intro|type=png}} | ||
| Line 8: | Line 10: | ||
# You need to be able to run the algorithm. | # You need to be able to run the algorithm. | ||
==== For example, here's a 'run' of the algorithm for | ==== For example, here's a 'run' of the algorithm for solving for the forces at joint B in the Nodal Analysis key example: ==== | ||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+ | ||
| Line 17: | Line 19: | ||
|- | |- | ||
| | | | ||
* Rearrange to find an expression for <math>F_{BD}</math> | ==== Apply vertical equilibrium: ==== | ||
* <math display="inline">\sum F_y = 0</math> | |||
* <math>9\sin{30} + F_{BD}\sin{30}-3-F_{BC}\sin{30}=0</math> | |||
==== Substitute for: <math display="inline">\sin{30} = 0.5</math> ==== | |||
*<math>9\times0.5+0.5F_{BD} - 3 - 0.5F_{BC}= - 3 - 0</math> | |||
*<math>1.5 + 0.5F_{BD} - 0.5F_{BC} = 0</math> | |||
==== Rearrange to find an expression for <math>F_{BD}</math> ==== | |||
*<math>0.5F_{BD} = -1.5 + 0.5F_{BC}</math> | |||
*<math>F_{BD} =-3 + F_{BC}</math> | |||
| | | | ||
==== Apply horizontal equilbrium: ==== | |||
* <math>\sum F_x =0</math> | |||
* <math>9\cos{30}+F_{BD}\cos{30} + F_{BC}\cos{30}=0</math> | |||
==== Divide each term by <math>\cos{30}</math>: ==== | |||
* <math>9+F_{BD}+F_{BC}=0</math> | |||
==== Substitute <math>F_{BD} =-3 + F_{BC}</math>: ==== | |||
* <math>9+(-3+F_{BC})+F_{BC}=0</math> | |||
* <math>6+2F_{BC}=0</math> | |||
* <math>F_{BC}=-3kN</math> (compression) | |||
==== Solve for <math>F_{BD}</math>: ==== | |||
* <math>F_{BD}=-3+F_{BC}</math> | |||
* <math>F_{BD}=-3-3=6kN</math> | |||
|} | |} | ||
==== The steps in the algorithm are: ==== | |||
# Draw the free body diagram for the joint. The input variables are: | |||
#* The 9 kN force in member AB that has been previously calculated | |||
#* The 3 kN load on the joint | |||
#* The geometry of the joint in terms of the angles between the members | |||
# The output variables are: <math>F_{BD}</math> and <math>F_{BC}</math> | |||
# Resolve the forces into the <math>x</math> and <math>y</math> directions. | |||
# Write the equation of equilibrium for the <math>x</math> or the <math>y</math> direction. | |||
# Use the rules of algebra to find an expression for one of the output variables (A) in terms of the other output variable (B). | |||
# Write the equation of equilibrium for the other direction. | |||
# Substitute the expression for variable A and solve for the value of variable B | |||
# Back-substitute to get the value of variable A. | |||
==== How do you practise so as to be able to do that? ==== | |||
* You could start by working with examples, exercises, definitions and explanations until you have an understanding of the process. Practise using the algorithm. | |||
* Keep asking questions such as ‘What does that mean?’ ‘How do I do that?’ | |||
* Then work on your memory. Memory should follow understanding. | |||
* Write down the variables and make sure that you know how to assign values to them. | |||
* Write out the algorithm. Make sure that you can do that from memory and that you know how to perform the steps. | |||
* Do not leave anything to the last minute. Few people can cram for understanding; both memorising facts and developing understanding need repetition. | |||
* That is the process that I used as a student. It got me good marks. | |||
Latest revision as of 08:02, 21 May 2021
The term running an algorithmis used here to mean doing a set of calculations:
What do you need to know to run an algorithm in an examination?
- You need to understand the meanings of all variables to an extent that you are able to assign correct values to them.
- You need to be able to write down the steps in the algorithm.
- You need to be able to run the algorithm.
For example, here's a 'run' of the algorithm for solving for the forces at joint B in the Nodal Analysis key example:
| Isolate Joint B | |
|---|---|
| |
Apply vertical equilibrium:Substitute for:Rearrange to find an expression for |
Apply horizontal equilbrium:Divide each term by :Substitute :
Solve for : |
The steps in the algorithm are:
- Draw the free body diagram for the joint. The input variables are:
- The 9 kN force in member AB that has been previously calculated
- The 3 kN load on the joint
- The geometry of the joint in terms of the angles between the members
- The output variables are: and
- Resolve the forces into the and directions.
- Write the equation of equilibrium for the or the direction.
- Use the rules of algebra to find an expression for one of the output variables (A) in terms of the other output variable (B).
- Write the equation of equilibrium for the other direction.
- Substitute the expression for variable A and solve for the value of variable B
- Back-substitute to get the value of variable A.
How do you practise so as to be able to do that?
- You could start by working with examples, exercises, definitions and explanations until you have an understanding of the process. Practise using the algorithm.
- Keep asking questions such as ‘What does that mean?’ ‘How do I do that?’
- Then work on your memory. Memory should follow understanding.
- Write down the variables and make sure that you know how to assign values to them.
- Write out the algorithm. Make sure that you can do that from memory and that you know how to perform the steps.
- Do not leave anything to the last minute. Few people can cram for understanding; both memorising facts and developing understanding need repetition.
- That is the process that I used as a student. It got me good marks.

