// Numbas version: exam_results_page_options {"name": "28. Method of Joints", "metadata": {"description": "

Homework set. Find the forces in truss members using the method of joints.

", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", ""], "variable_overrides": [[], [], []], "questions": [{"name": "Truss: Solve a joint", "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": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "William Haynes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2530/"}], "tags": ["equilibrium of a particle", "Mechanics", "mechanics", "method of joints", "Statics", "statics", "truss"], "metadata": {"description": "

This just an equilibrium of a particle problem, but posed in context of a joint as a warm-up for the method of joints.

\n

Advice is brief.

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

{applet}

\n

The diagram shows the free body diagram of a joint in a truss which is supporting a load, $F$. In the FBD the direction (sense) of forces $A$ and $B$ are assumed, so may not be correct.

\n

Given: $F = \\var{qty(magF,unit)}$ and $C = \\var{(qty(abs(magC),unit))}$

\n
    \n
  1. Draw draw a neat, labeled free body diagram representing the situation.
  2. \n
  3. Write two equilibrium equations, symbolically, based on your free body diagram.
  4. \n
  5. Solve your equations to determine the magnitudes of forces $A$ and $B$ necessary for equilibrium.
  6. \n
  7. Indicate whether forces $A$ and $B$ are in tension or compression.
  8. \n
\n

", "advice": "

Draw a free body diagram, then write two equilibrium equations:

\n

$\\Sigma F_x = 0 \\qquad\\Sigma F_y = 0$

\n

Solve them simultaneously for unknown magnitudes $A$ and $B$.

\n

\n

Answers:

\n

$A = \\var{qty(precround(abs(magA),1),unit)}$ {if(magA=0,'',if(magA>0,'Tension','Compression'))}

\n

$B = \\var{qty(precround(abs(magB),1),unit)}$ {if(magB=0,'',if(magB>0,'Tension','Compression'))}

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(30..270#30 except [90,270]) ", "description": "

dirction of force A

", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random([45,135,225,315])", "description": "

direction of force b

", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(0..360#30)", "description": "

direction of force c

", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "Ungrouped variables", "definition": "random(0..270#90)", "description": "

direction of force f

", "templateType": "anything", "can_override": false}, "magF": {"name": "magF", "group": "Ungrouped variables", "definition": "random(100..500#25)", "description": "", "templateType": "anything", "can_override": false}, "MagC": {"name": "MagC", "group": "Ungrouped variables", "definition": "random(50..245#50 except 0)", "description": "", "templateType": "anything", "can_override": false}, "unit": {"name": "unit", "group": "Ungrouped variables", "definition": "'kN'", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "solution", "definition": "-(magC cos(radians(c)) + magF cos(radians(f)))", "description": "", "templateType": "anything", "can_override": false}, "c2": {"name": "c2", "group": "solution", "definition": "-(magC sin(radians(c)) + magF sin(radians(f)))", "description": "", "templateType": "anything", "can_override": false}, "magB": {"name": "magB", "group": "solution", "definition": "(c2-c1 tan(radians(a)))/(-cos(radians(b))tan(radians(a)) + sin(radians(b)))\n", "description": "", "templateType": "anything", "can_override": false}, "magA": {"name": "magA", "group": "solution", "definition": "(c1-magB cos(radians(b)))/cos(radians(a))", "description": "", "templateType": "anything", "can_override": false}, "check_x": {"name": "check_x", "group": "solution", "definition": "precround(magA cos(radians(a)) + magB cos(radians(b)) + magC cos(radians(c)) + magF cos(radians(f)),6)", "description": "", "templateType": "anything", "can_override": false}, "check_y": {"name": "check_y", "group": "solution", "definition": "precround( magA sin(radians(a)) + magB sin(radians(b)) + magC sin(radians(c)) + magF sin(radians(f)),6)", "description": "", "templateType": "anything", "can_override": false}, "applet": {"name": "applet", "group": "Unnamed group", "definition": "geogebra_applet('yaqwabnr', params)\n\n", "description": "", "templateType": "anything", "can_override": false}, "params": {"name": "params", "group": "Unnamed group", "definition": "[a: a+'\u00b0', b: b+'\u00b0', c: c+'\u00b0', f: f+'\u00b0',\n hideA: 'false', hideB: 'false', hideC: 'false', hideF: 'false']\n", "description": "", "templateType": "anything", "can_override": false}, "FF": {"name": "FF", "group": "alternate solution", "definition": "vector(cos(radians(f))\n ,sin(radians(f))) magF", "description": "

Vector F

", "templateType": "anything", "can_override": false}, "FC": {"name": "FC", "group": "alternate solution", "definition": "vector(cos(radians(c)),sin(radians(c))) magC", "description": "

Force C

", "templateType": "anything", "can_override": false}, "FR": {"name": "FR", "group": "alternate solution", "definition": "FF + FC", "description": "

R = F + C

", "templateType": "anything", "can_override": false}, "AmatrixInverse": {"name": "AmatrixInverse", "group": "alternate solution", "definition": "matrix([sin(radians(b)), - cos(radians(b))],[-sin(radians(a)),cos(radians(a))])/det(Amatrix)", "description": "

used for matrix solution [X] = A^{-1} [B]

", "templateType": "anything", "can_override": false}, "Bmatrix": {"name": "Bmatrix", "group": "alternate solution", "definition": "matrix([[-FR[0]],[-FR[1]]])", "description": "", "templateType": "anything", "can_override": false}, "Amatrix": {"name": "Amatrix", "group": "alternate solution", "definition": "matrix([[cos(radians(a)),cos(radians(b))],[sin(radians(a)),sin(radians(b))]])", "description": "

used for matric solution 

", "templateType": "anything", "can_override": false}, "xMatrix": {"name": "xMatrix", "group": "alternate solution", "definition": "Amatrixinverse Bmatrix", "description": "

[A,B]

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "a <> b and a <> c and a <> f and b<> c and b<> f and c<> f", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "f", "magF", "MagC", "unit"], "variable_groups": [{"name": "solution", "variables": ["c1", "c2", "magB", "magA", "check_x", "check_y"]}, {"name": "Unnamed group", "variables": ["applet", "params"]}, {"name": "alternate solution", "variables": ["FF", "FC", "FR", "AmatrixInverse", "Bmatrix", "Amatrix", "xMatrix"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Answers", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "


$A=$[[0]] [[1]]

$B=$[[2]] [[3]]

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "Magnitude of A", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "abs(qty(magA,unit))", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "T or C", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Tension", "Compression", "Neither"], "matrix": ["if(sign(magA) > 0,5,0)", "if(sign(magA) < 0,5,0)", "if(sign(magA) = 0,5,0)"], "distractors": ["", "", ""]}, {"type": "engineering-answer", "useCustomName": true, "customName": "Magnitude of B", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "abs(qty(magB,unit))", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "T or C", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Tension", "Compression", "Neither"], "matrix": ["if(sign(magB) > 0,5,0)", "if(sign(magB) < 0,5,0)", "if(sign(magB) = 0,5,0)"], "distractors": ["", "", ""]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Truss: Method of Joints", "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": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "William Haynes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2530/"}], "tags": ["Equilibrium", "equilibrium", "Mechanics", "mechanics", "method of joints", "Rigid Body", "rigid body", "statics", "Statics", "truss"], "metadata": {"description": "

Find the forces in the members of a truss using the method of joints.

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

{applet}

\n

Determine the forces in all members of the truss shown when loaded with two forces:  $F_B = \\var{magB}$ and $F_C = \\var{magC}$.  For each member, indicate tension or compression.

", "advice": "

Find the reactions:

\n
    \n
  1. Draw a free body diagram of the entire truss.
  2. \n
  3. Get scalar components of loads $\\mathbf{B}$ and $\\mathbf{C}$ for later use.\n

    $\\begin{align}\\\\ B_x &= \\var{display(qty(vecB[0],units))} & B_y &= \\var{display(qty(vecB[1],units))}\\\\C_x &= \\var{display(qty(vecC[0],units))} & C_y &= \\var{display(qty(vecC[1],units))}\\end{align}$

    \n
  4. \n
  5. Take moments at $A$ to find reactions at $D$.  Note 1-2-$\\sqrt{3}$ triangle.  \n

    $\\begin{align}\\\\ \\Sigma M_A &= 0\\\\  2\\sqrt{3} \\,D &= \\var{if(sign(vecB[0])=-1,'– ','')} 1\\, B_x +  \\var{if(sign(vecB[1])=1,'– ','')} \\sqrt{3}\\, B_y + \\sqrt{3}\\,C \\\\  D &=  \\dfrac{ \\var{if(sign(vecB[0])=-1,'– ','')} B_x}{2\\sqrt{3}}   + \\dfrac{\\var{if(sign(vecB[1])=1,'– ','')}\\, B_y }{2} + \\dfrac{C }{2}\\\\D&= \\dfrac{1}{2}\\left(\\dfrac{ \\var{precround(vecB[0],1)} }{\\sqrt{3}} + \\var{precround( - vecB[1],1) } + \\var{scalar(magC)} \\right)&= \\var{display(magD)}\\text{ up.}\\end{align}$ 

    \n
  6. \n
  7. Apply $\\Sigma F_x$ and $\\Sigma F_y $ equations to get the components of the reaction force at $A$.\n

    $\\begin{align} \\\\\\Sigma F_x &= 0\\\\ A_x &= B_x \\\\ &= \\var{display(qty(abs(vecA[0]),units))}\\quad \\var{if(sign(vecA[0])=1,'to the right.','to the left.')} \\end{align}$ 

    \n

    $\\begin{align} \\\\\\Sigma F_y &= 0\\\\ A_y &= C_y - D_y + B_y  \\\\ A_y &= \\simplify[!collectNumbers]{{siground(-VecC[1],5)} + {siground(-VecD[1],5)} + {siground(-vecB[1],5)}} \\\\ &= \\var{display(qty(abs(vecA[1]),units))} \\quad \\var{if(sign(vecA[1])=1,'up.','down.')} \\end{align}$ 

    \n
  8. \n
\n

Analyze the joints:

\n
    \n
  1. Draw a FBDs of the joints showing your assumed directions for the forces in the members.  Members in tension pull away from the joint, compression push towards the joint.\n

       {geogebra_applet('menecfet',[['α',alpha+'°'],['FB','\"'+\"B = \" + string(magB)+'\"'],['FC', '\"'+\"C = \" + string(magC)+'\"'],['FD', '\"'+\"D = \" + display(magD)+'\"'],['FAx', '\"'+\"A_x = \" + display(qty(-vecA[0],units))+'\"'],['FAy', '\"'+\"A_y = \" + display(qty(vecA[1],units))+ '\"']])}

    \n
  2. \n
  3. Pick a joint with two unknowns, joint $D$ for example.  Joint $A$ would also work.
  4. \n
  5. Apply equations of equilibrium to joint $D$ to find forces in members $BD$ and $CD$.\n

    $\\begin{align}\\\\D: \\Sigma F_y  &= 0\\\\ BD_y &= D\\\\ BD &= \\dfrac{D}{\\sin 30°}\\\\ &= \\dfrac{\\var{display(magD)}}{0.5}\\\\ &= \\var{display(BD)} \\quad \\text{Compression.}\\end{align}$

    \n

    $\\begin{align}\\\\D: \\Sigma F_x &= 0\\\\ CD &=BD_x\\\\ &= BD \\cos 30° \\\\&=   \\var{display(BD)}  \\cos 30° \\\\&= \\var{display(CD)} \\quad \\text{Tension.}\\end{align} $

    \n
  6. \n
  7. Move to an adjacent joint with two unknowns, joint $C$ in this case.  Joint $C$ is a special case.\n

    $\\begin{align}\\\\ C: \\Sigma F_y &= 0\\\\BC &= C\\\\ &= \\var{display(BC)} \\quad \\text{Tension.}\\end{align}$ 

    \n

    $\\begin{align}\\\\ C: \\Sigma F_x &= 0\\\\AC &= CD\\\\ &= \\var{display(AC)} \\quad \\text{Tension.}\\end{align}$

    \n
  8. \n
  9. \n

    Move to joint $B$ and solve for $AB$.

    \n

    $B: \\Sigma F_y=0$

    \n

    $-AB_y  - BC + BD_y \\, \\mathbf{\\var{if(sign(vecB[1])=1,'+','–')}}\\, B_y = 0$

    \n

    $AB_y= \\var{vecC[1]} + \\var{precround(vecD[1],1)} \\, \\var{if(sign(vecB[1])=-1,'','+')} \\, \\var{precround(vecB[1],1)}= \\var{display(-ABy)}$

    \n

    $\\begin{align}AB &= \\dfrac{AB_y}{\\sin 30°}\\\\ &= \\var{display(-2ABy)}\\\\ &= \\var{display(AB)} \\var{if(sign(ABy)=-1,' Tension.', ' Compression.')}\\end{align}$

    \n
  10. \n
\n

Check your work:

\n

At this point you should check your work by verifying that joint $A$ is in equilibrium.  If it is not you have made a mistake somewhere above.

\n

$A: \\Sigma F_x \\stackrel{?}{=}  0$

\n

$-A_x + AB_x + AC = \\var{precround(vecA[0],1)}+ \\var{precround(-vecAB[0],1) } + \\var{precround(-vecCD[0],1) } =  \\var{vecA[0] -vecAB[0] - vecCD[0]}$

\n

{if((vecA[0] -vecAB[0] - vecCD[0]) = 0,'Check!', if((vecA[0] -vecAB[0] - vecCD[0]) < 0.00001, 'Close Enough', 'Something is wrong.'))}

\n

$A: \\Sigma F_y \\stackrel{?}{=}  0$

\n

$A_y + AB_y = \\var{precround(vecA[1],1)}+ \\var{precround(-vecAB[1],1) } = \\var{vecA[1] -vecAB[1]}$

\n

{if((vecA[1] -vecAB[1]) = 0,'Check!', if((vecA[1] -vecAB[1]) < 0.00001, 'Close Enough', 'Something is wrong.'))}

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"ABy": {"name": "ABy", "group": "force in members", "definition": "qty(vecAB[1],units)", "description": "", "templateType": "anything", "can_override": false}, "vecBD": {"name": "vecBD", "group": "force in members", "definition": "siground(scalar(BD) vector(sqrt(3/2),-0.5),5)", "description": "", "templateType": "anything", "can_override": false}, "r_ab": {"name": "r_ab", "group": "vectors", "definition": "vector(sqrt(3),1,0)", "description": "", "templateType": "anything", "can_override": false}, "vecD": {"name": "vecD", "group": "vectors", "definition": "scalar(magD) vector(0,1,0)", "description": "", "templateType": "anything", "can_override": false}, "BC": {"name": "BC", "group": "force in members", "definition": "magC", "description": "", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "Inputs", "definition": "random('N', 'kN', 'lb')", "description": "", "templateType": "anything", "can_override": false}, "vecC": {"name": "vecC", "group": "vectors", "definition": "scalar(magC)vector(0,-1,0)", "description": "", "templateType": "anything", "can_override": false}, "debug": {"name": "debug", "group": "Inputs", "definition": "false", "description": "", "templateType": "anything", "can_override": false}, "magAx": {"name": "magAx", "group": "quantities", "definition": "qty(abs(vecA[0]),units)", "description": "", "templateType": "anything", "can_override": false}, "magAy": {"name": "magAy", "group": "quantities", "definition": "qty(abs(vecA[1]),units)", "description": "", "templateType": "anything", "can_override": false}, "vecAB": {"name": "vecAB", "group": "force in members", "definition": "-(vecB + vecC + scalar(BD) vector(-cos(radians(30)),sin(radians(30))))", "description": "", "templateType": "anything", "can_override": false}, "vecB": {"name": "vecB", "group": "vectors", "definition": "scalar(magB) vector(cos(radians(alpha)),sin(radians(alpha)),0)", "description": "", "templateType": "anything", "can_override": false}, "AB": {"name": "AB", "group": "force in members", "definition": "qty(abs(vecAB),units)", "description": "", "templateType": "anything", "can_override": false}, "CD": {"name": "CD", "group": "force in members", "definition": "BD cos(radians(30))", "description": "", "templateType": "anything", "can_override": false}, "r_ad": {"name": "r_ad", "group": "vectors", "definition": "2 r_ac", "description": "", "templateType": "anything", "can_override": false}, "r_ac": {"name": "r_ac", "group": "vectors", "definition": "vector(sqrt(3),0,0)", "description": "", "templateType": "anything", "can_override": false}, "magC": {"name": "magC", "group": "Inputs", "definition": "qty(random(100..800#25),units)", "description": "

Magnitude of force C, always points straight down

", "templateType": "anything", "can_override": false}, "BD": {"name": "BD", "group": "force in members", "definition": " magD/sin(radians(30)) ", "description": "", "templateType": "anything", "can_override": false}, "magD": {"name": "magD", "group": "quantities", "definition": "qty(-(cross(r_ab,vecB)+cross(r_ac, vecC))[2]/abs(r_ad),units)", "description": "", "templateType": "anything", "can_override": false}, "AC": {"name": "AC", "group": "force in members", "definition": "CD", "description": "", "templateType": "anything", "can_override": false}, "Abs": {"name": "Abs", "group": "force in members", "definition": "qty(vecAB[0],units)", "description": "", "templateType": "anything", "can_override": false}, "check": {"name": "check", "group": "vectors", "definition": "vecA+vecB+vecC+vecD", "description": "", "templateType": "anything", "can_override": false}, "magB": {"name": "magB", "group": "Inputs", "definition": "qty(random(100..800#25),units)", "description": "", "templateType": "anything", "can_override": false}, "alpha": {"name": "alpha", "group": "Inputs", "definition": "random(-110..0#10 except -90) ", "description": "

direction of force B  - standard angle

", "templateType": "anything", "can_override": false}, "vecA": {"name": "vecA", "group": "vectors", "definition": "-(vecB+VecC+vecD)", "description": "", "templateType": "anything", "can_override": false}, "vecCD": {"name": "vecCD", "group": "force in members", "definition": "scalar(CD) vector(-1,0)", "description": "", "templateType": "anything", "can_override": false}, "applet": {"name": "applet", "group": "Inputs", "definition": "geogebra_applet('h7m3fvsj',params)", "description": "", "templateType": "anything", "can_override": false}, "params": {"name": "params", "group": "Inputs", "definition": "['\u03b1': radians(alpha),\nF_B: scalar(MagB),\u00a0\nF_C: scalar(MagC),\nunits: '\"{units}\"' \n]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "not (alpha >= 30 and alpha <= 150) and // keep force outside the truss\nscalar(magD) > 0 // so roller doesn't need to pull down", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Inputs", "variables": ["magC", "magB", "units", "alpha", "debug", "applet", "params"]}, {"name": "vectors", "variables": ["vecB", "vecC", "r_ab", "r_ac", "r_ad", "vecD", "vecA", "check"]}, {"name": "quantities", "variables": ["magD", "magAx", "magAy"]}, {"name": "force in members", "variables": ["BD", "CD", "BC", "AC", "vecAB", "AB", "ABy", "Abs", "vecCD", "vecBD"]}], "functions": {"display": {"parameters": [["q", "quantity"]], "type": "string", "language": "jme", "definition": "string(precround(q,2))"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Reactions", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Determine the components of the reactions at $A$ and $D$.

\n

$A_x$ = [[0]] [[1]] $\\qquad A_y$ = [[2]] [[3]]

\n

$D_x$ = [[4]] [[5]] $\\qquad D_y$ = [[6]] [[7]]

\n

{precround(vecA,1)} {units} {vecD}

", "gaps": [{"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "magAx", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Left", "Right", "Neither"], "matrix": "map(if(sign(vecA[0])=s,1,0),s,[-1,1,0])"}, {"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "magAy", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Up", "Down", "Neither"], "matrix": "map(if(sign(vecA[1])=s,1,0),s,[1,-1,0])"}, {"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(0,units)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Up", "Down", "Neither"], "matrix": "[0,0,1]"}, {"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "magD", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Up", "Down", "Neither"], "matrix": "map(if(sign(vecD[1])=s,1,0),s,[1,-1,0])"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Joint D", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Analyze joint $D$ to find the forces in members $BD$ and $CD$.

\n

$BD$ = [[0]] [[1]]  $CD$ = [[2]] [[3]] 

", "gaps": [{"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "BD", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Tension", "Compression", "Neither"], "matrix": [0, "1", "if(scalar(BD)=0,1,0)"], "distractors": ["", "", ""]}, {"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "CD", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Tension", "Compression", "Neither"], "matrix": ["1", "0", "if(scalar(CD)=0,1,0)"], "distractors": ["", "", ""]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Joint C", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Analyze joint $C$ to find the forces in members $AC$ and $BC$.

\n

$AC$ = [[0]] [[1]]  $BC$ = [[2]] [[3]] 

\n

{display(AC)} {display(BC)}

", "gaps": [{"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "AC", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Tension", "Compression", "Neither"], "matrix": ["1", "0", "if(scalar(AC)=0,1,0)"], "distractors": ["", "", ""]}, {"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "BC", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Tension", "Compression", "Neither"], "matrix": ["1", "0", "if(scalar(BC)=0,1,0)"], "distractors": ["", "", ""]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Joint B", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Analyze joint $B$ to find the forces in member $AB$.

\n

$AB$ = [[0]] [[1]]  {display(AB)} {if(sign(ABy)=-1,' Tension.', ' Compression.')}

\n

", "gaps": [{"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "AB", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Tension", "Compression", "Neither"], "matrix": ["if(sign(ABy)=-1,1,0)", "if(sign(ABy)=1,1,0)", "if(sign(ABy)=0,1,0)"], "distractors": ["", "", ""]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Method of joints: cantilever truss", "extensions": ["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/truss_KUTOuc7.png", "/srv/numbas/media/question-resources/truss_KUTOuc7.png"], ["question-resources/truss.vwx", "/srv/numbas/media/question-resources/truss.vwx"], ["question-resources/jointA_i2nJN9c.png", "/srv/numbas/media/question-resources/jointA_i2nJN9c.png"], ["question-resources/jointB_N4t3sYw.png", "/srv/numbas/media/question-resources/jointB_N4t3sYw.png"], ["question-resources/jointC_5MFLZd4.png", "/srv/numbas/media/question-resources/jointC_5MFLZd4.png"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "William Haynes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2530/"}], "tags": ["Equilibrium", "equilibrium", "Mechanics", "mechanics", "method of joints", "particle equilibrium", "Statics", "statics", "truss"], "metadata": {"description": "Use the method of joints to solve for the forces in a cantilever truss.", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

\n

The truss shown supports three loads, $A =  \\var{A}$, $B=\\var{B}$, and $C=\\var{C}$.  Use the method of joints to find the forces in all members.  Indicate tension or compression.

", "advice": "

Procedure

\n

Start with a joint with two unknowns, in this case $A$.  Draw a free body diagram of the joint and solve for the two unknowns. Move to an adjacent joint with two unknowns and repeat.  Continue in this manner until all the unknowns are found.

\n

When drawing free body diagrams, the force of a member acts along the axis of the member.  A force pushing towards the joint indicates compression, and a force pulling away indicates tension.  An incorrect assumed direction will result in a negative value.

\n

After all the forces in the members are found you can check your answer by calculating the external reactions at $D$ and $E$, and verifying that  joints $D$ and $E$ are in equilibrium.

\n

\n

\n

$\\begin{align}A\\!: \\Sigma F_y &= 0 &  A\\!: \\Sigma F_x &= 0   \\\\AB_y &= A&      AC&= AB_x    \\\\AB \\sin 30° &= A  &    &= AB \\cos 30°        \\\\AB &= \\dfrac{\\var{disp(A)}}{\\sin 30°} &   &= \\var{disp(AB)} \\cos 30°                  \\\\&= \\var{siground(AB,4)}  \\text{ (T)} & &= \\var{siground(AC,4)}  \\text{ (C)}\\end{align}$

\n

\n

\n

\n

$\\begin{align}B\\!: \\Sigma F_{y'} &= 0& B\\!: \\Sigma F_{x'}&= 0\\\\BC &= B_{y'}&BD&= B_{x'} + AB \\\\ &= B \\cos 30° & &= B \\sin 30°+ AB\\\\ &= {\\var{disp(B)}} \\cos 30°&&= \\var{disp(B)} \\sin 30°+ {AB}\\\\&= \\var{siground(BC,4)}  \\text{ (C)}& &= \\var{siground(BD,4)}  \\text{ (T)}\\ \\\\\\end{align}$

\n

\n

\n

\n

$\\begin{align}C\\!: \\Sigma {F_y} &= 0 &         C\\!: \\Sigma {F_x} &= 0\\\\            -CD_y-BC_{y} -C &=0      &   CE + CD_x &= BC_x + AC\\\\    CD \\sin 60°&= -(BC \\sin 60° +C)&    CE &= AC + BC_x - CD_x\\\\CD&= -\\frac{{\\var{disp(BC)}} \\sin 60° + \\var{C}}{\\sin 60°} & &= \\var{disp(AC)} + \\var{disp(BC)} \\cos 60° -(\\var{disp(-CD)}) \\cos 60° \\\\  &= \\var{-disp(CD)}  \\text{ (C)}  & &= \\var{siground(CE,4)}  \\text{ (C)} \\\\&= \\var{siground(CD,4)}  \\text{ (T)}  \\end{align}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"C": {"name": "C", "group": "Ungrouped variables", "definition": "qty(random(250..1000#50),units)", "description": "", "templateType": "anything", "can_override": false}, "CD": {"name": "CD", "group": "Ungrouped variables", "definition": "(BC sin(radians(60)) + C )/sin(radians(60))", "description": "", "templateType": "anything", "can_override": false}, "BC": {"name": "BC", "group": "Ungrouped variables", "definition": "B cos(radians(30))", "description": "", "templateType": "anything", "can_override": false}, "check": {"name": "check", "group": "Ungrouped variables", "definition": "(3 A + 1.5 B + C)/sqrt(3) - ce", "description": "", "templateType": "anything", "can_override": false}, "AC": {"name": "AC", "group": "Ungrouped variables", "definition": "AB cos(radians(30))", "description": "", "templateType": "anything", "can_override": false}, "AB": {"name": "AB", "group": "Ungrouped variables", "definition": "A/sin(radians(30))", "description": "", "templateType": "anything", "can_override": false}, "B": {"name": "B", "group": "Ungrouped variables", "definition": "qty(random(250..1000#50),units)", "description": "", "templateType": "anything", "can_override": false}, "A": {"name": "A", "group": "Ungrouped variables", "definition": "qty(random(250..1000#50),units)", "description": "", "templateType": "anything", "can_override": false}, "BD": {"name": "BD", "group": "Ungrouped variables", "definition": "B sin(radians(30)) + AB", "description": "", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "Ungrouped variables", "definition": "random(['N', 'kN', 'lb'])", "description": "", "templateType": "anything", "can_override": false}, "CE": {"name": "CE", "group": "Ungrouped variables", "definition": "ac + bc cos(radians(60)) + cd cos(radians(60))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["units", "A", "B", "C", "AB", "AC", "BC", "BD", "CD", "CE", "check"], "variable_groups": [], "functions": {"disp": {"parameters": [["q", "quantity"]], "type": "string", "language": "jme", "definition": "siground(scalar(q),4)"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Joint A", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Analyze joint $A$ and find $AB$ and $AC$.

\n

$AB =$  [[0]] [[1]] $AC =$ [[2]] [[3]]

\n
", "gaps": [{"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "AB", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Tension", "Compression"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "AC", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Tension", "Compression"], "matrix": ["0", "1"], "distractors": ["", ""]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Joint B", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Analyze joint $B$ and find $BC$ and $BD$.

\n

$BC =$  [[0]] [[1]] $BD =$ [[2]] [[3]]

\n
", "gaps": [{"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "BC", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Tension", "Compression"], "matrix": ["0", "1"], "distractors": ["", ""]}, {"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "BD", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Tension", "Compression"], "matrix": ["1", "0"], "distractors": ["", ""]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Joint C", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Analyze joint $C$ and find $CD$ and $CE$.

\n

$CD =$  [[0]] [[1]] $CE =$  [[2]] [[3]]

\n
", "gaps": [{"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "CD", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Tension", "Compression"], "matrix": ["1", 0], "distractors": ["", ""]}, {"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "CE", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "dropdownlist", "displayColumns": 0, "showCellAnswerState": true, "choices": ["Tension", "Compression"], "matrix": ["0", "1"], "distractors": ["", ""]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": false, "showresultspage": "oncompletion", "navigatemode": "sequence", "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": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "William Haynes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2530/"}], "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/truss_KUTOuc7.png", "/srv/numbas/media/question-resources/truss_KUTOuc7.png"], ["question-resources/truss.vwx", "/srv/numbas/media/question-resources/truss.vwx"], ["question-resources/jointA_i2nJN9c.png", "/srv/numbas/media/question-resources/jointA_i2nJN9c.png"], ["question-resources/jointB_N4t3sYw.png", "/srv/numbas/media/question-resources/jointB_N4t3sYw.png"], ["question-resources/jointC_5MFLZd4.png", "/srv/numbas/media/question-resources/jointC_5MFLZd4.png"]]}