// Numbas version: finer_feedback_settings {"name": "Chapter 1 Exercises", "metadata": {"description": "

Example exercise for Eng Fun Textbook

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Force Calculations", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": [""], "variable_overrides": [[]], "questions": [{"name": "Forces in equilibrium 1", "extensions": ["geogebra", "quantities"], "custom_part_types": [{"source": {"pk": 19, "author": {"name": "William Haynes", "pk": 2530}, "edit_page": "/part_type/19/edit"}, "name": "Engineering Accuracy with units", "short_name": "engineering-answer", "description": "

A value with units marked right if within an adjustable % error of the correct value.  Marked close if within a wider margin of error.

", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "siground(settings['correctAnswer'],4)", "hint": {"static": true, "value": ""}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\nswitch( \n right and good_units and right_sign, add_credit(1.0,'Correct.'),\n right and good_units and not right_sign, add_credit(settings['C2'],'Wrong sign.'),\n right and right_sign and not good_units, add_credit(settings['C2'],'Correct value, but wrong or missing units.'),\n close and good_units, add_credit(settings['C1'],'Close.'),\n close and not good_units, add_credit(settings['C3'],'Answer is close, but wrong or missing units.'),\n incorrect('Wrong answer.')\n)\n\n\ninterpreted_answer:\nqty(student_scalar, student_units)\n\n\n\ncorrect_quantity:\nsettings[\"correctAnswer\"]\n\n\n\ncorrect_units:\nunits(correct_quantity)\n\n\nallowed_notation_styles:\n[\"plain\",\"en\"]\n\nmatch_student_number:\nmatchnumber(studentAnswer,allowed_notation_styles)\n\nstudent_scalar:\nmatch_student_number[1]\n\nstudent_units:\nreplace_regex('ohms','ohm',\n replace_regex('\u00b0', ' deg',\n replace_regex('-', ' ' ,\n studentAnswer[len(match_student_number[0])..len(studentAnswer)])),\"i\")\n\ngood_units:\ntry(\ncompatible(quantity(1, student_units),correct_units),\nmsg,\nfeedback(msg);false)\n\n\nstudent_quantity:\nswitch(not good_units, \n student_scalar * correct_units, \n not right_sign,\n -quantity(student_scalar, student_units),\n quantity(student_scalar,student_units)\n)\n \n\n\npercent_error:\ntry(\nscalar(abs((correct_quantity - student_quantity)/correct_quantity))*100 \n,msg,\nif(student_quantity=correct_quantity,0,100))\n \n\nright:\npercent_error <= settings['right']\n\n\nclose:\nright_sign and percent_error <= settings['close']\n\nright_sign:\nsign(student_scalar) = sign(correct_quantity)", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "switch( \n right and good_units and right_sign, add_credit(1.0,'Correct.'),\n right and good_units and not right_sign, add_credit(settings['C2'],'Wrong sign.'),\n right and right_sign and not good_units, add_credit(settings['C2'],'Correct value, but wrong or missing units.'),\n close and good_units, add_credit(settings['C1'],'Close.'),\n close and not good_units, add_credit(settings['C3'],'Answer is close, but wrong or missing units.'),\n incorrect('Wrong answer.')\n)\n"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "qty(student_scalar, student_units)\n\n"}, {"name": "correct_quantity", "description": "", "definition": "settings[\"correctAnswer\"]\n\n"}, {"name": "correct_units", "description": "", "definition": "units(correct_quantity)\n"}, {"name": "allowed_notation_styles", "description": "", "definition": "[\"plain\",\"en\"]"}, {"name": "match_student_number", "description": "", "definition": "matchnumber(studentAnswer,allowed_notation_styles)"}, {"name": "student_scalar", "description": "", "definition": "match_student_number[1]"}, {"name": "student_units", "description": "

Modify the unit portion of the student's answer by

\n

1. replacing \"ohms\" with \"ohm\"  case insensitive

\n

2. replacing '-' with ' ' 

\n

3. replacing '°' with ' deg' 

\n

to allow answers like 10 ft-lb and 30°

", "definition": "replace_regex('ohms','ohm',\n replace_regex('\u00b0', ' deg',\n replace_regex('-', ' ' ,\n studentAnswer[len(match_student_number[0])..len(studentAnswer)])),\"i\")"}, {"name": "good_units", "description": "", "definition": "try(\ncompatible(quantity(1, student_units),correct_units),\nmsg,\nfeedback(msg);false)\n"}, {"name": "student_quantity", "description": "

This fixes the student answer for two common errors.  

\n

If student_units are wrong  - replace with correct units

\n

If student_scalar has the wrong sign - replace with right sign

\n

If student makes both errors, only one gets fixed.

", "definition": "switch(not good_units, \n student_scalar * correct_units, \n not right_sign,\n -quantity(student_scalar, student_units),\n quantity(student_scalar,student_units)\n)\n \n"}, {"name": "percent_error", "description": "", "definition": "try(\nscalar(abs((correct_quantity - student_quantity)/correct_quantity))*100 \n,msg,\nif(student_quantity=correct_quantity,0,100))\n "}, {"name": "right", "description": "", "definition": "percent_error <= settings['right']\n"}, {"name": "close", "description": "

Only marked close if the student actually has the right sign.

", "definition": "right_sign and percent_error <= settings['close']"}, {"name": "right_sign", "description": "", "definition": "sign(student_scalar) = sign(correct_quantity) "}], "settings": [{"name": "correctAnswer", "label": "Correct Quantity.", "help_url": "", "hint": "The correct answer given as a JME quantity.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "right", "label": "% Accuracy for right.", "help_url": "", "hint": "Question will be considered correct if the scalar part of the student's answer is within this % of correct value.", "input_type": "code", "default_value": "0.2", "evaluate": true}, {"name": "close", "label": "% Accuracy for close.", "help_url": "", "hint": "Question will be considered close if the scalar part of the student's answer is within this % of correct value.", "input_type": "code", "default_value": "1.0", "evaluate": true}, {"name": "C1", "label": "Close with units.", "help_url": "", "hint": "Partial Credit for close value with appropriate units.  if correct answer is 100 N and close is ±1%,
99  N is accepted.", "input_type": "percent", "default_value": "75"}, {"name": "C2", "label": "No units or wrong sign", "help_url": "", "hint": "Partial credit for forgetting units or using wrong sign.
If the correct answer is 100 N, both 100 and -100 N are accepted.", "input_type": "percent", "default_value": "50"}, {"name": "C3", "label": "Close, no units.", "help_url": "", "hint": "Partial Credit for close value but forgotten units.
This value would be close if the expected units were provided.  If the correct answer is 100 N, and close is ±1%,
99 is accepted.", "input_type": "percent", "default_value": "25"}], "public_availability": "always", "published": true, "extensions": ["quantities"]}], "resources": [["question-resources/Fig1.svg", "/srv/numbas/media/question-resources/Fig1.svg"], ["question-resources/Fig2.svg", "/srv/numbas/media/question-resources/Fig2.svg"], ["question-resources/Fig3.svg", "/srv/numbas/media/question-resources/Fig3.svg"], ["question-resources/Fig3_c0nPdDi.svg", "/srv/numbas/media/question-resources/Fig3_c0nPdDi.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Andrew Burkert", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/19802/"}], "tags": [], "metadata": {"description": "

First question on forces in equilibrium.

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

A load of $W=$ {W} N is suspended from a roof by two cables, A and B.

\n

Cable A makes an angle  $\\theta_1 = $ {theta_1}° with the roof, while cable B makes an angle  $\\theta_2 = $ {theta_2}° with the roof.

\n

{geogebra_applet('cbqunudv',[['angle1',theta_1+'°'],['angle2',theta_2+'°'],['W',W]])}

\n

Calculate the magnitude of the tension in cables A and B.

", "advice": "

Worked Solution

\n

Given values:

\n

$W = \\var{W}$ N, $\\theta_1 = \\var{theta_1}°$, and $\\theta_2 = \\var{theta_2}°$, 

\n

\n

The solution using a force triangle is as follows:

\n

{geogebra_applet('ncuhpcre',[['angle1',theta_2+'°'],['angle2',theta_1+'°']])}

\n

$\\begin{align}
\\frac{T_A}{sin\\ (90^\\circ-\\theta_2)}&=\\frac{W}{sin\\ (\\theta_1+\\theta_2)} & \\frac{T_B}{sin\\ (90^\\circ-\\theta_1)}&=\\frac{W}{sin\\ (\\theta_1+\\theta_2)}\\\\\\\\ T_A&=W\\frac{sin\\ (90^\\circ-\\theta_2)}{sin\\ (\\theta_1+\\theta_2)} & T_B&=W\\frac{sin\\ (90^\\circ-\\theta_1)}{sin\\ (\\theta_1+\\theta_2)}\\\\
T_A&=\\var{W}\\ \\frac{sin\\ (90^\\circ-\\var{theta_2}^\\circ)}{sin\\ (\\var{theta_1}^\\circ+\\var{theta_2}^\\circ)} & T_B&=\\var{W}\\ \\frac{sin\\ (90^\\circ-\\var{theta_1}^\\circ)}{sin\\ (\\var{theta_1}^\\circ+\\var{theta_2})^\\circ}\\\\
T_A&=\\var{T_A} \\  \\var{unit} & T_B&=\\var{T_B} \\ \\var{unit}
\\end{align}$

\n

\n

The solution using components is as follows:

\n

{geogebra_applet('rzbj2sxt',[['angle1',theta_1+'°'],['angle2',theta_2+'°'],['W',W]])}

\n

Since the system is in equilibrium, we can say:

\n

$\\begin{align}
\\Sigma_x &=0  &&&  \\Sigma_y =0 &\\\\
T_Bcos\\theta_2 -T_Acos\\theta_1&=0  & (1) && T_Asin\\theta_1 +T_Bsin\\theta_2-W=0 && (2)\\\\
\\end{align}$

\n

Solve for $T_A$ and $T_B$ using simultaneous equations.

\n

Rearranging (1)

\n

 $\\begin{align}T_B&=\\frac{T_Acos\\theta_1}{cos\\theta_2} =T_A\\frac{cos\\theta_1}{cos\\theta_2}&   (3) \\\\ \\end{align}$

\n

Substitute (3) into (2)

\n

$\\begin{align}
T_Asin\\theta_1+T_A\\frac{cos\\theta_1}{cos\\theta_2}sin\\theta_2 -W &=0\\\\
T_A \\left(sin\\theta_1+\\frac{cos\\theta_1}{cos\\theta_2}sin\\theta_2\\right)-W&=0\\\\
T_A&=\\frac{W}{ \\left(sin\\theta_1+\\frac{cos\\theta_1}{cos\\theta_2}sin\\theta_2\\right)}\\\\
T_A&=\\frac{\\var{W}}{ \\left(sin\\ \\var{theta_1}^\\circ+\\frac{cos\\ \\var{theta_1}^\\circ}{cos\\ \\var{theta_2}^\\circ}sin\\ \\var{theta_2}^\\circ\\right)}\\\\
T_A&=\\var{T_A} \\  \\var{unit}
\\end{align}$

\n

Substitute the value of $T_A$ into (3) to find $T_B$

\n

$\\begin{align}
T_B&=T_A\\frac{cos\\theta_1}{cos\\theta_2}\\\\
T_B&=\\var{T_A}\\ \\frac{cos\\ \\var{theta_1}^\\circ}{cos\\ \\var{theta_2}^\\circ}\\\\
T_B&=\\var{T_B} \\ \\var{unit}
\\end{align}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"theta_1": {"name": "theta_1", "group": "Inputs", "definition": "random(65 .. 75#1)", "description": "", "templateType": "randrange", "can_override": false}, "base_angle": {"name": "base_angle", "group": "Inputs", "definition": "random(70 .. 85#1)", "description": "", "templateType": "randrange", "can_override": false}, "theta_2": {"name": "theta_2", "group": "Inputs", "definition": "180-theta_1-base_angle", "description": "", "templateType": "anything", "can_override": false}, "W": {"name": "W", "group": "Inputs", "definition": "random(100 .. 150#10)", "description": "", "templateType": "randrange", "can_override": false}, "T_A": {"name": "T_A", "group": "Outputs", "definition": "siground(W*sin(radians(90-theta_2))/sin(radians(theta_1+theta_2)),3)", "description": "", "templateType": "anything", "can_override": false}, "unit": {"name": "unit", "group": "Ungrouped variables", "definition": "\"N\"", "description": "", "templateType": "string", "can_override": false}, "T_B": {"name": "T_B", "group": "Outputs", "definition": "siground(W*sin(radians(90-theta_1))/sin(radians(theta_1+theta_2)),3)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["unit"], "variable_groups": [{"name": "Inputs", "variables": ["base_angle", "theta_1", "theta_2", "W"]}, {"name": "Outputs", "variables": ["T_A", "T_B"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "information", "useCustomName": true, "customName": "Choose solution method", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Solve using a vector diagram", "rawLabel": "", "otherPart": 1, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "Solve using components", "rawLabel": "", "otherPart": 2, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Choose the method you want to use to solve this problem

"}, {"type": "information", "useCustomName": true, "customName": "Solve using a vector diagram", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "See the free-body diagram", "rawLabel": "", "otherPart": 3, "variableReplacements": [], "availabilityCondition": "", "penalty": "Viewing free-body diagram", "penaltyAmount": "1", "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "My solution using a force triangle", "rawLabel": "", "otherPart": 4, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

This is the easier method to use for this problem.

\n

You will need to draw a free-body diagram for the point where the three cables join.

\n

From this you need to draw a vector diagram.

\n

The vector diagram will be a closed force triangle.

\n

You can then use the sine rule to calculate the tension in each of the cables.

"}, {"type": "information", "useCustomName": true, "customName": "Solve using components", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "See the free-body diagram", "rawLabel": "", "otherPart": 3, "variableReplacements": [], "availabilityCondition": "", "penalty": "Viewing free-body diagram", "penaltyAmount": "1", "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "My solution using components", "rawLabel": "", "otherPart": 7, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

This is the harder method to use for this problem as you will need to use simultaneous equations.

\n

You will need to draw a free-body diagram for the point where the three cables join, establishing a coordinate system indicating the directions of the forces.

\n

The coordinate system normally has the origin at the point where the cables meet and a horizontal $x$ axis and a vertical $y$ axis

\n

You can then use the equations for the equilibrium of concurrent forces to solve the problem:

\n

$\\Sigma F_x=0$ and $\\Sigma F_y=0$

"}, {"type": "information", "useCustomName": true, "customName": "See the free-body diagram", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Let $W$ be the weight of the load, $T_A$ be the tension in cable A, and $T_B$ be in the tension in cable B.

\n

Let $\\theta_1$ and $\\theta_2$ be the angles cable A and cable B make to the horizonal respectively. These are the same as the angles the cables make with the roof as they are alternate angles.

\n

Your free-body dagram should look like this:

\n

{geogebra_applet('rzbj2sxt',[['angle1',theta_1+'°'],['angle2',theta_2+'°'],['W',W]])}

"}, {"type": "gapfill", "useCustomName": true, "customName": "My solution using a force triangle", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "See the force triangle", "rawLabel": "", "otherPart": 6, "variableReplacements": [], "availabilityCondition": "", "penalty": "Viewing the force triangle", "penaltyAmount": "1", "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "See method for solving by force triangle", "rawLabel": "", "otherPart": 5, "variableReplacements": [], "availabilityCondition": "", "penalty": "Viewing the method", "penaltyAmount": "1", "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

From your force triangle, use the sine rule to calculate the tension in each cable.

\n

Enter your solution to 3 sf and include units.

\n

$T_{A}$ = [[0]]

\n

$T_{B}$ = [[1]]

\n

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "Tension in cable A", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Tension in cable A", "settings": {"correctAnswer": "qty(t_a, unit)", "right": "0.5", "close": "5", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "Tension in cable B", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Tension in cable B", "settings": {"correctAnswer": "qty(t_b, unit)", "right": "0.5", "close": "5", "C1": "75", "C2": "50", "C3": "25"}}], "sortAnswers": false}, {"type": "information", "useCustomName": true, "customName": "See method for solving by force triangle", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

The sine rule $\\frac{a}{sin\\ A}=\\frac{b}{sin\\ B}=\\frac{c}{sin\\ C}$ can be used twice in your force triangle to find the tension in each of the cables.

\n

{geogebra_applet('dweqdfpv',[['angle1',theta_2+'°'],['angle2',theta_1+'°']])}

\n

$\\begin{align}
\\frac{T_A}{sin\\ (90^\\circ-\\theta_2)}&=\\frac{W}{sin\\ (\\theta_1+\\theta_2)} & \\frac{T_B}{sin\\ (90^\\circ-\\theta_1)}&=\\frac{W}{sin\\ (\\theta_1+\\theta_2)}\\\\\\\\ T_A&=W\\frac{sin\\ (90^\\circ-\\theta_2)}{sin\\ (\\theta_1+\\theta_2)} & T_B&=W\\frac{sin\\ (90^\\circ-\\theta_1)}{sin\\ (\\theta_1+\\theta_2)}\\\\\\\\
\\end{align}$

"}, {"type": "information", "useCustomName": true, "customName": "See the force triangle", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

We draw the force triangle by drawing each of the three forces in the free-body diagram in turn. The tail of each force vector should join the head of the previous vector. As the forces are in equilibrium, the final diagram will be a closed triangle. 

\n

Your force triangle should look like this if you have drawn the vectors in the order $W$, $T_B$, and $T_A$.

\n

{geogebra_applet('ncuhpcre',[['angle1',theta_2+'°'],['angle2',theta_1+'°']])}

\n

If you need help on how to construct the force triangle click on the <- button on the diagram and then use the the >> button to step through the construction process as shown below.

\n
    \n
  1. Start by placing point A at your origin.
  2. \n
  3. Draw force $W$ straight down from point A with an appropriate length, and place point B at its tip. The length of this vector represents the weight.
  4. \n
  5. We know the direction of the tension force $T_B$ but not its magnitude. For now, just draw a line passing through point B with an angle of {theta_2}° above the horizontal.
  6. \n
  7. Similarly we know the direction of the tension force $T_A$. So draw another line passing through point A with an angle of {theta_1}° below the horizontal.
  8. \n
  9. Call the point where the two lines intersect, C. Points A, B and C now define the force triangle.
  10. \n
  11. Draw the tension force $T_B$ from point B to point C.
  12. \n
  13. Draw the tension force $T_A$ from point C back to point A.
  14. \n
  15. Determine angle A ($\\angle A$ = 90°-{theta_1}° = {90-theta_1}°) 
  16. \n
  17. Determine angle B ($\\angle B$ = 90°-{theta_2}° = {90-theta_2}°) 
  18. \n
  19. Determine angle C ($\\angle C$ = {theta_1}°+{theta_2}° = {theta_1+theta_2}°)
  20. \n
\n
    \n

    "}, {"type": "gapfill", "useCustomName": true, "customName": "My solution using components", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "See method for solving by components", "rawLabel": "", "otherPart": 8, "variableReplacements": [], "availabilityCondition": "", "penalty": "Viewing the method", "penaltyAmount": "1", "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

    From your free-body diagram, use simultaneous equations to calculate the tension in each cable.

    \n

    Enter your solution to 3 sf and include units.

    \n

    $T_{A}$ = [[0]]

    \n

    $T_{B}$ = [[1]]

    ", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "Tension in cable A", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Tension in cable A", "settings": {"correctAnswer": "qty(t_a, unit)", "right": "0.5", "close": "5", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "Tension in cable B", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Tension in cable B", "alternatives": [{"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "settings": {"correctAnswer": "qty(t_b, unit)", "right": "0.5", "close": "5", "C1": "75", "C2": "50", "C3": "25"}}], "settings": {"correctAnswer": "qty(t_b, unit)", "right": "0.5", "close": "5", "C1": "75", "C2": "50", "C3": "25"}}], "sortAnswers": false}, {"type": "information", "useCustomName": true, "customName": "See method for solving by components", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

    {geogebra_applet('rzbj2sxt',[['angle1',theta_1+'°'],['angle2',theta_2+'°'],['W',W]])}

    \n

    Since the system is in equilibrium, we can say:

    \n

    $\\begin{align}
    \\Sigma_x &=0  &&&  \\Sigma_y =0 &\\\\
    T_Bcos\\theta_2 -T_Acos\\theta_1&=0  & (1) && T_Asin\\theta_1 +T_Bsin\\theta_2-W=0 && (2)\\\\
    \\end{align}$

    \n

    Solve for $T_A$ and $T_B$ using simultaneous equations.

    \n

    Rearranging (1)

    \n

     $\\begin{align}T_B&=\\frac{T_Acos\\theta_1}{cos\\theta_2} =T_A\\frac{cos\\theta_1}{cos\\theta_2}&   (3) \\\\ \\end{align}$

    \n

    Substitute (3) into (2)

    \n

    $\\begin{align}
    T_Asin\\theta_1+T_A\\frac{cos\\theta_1}{cos\\theta_2}sin\\theta_2 -W &=0\\\\
    T_A \\left(sin\\theta_1+\\frac{cos\\theta_1}{cos\\theta_2}sin\\theta_2\\right)-W&=0\\\\
    T_A&=\\frac{W}{ \\left(sin\\theta_1+\\frac{cos\\theta_1}{cos\\theta_2}sin\\theta_2\\right)}
    \\end{align}$

    \n

    Substitute the value of $T_A$ into (3) to find $T_B$

    \n

    "}], "partsMode": "explore", "maxMarks": "8", "objectives": [{"name": "Tension in cable A", "limit": "4"}, {"name": "Tension in cable B", "limit": "4"}], "penalties": [{"name": "Viewing free-body diagram", "limit": "1"}, {"name": "Viewing the force triangle", "limit": "1"}, {"name": "Viewing the method", "limit": "1"}], "objectiveVisibility": "when-active", "penaltyVisibility": "when-active", "type": "question"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": true, "showresultspage": "oncompletion", "navigatemode": "menu", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "end_message": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": [], "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "inreview"}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "type": "exam", "contributors": [{"name": "Andrew Burkert", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/19802/"}], "extensions": ["geogebra", "quantities"], "custom_part_types": [{"source": {"pk": 19, "author": {"name": "William Haynes", "pk": 2530}, "edit_page": "/part_type/19/edit"}, "name": "Engineering Accuracy with units", "short_name": "engineering-answer", "description": "

    A value with units marked right if within an adjustable % error of the correct value.  Marked close if within a wider margin of error.

    ", "help_url": "", "input_widget": "string", "input_options": {"correctAnswer": "siground(settings['correctAnswer'],4)", "hint": {"static": true, "value": ""}, "allowEmpty": {"static": true, "value": true}}, "can_be_gap": true, "can_be_step": true, "marking_script": "mark:\nswitch( \n right and good_units and right_sign, add_credit(1.0,'Correct.'),\n right and good_units and not right_sign, add_credit(settings['C2'],'Wrong sign.'),\n right and right_sign and not good_units, add_credit(settings['C2'],'Correct value, but wrong or missing units.'),\n close and good_units, add_credit(settings['C1'],'Close.'),\n close and not good_units, add_credit(settings['C3'],'Answer is close, but wrong or missing units.'),\n incorrect('Wrong answer.')\n)\n\n\ninterpreted_answer:\nqty(student_scalar, student_units)\n\n\n\ncorrect_quantity:\nsettings[\"correctAnswer\"]\n\n\n\ncorrect_units:\nunits(correct_quantity)\n\n\nallowed_notation_styles:\n[\"plain\",\"en\"]\n\nmatch_student_number:\nmatchnumber(studentAnswer,allowed_notation_styles)\n\nstudent_scalar:\nmatch_student_number[1]\n\nstudent_units:\nreplace_regex('ohms','ohm',\n replace_regex('\u00b0', ' deg',\n replace_regex('-', ' ' ,\n studentAnswer[len(match_student_number[0])..len(studentAnswer)])),\"i\")\n\ngood_units:\ntry(\ncompatible(quantity(1, student_units),correct_units),\nmsg,\nfeedback(msg);false)\n\n\nstudent_quantity:\nswitch(not good_units, \n student_scalar * correct_units, \n not right_sign,\n -quantity(student_scalar, student_units),\n quantity(student_scalar,student_units)\n)\n \n\n\npercent_error:\ntry(\nscalar(abs((correct_quantity - student_quantity)/correct_quantity))*100 \n,msg,\nif(student_quantity=correct_quantity,0,100))\n \n\nright:\npercent_error <= settings['right']\n\n\nclose:\nright_sign and percent_error <= settings['close']\n\nright_sign:\nsign(student_scalar) = sign(correct_quantity)", "marking_notes": [{"name": "mark", "description": "This is the main marking note. It should award credit and provide feedback based on the student's answer.", "definition": "switch( \n right and good_units and right_sign, add_credit(1.0,'Correct.'),\n right and good_units and not right_sign, add_credit(settings['C2'],'Wrong sign.'),\n right and right_sign and not good_units, add_credit(settings['C2'],'Correct value, but wrong or missing units.'),\n close and good_units, add_credit(settings['C1'],'Close.'),\n close and not good_units, add_credit(settings['C3'],'Answer is close, but wrong or missing units.'),\n incorrect('Wrong answer.')\n)\n"}, {"name": "interpreted_answer", "description": "A value representing the student's answer to this part.", "definition": "qty(student_scalar, student_units)\n\n"}, {"name": "correct_quantity", "description": "", "definition": "settings[\"correctAnswer\"]\n\n"}, {"name": "correct_units", "description": "", "definition": "units(correct_quantity)\n"}, {"name": "allowed_notation_styles", "description": "", "definition": "[\"plain\",\"en\"]"}, {"name": "match_student_number", "description": "", "definition": "matchnumber(studentAnswer,allowed_notation_styles)"}, {"name": "student_scalar", "description": "", "definition": "match_student_number[1]"}, {"name": "student_units", "description": "

    Modify the unit portion of the student's answer by

    \n

    1. replacing \"ohms\" with \"ohm\"  case insensitive

    \n

    2. replacing '-' with ' ' 

    \n

    3. replacing '°' with ' deg' 

    \n

    to allow answers like 10 ft-lb and 30°

    ", "definition": "replace_regex('ohms','ohm',\n replace_regex('\u00b0', ' deg',\n replace_regex('-', ' ' ,\n studentAnswer[len(match_student_number[0])..len(studentAnswer)])),\"i\")"}, {"name": "good_units", "description": "", "definition": "try(\ncompatible(quantity(1, student_units),correct_units),\nmsg,\nfeedback(msg);false)\n"}, {"name": "student_quantity", "description": "

    This fixes the student answer for two common errors.  

    \n

    If student_units are wrong  - replace with correct units

    \n

    If student_scalar has the wrong sign - replace with right sign

    \n

    If student makes both errors, only one gets fixed.

    ", "definition": "switch(not good_units, \n student_scalar * correct_units, \n not right_sign,\n -quantity(student_scalar, student_units),\n quantity(student_scalar,student_units)\n)\n \n"}, {"name": "percent_error", "description": "", "definition": "try(\nscalar(abs((correct_quantity - student_quantity)/correct_quantity))*100 \n,msg,\nif(student_quantity=correct_quantity,0,100))\n "}, {"name": "right", "description": "", "definition": "percent_error <= settings['right']\n"}, {"name": "close", "description": "

    Only marked close if the student actually has the right sign.

    ", "definition": "right_sign and percent_error <= settings['close']"}, {"name": "right_sign", "description": "", "definition": "sign(student_scalar) = sign(correct_quantity) "}], "settings": [{"name": "correctAnswer", "label": "Correct Quantity.", "help_url": "", "hint": "The correct answer given as a JME quantity.", "input_type": "code", "default_value": "", "evaluate": true}, {"name": "right", "label": "% Accuracy for right.", "help_url": "", "hint": "Question will be considered correct if the scalar part of the student's answer is within this % of correct value.", "input_type": "code", "default_value": "0.2", "evaluate": true}, {"name": "close", "label": "% Accuracy for close.", "help_url": "", "hint": "Question will be considered close if the scalar part of the student's answer is within this % of correct value.", "input_type": "code", "default_value": "1.0", "evaluate": true}, {"name": "C1", "label": "Close with units.", "help_url": "", "hint": "Partial Credit for close value with appropriate units.  if correct answer is 100 N and close is ±1%,
    99  N is accepted.", "input_type": "percent", "default_value": "75"}, {"name": "C2", "label": "No units or wrong sign", "help_url": "", "hint": "Partial credit for forgetting units or using wrong sign.
    If the correct answer is 100 N, both 100 and -100 N are accepted.", "input_type": "percent", "default_value": "50"}, {"name": "C3", "label": "Close, no units.", "help_url": "", "hint": "Partial Credit for close value but forgotten units.
    This value would be close if the expected units were provided.  If the correct answer is 100 N, and close is ±1%,
    99 is accepted.", "input_type": "percent", "default_value": "25"}], "public_availability": "always", "published": true, "extensions": ["quantities"]}], "resources": [["question-resources/Fig1.svg", "/srv/numbas/media/question-resources/Fig1.svg"], ["question-resources/Fig2.svg", "/srv/numbas/media/question-resources/Fig2.svg"], ["question-resources/Fig3.svg", "/srv/numbas/media/question-resources/Fig3.svg"], ["question-resources/Fig3_c0nPdDi.svg", "/srv/numbas/media/question-resources/Fig3_c0nPdDi.svg"]]}