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

End of chapter exercises for Engineering Statics: Open and Interactive 

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": true, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Truss: Method of Joints ", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["Solve a joint", "Cantilever truss", "Kingpost truss", ""], "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", "type": "question"}, {"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", "type": "question"}, {"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", "type": "question"}, {"name": "Method of Joints: Symmetric Truss", "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/joan-problem_fs07hWN.ggb", "/srv/numbas/media/question-resources/joan-problem_fs07hWN.ggb"], ["question-resources/Joint_B_6eszcTT.svg", "/srv/numbas/media/question-resources/Joint_B_6eszcTT.svg"], ["question-resources/Joint_D_EOoCf9Z.svg", "/srv/numbas/media/question-resources/Joint_D_EOoCf9Z.svg"], ["question-resources/fbds_jqa9zTW_0O5KNSm.afdesign", "/srv/numbas/media/question-resources/fbds_jqa9zTW_0O5KNSm.afdesign"], ["question-resources/Joint_A_j2xOQ6P.svg", "/srv/numbas/media/question-resources/Joint_A_j2xOQ6P.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "William Haynes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2530/"}], "tags": ["Mechanics", "mechanics", "method of joints", "Statics", "statics", "truss"], "metadata": {"description": "

Solve Truss by the method of joints.  The solution is simplified by recognizing symmetry.

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

{applet(app)}

", "advice": "

Given:

\n

Truss geometry and these loads:

\n

$P_A = P_H = \\var{display(P_A)}$

\n

$P_B = P_F = \\var{display(P_B)}$

\n

$P_D = \\var{display(P_D)}$

\n

Find reactions at $A$.

\n

Since the truss and load are both symmetrical, the reactions at $A$ and $H$ are equal and equal to half the total load.

\n

$R_A = R_H = \\dfrac{2 \\cdot \\var{P_A} + 2 \\cdot\\var{P_B} + \\var{P_D}}{2} = \\var{display(R_A)}$

\n

\n

For the following, unknown forces are shown in blue, known forces in red, and all members are assumed to be in tension.  Negative results indicate the member is actually in compression.

\n

\n

Find angle $\\theta$.

\n

$\\theta = \\tan^{-1} \\left(\\dfrac{\\var{h}}{\\var{b}}\\right) = \\var{precround(theta,1)}$°

\n

\n

Solve Joint $A$.

\n

\n

\\begin{align} \\sum F_y &= 0 \\\\ R_A - P_A + AB \\sin\\theta &= 0\\\\ AB &=  \\dfrac{P_A - R_A}{\\sin\\theta} = \\var{display(AB)} \\end{align}

\n

\\begin{align} \\sum F_x &= 0 \\\\ AB \\cos\\theta + AC & = 0\\\\ AC &= - AB \\cos \\theta = \\var{display(AC)} \\end{align}

\n

\n

Solve Joint $C$

\n

Note member $BC$ is a zero-force member, by inspection, so

\n

$CE = AC =\\var{display(CE)}$

\n

Solve Joint $B$

\n

\n

\n

\\begin{align} \\sum F_{y'} &= 0 \\\\ -P_B \\cos\\theta  - BE \\sin(2 \\theta) &= 0\\\\ BE &= - \\dfrac{P_B \\cos\\theta}{\\sin(2\\theta)} = \\var{display(BE)} \\end{align}

\n

\\begin{align} \\sum F_{x'} &= 0 \\\\  - AB - P_B \\sin\\theta + BD + BE \\cos(2 \\theta) & = 0\\\\ BD &= AB + P_B \\sin\\theta - BE \\cos(2\\theta) = \\var{display(BD)} \\end{align}

\n

\n

Solve Joint $D$

\n

\n

Note by symmetry $DF = BD$.

\n

\\begin{align} \\sum F_y &= 0 \\\\ -DE  - P_D  -  BD \\sin\\theta - DF \\sin\\theta &= 0\\\\ DE &= - P_D  - 2 BD \\sin\\theta= \\var{display(DE)} \\end{align}

\n

\n

Find remaining forces by symmetry.

\n

$EG = CE = \\var{display(EG)}$

\n

$EF = BE = \\var{display(EF)}$

\n

$FG = BC = $ Zero-force member

$FH = AB = \\var{display(FH)}$

\n

$GH = AC = \\var{display(GH)}$

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"app": {"name": "app", "group": "Ungrouped variables", "definition": "geogebra_file(\"joan-problem_fs07hWN.ggb\",params)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Variables", "definition": "random(6,8,10,12, 16,18)", "description": "

width of panel

", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "Variables", "definition": "max(2, b - random(1..5))", "description": "

height of panel

", "templateType": "anything", "can_override": false}, "params": {"name": "params", "group": "Ungrouped variables", "definition": "[b: b, h: h, \"F_A\": P_A, \"F_B\": P_B, \"F_D\": P_D, unitD:'\"'+units[0]+'\"', \"unitF\": '\"'+units[1]+'\"']", "description": "", "templateType": "anything", "can_override": false}, "P_A": {"name": "P_A", "group": "Variables", "definition": "random(50..500#50)", "description": "

Force at A and H

", "templateType": "anything", "can_override": false}, "P_B": {"name": "P_B", "group": "Variables", "definition": "random(50..500#50)", "description": "

Force at B and E

", "templateType": "anything", "can_override": false}, "P_D": {"name": "P_D", "group": "Variables", "definition": "random(50..500#50)", "description": "

Force at D

", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "Variables", "definition": "random([\"ft\",\"lb\"],[\"m\",\"kN\"])", "description": "", "templateType": "anything", "can_override": false}, "R_A": {"name": "R_A", "group": "solutions", "definition": "(2 P_A + 2 P_B + P_D)/2", "description": "", "templateType": "anything", "can_override": false}, "theta": {"name": "theta", "group": "solutions", "definition": "degrees(arctan(h/b))", "description": "", "templateType": "anything", "can_override": false}, "AB": {"name": "AB", "group": "solutions", "definition": "(P_A - R_A)/sin(radians(theta))", "description": "", "templateType": "anything", "can_override": false}, "AC": {"name": "AC", "group": "solutions", "definition": "- AB cos(radians(theta))", "description": "", "templateType": "anything", "can_override": false}, "BE": {"name": "BE", "group": "solutions", "definition": "-(P_B cos(radians(theta)))/sin(2 radians(theta))", "description": "", "templateType": "anything", "can_override": false}, "BD": {"name": "BD", "group": "solutions", "definition": "AB + P_B sin(radians(theta)) - BE cos(2 radians(theta))", "description": "", "templateType": "anything", "can_override": false}, "DE": {"name": "DE", "group": "solutions", "definition": "-(P_D + 2 BD sin(radians(theta)))", "description": "", "templateType": "anything", "can_override": false}, "BC": {"name": "BC", "group": "solutions", "definition": "0", "description": "", "templateType": "anything", "can_override": false}, "CE": {"name": "CE", "group": "solutions", "definition": "AC", "description": "", "templateType": "anything", "can_override": false}, "GH": {"name": "GH", "group": "solutions", "definition": "AC", "description": "", "templateType": "anything", "can_override": false}, "EG": {"name": "EG", "group": "solutions", "definition": "AC", "description": "", "templateType": "anything", "can_override": false}, "DF": {"name": "DF", "group": "solutions", "definition": "BD", "description": "", "templateType": "anything", "can_override": false}, "EF": {"name": "EF", "group": "solutions", "definition": "BD", "description": "", "templateType": "anything", "can_override": false}, "FG": {"name": "FG", "group": "solutions", "definition": "BC", "description": "", "templateType": "anything", "can_override": false}, "FH": {"name": "FH", "group": "solutions", "definition": "AB", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["app", "params"], "variable_groups": [{"name": "Variables", "variables": ["b", "h", "P_B", "P_A", "P_D", "units"]}, {"name": "solutions", "variables": ["R_A", "theta", "AB", "AC", "BE", "BD", "DE", "BC", "CE", "GH", "EG", "DF", "EF", "FG", "FH"]}], "functions": {"applet": {"parameters": [["app", "ggbapplet"]], "type": "anything", "language": "javascript", "definition": "// See https://wiki.geogebra.org/en/Scripting_Commands and\n// https://wiki.geogebra.org/en/Reference:GeoGebra_Apps_API\napp.promise.then(function(d) {\n d.app.setGridVisible(false)\n //d.app.setAxesVisible(false,false);\n});\nreturn new Numbas.jme.types.ggbapplet(app);\n"}, "force": {"parameters": [["F", "number"]], "type": "anything", "language": "jme", "definition": "siground(qty(abs(f), units[1]),4)"}, "TC": {"parameters": [["f", "number"]], "type": "list", "language": "jme", "definition": "[if(sign(f)>0,1,0),if(sign(f)<0,1,0), if(sign(f)=0,1,0)]"}, "display": {"parameters": [["F", "number"]], "type": "anything", "language": "jme", "definition": "siground(qty(f,units[1]),4)"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Using the method of joints, determine the force in each member of the truss shown.

\n

On the table provided, list the magnitude of the force, also state whether each member is in tension or compression. Be sure and note any simplifying assumptions you make. Draw all free body diagrams.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
MemberForceT or C
AB[[0]][[1]]
AC[[2]][[3]]
 BC[[4]][[5]]
 BD[[6]][[7]]
 BE[[8]][[9]]
 CE[[10]][[11]]
DE[[12]][[13]]
DF[[14]][[15]]
EF[[16]][[17]]
 EG[[18]][[19]]
FG [[20]][[21]]
FH[[22]][[23]]
GH[[24]][[25]]
\n

\\

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "$AB$", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "force(AB)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "TCAB", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": "3", "showCellAnswerState": true, "choices": ["T", "C", "Zero Force"], "matrix": "TC(AB)"}, {"type": "engineering-answer", "useCustomName": true, "customName": "$AC$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "force(AC)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "TCAC", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": "3", "showCellAnswerState": true, "choices": ["T", "C", "Zero Force"], "matrix": "TC(AC)"}, {"type": "engineering-answer", "useCustomName": true, "customName": "$BC$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "force(BC)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "TCBC", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": "3", "showCellAnswerState": true, "choices": ["T", "C", "Zero Force"], "matrix": "TC(BC)"}, {"type": "engineering-answer", "useCustomName": true, "customName": "$BD$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "force(BD)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "TCBD", "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": "radiogroup", "displayColumns": "3", "showCellAnswerState": true, "choices": ["T", "C", "Zero Force"], "matrix": "TC(BD)"}, {"type": "engineering-answer", "useCustomName": true, "customName": "$BE$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "force(BE)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "TCBE", "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": "radiogroup", "displayColumns": "3", "showCellAnswerState": true, "choices": ["T", "C", "Zero Force"], "matrix": "TC(BE)"}, {"type": "engineering-answer", "useCustomName": true, "customName": "$CE$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "force(CE)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "TCCE", "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": "radiogroup", "displayColumns": "3", "showCellAnswerState": true, "choices": ["T", "C", "Zero Force"], "matrix": "TC(CE)"}, {"type": "engineering-answer", "useCustomName": true, "customName": "$DE$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "force(DE)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "TCDE", "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": "radiogroup", "displayColumns": "3", "showCellAnswerState": true, "choices": ["T", "C", "Zero Force"], "matrix": "TC(DE)"}, {"type": "engineering-answer", "useCustomName": true, "customName": "$DF$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "force(DF)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "TCDF", "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": "radiogroup", "displayColumns": "3", "showCellAnswerState": true, "choices": ["T", "C", "Zero Force"], "matrix": "TC(DF)"}, {"type": "engineering-answer", "useCustomName": true, "customName": "$EF$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "force(EF)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "TCEF", "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": "radiogroup", "displayColumns": "3", "showCellAnswerState": true, "choices": ["T", "C", "Zero Force"], "matrix": "TC(EF)"}, {"type": "engineering-answer", "useCustomName": true, "customName": "$EG$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "force(EG)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "TCEG", "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": "radiogroup", "displayColumns": "3", "showCellAnswerState": true, "choices": ["T", "C", "Zero Force"], "matrix": "TC(EG)"}, {"type": "engineering-answer", "useCustomName": true, "customName": "$FG$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "force(FG)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "TCFG", "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": "radiogroup", "displayColumns": "3", "showCellAnswerState": true, "choices": ["T", "C", "Zero Force"], "matrix": "TC(FG)"}, {"type": "engineering-answer", "useCustomName": true, "customName": "$FH$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "force(FH)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "TCFH", "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": "radiogroup", "displayColumns": "3", "showCellAnswerState": true, "choices": ["T", "C", "Zero Force"], "matrix": "TC(FH)"}, {"type": "engineering-answer", "useCustomName": true, "customName": "$GH$", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "force(GH)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "TCGH", "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": "radiogroup", "displayColumns": "3", "showCellAnswerState": true, "choices": ["T", "C", "Zero Force"], "matrix": "TC(GH)"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}, {"name": "Truss: Method of Sections", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["Zero force members", "Cantilever truss", "Howe Truss", "Pratt Truss", "Maximum load"], "variable_overrides": [[], [], [], [], []], "questions": [{"name": "Truss: zero force members", "extensions": ["geogebra"], "custom_part_types": [], "resources": [["question-resources/FBD_kZRowVa.png", "/srv/numbas/media/question-resources/FBD_kZRowVa.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": ["Mechanics", "mechanics", "Statics", "statics", "truss", "zero-force"], "metadata": {"description": "Given a loaded truss, identify any zero force members by inspection.", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

{applet()}

\n

\n

Scripts in part seems to cause breakage of marking algorithm - moved it to advise section. 

\n
\n

Loads: down is positive

\n

{f}

\n

Loads and reactions:  down is positive   

\n

{loads[0]} = {f[loads[0]]} {loads[1]} = {f[loads[1]]}  {supports[0]} = {reactions[0]}   {supports[1]} = {reactions[1]}    $\\Sigma M_A:$  =  {13 x[loads[0]]+ 17 x[loads[1]] + reactions[0] * x[supports[0]]   + reactions[1] * x[supports[1]]}

\n

\n

Forces in members:  Tension is positive

\n

{m}

\n

Joint Equilibrium:

\n

Joint A:  {polar(f[\"A\"], -90) + polar(AB,0) + polar(AG,30)}

\n

Joint B:   {polar(f[\"B\"], -90) + polar(AB,180) + polar(BC,0)  + polar(BG,120)  + polar(BH,60) }

\n

Joint C:   {polar(f[\"C\"], -90) + polar(BC,180) + polar(CD,0) + polar(CH,120)  + polar(CN,60) }

\n

Joint D:   {polar(f[\"D\"], -90) + polar(CD,180) + polar(DE,0) + polar(DO,120) + polar(DL,60)}

\n

Joint E:   {polar(f[\"E\"], -90) + polar(DE,180) + polar(EF,0) + polar(EL,120) + polar(EM,60)}

\n

Joint F:   {polar(f[\"F\"], -90) + polar(EF,180) + polar(FM,150)}

\n

Joint G:   {polar(f[\"G\"], -90) + polar(GH,30)  + polar(AG,-150) + polar(BG,-60)}

\n

Joint H:  {polar(f[\"H\"], -90) + polar(HN,0) + polar(CH, -60) + polar(BH,-120) + polar(GH, -150) + polar(HI, 30)}

\n

Joint I:   {polar(f[\"I\"], -90) + polar(IJ,30) + polar(NI,-60) + polar(HI,-150)}

\n

Joint J:   {polar(f[\"J\"], -90) + polar(JK,-30) + polar(JO,-60) + polar(JN,-120) + polar(IJ,-150)}

\n

Joint K:   {polar(f[\"K\"], -90) + polar(KL,-30) + polar(KO,-120) + polar(JK,150)}

\n

Joint L:  {polar(f[\"L\"], -90) + polar(LM,-30 ) + polar(EL, -60) + polar(DL,-120) + polar(LO, 180) + polar(KL, 150)}

\n

Joint M:   {polar(f[\"M\"], -90) + polar(FM,-30) + polar(EM,-120) + polar(LM,150)}

\n

Joint N:  {polar(f[\"N\"], -90) + polar(NI,120 ) + polar(HN, 180) + polar(JN,60) + polar(CN,-120)}

\n

Joint O:  {polar(f[\"O\"], -90) + polar(KO, 60) + polar(LO, 0) + polar(JO,120) + polar(DO, -60)}

\n
", "advice": "

Look for situations like  1a) and 2a) in the diagram below.  

\n

\n

\n

\n

\n

In figure 1a), members $AB$ and $AC$ share the same line of action and member $AD$ is zero-force.  If a load is added to $A$, then member $AD$ must pick up load to support it and will not be zero-force.

\n

If figure 2a), members $AB$ and $AC$ do not share the same line of action and both must be zero-force to maintain equilibrium of joint $A$.  If a load is added at $A$ as shown in figure 2b) then $AB$ and $AC$ will pick up load to maintain equilibrium.

\n

When a member is identified as zero-force, then it may produce zero-force members at adjacent joints.

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"num_ans": {"name": "num_ans", "group": "setup", "definition": "length(length(filter(x -> x=0, zeroforce)))", "description": "

This counts the number of zero force members

", "templateType": "anything", "can_override": false}, "IJ": {"name": "IJ", "group": "members", "definition": "HI + f[\"I\"]* cos(radians(60))", "description": "", "templateType": "anything", "can_override": false}, "DO": {"name": "DO", "group": "members", "definition": "F[\"D\"] / 2.0/ cos(radians(30)) + DE - CD", "description": "", "templateType": "anything", "can_override": false}, "x": {"name": "x", "group": "setup", "definition": "[\"A\":0,\"B\":2,\"C\":4,\"D\":8,\"E\":10,\"F\":12,\n \"G\":1.5,\"H\":3,\"I\":4.5,\"J\":6,\"K\":7.5,\"L\":9,\n\"M\":10.5,\"N\":5,\"O\":7]", "description": "

horizontal location as dictionary

", "templateType": "anything", "can_override": false}, "GH": {"name": "GH", "group": "members", "definition": "0.5 f[\"G\"] + AG", "description": "", "templateType": "anything", "can_override": false}, "EL": {"name": "EL", "group": "members", "definition": "F[\"E\"]/sin(radians(60)) - EM", "description": "", "templateType": "anything", "can_override": false}, "BH": {"name": "BH", "group": "members", "definition": "F[\"B\"]/sin(radians(60)) - BG", "description": "", "templateType": "anything", "can_override": false}, "NI": {"name": "NI", "group": "members", "definition": "-f[\"I\"] * cos(radians(30))", "description": "
    \n
  1. not alphabetical (IN) becasue in is reserved word
  2. \n
", "templateType": "anything", "can_override": false}, "FM": {"name": "FM", "group": "members", "definition": "F[\"F\"] *2.0", "description": "", "templateType": "anything", "can_override": false}, "CH": {"name": "CH", "group": "members", "definition": "CD - BC + F[\"C\"]/2.0/sin(radians(60))", "description": "", "templateType": "anything", "can_override": false}, "KO": {"name": "KO", "group": "members", "definition": "-f[\"K\"] * cos(radians(30))", "description": "", "templateType": "anything", "can_override": false}, "DL": {"name": "DL", "group": "members", "definition": "F[\"D\"]/2.0/cos(radians(30)) - DE + CD", "description": "", "templateType": "anything", "can_override": false}, "CN": {"name": "CN", "group": "members", "definition": "f[\"C\"]/sin(radians(60)) - CH", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "setup", "definition": "dict([[\"AB\", precround(AB,5)],\n [\"AG\", precround(AG,5)],\n [\"BC\", precround(BC,5)],\n [\"BG\", precround(BG,5)],\n [\"BH\", precround(BH,5)],\n [\"CD\", precround(CD,5)],\n [\"CH\", precround(CH,5)],\n [\"CN\", precround(CN,5)],\n [\"DE\", precround(DE,5)],\n [\"DL\", precround(DL,5)],\n [\"DO\", precround(DO,5)],\n [\"EF\", precround(EF,5)],\n [\"EL\", precround(EL,5)],\n [\"EM\", precround(EM,5)],\n [\"FM\", precround(FM,5)],\n [\"GH\", precround(GH,5)],\n [\"HI\", precround(HI,5)],\n [\"HN\", precround(HN,5)],\n [\"IJ\", precround(IJ,5)],\n [\"JK\", precround(JK,5)],\n [\"JO\", precround(JO,5)],\n [\"JN\", precround(JN,5)],\n [\"KL\", precround(KL,5)],\n [\"KO\", precround(KO,5)],\n [\"LO\", precround(LO,5)],\n [\"LM\", precround(LM,5)],\n [\"NI\", precround(NI,5)]])", "description": "

forces in members as dictionary

", "templateType": "anything", "can_override": false}, "AB": {"name": "AB", "group": "members", "definition": "-AG cos(radians(30))", "description": "", "templateType": "anything", "can_override": false}, "loads": {"name": "loads", "group": "setup", "definition": "shuffle(set(points)-set(supports))[0..2]\n//[\"J\",\"B\"]//", "description": "

2 loads, anywhere but at the supports

\n

passed to geogebra

", "templateType": "anything", "can_override": false}, "JN": {"name": "JN", "group": "members", "definition": "NI + CN + HN/cos(radians(60))", "description": "", "templateType": "anything", "can_override": false}, "zeroForce": {"name": "zeroForce", "group": "setup", "definition": "map(if(m[pt]=0,1,0),pt,members)", "description": "

This makes a list of true/false values indicating which members are zero-force

", "templateType": "anything", "can_override": false}, "JK": {"name": "JK", "group": "members", "definition": "KL + F[\"K\"]* cos(radians(60))", "description": "", "templateType": "anything", "can_override": false}, "KL": {"name": "KL", "group": "members", "definition": "2.0 F[\"L\"] + 2.0 (EL + DL) cos(radians(30)) + LM", "description": "", "templateType": "anything", "can_override": false}, "LM": {"name": "LM", "group": "members", "definition": "0.5 F[\"M\"] + FM", "description": "", "templateType": "anything", "can_override": false}, "points": {"name": "points", "group": "setup", "definition": "[\"A\",\"B\",\"C\",\"D\",\"E\", \"F\",\"G\",\"H\",\"I\",\"J\", \"K\",\"L\",\"M\",\"N\",\"O\"]", "description": "

names of the points

", "templateType": "anything", "can_override": false}, "EM": {"name": "EM", "group": "members", "definition": "- F[\"M\"] * cos(radians(30))", "description": "", "templateType": "anything", "can_override": false}, "EF": {"name": "EF", "group": "members", "definition": "-FM cos(radians(30))", "description": "", "templateType": "anything", "can_override": false}, "AG": {"name": "AG", "group": "members", "definition": "2.0 f[\"A\"] ", "description": "", "templateType": "anything", "can_override": false}, "BC": {"name": "BC", "group": "members", "definition": "AB + 0.5(BG-BH)", "description": "", "templateType": "anything", "can_override": false}, "LO": {"name": "LO", "group": "members", "definition": "-( 2.0 f[\"L\"] * cos(radians(30)) + 2.0 DL + EL)", "description": "", "templateType": "anything", "can_override": false}, "CD": {"name": "CD", "group": "members", "definition": "-(6 * f[\"A\"] + 4 * f[\"B\"] + 2* f[\"C\"]\n + 4.5 * f[\"G\"] + 3 * f[\"H\"] + 1.5 * f[\"I\"] + f[\"N\"]) / (6 tan(radians(30)))", "description": "

sum m at j

", "templateType": "anything", "can_override": false}, "members": {"name": "members", "group": "setup", "definition": "[\"AB\",\"AG\",\"BG\", \"BC\",\"BH\",\"GH\",\"CH\",\"CN\", \"CD\", \"HN\",\"HI\",\"NI\",\"JN\",\"IJ\",\"JK\",\"JO\",\n \"KO\", \"KL\", \"LO\",\"DO\",\"DL\",\"DE\",\"EL\",\"LM\",\"EM\",\n \"EF\",\"FM\"]\n ", "description": "

names of the members

", "templateType": "anything", "can_override": false}, "BG": {"name": "BG", "group": "members", "definition": "- F[\"G\"] * cos(radians(30))", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "setup", "definition": "dict(map([pt, 0], pt, set(points)-set(supports) - set(loads))) +\ndict(map([supports[pt],reactions[pt]],pt,[0,1]))+\ndict(map([loads[pt],[13,17][pt]], pt, [0,1]))", "description": "

forces as dictionary  

\n

downward forces are positive

\n

Loads have magnitude 1

\n

", "templateType": "anything", "can_override": false}, "JO": {"name": "JO", "group": "members", "definition": "f[\"O\"]/2/cos(radians(30)) + LO + DO", "description": "", "templateType": "anything", "can_override": false}, "HI": {"name": "HI", "group": "members", "definition": "0.5 F[\"H\"] +(BH - HN) cos(radians(30)) + GH", "description": "", "templateType": "anything", "can_override": false}, "DE": {"name": "DE", "group": "members", "definition": "EF + 0.5(EM - EL)", "description": "", "templateType": "anything", "can_override": false}, "reactions": {"name": "reactions", "group": "setup", "definition": "[ -(13 (x[loads[0]] - x[supports[1]]) +\n17 (x[loads[1]] - x[supports[1]]))/(x[supports[0]]-x[supports[1]]),\n -(13(x[loads[0]] - x[supports[0]])+\n17 (x[loads[1]] - x[supports[0]]))/(x[supports[1]]-x[supports[0]])\n]\n\n", "description": "

sum of moments at the supports

\n

reactions at supports[0] and supports[1]

\n

Loads assumed to be 13 and 17

", "templateType": "anything", "can_override": false}, "supports": {"name": "supports", "group": "setup", "definition": "shuffle([\"A\",\"B\",\"C\",\"D\",\"E\",\"F\"])[0..2]\n//[\"C\",\"D\"]", "description": "

reactions -- along the bottom

\n

passed to geogebra

", "templateType": "anything", "can_override": false}, "HN": {"name": "HN", "group": "members", "definition": "-(2.0 CH + BH + 2.0 f[\"H\"] * cos(radians(30)))", "description": "", "templateType": "anything", "can_override": false}, "answers": {"name": "answers", "group": "Ungrouped variables", "definition": "map(if(m[pt]=0,20 /num_ans,0),pt,members)", "description": "

array of point values for marking 

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["answers"], "variable_groups": [{"name": "setup", "variables": ["points", "members", "loads", "supports", "f", "m", "x", "reactions", "zeroForce", "num_ans"]}, {"name": "members", "variables": ["AB", "AG", "BC", "BG", "BH", "CD", "CH", "CN", "DE", "DL", "DO", "EF", "EL", "EM", "FM", "GH", "HI", "HN", "IJ", "JK", "JO", "JN", "KL", "KO", "LO", "LM", "NI"]}], "functions": {"polar": {"parameters": [["mag", "number"], ["dir", "number"]], "type": "vector", "language": "jme", "definition": "vector([mag * cos(radians(dir)), mag * sin(radians(dir))])"}, "applet": {"parameters": [], "type": "ggbapplet", "language": "javascript", "definition": "// Create the worksheet. \n// This function returns an object with a container `element` and a `promise` resolving to a GeoGebra applet.\nvar params = {\n //filename: 'resources/question-resources/centroid_F00fWDR.ggb',\n material_id: 'frtfqyat',\n //width: 250,\n //height: 250\n}\n\nvar result = Numbas.extensions.geogebra.createGeogebraApplet(params);\n\n// Once the applet has loaded, run some commands to manipulate the worksheet.\nresult.promise.then(function(d) {\n var app = d.app;\n var v = question.scope;\n question.applet = d;\n \n function setGGBNumber(name) {\n // Sets number in GGB to a Numbas Variable\n var n = v.evaluate(name).value;\n app.setValue(name,n);\n }\n \nfunction setGGBPoint(name) {\n // moves point in GGB to location of Numbas Vector Variable\n var pt = question.scope.evaluate(name).value\n app.setFixed(name,false,false);\n app.setCoords(name, pt[0], pt[1]);\n app.setFixed(name,true,true);\n }\n\n //initialize pass the locations of the loads and supports to geogebra\n var s0 = v.evaluate(\"supports[0]\").value;\n var s1 = v.evaluate(\"supports[1]\").value;\n app.evalCommand(`supports={\"${s0}\",\"${s1}\"}`);\n var p0 = v.evaluate(\"loads[0]\").value;\n var p1 = v.evaluate(\"loads[1]\").value;\n app.evalCommand(`loads={\"${p0}\",\"${p1}\"}`);\n \n});\n\n// This function returns the result of `createGeogebraApplet` as an object \n// with the JME data type 'ggbapplet', which can be substituted into the question's content.\nreturn new Numbas.jme.types.ggbapplet(result);"}}, "preamble": {"js": "question.signals.on('adviceDisplayed',function() {\n\n // change look of zero force members\n var v = question.scope;\n try{\n var app = question.applet.app;\n \n\n for (index = 0; index < 27; index++) { \n var link = v.evaluate(\"members[\"+index+\"]\").value;\n var load = v.evaluate(link).value;\n if(load*load < 0.00005) {\n \n app.setVisible(`${link}_1`, false);\n app.setColor(`${link}_2`, 200,200,200);\n }\n } \n\n\n \n }\n catch(err){} \n})\n\n", "css": ""}, "parts": [{"type": "m_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, "prompt": "

Select all {num_ans} zero-force members to receive full credit.

", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "checkbox", "displayColumns": "5", "minAnswers": "num_ans", "maxAnswers": "num_ans", "warningType": "prevent", "showCellAnswerState": false, "markingMethod": "sum ticked cells", "choices": "members", "matrix": "answers"}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Method of sections: cantilever truss", "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": ["Mechanics", "mechanics", "method of sections", "Statics", "statics", "truss", "zero force member"], "metadata": {"description": "

Simple truss with a zero-force member

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

{applet}

\n

A {A} force is applied to point A of the cantilever truss as shown.  Determine the forces in members DB, DC, CE and state whether the members are in tension or compression.

\n

", "advice": "

Take an imaginary cut through member $BD$, $DC$, and $CE$ and draw a free body diagram of the right side of the truss.  Each cut member exposes an internal force in the direction of the member.  Arbitrarily assume that the exposed forces are tensile; positive answers will confirm this while negative answers will indicate compression.  Because the support reactions at $F$ and $G$ do not act on this free body, it is unnecessary to solve for them in this problem.  In other situations, this may not be so.

\n

Use the equations of equilibrium to solve for the unknown internal forces.  When possible select moment equations about a point where the lines of action of the other two unknowns intersect.

\n
    \n
  1.  Find $BD$ by taking moments about point $C$.  
  2. \n
  3.  Find $DC$ by noting that $BC$ and $DC$ are zero force members.
  4. \n
  5.  Find $CE$ by taking moments about point $D$. 
  6. \n
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"CE_y": {"name": "CE_y", "group": "magnitudes", "definition": "-A_y", "description": "", "templateType": "anything", "can_override": false}, "DB": {"name": "DB", "group": "magnitudes", "definition": "(A_y w + A_x h/3)/(h/3)", "description": "

moments about B

", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "Unnamed group", "definition": "random(['N','m'],['lb','ft'])", "description": "", "templateType": "anything", "can_override": false}, "w": {"name": "w", "group": "Unnamed group", "definition": "qty(random(2..6#0.5),units[1])", "description": "", "templateType": "anything", "can_override": false}, "A": {"name": "A", "group": "Unnamed group", "definition": "qty(random(50..400#25),units[0])", "description": "", "templateType": "anything", "can_override": false}, "A_y": {"name": "A_y", "group": "magnitudes", "definition": "-A sin(radians(alpha))", "description": "

fy 

", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "Unnamed group", "definition": "w + qty(random(-1..2#0.5),units[1])", "description": "", "templateType": "anything", "can_override": false}, "alpha": {"name": "alpha", "group": "Unnamed group", "definition": "random(-20..-120#5)", "description": "", "templateType": "anything", "can_override": false}, "DC": {"name": "DC", "group": "magnitudes", "definition": "qty(0,units[0])", "description": "", "templateType": "anything", "can_override": false}, "debug": {"name": "debug", "group": "Unnamed group", "definition": "false", "description": "", "templateType": "anything", "can_override": false}, "CE": {"name": "CE", "group": "magnitudes", "definition": "CE_y/sin(arctan(scalar(h/3/w)))", "description": "", "templateType": "anything", "can_override": false}, "A_x": {"name": "A_x", "group": "magnitudes", "definition": "A cos(radians(alpha))", "description": "", "templateType": "anything", "can_override": false}, "applet": {"name": "applet", "group": "Unnamed group", "definition": "geogebra_applet('gxp6xfc2',params)", "description": "", "templateType": "anything", "can_override": false}, "params": {"name": "params", "group": "Unnamed group", "definition": "[alpha: radians(alpha), w: scalar(w), h: scalar(h), units: '\"'+units[1]+'\"']", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Unnamed group", "variables": ["A", "alpha", "w", "h", "units", "debug", "applet", "params"]}, {"name": "magnitudes", "variables": ["A_x", "A_y", "CE_y", "DB", "CE", "DC"]}], "functions": {"display": {"parameters": [["q", "quantity"]], "type": "string", "language": "jme", "definition": "string(siground(q,4))"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Internal Forces", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$DB$ = [[0]]  [[1]]

\n

$DC$ = [[2]] [[3]]

\n

$CE$ = [[4]] [[5]]

\n

{display(DB)} {display(DC)} {display(CE)}

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "DB", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "abs(DB)", "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(DB)=1,1,0)", "if(sign(DB)=-1,1,0)", "if(sign(DB)=0,1,0)"], "distractors": ["", "", ""]}, {"type": "engineering-answer", "useCustomName": true, "customName": "DC", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "DC", "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", "0", "1"], "distractors": ["", "", ""]}, {"type": "engineering-answer", "useCustomName": true, "customName": "CD", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "abs(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", "Neither"], "matrix": ["if(sign(CE)=1,1,0)", "if(sign(CE)=-1,1,0)", "if(sign(CE)=0,1,0)"], "distractors": ["", "", ""]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Method of sections: Howe Truss", "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 sections", "Statics", "statics", "truss"], "metadata": {"description": "

Solve for the internal force in three members of a truss.

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

{geogebra_applet('mzwuspm4',[['width',width],['height',height],['units','\"'+units[1]+'\"']]+ggb_forces)}

\n

Determine the forces in members $DE$, $KE$ and $KL$ $BC$, $CJ$, and $JK$ knowing that the loads supported by the Howe truss are {load_html(0,units[0])}, {load_html(1,units[0])}, and {load_html(2, units[0])}. Indicate tension or compression.

", "advice": "
    \n
  1. Draw a free body diagram of the whole truss and take moments at A to find force G, and take moments at G to find A.  Check your answer by ensuring that $\\Sigma F_y = 0$.
  2. \n
  3. Take an imaginary cut through the three members of interest to divide the truss into two sections.
  4. \n
  5. Draw a free body diagram of one side of the truss.  Indicate forces at the cut members as tension (pulling away from the joint).  Show only the loads which act on the isolated portion of the truss
  6. \n
  7. Apply three equations of equilibrium to find the forces in the cut members.  Negative values will indicate compression.  It is good idea to take moments at a point where two unknowns intersect when possible.
  8. \n
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"units": {"name": "units", "group": "Inputs", "definition": "random(['N','m'],['lb','ft'])", "description": "", "templateType": "anything", "can_override": false}, "BC": {"name": "BC", "group": "magnitudes", "definition": "BC_y/sin(radians(alpha))", "description": "", "templateType": "anything", "can_override": false}, "KE_y": {"name": "KE_y", "group": "magnitudes", "definition": "siground(-(f[\"F\"] + f[\"M\"] + 2 (f[\"E\"]+ f[\"L\"]))/ 3,4)", "description": "

sum of moment about G/dperp

", "templateType": "anything", "can_override": false}, "BC_y": {"name": "BC_y", "group": "magnitudes", "definition": "(-2A + f[\"H\"] + f[\"B\"])/2", "description": "

sum of moments about J / dperp

", "templateType": "anything", "can_override": false}, "DE": {"name": "DE", "group": "magnitudes", "definition": "DE_x/cos(radians(alpha))", "description": "", "templateType": "anything", "can_override": false}, "test_ans": {"name": "test_ans", "group": "Ungrouped variables", "definition": "ans(KL,units[1])", "description": "", "templateType": "anything", "can_override": false}, "JK": {"name": "JK", "group": "magnitudes", "definition": "((2 A - f[\"B\"] - f[\"H\"]) width)/(2 height /3)", "description": "

sum of moments about C/dperp

", "templateType": "anything", "can_override": false}, "KL": {"name": "KL", "group": "magnitudes", "definition": "-((f[\"F\"]+f[\"M\"]) width - g 2 width)/(2 height /3)", "description": "", "templateType": "anything", "can_override": false}, "alpha": {"name": "alpha", "group": "Ungrouped variables", "definition": "degrees(arctan(height/(3 width)))", "description": "", "templateType": "anything", "can_override": false}, "debug": {"name": "debug", "group": "Inputs", "definition": "false", "description": "", "templateType": "anything", "can_override": false}, "version": {"name": "version", "group": "Inputs", "definition": "random(0,1)", "description": "", "templateType": "anything", "can_override": false}, "G": {"name": "G", "group": "magnitudes", "definition": "sum(map(F[k]*X[k],k,loads))/6", "description": "

sum of moments about A / dperp 

", "templateType": "anything", "can_override": false}, "F": {"name": "F", "group": "Inputs", "definition": "dict(map([n,if(n in loads,random(100..500#25),0)],n,names))", "description": "", "templateType": "anything", "can_override": false}, "beta": {"name": "beta", "group": "Ungrouped variables", "definition": "degrees(arctan(2 height/3/width))", "description": "", "templateType": "anything", "can_override": false}, "DE_x": {"name": "DE_x", "group": "magnitudes", "definition": "siground((2(f[\"F\"]+f[\"M\"]) + (f[\"E\"]+ f[\"L\"]) - 3 G ) \n width/ height,4)", "description": "

sum of moments about K

", "templateType": "anything", "can_override": false}, "names": {"name": "names", "group": "Inputs", "definition": "[\"A\",\"B\",\"H\",\"C\",\"J\",\"D\",\"K\",\"E\",\"L\",\"F\",\"M\",\"G\"]", "description": "", "templateType": "anything", "can_override": false}, "loads": {"name": "loads", "group": "Inputs", "definition": "sort(shuffle(names[1..10])[0..3])", "description": "

only apply loads at middle 10 (out of 12) points.

", "templateType": "anything", "can_override": false}, "height": {"name": "height", "group": "Inputs", "definition": "3 random(1/2,2/3,3/4,2/5,3/5) width\n", "description": "", "templateType": "anything", "can_override": false}, "A": {"name": "A", "group": "magnitudes", "definition": "sum(map(F[k],k,loads))-G", "description": "", "templateType": "anything", "can_override": false}, "ggb_forces": {"name": "ggb_forces", "group": "Inputs", "definition": "map([lower(n),F[n]],n,loads)", "description": "", "templateType": "anything", "can_override": false}, "X": {"name": "X", "group": "Inputs", "definition": "dict(map([names[n],[0,1,1,2,2,3,3,4,4,5,5,6][n]],n,0..11))", "description": "

horizontal location of point.  multiply by width for actual position.

", "templateType": "anything", "can_override": false}, "KE": {"name": "KE", "group": "magnitudes", "definition": "KE_y/sin(radians(beta))", "description": "", "templateType": "anything", "can_override": false}, "CJ": {"name": "CJ", "group": "magnitudes", "definition": "(2 f[\"J\"]+ F[\"B\"] + F[\"H\"])/2", "description": "

sum of moments about A/dperp

", "templateType": "anything", "can_override": false}, "width": {"name": "width", "group": "Inputs", "definition": "random(3,4,5,6)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["alpha", "beta", "test_ans"], "variable_groups": [{"name": "Inputs", "variables": ["width", "units", "height", "ggb_forces", "names", "loads", "F", "X", "version", "debug"]}, {"name": "tests", "variables": []}, {"name": "magnitudes", "variables": ["A", "G", "KL", "DE_x", "DE", "KE_y", "CJ", "BC_y", "BC", "JK", "KE"]}, {"name": "quantities", "variables": []}], "functions": {"display": {"parameters": [["q", "quantity"]], "type": "string", "language": "jme", "definition": "string(abs(q))"}, "ans": {"parameters": [["f", "number"], ["u", "string"]], "type": "string", "language": "jme", "definition": "string(siground(qty(abs(f),u),4)) + if(f<0,' (C)', ' (T)')"}, "load_html": {"parameters": [["k", "number"], ["u", "string"]], "type": "html", "language": "jme", "definition": "\"$\" + loads[k] + \"= $ \" + qty(f[loads[k]],u)"}}, "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 reactions at A and G.

\n

$A$ = [[0]] $\\qquad G$ = [[1]] A = {siground(qty(A,units[0]),4)}  G = {siground(qty(G,units[0]),4)} 

", "gaps": [{"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(A,units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": false, "customName": "", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(G,units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Member 1", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Determine the force in the member DE BC.

\n

DE BC = [[0]] [[1]]   DE = {ans(DE, units[0])} BC = {ans(BC, units[0])}

", "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": "abs(qty(if(version=0,DE,BC),units[0]))", "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(if(version=0,DE,BC)>0,1,0)", "if(if(version=0,DE,BC)<0,1,0)", "if(if(version=0,DE,BC)=0,1,0)"], "distractors": ["", "", ""]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Member 2", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Determine the force in the member KE CJ.

\n

KE CJ = [[0]] [[1]]   KE =  {ans(KE,units[0])}  CJ  = {ans(CJ,units[0])}

", "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": "abs(qty(if(version=0,KE,CJ),units[0]))", "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(if(version=0,KE,CJ)>0,1,0)", "if(if(version=0,KE,CJ)<0,1,0)", "if(if(version=0,KE,CJ)=0,1,0)"], "distractors": ["", "", ""]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Member 3", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Determine the force in the member KL JK.

\n

KL JK = [[0]] [[1]] KL = {ans(KL,units[0])} JK = {ans(JK,units[0])}

", "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": "abs(qty(if(version=0,KL,JK),units[0]))", "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(if(version=0,KL,JK)>0,1,0)", "if(if(version=0,KL,JK)<0,1,0)", "if(if(version=0,KL,JK)=0,1,0)"], "distractors": ["", "", ""]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Method of sections: Pratt Truss", "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": ["Mechanics", "mechanics", "method of sections", "Statics", "statics", "truss"], "metadata": {"description": "

Solve for the internal force in three members of a truss.

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

{geogebra_applet('yrdq38xt',[['width',width],['height',height],['units','\"'+units[1]+'\"']]+ggb_forces)}

\n

Determine the forces in members $CD$, $HJ$ and $CJ$ $DE$, $EJ$, and $JK$ knowing that the loads supported by the Pratt truss are:

\n

{load_html(0,units[0])}, {load_html(1,units[0])}, and {load_html(2, units[0])}.

\n

Indicate tension or compression.

", "advice": "
    \n
  1. Draw a free body diagram of the whole truss and take moments at A to find force G, and take moments at G to find A.  Check your answer by ensuring that $\\Sigma F_y = 0$.
  2. \n
  3. Take an imaginary cut through the three members of interest to divide the truss into two sections.
  4. \n
  5. Draw a free body diagram of one side of the truss.  Indicate forces at the cut members as tension (pulling away from the joint).  Show only the loads which act on the isolated portion of the truss
  6. \n
  7. Apply three equations of equilibrium to find the forces in the cut members.  Negative values will indicate compression.  It is good idea to take moments at a point where two unknowns intersect when possible.
  8. \n
", "rulesets": {}, "variables": {"ans_name": {"name": "ans_name", "group": "magnitudes", "definition": "[[\"CD\",\"DE\"][version],[\"HJ\",\"EJ\"][version],[\"CJ\",\"JK\"][version]]", "description": "", "templateType": "anything"}, "HJ": {"name": "HJ", "group": "magnitudes", "definition": "(A_y width - A_x height)/height", "description": "", "templateType": "anything"}, "units": {"name": "units", "group": "Inputs", "definition": "random(['N','m'],['lb','ft'])", "description": "", "templateType": "anything"}, "DE": {"name": "DE", "group": "magnitudes", "definition": "((F[\"E\"] + F[\"K\"] - 2 G) width/height + F[\"F\"])", "description": "", "templateType": "anything"}, "CD": {"name": "CD", "group": "magnitudes", "definition": "((F[\"C\"]+F[\"H\"]-2 A_y) width + F[\"B\"]* height)/height", "description": "

sigma M_j = 0 

", "templateType": "anything"}, "version": {"name": "version", "group": "Inputs", "definition": "random(0,1)", "description": "", "templateType": "anything"}, "JK": {"name": "JK", "group": "magnitudes", "definition": "G width / height", "description": "", "templateType": "anything"}, "EJ_y": {"name": "EJ_y", "group": "magnitudes", "definition": "G - F[\"E\"] - f[\"K\"]", "description": "

sigma f_y=0

", "templateType": "anything"}, "ggb_forces": {"name": "ggb_forces", "group": "Inputs", "definition": "map([lower(n),F[n]],n,loads)", "description": "", "templateType": "anything"}, "CJ": {"name": "CJ", "group": "magnitudes", "definition": "CJ_y/sin(radians(theta))", "description": "", "templateType": "anything"}, "ans": {"name": "ans", "group": "magnitudes", "definition": "[[CD,DE][version],[HJ,EJ][version],[CJ,JK][version]]\n\n", "description": "", "templateType": "anything"}, "G": {"name": "G", "group": "magnitudes", "definition": "sum(map(F[k]*D[k],k,loads))/4", "description": "

sum of moments about A / dperp 

", "templateType": "anything"}, "F": {"name": "F", "group": "Inputs", "definition": "dict(map([n,if(n in loads,random(100..500#25),0)],n,names))", "description": "

force magnitudes 

", "templateType": "anything"}, "D": {"name": "D", "group": "Inputs", "definition": "dict(map([names[n],[0,-height/width,1,1,2,2,3,3,height/width,4][n]],n,0..9))", "description": "

Normalized perpendicular distances from point A

\n

multiply this by width to get actual distance

\n

positive moments except for force B which acts left

", "templateType": "anything"}, "width": {"name": "width", "group": "Inputs", "definition": "random(3,4,5,6)", "description": "", "templateType": "anything"}, "height": {"name": "height", "group": "Inputs", "definition": " width + random(-1.5..1.5#0.5)\n", "description": "", "templateType": "anything"}, "EJ": {"name": "EJ", "group": "magnitudes", "definition": "EJ_y/sin(radians(theta))", "description": "", "templateType": "anything"}, "CJ_y": {"name": "CJ_y", "group": "magnitudes", "definition": "A_y - F[\"C\"]-F[\"H\"]", "description": "

sum of moments about A/dperp

", "templateType": "anything"}, "theta": {"name": "theta", "group": "Inputs", "definition": "degrees(arctan(height/width))", "description": "

Angle of diagonal members

", "templateType": "anything"}, "A": {"name": "A", "group": "magnitudes", "definition": "sqrt(A_x^2+A_y^2)", "description": "", "templateType": "anything"}, "names": {"name": "names", "group": "Inputs", "definition": "[\"A\",\"B\",\"H\",\"C\",\"J\",\"D\",\"K\",\"E\",\"F\",\"G\"]", "description": "", "templateType": "anything"}, "A_y": {"name": "A_y", "group": "magnitudes", "definition": "sum(map(F[k],k,[\"C\",\"D\",\"E\",\"H\",\"J\",\"K\"]))-G", "description": "", "templateType": "anything"}, "loads": {"name": "loads", "group": "Inputs", "definition": "sort(shuffle(names[1..9])[0..3])", "description": "

only apply loads at middle 8 (out of 10) points.

", "templateType": "anything"}, "debug": {"name": "debug", "group": "Inputs", "definition": "false", "description": "", "templateType": "anything"}, "A_x": {"name": "A_x", "group": "magnitudes", "definition": "f[\"B\"]-f[\"F\"]", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Inputs", "variables": ["height", "width", "units", "ggb_forces", "names", "loads", "F", "D", "version", "debug", "theta"]}, {"name": "magnitudes", "variables": ["G", "A_y", "A_x", "A", "CD", "HJ", "CJ_y", "CJ", "DE", "JK", "EJ_y", "EJ", "ans", "ans_name"]}, {"name": "quantities", "variables": []}], "functions": {"load_html": {"parameters": [["k", "number"], ["u", "string"]], "type": "html", "language": "jme", "definition": "\"\" + loads[k] + \" = \" + qty(f[loads[k]],u)"}, "display": {"parameters": [["q", "number"]], "type": "string", "language": "jme", "definition": "string(siground(q,4))"}, "ans": {"parameters": [["f", "number"], ["u", "string"]], "type": "string", "language": "jme", "definition": "string(siground(qty(abs(f),u),4)) + if(f<0,' (C)', ' (T)')"}}, "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 reactions at A and G.

\n

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

\n

$G=$ [[4]]  [[5]]  

\n

{siground(qty(A_x,units[0]),4)}    {map(if(sign(A_x)=s,2,0),s,[1,-1,0])}

\n

{siground(qty(A_y,units[0]),4)}    {map(if(sign(A_y)=s,2,0),s,[1,-1,0])}

\n

{siground(qty(G,units[0]),4)}    {map(if(sign(G)=s,2,0),s,[1,-1,0])}

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "A_x", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(abs(A_x),units[0])", "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": ["Right", "Left", "Neither"], "matrix": "map(if(sign(A_x)=s,1,0),s,[1,-1,0])"}, {"type": "engineering-answer", "useCustomName": true, "customName": "A_y", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(abs(A_y),units[0])", "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(A_y)=s,1,0),s,[1,-1,0])"}, {"type": "engineering-answer", "useCustomName": true, "customName": "G", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(abs(G),units[0])", "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(G)=s,1,0),s,[1,-1,0])"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Member {ans_name[0]}", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

{ans_name[0]} = [[0]] [[1]]  {siground(qty(ans[0],units[0]),4)}

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "mag", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(abs(ans[0]),units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "dir", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "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": "map(if(sign(ans[0])=s,1,0),s,[1,-1,0])"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Member {ans_name[1]}", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

{ans_name[1]} = [[0]] [[1]]  {siground(qty(ans[1],units[0]),4)}

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "mag", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(abs(ans[1]),units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "dir", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "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": "map(if(sign(ans[1])=s,1,0),s,[1,-1,0])"}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Member {ans_name[2]}", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

{ans_name[2]} = [[0]] [[1]]  {siground(qty(ans[2],units[0]),4)}

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "mag", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(abs(ans[2]),units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "dir", "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": "map(if(sign(ans[2])=s,1,0),s,[1,-1,0])"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Truss: maximum load", "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/truss150_ST2n1NE.png", "/srv/numbas/media/question-resources/truss150_ST2n1NE.png"], ["question-resources/FBD1_0gNiD65.png", "/srv/numbas/media/question-resources/FBD1_0gNiD65.png"], ["question-resources/FBD2_brSZxtl.png", "/srv/numbas/media/question-resources/FBD2_brSZxtl.png"], ["question-resources/FBD3_IU8eiX9.png", "/srv/numbas/media/question-resources/FBD3_IU8eiX9.png"], ["question-resources/FBD2_Vmzm7ke.png", "/srv/numbas/media/question-resources/FBD2_Vmzm7ke.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": ["mechanics", "Mechanics", "Statics", "statics", "truss", "zero-force-member"], "metadata": {"description": "Determine the maximum load on a truss given two constraints.  Truss  includes zero-force members.", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

Determine the maximum mass $m$ which may be applied to the truss without exceeding {tmax} kN in tension or {cmax} kN in compression in any member.

\n

", "advice": "

Note that members $AE$, $DF$ and $AF$ are zero force members, that $AD = DC$ and $BE = EF = FC$, and that angle $\\beta = 45°$

\n

Let $T$ be the weight of the load which has a mass $m$.    $T = m g$.

\n

\n

Joint C

\n

Draw a FBD of joint $C$.  The tensile forces on the pulley are equivalent to forces acting on the pin $C$.

\n

\n

\n

The two tension forces acting on joint $C$ resolve to a single force $T' = \\sqrt{2} T$ acting down and to the left at a 45° angle. Redraw the FBD to this. 

\n

\n

By inspection you can conclude:

\n

$DC = 0$  

\n

$FC = T'$ (compression).

\n

Joint B

\n

Draw a free body diagram of joint $B$.  

\n

\n

From $\\Sigma F_y = 0 $  you conclude that

\n

 $AB = T' \\sin{45°} = T$ (tension).

\n

\n

Apply Design Conditions

\n

Since we have two design constraints, you will need to check them both.

\n

\n

For Compression

\n

$FC = T' = \\sqrt{2} T=\\sqrt{2} m g $

\n

$FC <  \\var{cmax}$  kN

\n

$\\sqrt{2} m g  < \\var{cmax * 1000} $ N

\n

$m < \\frac{\\var{1000 cmax}}{\\sqrt{2} g}  = \\var{max1}$ kg

\n

\n

For Tension

\n

$AB = T =  m g $

\n

$AB <  \\var{tmax}$  kN

\n

$ m g  < \\var{1000 tmax} $ N

\n

$m < \\frac{\\var{1000 tmax}}{g}  = \\var{max2}$ kg

\n

\n

Solution

\n

The maximum mass will be the smaller of these two values.

\n

$m_{max} = \\var{answer}$ 

", "rulesets": {}, "variables": {"tmax": {"name": "tmax", "group": "Ungrouped variables", "definition": "cmax + random(-40..40#5 except 0)\n", "description": "", "templateType": "anything"}, "cmax": {"name": "cmax", "group": "Ungrouped variables", "definition": "random(50..100#5)\n", "description": "", "templateType": "anything"}, "max1": {"name": "max1", "group": "Ungrouped variables", "definition": "siground(cmax/sqrt(2)/9.81,3) 1000", "description": "", "templateType": "anything"}, "max2": {"name": "max2", "group": "Ungrouped variables", "definition": "siground(tmax/9.81,3) 1000", "description": "", "templateType": "anything"}, "answer": {"name": "answer", "group": "Ungrouped variables", "definition": "qty(min(max1,max2),'kg') \n", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["cmax", "tmax", "max1", "max2", "answer"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Maximum Load", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$m_{max} = $ [[0]]

\n

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "Max Load", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "{answer}", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}]}, {"name": "Frames ", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", "", ""], "variable_overrides": [[], [], [], [], [], []], "questions": [{"name": "Crossbuck frame", "extensions": ["geogebra", "quantities", "weh"], "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": [], "metadata": {"description": "

Find all forces on a two-part, symmetrical frame supporting a load. 

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

{geogebra_applet('c3ambsph',[['ab',scalar(ab)],['bc',scalar(bc)],['θ',theta+'°'],['r',scalar(r)]])}

\n

A {scalar(w)} {units[0]} cylinder {2 r} in diameter is lodged between two cross pieces which make an angle of {theta}° with each other as shown.   The length of each cross piece is {ab} from A to B and {bc} from B to C. Assume that the weight and width of the cross pieces are negligable and that the floor is smooth. 

\n

Determine the tension in horizontal rope C-C'.

\n

", "advice": "

Draw a free body diagram of the entire structure and find the reactions at A and A'. Because of symmetry it is apparent that A = A' = W/2.

\n

Next, draw a free body diagram of the cylinder and determine the reaction forces at D and D' which support it.

\n

$\\Sigma F_y = 0$

\n

$2 D_y = W$

\n

$ 2 D \\sin(\\var{theta/2}°) = \\var{w}$

\n

Next, draw a free body diagram of cross piece ABC. Take moments about point B to determine the tension in the cable.  Note that the perpendicular distance from B to D is $d_\\perp = r/\\tan(\\var{theta/2}°) $

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"T": {"name": "T", "group": "Ungrouped variables", "definition": "siground((ay ab sin(radians(theta/2)) + \n FD bd)/(bc cos(radians(theta/2))),4)\n\n\n\n", "description": "", "templateType": "anything", "can_override": false}, "debug": {"name": "debug", "group": "inputs", "definition": "false", "description": "", "templateType": "anything", "can_override": false}, "theta": {"name": "theta", "group": "inputs", "definition": "random(50..120#10)", "description": "", "templateType": "anything", "can_override": false}, "W": {"name": "W", "group": "inputs", "definition": "if(unit_sys='si', \n quantity(random(50..1000#10),'N'), \n quantity(random(10..400#25),'lb'))\n\n\n\n", "description": "", "templateType": "anything", "can_override": false}, "r": {"name": "r", "group": "inputs", "definition": "precround(bc * random(0.25..0.75),1)", "description": "", "templateType": "anything", "can_override": false}, "Ay": {"name": "Ay", "group": "Ungrouped variables", "definition": "W/2", "description": "", "templateType": "anything", "can_override": false}, "FD": {"name": "FD", "group": "Ungrouped variables", "definition": "W/(2 sin(radians(theta/2)))", "description": "", "templateType": "anything", "can_override": false}, "L": {"name": "L", "group": "inputs", "definition": "qty(\n if(unit_sys='si', \n random(2..4#0.2),\n random(6..14#2)),\n units[1])\n\n\n", "description": "", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "inputs", "definition": "if(unit_sys = 'si',['N','m'],['lb','ft'])", "description": "", "templateType": "anything", "can_override": false}, "bd": {"name": "bd", "group": "Ungrouped variables", "definition": "r/tan(radians(theta/2))", "description": "", "templateType": "anything", "can_override": false}, "ab": {"name": "ab", "group": "inputs", "definition": "qty(\n if(unit_sys='si', \n random(1..3#0.2),\n random(3..8)),\nunits[1])\n\n", "description": "", "templateType": "anything", "can_override": false}, "unit_sys": {"name": "unit_sys", "group": "inputs", "definition": "random('us','si')", "description": "", "templateType": "anything", "can_override": false}, "bc": {"name": "bc", "group": "inputs", "definition": "L-ab", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "ab <= L/3", "maxRuns": 100}, "ungrouped_variables": ["Ay", "FD", "bd", "T"], "variable_groups": [{"name": "inputs", "variables": ["L", "ab", "bc", "theta", "W", "r", "debug", "units", "unit_sys"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "m_n_2", "useCustomName": true, "customName": "Implications", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

What can be concluded from the problem statement? (Check all true statements.)

", "minMarks": "-5", "maxMarks": 0, "shuffleChoices": false, "displayType": "checkbox", "displayColumns": "2", "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "markingMethod": "sum ticked cells", "choices": ["$A_x = A_y$", "$A_x = A'_x$", "$A_x = 0$", "$A_y =0$", "$A_y = A'_y$", "The object is symmetrical.", "There are no horzontal reactions at the floor."], "matrix": ["-1", "1", "1", "-1", "1", "1", "1"], "distractors": ["", "Symmetry implies $A_x = A'_x$.", "Frictionless surface implies $A_x = A'_x =0$.", "", "Symmetry implies $A_y = A'_y$.", "The object and load are symmetrical.", "'smooth' implies a frictionless surface."]}, {"type": "gapfill", "useCustomName": true, "customName": "Reactions at A", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Draw a free body diagram of the entire structure and determine the components of the reactions at A. 

\n

$A_x$ = [[0]]  $A_y$ = [[1]]

\n

$A_y$ = {Ay}

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "$A_x$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(0,units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "$A_y$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "Ay", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Force at D", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Draw a free body diagram of the cylinder and determine the contact force at D.

\n

$D = $ [[0]]

\n

$D$ = {FD}

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "D", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "FD", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Tension", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Draw a free body diagram of member ABDC and determine the distance from B to D and the tension in the rope, T.

\n

$\\overline{BD}$ = [[0]] $\\qquad T$ = [[1]]

\n

BD = {bd}  T = {T}

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "distance", "marks": "5", "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": "engineering-answer", "useCustomName": true, "customName": "Tension", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "T", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Frame: A-Frame with load", "extensions": ["geogebra", "quantities", "weh"], "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", "frame", "Frame", "Mechanics", "mechanics", "Statics", "statics"], "metadata": {"description": "Solve for the internal forces at on a multipart frame.", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

{geogebra_applet('wrp4gmsn',var_1)}

\n

The frame shown supports a {F} load at point $F$.  Determine the $x$- and $y$- components of the forces acting on member $ADC$ at pins $A$, $D$ and $C$.

\n

", "advice": "

\n

$L = \\var{L}$ $b = \\var{b}$ $h =\\var{h}$  $d=\\var{d}$

\n

$DE = \\var{DE}$

\n

$EF = \\var{EF}$

\n

Start by drawing neat, labeled, consistent free body diagrams of the whole frame and each of its parts.  Exposed internal forces must occur in equal and opposite pairs.  In the diagram below, the external forces are drawn in red.

\n

{geogebra_applet('x3npnvsb',var_2)}

\n

Count the unknowns on each diagram.  If any diagram has three unknowns, consider starting there.  In this case FBD I has three unknowns ($A_x, A_y$, and $B$).

\n

FBD I

\n

 \\[\\begin{align} \\text{I: }\\Sigma M_A &= 0\\\\  B ( \\simplify[]{{AD}+{DE} + {AD} })  &= F( \\simplify[!collectNumbers]{{AD}+{DE} + {EF} })\\\\B&=\\var{F} \\left( \\dfrac{\\var{AD+qty(L,unit_d)}}{\\var{qty(b,unit_d)}}\\right) \\\\ &= \\var{b_y}\\uparrow \\\\\\\\\\text{I: }\\Sigma F_y &=0\\\\A_y+B &= F\\\\A_y &= \\var{F} - \\var{b_y}\\\\&=\\var{(a_y)}\\uparrow\\\\\\\\\\text{I: }\\Sigma F_x &= 0\\\\A_x&=0\\end{align}\\]

\n

FBD II

\n

With $A_x, A_y$, and $B$ known, the remaining free body diagrams all have four unknowns but, luckily in this problem, the lines of action of forces $E_x, E_y$, and $D_x$ all intersect at point $E$ on FBD II.  By taking moments there, we can find $D_y$.  If this was not the case, you would need to select two free body diagrams and take moments appropriately to yield two equations with two unknowns which can be solved simultaneously.  

\n

\\[\\begin{align} \\text{II: }\\Sigma M_E &=0\\\\ D_y(\\var{DE}) &= F(\\var{EF})\\\\D_y &= \\var{F}\\left(\\dfrac{\\var{EF}}{\\var{DE}}\\right)\\\\ &=\\var{d(D_y)}\\downarrow\\end{align}\\]

\n

FBD III

\n

With $A_x, A_y$ and $D_y$ found, only three unknowns remain on FBD III, so it can be solved to satisfy the problem statement.  Remember that negative results indicate that the force acts in the direction opposite to the one assumed on the free body diagram.

\n

\\[\\begin{align} \\text{III: }\\Sigma M_C &= 0\\\\ - A_y ( \\var{b/2}) - D_x(\\var{h-d}) - D_y(\\var{scalar(DE/2)})  &= 0 \\\\D_x &=\\dfrac{-\\var{b/2} A_y - \\var{scalar(DE/2)}D_y}{\\var{h-d}} \\\\ &=-\\dfrac{\\var{b/2} (\\var{d(A_y)}) +\\var{scalar(DE/2)}(\\var{d(D_y)})}{\\var{h-d}} \\\\&= \\var{d(d_x)} \\leftarrow\\\\\\\\\\text{III: }\\Sigma F_y &=0\\\\A_y+D_y - C_y &= 0\\\\C_y &= \\var{d(A_y)} +\\var{d(D_y)}\\\\&=\\var{d(C_y) }\\downarrow\\\\\\\\\\text{III: }\\Sigma F_x &= 0\\\\D_x-C_x&=0\\\\C_x &= \\var{d(C_x)} \\rightarrow \\end{align}\\]

\n

FBD II

\n

With $D_x$ determined, the remainin unknown on FBD II can be found.

\n

\\[\\begin{align} \\text{II: }\\Sigma F_x &= 0\\\\D_x-E_x&=0\\\\E_x &= \\var{d(E_x)} \\leftarrow \\end{align}\\]

\n

FBD IV

\n

All the unknown reactions are now known.  You can check your work by verifying that these force put member $CEB$ in equilibrium.  If they don't, you have made an error.

\n

\\[\\begin{align} \\text{IV: }\\Sigma M_c &\\stackrel{?}{=} 0\\\\ 0&\\stackrel{?}{=}  B_y (\\var{qty(b/2,unit_d)}) - E_y (\\var{DE/2}) + E_x (\\var{qty(h-d,unit_d)})\\\\0&\\stackrel{?}{=}   (\\var{d(B_y)})(\\var{qty(b/2,unit_d)}) -  (\\var{d(E_y)})(\\var{DE/2})  + (\\var{d(E_x)}) (\\var{qty(h-d,unit_d)})\\\\0&\\stackrel{?}{=}   (\\var{d(B_y qty(b/2,unit_d))}) -  (\\var{d(E_y DE/2)})  + (\\var{d(E_x qty(h-d,unit_d))})\\\\0&= \\var{check} \\, \\checkmark\\end{align}\\]

\n

\n

", "rulesets": {}, "variables": {"c_y": {"name": "c_y", "group": "solution", "definition": "A_y + D_y", "description": "

member ADC sigma fy

", "templateType": "anything"}, "d_y": {"name": "d_y", "group": "solution", "definition": "f EF/DE", "description": "

member DEF sum of moment about E

", "templateType": "anything"}, "e_y": {"name": "e_y", "group": "solution", "definition": "d_y + f", "description": "

member DEF sum forces in y

", "templateType": "anything"}, "debug": {"name": "debug", "group": "Ungrouped variables", "definition": "false", "description": "", "templateType": "anything"}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(1..3) h/4", "description": "

height of arm

", "templateType": "anything"}, "check": {"name": "check", "group": "solution", "definition": "scalar(b_y qty(b/2,unit_d) - e_y DE/2 + e_x qty(h-d,unit_d))", "description": "

member CEB sigma Mc 

", "templateType": "anything"}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(h/2..h#2)", "description": "

width between supports

", "templateType": "anything"}, "var_1": {"name": "var_1", "group": "Ungrouped variables", "definition": "[['b',b],['h',h],['L',L],\n['d',d],['unit','\"'+unit_d+'\"']]", "description": "

list passed to geogebra applet

", "templateType": "anything"}, "EF": {"name": "EF", "group": "solution", "definition": "qty(l,unit_d)-DE", "description": "", "templateType": "anything"}, "unit_F": {"name": "unit_F", "group": "Ungrouped variables", "definition": "if(unit_d='m','N','lb')", "description": "", "templateType": "anything"}, "F": {"name": "F", "group": "Ungrouped variables", "definition": "qty(random(10..500#50),unit_f)", "description": "", "templateType": "anything"}, "a_x": {"name": "a_x", "group": "solution", "definition": "qty(0,unit_f)", "description": "", "templateType": "anything"}, "DE": {"name": "DE", "group": "solution", "definition": "qty((h-d)/h b,unit_d)", "description": "", "templateType": "anything"}, "L": {"name": "L", "group": "Ungrouped variables", "definition": "random(scalar(DE)..b#0.5)", "description": "

length of horizontal arm

", "templateType": "anything"}, "d_x": {"name": "d_x", "group": "solution", "definition": "-(qty(b/2,unit_d) A_y + DE/2 D_y)/qty(h-d,unit_d)", "description": "

-\\dfrac{\\var{b/2} (\\var{A_y}) + \\var{scalar(DE/2)}(\\var{D_y})}{\\var{h-d}} 

\n

\n

 ex (b_y qty(b/2,unit_d) + e_y DE/2)/qty(h-d,unit_d)

\n

-(qty(b/2,unit_d) A_y + DE/2 D_y)/qty(h-d,unit_d)

", "templateType": "anything"}, "var_2": {"name": "var_2", "group": "Ungrouped variables", "definition": "[['b',b 6/h],['h',6],['L',L 6/h],\n['d',d 6/h],['unit','\"'+unit_d+'\"']]", "description": "

diagram scaled proportional to h =6

", "templateType": "anything"}, "unit_d": {"name": "unit_d", "group": "Ungrouped variables", "definition": "random('m','ft')", "description": "", "templateType": "anything"}, "h": {"name": "h", "group": "Ungrouped variables", "definition": "random(4..10#2)", "description": "

height of structure

", "templateType": "anything"}, "c_x": {"name": "c_x", "group": "solution", "definition": "d_x", "description": "", "templateType": "anything"}, "AD": {"name": "AD", "group": "solution", "definition": "qty(b/2 d/h,unit_d)", "description": "

sum of moment about A for entire frame

", "templateType": "anything"}, "e_x": {"name": "e_x", "group": "solution", "definition": "d_x", "description": "

fbd DEF sigma fx

", "templateType": "anything"}, "a_y": {"name": "a_y", "group": "solution", "definition": "f - b_y", "description": "

sum f_y for whole thing

", "templateType": "anything"}, "b_y": {"name": "b_y", "group": "solution", "definition": "f * (scalar(AD)+L)/b", "description": "

distance from a to force

", "templateType": "anything"}}, "variablesTest": {"condition": "scalar(AD)+L <> b and scalar(DE) <> L // prevent force over roller or pin E", "maxRuns": 100}, "ungrouped_variables": ["b", "h", "L", "d", "unit_d", "var_1", "F", "unit_F", "var_2", "debug"], "variable_groups": [{"name": "solution", "variables": ["AD", "DE", "EF", "b_y", "a_y", "d_y", "d_x", "e_y", "e_x", "c_y", "c_x", "check", "a_x"]}], "functions": {"d": {"parameters": [["q", "quantity"]], "type": "string", "language": "jme", "definition": "siground(q,4)"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Pin A", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$A_x =$ [[0]] [[1]]  {a_x} $A_y =$ [[2]] [[3]]  {d(a_y)}

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "Ax", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(0,unit_f)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "L-R", "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": ["←", "→", "Neither"], "matrix": [0, 0, "1"], "distractors": ["", "", ""]}, {"type": "engineering-answer", "useCustomName": true, "customName": "Ay", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "abs(A_y)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "U-D", "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": ["↑", "↓", "Neither"], "matrix": ["if(scalar(A_y)>0,1,0)", "if(scalar(A_y)<0,1,0)", "if(scalar(A_y)=0,1,0)"], "distractors": ["", "", ""]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Pin D", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$D_x =$ [[0]] [[1]]  {d(d_x)}$D_y =$ [[2]] [[3]]  {d(d_y)}

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "Dx", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "abs(D_x)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "L-R", "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": ["←", "→", "Neither"], "matrix": ["if(scalar(D_x)>0,1,0)", "if(scalar(D_x)<0,1,0)", "if(scalar(D_x)=0,1,0)"], "distractors": ["", "", ""]}, {"type": "engineering-answer", "useCustomName": true, "customName": "Dy", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "abs(D_y)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "U-D", "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": ["↑", "↓", "Neither"], "matrix": ["if(scalar(D_y)>0,1,0)", "if(scalar(D_y)<0,1,0)", "if(scalar(D_y)=0,1,0)"], "distractors": ["", "", ""]}], "sortAnswers": false}, {"type": "gapfill", "useCustomName": true, "customName": "Pin C", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$C_x =$ [[0]] [[1]]  {d(C_x)}$C_y =$ [[2]] [[3]]  {d(c_y)}

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "Cx", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "abs(C_x)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "L-R", "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": ["←", "→", "Neither"], "matrix": ["if(scalar(C_x)<0,1,0)", "if(scalar(C_x)>0,1,0)", "if(scalar(C_x)=0,1,0)"], "distractors": ["", "", ""]}, {"type": "engineering-answer", "useCustomName": true, "customName": "Cy", "marks": "4", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "abs(C_y)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "1_n_2", "useCustomName": true, "customName": "U-D", "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": ["↑", "↓", "Neither"], "matrix": ["if(scalar(C_y)<0,1,0)", "if(scalar(C_y)>0,1,0)", "if(scalar(C_y)=0,1,0)"], "distractors": ["", "", ""]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Frame: A-frame Difficulty 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": [], "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", "Frame", "frame", "Mechanics", "mechanics", "Statics", "statics"], "metadata": {"description": "

An A-frame structure supporting a load at the top.  Simple because both legs are two force bodies.

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

{geogebra_applet('qe7xhnse',[[\"B\",B],[\"C\",C],['units','\"'+units[1]+'\"']]+ggb_load )}

\n

The A-frame shown supports a {F_w} load as shown.  Determine the scalar components of the reactions at pins A and C.

\n

", "advice": "

{geogebra_applet('uyjv6v8r',[[\"B\",B],[\"C\",C]] + ggb_load )}

\n

\n

Strategy:

\n

Note that members AB and BC are two-force bodies and both act on pin B in known directions.  Draw a free body diagram of the two members and of the forces acting on pin at B, and solve it for the magnitudes of A and C using the equilibrium equation method or the force-triangle method

\n

Known:

\n

$W$ = {F_w}

\n

Determine necessary angles:

\n

$\\alpha = \\tan^{-1}\\left(\\frac{\\var{y1}}{\\var{x1}}\\right) = \\var{siground(alpha,4)}$°  This is the angle between force $\\textbf{A}$ and the horizontal.

\n

$\\beta = \\tan^{-1}\\left(\\frac{\\var{y2}}{\\var{x2}}\\right) = \\var{siground(beta,4)}$°   This is the angle between force $\\textbf{C}$ and the horizontal.

\n

Using the law of sines to solve for forces A and C:

\n

$\\dfrac{W}{\\sin(\\alpha+\\beta)} = \\dfrac{A}{\\sin(90°-\\beta)} = \\dfrac{C}{\\sin(90°-\\alpha)}$

\n

$A = W \\dfrac{\\cos(\\beta)}{\\sin(\\alpha+\\beta)}$ = {display(magA)} $\\nearrow$

\n

$C = W \\dfrac{\\cos(\\alpha)}{\\sin(\\alpha+\\beta)}$ = {display(magC)}  $\\nwarrow$

\n

Find the scalar components of the forces at pins A and C.

\n

Note: Scalar components have a sign which indicates direction: positive values indicate $\\uparrow$  or $\\rightarrow$, negative indicate $\\downarrow$ or $\\leftarrow$.

\n

$\\begin{align} A_x = A \\cos(\\alpha) &= \\var{qty(vecA[0],units[0])}& &C_x = C \\cos(\\beta) = \\var{qty(vecC[0],units[0])} \\\\  A_y = A \\sin(\\alpha) &= \\var{qty(vecA[1],units[0])}  &&      C_y = C \\sin(\\beta) = \\var{qty(vecC[1],units[0])} \\end{align}$

\n

Check

\n

You can use the equations of equilibrium to verify that these answers put point $B$ in equilibrium.

\n

$\\begin{align}A_x  &\\stackrel{?}{=}C_x  &A_y + C_y &\\stackrel{?}{=}W\\\\ \\var{vecA[0]} &= \\var{-vecC[0]} \\quad \\checkmark & \\var{vecA[1]} + \\var{vecC[1]}  &= \\var{W} \\quad \\checkmark\\\\ \\end{align}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"magA": {"name": "magA", "group": "magnitudes", "definition": "F_w cos(radians(beta))/sin(radians(alpha+beta))", "description": "", "templateType": "anything", "can_override": false}, "F_w": {"name": "F_w", "group": "magnitudes", "definition": "qty(w,units[0])", "description": "", "templateType": "anything", "can_override": false}, "fd": {"name": "fd", "group": "Ungrouped variables", "definition": "0//random(-250..250#50 except 0)", "description": "", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "Ungrouped variables", "definition": "random(['N','m'],['lb','ft'])", "description": "", "templateType": "anything", "can_override": false}, "B": {"name": "B", "group": "Ungrouped variables", "definition": "vector(random(3..5),random(3..5))", "description": "", "templateType": "anything", "can_override": false}, "C": {"name": "C", "group": "Ungrouped variables", "definition": "vector(B[0]+ random(3..5),random(-2..3))", "description": "", "templateType": "anything", "can_override": false}, "ggb_load": {"name": "ggb_load", "group": "Ungrouped variables", "definition": "[['me', 0],['fd', 0],['w',-w]]", "description": "

Below this will select either the force or the moment, but not both.

\n

\n

random(
[['fd',fd], ['me', 0]],
[['me',me], ['fd', 0]]
) + [['w',0]]

", "templateType": "anything", "can_override": false}, "debug": {"name": "debug", "group": "Ungrouped variables", "definition": "false", "description": "", "templateType": "anything", "can_override": false}, "sigma_f": {"name": "sigma_f", "group": "vectors", "definition": "vecW+vecA+vecC", "description": "", "templateType": "anything", "can_override": false}, "beta": {"name": "beta", "group": "magnitudes", "definition": "degrees(angle(vector(-1,0),B-C))", "description": "", "templateType": "anything", "can_override": false}, "vecC": {"name": "vecC", "group": "vectors", "definition": "siground(scalar(magC) *\nvector(cos(radians(180-beta)),\n sin(radians(180-beta))),4)", "description": "", "templateType": "anything", "can_override": false}, "y1": {"name": "y1", "group": "magnitudes", "definition": "qty(B[1],units[1])", "description": "", "templateType": "anything", "can_override": false}, "x1": {"name": "x1", "group": "magnitudes", "definition": "qty(B[0],units[1])", "description": "", "templateType": "anything", "can_override": false}, "vecW": {"name": "vecW", "group": "vectors", "definition": "vector(0,-w)", "description": "", "templateType": "anything", "can_override": false}, "y2": {"name": "y2", "group": "magnitudes", "definition": "qty(abs(b[1]-c[1]),units[1])", "description": "", "templateType": "anything", "can_override": false}, "alpha": {"name": "alpha", "group": "magnitudes", "definition": "degrees(angle(vector(1,0),B))", "description": "", "templateType": "anything", "can_override": false}, "vecA": {"name": "vecA", "group": "vectors", "definition": "siground(scalar(magA)*\nvector(cos(radians(alpha)),\n sin(radians(alpha))),4)", "description": "", "templateType": "anything", "can_override": false}, "magC": {"name": "magC", "group": "magnitudes", "definition": "F_w cos(radians(alpha))/sin(radians(alpha+beta))", "description": "", "templateType": "anything", "can_override": false}, "me": {"name": "me", "group": "Ungrouped variables", "definition": "0//random(-1000..1000#100 except 0)", "description": "", "templateType": "anything", "can_override": false}, "w": {"name": "w", "group": "Ungrouped variables", "definition": "random(100..500#25)", "description": "", "templateType": "anything", "can_override": false}, "x2": {"name": "x2", "group": "magnitudes", "definition": "qty(abs(b[0]-c[0]),units[1])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "B[1]<> C[1] and B[0] <> B[1] and C[0] <> C[1]", "maxRuns": 100}, "ungrouped_variables": ["B", "C", "fd", "me", "w", "units", "ggb_load", "debug"], "variable_groups": [{"name": "magnitudes", "variables": ["F_w", "alpha", "beta", "magA", "magC", "x1", "y1", "x2", "y2"]}, {"name": "vectors", "variables": ["vecW", "vecA", "vecC", "sigma_f"]}], "functions": {"display": {"parameters": [["Q", "quantity"]], "type": "string", "language": "jme", "definition": "string(siground(q,4))"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$A_x = $ [[0]] $A_y = $ [[1]] $C_x = $ [[2]] $C_y = $ [[3]]  

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "$A_x$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecA[0],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "$A_y$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecA[1],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "$C_x$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecC[0],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "$C_y$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecC[1],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Frame: A-frame Difficulty 2", "extensions": ["geogebra", "quantities", "stats", "weh"], "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", "frame", "Frame", "Mechanics", "mechanics", "statics", "Statics"], "metadata": {"description": "

An A-frame structure supporting a force or a moment.  One leg is a two force body.

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

{geogebra_applet('qe7xhnse',[[\"B\",B],[\"C\",C],['units','\"'+units[1]+'\"']]+ggb_load )}

\n

The A-frame shown supports a {description} as shown.  

\n

Determine the scalar components of the reactions at pins A and C.  

\n

Note: the sign of a scalar component indicates the sense of the force. A positive sense indicates the force points towards the positive end of the corresponding axis. 

\n

\n

", "advice": "

Strategy:

\n

       Draw a free body diagram of the entire frame and each of its legs.  Note that member {if(Fd=0,\"AB\",\"BC\")} is a two-force body and the direction of the line of action of force {if(Fd=0,\"A\",\"C\")} is known;  that means that FBD {if(Fd=0,'III','II')} has three unknowns. FBD I has four unknowns, and FBD {if(Fd=0,'II','III')} has no knowns.  

\n

{geogebra_applet('p6rz9bqx',[[\"B\",B],[\"C\",C]] + ggb_load )}

\n

Known:

\n

$M_E = \\var{display(abs(M_E))}$ $D = \\var{display(abs(F_D))}$

\n

Determine necessary angles:

\n

$\\alpha = \\tan^{-1}\\left(\\frac{\\var{y1}}{\\var{x1}}\\right) = \\var{siground(alpha,4)}$°

\n

$\\beta = \\tan^{-1}\\left(\\frac{\\var{y2}}{\\var{x2}}\\right) = \\var{siground(beta,4)}$°

\n

Start with FBD {if(Fd=0,'III','II')} which has three unknowns, and take moments at point {if(Fd=0,'C','A')} to find force {if(Fd=0,\"A\",\"C\")}

\n
\n

II: $\\Sigma M_A = 0$

\n

$\\simplify{{sign(-fd)} D }  (\\var{y1/2}) + C_x (\\var{y1}) + C_y ( \\var{x1}) = 0$

\n

$\\simplify{{sign(-fd)} D} (\\var{y1/2}) + (C \\cos \\beta)  (\\var{y1}) + (C  \\sin \\beta) (\\var{x1}) = 0$

\n

$ C   = \\dfrac{\\simplify{{sign(fd)} D } (\\var{y1/2}) }{ (\\var{y1}) \\cos \\beta + (\\var{x1}) \\sin \\beta} = \\dfrac{ \\var{ F_D y1 /2 }}{\\var{display(y1 * cos(radians(beta)) + x1 * sin(radians(beta)))}} = \\var{display(magC)}$

\n

$C_x = C \\cos \\beta  = \\var{display(qty(-vecC[0],units[0]))} = \\var{display(abs(qty(vecC[0],units[0])))} \\var{if(vecC[0]>0,latex('\\\\rightarrow'),latex('\\\\leftarrow'))}$

\n

$C_y = C  \\sin \\beta  = \\var{display(qty(vecC[1],units[0]))} =  \\var{display(abs(qty(vecC[1],units[0])))} \\var{if(vecC[1]<0,latex('\\\\downarrow'),latex('\\\\uparrow'))}$ 

\n

\n
\n
\n

II: $\\Sigma M_C = 0$

\n

$\\simplify{M_E }   + A_x (\\var{y2}) + A_y ( \\var{x2}) = 0$

\n

$\\simplify{M_E} + (A \\cos \\alpha)  (\\var{y2}) + (A  \\sin \\alpha) (\\var{x2}) = 0$

\n

$ A = \\dfrac{\\simplify{- M_E }}{ (\\var{y2}) \\cos \\alpha + (\\var{x2}) \\sin \\alpha} = \\dfrac{ \\var{M_E }}{\\var{display(y2 * cos(radians(alpha)) + x2 * sin(radians(alpha)))}} = \\var{display(magA)}$

\n

$A_x = A \\cos \\alpha  = \\var{display(qty(vecA[0],units[0]))} = \\var{display(abs(qty(vecA[0],units[0])))} \\var{if(vecA[0]<0,latex('\\\\leftarrow'),latex('\\\\rightarrow'))}$

\n

$A_y = A  \\sin \\alpha  = \\var{display(qty(vecA[1],units[0]))} =  \\var{display(abs(qty(vecA[1],units[0])))}\\var{if(vecA[1]<0,latex('\\\\downarrow'),latex('\\\\uparrow'))}$

\n

\n
\n

Apply $\\Sigma F_x = 0$ and $\\Sigma F_y=0$ to FBD I to find the reactions at {if(fd=0,'C','A')}.

\n
\n

$\\begin{align} \\Sigma F_x &= 0\\\\ A_x - C_x  &=0\\\\ C_x &= A_x\\\\ &= (\\var{display(qty(vecA[0],units[0]))}) \\\\ &= \\var{display(abs(qty(vecC[0],units[0])))} \\var{if(vecC[0]<0,latex('\\\\leftarrow'),latex('\\\\rightarrow'))} \\end{align}$  

\n

$\\begin{align} \\Sigma F_y &= 0\\\\ C_y +A_y & = 0\\\\ C_y &= - A_y \\\\&= -(\\var{display(qty(vecA[1],units[0]))})\\\\  &=  \\var{display(abs(qty(vecC[1],units[0])))} \\var{if(vecC[1]>0,latex('\\\\downarrow'),latex('\\\\uparrow'))} \\end{align}$ 

\n
\n

\n
\n

$\\begin{align} \\Sigma F_x &= 0\\\\   \\simplify{ A_x  +  {sign(fd)} D } - C_x &= 0\\\\ A_x &= \\simplify{C_x - {sign(fd)} D } \\\\&= \\simplify[!collectNumbers]{({-siground(vecC[0],4)}) + ({-vecD[0]})}\\\\ &= \\simplify{({-siground(vecC[0],4)}) + ({-vecD[0]})}\\\\&= \\var{display(abs(qty(vecA[0],units[0])))} \\var{if(vecA[0]<0,latex('\\\\leftarrow'),latex('\\\\rightarrow'))} \\end{align}$  

\n

$\\begin{align}\\Sigma F_y &= 0\\\\ A_y + C_y &=0\\\\A_y &= -C_y \\\\ &= -( \\var{display(qty(vecC[1],units[0]))}) \\\\ &=  \\var{display(abs(qty(vecA[1],units[0])))} \\var{if(vecA[1]<0,latex('\\\\downarrow'),latex('\\\\uparrow'))} \\end{align}$

\n
", "rulesets": {}, "variables": {"me": {"name": "me", "group": "Ungrouped variables", "definition": "load[1]", "description": "

the magnitude of the moment

", "templateType": "anything"}, "beta": {"name": "beta", "group": "magnitudes", "definition": "degrees(angle(vector(-1,0),B-C))", "description": "", "templateType": "anything"}, "w": {"name": "w", "group": "Ungrouped variables", "definition": "0//random(100..500#25)", "description": "", "templateType": "anything"}, "x2": {"name": "x2", "group": "magnitudes", "definition": "qty(abs(b[0]-c[0]),units[1])", "description": "", "templateType": "anything"}, "y1": {"name": "y1", "group": "magnitudes", "definition": "qty(B[1],units[1])", "description": "", "templateType": "anything"}, "magA": {"name": "magA", "group": "magnitudes", "definition": "M_E/(y2 * cos(radians(alpha)) + x2 sin(radians(alpha)))\n\n", "description": "

\n

magnidude of force a in version 1 only

", "templateType": "anything"}, "F_w": {"name": "F_w", "group": "magnitudes", "definition": "qty(w,units[0])", "description": "", "templateType": "anything"}, "y2": {"name": "y2", "group": "magnitudes", "definition": "qty(abs(b[1]-c[1]),units[1])", "description": "", "templateType": "anything"}, "version": {"name": "version", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "

version 0 = force d

\n

version 1 = moment e

", "templateType": "anything"}, "vecA": {"name": "vecA", "group": "vectors", "definition": "[-vecD - scalar(magC) * vector(cos(radians(180-beta)), sin(radians(180-beta))),\nscalar(magA)* vector(cos(radians(alpha)), sin(radians(alpha)))][version]", "description": "

reactions at A for both versions as a vector

", "templateType": "anything"}, "alpha": {"name": "alpha", "group": "magnitudes", "definition": "degrees(angle(vector(1,0),B))", "description": "", "templateType": "anything"}, "units": {"name": "units", "group": "Ungrouped variables", "definition": "random(['N','m'],['lb','ft'])", "description": "", "templateType": "anything"}, "M_E": {"name": "M_E", "group": "magnitudes", "definition": "qty(me,units[0]+\"*\"+units[1])", "description": "", "templateType": "anything"}, "fd": {"name": "fd", "group": "Ungrouped variables", "definition": "Load[0]", "description": "

the magnitude of the force

", "templateType": "anything"}, "debug": {"name": "debug", "group": "Ungrouped variables", "definition": "false", "description": "", "templateType": "anything"}, "B": {"name": "B", "group": "Ungrouped variables", "definition": "vector(random(3..5),random(3..5))", "description": "

location of pin B

", "templateType": "anything"}, "Load": {"name": "Load", "group": "Ungrouped variables", "definition": "[[random(-500..500#25 except 0),0],\n[0,random(100..2000#100) random(1,-1)]]\n[version]", "description": "

establishes whether force or moment load is active.  Weight at B is always zero in this problem

", "templateType": "anything"}, "ggb_load": {"name": "ggb_load", "group": "Ungrouped variables", "definition": "[['fd',fd],['me',me],['w',0]]", "description": "

This will select either the force or the moment, but not both.  Weight is always zero.

\n

\n

", "templateType": "anything"}, "C": {"name": "C", "group": "Ungrouped variables", "definition": "vector(B[0]+ random(3..5),random(-2..3))", "description": "

Location of pin C.  Pin A is at (0,0)

", "templateType": "anything"}, "vecC": {"name": "vecC", "group": "vectors", "definition": "[scalar(magC) * vector(cos(radians(180-beta)),sin(radians(180-beta))),\n-scalar(magA)* vector(cos(radians(alpha)), sin(radians(alpha)))][version]", "description": "

reactions at C for both versions as a vector

", "templateType": "anything"}, "sigma_f": {"name": "sigma_f", "group": "vectors", "definition": "vecW+vecA+vecC + vecD", "description": "", "templateType": "anything"}, "F_d": {"name": "F_d", "group": "magnitudes", "definition": "qty(fd,units[0])", "description": "", "templateType": "anything"}, "x1": {"name": "x1", "group": "magnitudes", "definition": "qty(B[0],units[1])", "description": "", "templateType": "anything"}, "vecW": {"name": "vecW", "group": "vectors", "definition": "vector(0,-w)", "description": "

always 0 in this problem

", "templateType": "anything"}, "magC": {"name": "magC", "group": "magnitudes", "definition": "(F_D y1 /2)/\n(y1 * cos(radians(beta)) + \nx1 * sin(radians(beta)))\n \n", "description": "

magnitude of reaction in version 0 only

", "templateType": "anything"}, "vecD": {"name": "vecD", "group": "vectors", "definition": "vector(scalar(f_d),0)", "description": "", "templateType": "anything"}, "description": {"name": "description", "group": "magnitudes", "definition": "if(version=0,\n display(abs(F_d)) + \" force $D$ at the midpoint of member AB\",\n display(abs(M_E)) + if(me>0,\" counter-\",\" \") + \"clockwise moment $M_E$ \")", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "B[1]<> C[1] and C[1]<>0", "maxRuns": 100}, "ungrouped_variables": ["B", "C", "fd", "me", "w", "units", "ggb_load", "Load", "version", "debug"], "variable_groups": [{"name": "magnitudes", "variables": ["F_w", "F_d", "M_E", "alpha", "beta", "magA", "magC", "x1", "y1", "x2", "y2", "description"]}, {"name": "vectors", "variables": ["vecW", "vecA", "vecC", "sigma_f", "vecD"]}], "functions": {"display": {"parameters": [["Q", "quantity"]], "type": "string", "language": "jme", "definition": "string(siground(q,4))"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$A_x = $ [[0]] $A_y = $ [[1]] $C_x = $ [[2]] $C_y = $ [[3]]  

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "$A_x$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecA[0],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "$A_y$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecA[1],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "$C_x$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecC[0],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "$C_y$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecC[1],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Frame: A-frame Difficulty 3", "extensions": ["geogebra", "quantities", "weh"], "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": ["frame", "Frame", "Mechanics", "mechanics", "Rigid body equilibrium", "rigid body equilibrium", "Statics", "statics"], "metadata": {"description": "

An A-frame structure supporting a force and a moment. The feet are at the same vertical position, so taking moments at one foot yields the y component of the reaction at the other.

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

{geogebra_applet('qe7xhnse',[[\"B\",B],[\"C\",C],['units','\"'+units[1]+'\"']]+ggb_load )}

\n

The A-frame shown supports a {display(abs(F_d))} force $D$ at the midpoint of member AB and a {display(abs(M_E)) } {if(me>0,\"counter-\",\"\")}clockwise moment $M_E$ at E as shown.  

\n

Determine the scalar components of the reactions at pins A and C.  

\n

Note: the sign of a scalar component indicates the sense of the force. A positive sense indicates the force points towards the positive end of the corresponding axis. 

\n

\n

", "advice": "

Strategy:

\n

       Draw a free body diagram of the entire frame and each of its legs.  Note that members AB or BC are not two-force bodies; therefore the direction of the forces at A and C don't align with the members and should be represented with x and y components.  In this case all three of the free body diagrams have four unknowns.  Fortunately, the lines of action of three of the unknowns on FBD I intersect at points A and C.

\n

{geogebra_applet('p6rz9bqx',[[\"B\",B],[\"C\",C]] + ggb_load )}

\n

Known:

\n

$M_E = \\var{display(abs(M_E))}$ and $D = \\var{display(abs(F_D))}$

\n

Determine necessary angles:

\n

$\\alpha = \\tan^{-1}\\left(\\frac{\\var{y1}}{\\var{x1}}\\right) = \\var{siground(alpha,4)}$°

\n

$\\beta = \\tan^{-1}\\left(\\frac{\\var{y2}}{\\var{x2}}\\right) = \\var{siground(beta,4)}$°

\n

Start with FBD I  and take moments at point A to find force $C_y$. 

\n
\n

$\\begin{align} \\textrm{I: } \\Sigma M_A &= 0\\\\ \\simplify{{sign(-fd)} D   ({y1/2}) + {sign(me)} M_E } + C_y ( \\var{x1 + x2}) &= 0\\\\ C_y &= \\dfrac{\\simplify{({sign(fd)} D   ({y1/2})  + {-sign(me)} M_E )}} { \\simplify{({x1+x2})}}\\\\ &= \\var{display(Cy)}\\\\ &= \\var{display(abs(Cy))}  \\var{if(VecC[1]<0,latex('\\\\downarrow'),latex('\\\\uparrow'))} \\end{align}$

\n

Use FBD III and take moment about B to find $C_x$.

\n

$\\begin{align} \\textrm{III: } \\Sigma M_B &= 0\\\\  \\simplify{- C_x ({y1}) + C_y ({x2}) + {sign(me)} M_E }  &= 0\\\\ C_x &= \\dfrac{\\simplify{( C_y ({x2})  + {-sign(me)} M_E )}} {\\var{y2}}\\\\ &= \\var{display(Cx)}\\\\ &= \\var{display(abs(Cx))}  \\var{if(VecC[0]<0,latex('\\\\leftarrow'),latex('\\\\rightarrow'))} \\end{align}$

\n

Apply $\\Sigma F_x = 0$ and $\\Sigma F_y=0$ to FBD I to find the reactions at A.

\n
\n
\n

$\\begin{align} \\Sigma F_x &= 0\\\\   \\simplify{ A_x  +  {sign(fd)} D } - C_x &= 0\\\\ A_x &= \\simplify{C_x - {sign(fd)} D } \\\\&= \\simplify[!collectNumbers]{({-siground(vecC[0],4)}) + ({-vecD[0]})}\\\\ &= \\simplify{({-siground(vecC[0],4)}) + ({-vecD[0]})}\\\\&= \\var{display(abs(qty(vecA[0],units[0])))} \\var{if(vecA[0]<0,latex('\\\\leftarrow'),latex('\\\\rightarrow'))} \\end{align}$  

\n

$\\begin{align}\\Sigma F_y &= 0\\\\ A_y + C_y &=0\\\\A_y &= -C_y \\\\ &= -( \\var{display(qty(vecC[1],units[0]))}) \\\\ &=  \\var{display(abs(qty(vecA[1],units[0])))} \\var{if(vecA[1]<0,latex('\\\\downarrow'),latex('\\\\uparrow'))} \\end{align}$

\n
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"F_d": {"name": "F_d", "group": "quantities", "definition": "qty(fd,units[0])", "description": "", "templateType": "anything", "can_override": false}, "vecD": {"name": "vecD", "group": "vectors", "definition": "vector(scalar(f_d),0)", "description": "", "templateType": "anything", "can_override": false}, "x2": {"name": "x2", "group": "quantities", "definition": "qty(abs(b[0]-c[0]),units[1])", "description": "", "templateType": "anything", "can_override": false}, "debug": {"name": "debug", "group": "Ungrouped variables", "definition": "false", "description": "", "templateType": "anything", "can_override": false}, "F_w": {"name": "F_w", "group": "quantities", "definition": "qty(w,units[0])", "description": "", "templateType": "anything", "can_override": false}, "M_E": {"name": "M_E", "group": "quantities", "definition": "qty(me,units[0]+\"*\"+units[1])", "description": "", "templateType": "anything", "can_override": false}, "alpha": {"name": "alpha", "group": "quantities", "definition": "degrees(angle(vector(1,0),B))", "description": "", "templateType": "anything", "can_override": false}, "Cy": {"name": "Cy", "group": "quantities", "definition": "( F_d y1/2 - M_E ) /(x1+x2)", "description": "

( sign(fd)} D   y1/2  + -sign(me) M_E ) /(x1+x2)

", "templateType": "anything", "can_override": false}, "vecW": {"name": "vecW", "group": "vectors", "definition": "vector(0,-w)", "description": "

always 0 in this problem

", "templateType": "anything", "can_override": false}, "w": {"name": "w", "group": "Ungrouped variables", "definition": "0//random(100..500#25)", "description": "", "templateType": "anything", "can_override": false}, "beta": {"name": "beta", "group": "quantities", "definition": "degrees(angle(vector(-1,0),B-C))", "description": "", "templateType": "anything", "can_override": false}, "fd": {"name": "fd", "group": "Ungrouped variables", "definition": "random(-500..500#25 except 0)", "description": "

the magnitude of the force

", "templateType": "anything", "can_override": false}, "description": {"name": "description", "group": "quantities", "definition": "display(abs(F_d)) + \" force $D$ at the midpoint of member AB and\"+\n display(abs(M_E)) + if(me>0,\" counter-\",\" \") + \"clockwise moment $M_E$ \"", "description": "", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "Ungrouped variables", "definition": "random(['N','m'],['lb','ft'])", "description": "", "templateType": "anything", "can_override": false}, "ggb_load": {"name": "ggb_load", "group": "Ungrouped variables", "definition": "[['fd',fd],['me',me],['w',0]]", "description": "

This will select either the force or the moment, but not both.  Weight is always zero.

\n

\n

", "templateType": "anything", "can_override": false}, "x1": {"name": "x1", "group": "quantities", "definition": "qty(B[0],units[1])", "description": "", "templateType": "anything", "can_override": false}, "B": {"name": "B", "group": "Ungrouped variables", "definition": "vector(random(3..5),random(3..5))", "description": "

location of pin B

", "templateType": "anything", "can_override": false}, "me": {"name": "me", "group": "Ungrouped variables", "definition": "random(100..2000#100) random(1,-1)", "description": "

the magnitude of the moment

", "templateType": "anything", "can_override": false}, "sigma_f": {"name": "sigma_f", "group": "vectors", "definition": "vecW+vecA+vecC + vecD", "description": "", "templateType": "anything", "can_override": false}, "y2": {"name": "y2", "group": "quantities", "definition": "qty(abs(b[1]-c[1]),units[1])", "description": "", "templateType": "anything", "can_override": false}, "C": {"name": "C", "group": "Ungrouped variables", "definition": "vector(B[0]+ random(3..5),0)", "description": "

Location of pin C.  Pin A is at (0,0)

", "templateType": "anything", "can_override": false}, "vecA": {"name": "vecA", "group": "vectors", "definition": "-(vecD+VecC)", "description": "

reactions at A for both versions as a vector

", "templateType": "anything", "can_override": false}, "vecC": {"name": "vecC", "group": "vectors", "definition": "vector(scalar(-cx),scalar(cy))", "description": "

reactions at C for both versions as a vector

", "templateType": "anything", "can_override": false}, "Cx": {"name": "Cx", "group": "quantities", "definition": "( Cy x2 + M_E )/ y2", "description": "", "templateType": "anything", "can_override": false}, "y1": {"name": "y1", "group": "quantities", "definition": "qty(B[1],units[1])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "B[1]<> C[1] ", "maxRuns": 100}, "ungrouped_variables": ["B", "C", "fd", "me", "w", "units", "ggb_load", "debug"], "variable_groups": [{"name": "quantities", "variables": ["F_w", "F_d", "M_E", "alpha", "beta", "x1", "y1", "x2", "y2", "description", "Cy", "Cx"]}, {"name": "vectors", "variables": ["vecW", "vecA", "vecC", "sigma_f", "vecD"]}], "functions": {"display": {"parameters": [["Q", "quantity"]], "type": "string", "language": "jme", "definition": "string(siground(q,4))"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$A_x = $ [[0]]   $A_y = $ [[1]] $C_x = $ [[2]]   $C_y = $ [[3]]

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "$A_x$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecA[0],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "$A_y$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecA[1],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "$C_x$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecC[0],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "$C_y$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecC[1],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Frame: A-frame Difficulty 4", "extensions": ["geogebra", "quantities", "stats"], "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": [], "metadata": {"description": "

An A-frame structure supporting a force and a moment. The feet are at the different vertical positions so the solution will require simultaneous equations, unless you rotate the coordinate system.

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

{geogebra_applet('qe7xhnse',[[\"B\",B],[\"C\",C],['units','\"'+units[1]+'\"']]+ggb_load )}

\n

The A-frame shown supports a {display(abs(F_d))} force $D$ at the midpoint of member AB and a {display(abs(M_E)) } {if(me>0,\"counter-\",\"\")}clockwise moment $M_E$ at E as shown.  

\n

Determine the scalar components of the reactions at pins A and C.  

\n

Note: the sign of a scalar component indicates the sense of the force. A positive sense indicates the force points towards the positive end of the corresponding axis. 

", "advice": "

Strategy:

\n

       Draw a free body diagram of the entire frame and each of its legs.  Note that members AB or BC are not two-force bodies; therefore the direction of the forces at A and C don't align with the members and should be represented with x and y components.  Since all of the free body diagrams have four unknowns, there is no simple way to find one unknown using just one equation.  The general approach in this case is to write two equations which contain the same two unknowns, then solve them simultaneously.  

\n

{geogebra_applet('p6rz9bqx',[[\"B\",B],[\"C\",C]] + ggb_load )}

\n

Known:

\n

$M_E = \\var{display(abs(M_E))}$ and $D = \\var{display(abs(F_D))}$

\n

Determine necessary angles:

\n

$\\begin{align}\\alpha &= \\tan^{-1}\\left(\\frac{\\var{y1}}{\\var{x1}}\\right) = \\var{siground(alpha,4)}°  & \\beta &= \\tan^{-1}\\left(\\frac{\\var{y2}}{\\var{x2}}\\right) = \\var{siground(beta,4)}°\\end{align}$

\n

Use FBDs II and III to generate two independent equations containing $B_x$ and $B_y$:

\n
\n

$\\begin{align} \\textrm{II: } \\Sigma M_A &= 0    & \\textrm{III: } \\Sigma M_C &= 0\\\\B_x (\\var{y1}) + B_y (\\var{x1}) &=  \\simplify{{sign(fd)} D   ({y1/2})}&   - B_x (\\var{y2}) + B_y (\\var{x2}) &=  \\simplify{ - {sign(me)} M_E  } \\\\  \\var{scalar(y1)} B_x + \\var{scalar(x1)}B_y& = \\var{fd scalar( y1/2) }\\qquad (1) &  - \\var{scalar(y2)} B_x + \\var{Scalar(x2)} B_y &=  \\var{scalar(-M_E ) }\\qquad (2)\\end{align}$

\n

Solve equations (1) and (2) simultaneously to find $B_x$ and $B_y$:

\n

$\\qquad B_x = \\var{display(Bx)}  \\qquad\\qquad\\qquad\\qquad\\qquad  B_y = \\var{display(By)}$

\n

From FBD III:

\n

$\\begin{align} \\textrm{III: }\\Sigma F_x &= 0  &   \\textrm{III: }\\Sigma F_y &= 0 \\\\  C_x &= B_x & C_y & = B_y \\\\ &= \\var{display(abs(Cx))}  \\var{if(vecC[0]<0,latex('\\\\leftarrow'),latex('\\\\rightarrow'))}& &= \\var{display(abs(Cy))} \\var{if(vecC[1]<0,latex('\\\\downarrow'),latex('\\\\uparrow'))} \\end{align}$

\n

From FBD II:

\n
\n
\n

$\\begin{align} \\textrm{II: }\\Sigma F_x &= 0 & \\textrm{II: } \\Sigma F_y &= 0\\\\ A_x &= \\simplify{B_x - {sign(fd)} D }  & A_y &= -B_y  \\\\&= \\simplify[!collectNumbers]{({display(-qty(vecC[0],units[0]))}) + ({-F_D})}& &=  - ( \\var{display(qty(vecC[1],units[0]))}) \\\\ &=\\var{display(abs(qty(vecA[0],units[0])))} \\var{if(vecA[0]<0,latex('\\\\leftarrow'),latex('\\\\rightarrow'))} & &= \\var{display(abs(qty(vecA[1],units[0])))} \\var{if(vecA[1]<0,latex('\\\\downarrow'),latex('\\\\uparrow'))}\\end{align}$  

\n
", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"vecW": {"name": "vecW", "group": "vectors", "definition": "vector(0,-w)", "description": "

always 0 in this problem

", "templateType": "anything", "can_override": false}, "Cy": {"name": "Cy", "group": "quantities", "definition": "By", "description": "

( sign(fd)} D   y1/2  + -sign(me) M_E ) /(x1+x2)

", "templateType": "anything", "can_override": false}, "fd": {"name": "fd", "group": "Ungrouped variables", "definition": "random(-500..500#25 except 0)", "description": "

the magnitude of the force

", "templateType": "anything", "can_override": false}, "me": {"name": "me", "group": "Ungrouped variables", "definition": "random(100..2000#100) random(1,-1)", "description": "

the magnitude of the moment

", "templateType": "anything", "can_override": false}, "x2": {"name": "x2", "group": "quantities", "definition": "qty(abs(b[0]-c[0]),units[1])", "description": "", "templateType": "anything", "can_override": false}, "F_w": {"name": "F_w", "group": "quantities", "definition": "qty(w,units[0])", "description": "", "templateType": "anything", "can_override": false}, "alpha": {"name": "alpha", "group": "quantities", "definition": "degrees(angle(vector(1,0),B))", "description": "", "templateType": "anything", "can_override": false}, "x1": {"name": "x1", "group": "quantities", "definition": "qty(B[0],units[1])", "description": "", "templateType": "anything", "can_override": false}, "F_d": {"name": "F_d", "group": "quantities", "definition": "qty(fd,units[0])", "description": "", "templateType": "anything", "can_override": false}, "Cx": {"name": "Cx", "group": "quantities", "definition": "Bx", "description": "

( C_y x2  + -sign(me) M_E )/ y2

", "templateType": "anything", "can_override": false}, "det": {"name": "det", "group": "quantities", "definition": "det(matrix(\n [scalar(y1),scalar(x1)],\n [-scalar(y2),scalar(x2)]\n))", "description": "", "templateType": "anything", "can_override": false}, "dety": {"name": "dety", "group": "quantities", "definition": "det(matrix(\n [scalar(y1) ,fd scalar(y1) /2],\n [-scalar(y2) ,- me]\n))", "description": "", "templateType": "anything", "can_override": false}, "vecC": {"name": "vecC", "group": "vectors", "definition": "vector(scalar(-cx),scalar(cy))", "description": "

reactions at C for both versions as a vector

", "templateType": "anything", "can_override": false}, "y2": {"name": "y2", "group": "quantities", "definition": "qty(abs(b[1]-c[1]),units[1])", "description": "", "templateType": "anything", "can_override": false}, "M_E": {"name": "M_E", "group": "quantities", "definition": "qty(me,units[0]+\"*\"+units[1])", "description": "", "templateType": "anything", "can_override": false}, "sigma_f": {"name": "sigma_f", "group": "vectors", "definition": "vecW+vecA+vecC + vecD", "description": "", "templateType": "anything", "can_override": false}, "B": {"name": "B", "group": "Ungrouped variables", "definition": "vector(random(3..5),random(3..5))", "description": "

location of pin B

", "templateType": "anything", "can_override": false}, "vecD": {"name": "vecD", "group": "vectors", "definition": "vector(scalar(f_d),0)", "description": "", "templateType": "anything", "can_override": false}, "w": {"name": "w", "group": "Ungrouped variables", "definition": "0//random(100..500#25)", "description": "", "templateType": "anything", "can_override": false}, "y1": {"name": "y1", "group": "quantities", "definition": "qty(B[1],units[1])", "description": "", "templateType": "anything", "can_override": false}, "beta": {"name": "beta", "group": "quantities", "definition": "degrees(angle(vector(-1,0),B-C))", "description": "", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "Ungrouped variables", "definition": "random(['N','m'],['lb','ft'])", "description": "", "templateType": "anything", "can_override": false}, "Bx": {"name": "Bx", "group": "quantities", "definition": "qty(detx/det,units[0])", "description": "", "templateType": "anything", "can_override": false}, "description": {"name": "description", "group": "quantities", "definition": "display(abs(F_d)) + \" force $D$ at the midpoint of member AB and\"+\n display(abs(M_E)) + if(me>0,\" counter-\",\" \") + \"clockwise moment $M_E$ \"", "description": "", "templateType": "anything", "can_override": false}, "detx": {"name": "detx", "group": "quantities", "definition": "det(matrix(\n [fd scalar(y1)/2 ,scalar(x1)],\n [- me ,scalar(x2)]\n))", "description": "", "templateType": "anything", "can_override": false}, "By": {"name": "By", "group": "quantities", "definition": "qty(dety/det,units[0])", "description": "", "templateType": "anything", "can_override": false}, "vecA": {"name": "vecA", "group": "vectors", "definition": "-(vecD+VecC)", "description": "

reactions at A for both versions as a vector

", "templateType": "anything", "can_override": false}, "C": {"name": "C", "group": "Ungrouped variables", "definition": "vector(B[0]+ random(3..5),random(-4..4 except 0))", "description": "

Location of pin C.  Pin A is at (0,0)

", "templateType": "anything", "can_override": false}, "ggb_load": {"name": "ggb_load", "group": "Ungrouped variables", "definition": "[['fd',fd],['me',me],['w',0]]", "description": "

This will select either the force or the moment, but not both.  Weight is always zero.

\n

\n

", "templateType": "anything", "can_override": false}, "debug": {"name": "debug", "group": "Ungrouped variables", "definition": "true", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "B[1] > C[1] ", "maxRuns": 100}, "ungrouped_variables": ["B", "C", "fd", "me", "w", "units", "ggb_load", "debug"], "variable_groups": [{"name": "quantities", "variables": ["F_w", "F_d", "M_E", "alpha", "beta", "x1", "y1", "x2", "y2", "description", "Cy", "Cx", "Bx", "By", "det", "detx", "dety"]}, {"name": "vectors", "variables": ["vecW", "vecA", "vecC", "vecD", "sigma_f"]}], "functions": {"display": {"parameters": [["Q", "quantity"]], "type": "string", "language": "jme", "definition": "string(siground(q,4))"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

$A_x = $ [[0]] $A_y = $ [[1]] $C_x = $ [[2]] $C_y = $ [[3]] 

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "$A_x$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecA[0],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "$A_y$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecA[1],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "$C_x$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecC[0],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "$C_y$", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(vecC[1],units[0])", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}]}, {"name": "Machines", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", ""], "variable_overrides": [[], [], [], [], []], "questions": [{"name": "Machine: Pliers", "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/pliers_taINXsR.svg", "/srv/numbas/media/question-resources/pliers_taINXsR.svg"], ["question-resources/pliers.afdesign", "/srv/numbas/media/question-resources/pliers.afdesign"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "William Haynes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2530/"}], "tags": ["machine", "mechanical advantage", "Mechanics", "mechanics", "Pliers", "Rigid body Equilibrum", "Statics", "statics"], "metadata": {"description": "

Classic machine problem.  Find the mechanical advantage of a pair of pliers and the force on the hinge pin.

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

", "advice": "

Given $P = \\var{qty(P,'N')}$ and the dimensions and angles on the diagram. Recognize that the pipe is a two-force body in compression, and that the force of the pipe on the pliers is perpendicular to the jaws

\n

1. Draw a free body diagram of one of the handles.

\n

\n

2. Apply equilibrium equations.

\n

$\\begin{align}
\\Sigma M_A &= 0\\\\
Q (\\var{qty(d1,'mm')}) &= P (\\var{qty(d2,'mm')})\\\\
Q & = (\\var{qty(P,'N')}) (\\var{siground(d2/d1,3)})= \\var{siground(qty(abs(Q), 'N'),4)}\\\\\\\\
\\Sigma F_x &= 0\\\\
A_x &= Q_x \\\\
&= Q \\sin \\var{theta}°= \\var{siground(qty(Ax, 'N'),4)}\\\\\\\\
\\Sigma F_y &= 0
\\\\A_y &= P + Q_y\\\\
&= P + Q \\cos{\\theta}= \\var{siground(qty(Ay, 'N'),4) }\\\\\\\\
A&= \\sqrt{A_x^2 + A_y^2} \\\\
&= \\var{siground(qty(A,'N'),4)}
\\end{align}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"d1": {"name": "d1", "group": "Ungrouped variables", "definition": "random(25..55)", "description": "", "templateType": "anything", "can_override": false}, "d2": {"name": "d2", "group": "Ungrouped variables", "definition": "random(140..180)", "description": "", "templateType": "anything", "can_override": false}, "theta": {"name": "theta", "group": "Ungrouped variables", "definition": "random(35..55)", "description": "", "templateType": "anything", "can_override": false}, "P": {"name": "P", "group": "Ungrouped variables", "definition": "random(200..400#20)", "description": "", "templateType": "anything", "can_override": false}, "A": {"name": "A", "group": "Ungrouped variables", "definition": "sqrt((P+Q[1])^2 + Q[0]^2)", "description": "", "templateType": "anything", "can_override": false}, "Q": {"name": "Q", "group": "Ungrouped variables", "definition": "P d2/d1 vector(sin(radians(theta)),cos(radians(theta)))", "description": "

gripping force

", "templateType": "anything", "can_override": false}, "Ax": {"name": "Ax", "group": "Ungrouped variables", "definition": "Q[0]", "description": "", "templateType": "anything", "can_override": false}, "Ay": {"name": "Ay", "group": "Ungrouped variables", "definition": "P+Q[1]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["d1", "d2", "theta", "P", "A", "Q", "Ax", "Ay"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Determine the magnitudes of the force on pin $A$ and the gripping force $Q$ on the pipe when a $\\var{qty(P,'N')}$ force $P$ is applied to the handles of the slip-joint pliers as shown.

\n

$A = $ [[0]]

\n

$Q = $ [[1]]

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "A", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "siground(qty(A,'N'),3)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "Q", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "siground(qty(abs(Q),'N'),3)", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Machine: Vice grips", "extensions": ["geogebra", "quantities"], "custom_part_types": [], "resources": [["question-resources/vicegrips2FBD_VTYoSKJ.png", "/srv/numbas/media/question-resources/vicegrips2FBD_VTYoSKJ.png"], ["question-resources/vicegrips2.vwx", "/srv/numbas/media/question-resources/vicegrips2.vwx"]], "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", "machine", "Mechanics", "mechanics", "Statics", "statics"], "metadata": {"description": "Find the mechanical advantage of a pair of 'vice-grip' pliers.", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

{applet}

", "advice": "

Start by drawing neat, correct, labeled free body diagrams for the lower handle and the lower jaw.  Recognize that piece $CE$ is a two force member in compression so the force on pin $E$ acts down and left along a line passing through $C$ and $E$.

\n

\n

Geometry

\n

Determine angle $\\theta$ from the geometry of the pliers.  

\n

\\[\\theta = \\tan^{-1}\\left( \\dfrac{\\var{q(x3)}}{\\var{q(y1)}}\\right) = \\var{d(theta)}°\\]

\n

FBD II

\n

\\[\\begin{align}\\text{II: } \\Sigma M_B &= 0\\\\ CE_x \\,(\\var{q(y2)}) -CE_y\\,(\\var{q(x2)}) + P \\,( \\var{q(x2+x3+x4)})& = 0 \\\\ CE\\left( \\var{y2} \\sin \\theta - \\var{x2} \\cos \\theta \\right) &=  -P \\,( \\var{q(x2)}+\\var{q(x3)}+\\var{q(x4)})\\\\CE &=-P \\,\\left( \\dfrac{\\var{q(x2+x3+x4)}}{\\var{-q(dperp)}} \\right)\\\\ &= \\var{d(ce)} P \\\\ \\\\ \\text{II: }\\Sigma F_x &= 0\\\\ B_x &= CE_x\\\\ &= CE \\sin{\\theta}\\\\ &= ( \\var{d(ce)} P )\\,(\\sin \\var{d(theta)}°)\\\\&= \\var{d(bx)} P\\end{align}\\]

\n

FBD I

\n

\\[\\begin{align} \\text{I: }\\Sigma M_D &=0\\\\ A\\,(\\var{q(x1)}) &= B_x\\,(\\var{q(y1)} + \\var{q(y2)})\\\\ A &= (\\var{d(bx)} P) \\, \\left(\\dfrac{\\var{q(y1+y2)}}{\\var{q(x1)}}\\right)\\\\  &= \\var{d(A)} P\\end{align}\\]

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"dperp": {"name": "dperp", "group": "solution", "definition": "x2 cos(radians(theta)) - y2 sin(radians(theta))", "description": "

\\var{x2} \\cos \\theta - \\var{y2} \\sin \\theta

", "templateType": "anything", "can_override": false}, "Y2": {"name": "Y2", "group": "Ungrouped variables", "definition": "9 + random(-2..2)", "description": "", "templateType": "anything", "can_override": false}, "Y1": {"name": "Y1", "group": "Ungrouped variables", "definition": "24+random(-3..3)", "description": "", "templateType": "anything", "can_override": false}, "X1": {"name": "X1", "group": "Ungrouped variables", "definition": "43 + random(-5..5)\n", "description": "

x

", "templateType": "anything", "can_override": false}, "X3": {"name": "X3", "group": "Ungrouped variables", "definition": "61 + random(-6..6)", "description": "", "templateType": "anything", "can_override": false}, "X2": {"name": "X2", "group": "Ungrouped variables", "definition": "35 + random(-5..5)", "description": "", "templateType": "anything", "can_override": false}, "X4": {"name": "X4", "group": "Ungrouped variables", "definition": "20 + random(-3..3)", "description": "", "templateType": "anything", "can_override": false}, "CE": {"name": "CE", "group": "solution", "definition": "(x2+x3+x4)/dperp", "description": "

\\dfrac{\\var{q(x2+x3+x4)}}{\\var{q(dperp)}}

", "templateType": "anything", "can_override": false}, "Bx": {"name": "Bx", "group": "solution", "definition": "ce sin(radians(theta))", "description": "", "templateType": "anything", "can_override": false}, "params": {"name": "params", "group": "Ungrouped variables", "definition": "[['x1',x1],['x2',x2],['x3',x3],['x4',x4],['y1',y1],['y2',y2]]", "description": "", "templateType": "anything", "can_override": false}, "theta": {"name": "theta", "group": "solution", "definition": "degrees(arctan(x3/y1))", "description": "", "templateType": "anything", "can_override": false}, "A": {"name": "A", "group": "solution", "definition": "bx * (y1+y2)/x1", "description": "

 (\\var{d(bx)} P) \\left(dfrac{\\var{q(y1+y2)}}{\\var{q(x1)}}

", "templateType": "anything", "can_override": false}, "applet": {"name": "applet", "group": "Ungrouped variables", "definition": "geogebra_applet('vugb9fzx', params)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["X1", "X2", "X3", "X4", "Y1", "Y2", "params", "applet"], "variable_groups": [{"name": "solution", "variables": ["theta", "dperp", "CE", "Bx", "A"]}], "functions": {"q": {"parameters": [["n", "number"]], "type": "number", "language": "jme", "definition": "qty(d(n),'mm')"}, "d": {"parameters": [["n", "number"]], "type": "number", "language": "jme", "definition": "siground(n,4)"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Determine the compressive force on object $A$ in terms of squeezing forces $P$ when the vice grip pliers are in the position shown. (Assume that the forces acting on $A$ are vertical.)

\n

$A$ = [[0]] 

", "gaps": [{"type": "jme", "useCustomName": true, "customName": "A", "marks": "20", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "{siground(A,4)} P", "showPreview": true, "checkingType": "reldiff", "checkingAccuracy": "0.002", "failureRate": 1, "vsetRangePoints": 5, "vsetRange": ["0", "1"], "checkVariableNames": false, "singleLetterVariables": false, "allowUnknownFunctions": true, "implicitFunctionComposition": false, "caseSensitive": false, "valuegenerators": [{"name": "p", "value": ""}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Machine: Pruning Shears", "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/shears_SL6Ej4S.svg", "/srv/numbas/media/question-resources/shears_SL6Ej4S.svg"]], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "William Haynes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2530/"}], "tags": ["machine", "mechanical advantage", "Mechanics", "mechanics", "Statics", "statics", "SVG"], "metadata": {"description": "

Classic machine problem.  

Find cutting force and mechanical advantage of a set of compound pruning shears.  This problem has the problem variables directly inserted into an SVG diagram. 

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

\n

", "advice": "

Recognize that member $DE$ is a two-force member in compression, thus the direction of the forces at $D$ and $E$ are known, and they are equal and opposite.  Given: Input force $F = \\var{F}$, geometry of the tool.

\n
    \n
  1. Draw a FBD of the lower handle, and take moments at $G$ to find the force in member $DE$.
  2. \n
\n\n
    \n
  1. Draw a FBD of the upper jaw, and take moments about $C$ to find force $A$.  Since the twig is a two-force member, the cutting force at $B$ equals the force at $A$.
  2. \n
\n\n
    \n
  1. The mechanical advantage of the tool is the ratio of the output force $F_A$ to input force $F$.
  2. \n
\n\n

Checkpoints:  

\n\n

\n

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"d1": {"name": "d1", "group": "dimensions", "definition": "qty(random(55..70),'mm')", "description": "", "templateType": "anything", "can_override": false}, "d2": {"name": "d2", "group": "dimensions", "definition": "qty(random(120..150),'mm')", "description": "", "templateType": "anything", "can_override": false}, "x1": {"name": "x1", "group": "dimensions", "definition": "qty(random(28..33),'mm')", "description": "", "templateType": "anything", "can_override": false}, "x2": {"name": "x2", "group": "dimensions", "definition": "qty(random(14..18),'mm')", "description": "", "templateType": "anything", "can_override": false}, "y1": {"name": "y1", "group": "dimensions", "definition": "qty(random(14..18),'mm')", "description": "", "templateType": "anything", "can_override": false}, "y2": {"name": "y2", "group": "dimensions", "definition": "qty(random(14..18),'mm')", "description": "", "templateType": "anything", "can_override": false}, "alpha": {"name": "alpha", "group": "dimensions", "definition": "random(24..32)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "dimensions", "definition": "alpha+'\u00b0'", "description": "", "templateType": "anything", "can_override": false}, "F": {"name": "F", "group": "dimensions", "definition": "qty(random(30..100#5),'N')", "description": "", "templateType": "anything", "can_override": false}, "FA": {"name": "FA", "group": "Solution", "definition": "precround(DE dperp/ d1,3)", "description": "

Cutting force

", "templateType": "anything", "can_override": false}, "DE": {"name": "DE", "group": "Solution", "definition": "precround(F d2 /x1 / sin(radians(theta)),3)", "description": "", "templateType": "anything", "can_override": false}, "theta": {"name": "theta", "group": "Solution", "definition": "siground(degrees(arctan(scalar(y1/x2))),5)", "description": "

t

", "templateType": "anything", "can_override": false}, "dperp": {"name": "dperp", "group": "Solution", "definition": "precround(y2 cos(radians(theta)) + (x1 + x2) sin(radians(theta)),3)", "description": "

perpendicular distance from DE to C

", "templateType": "anything", "can_override": false}, "CD": {"name": "CD", "group": "Solution", "definition": "qty(precround(sqrt(scalar(y2)^2+ scalar((x1+x2))^2),3),'mm')", "description": "

distance from C to D

", "templateType": "anything", "can_override": false}, "dperp'": {"name": "dperp'", "group": "Solution", "definition": "precround(CD sin(radians(theta+phi)),2)", "description": "

Alternate calculation of dperp 

", "templateType": "anything", "can_override": false}, "phi": {"name": "phi", "group": "Solution", "definition": "siground(degrees(arctan(scalar(y2/(x1+x2)))),5)", "description": "", "templateType": "anything", "can_override": false}, "R": {"name": "R", "group": "Solution", "definition": "siground(scalar(FA/F),5)", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "dimensions", "variables": ["x1", "x2", "y1", "y2", "d1", "d2", "alpha", "a", "F"]}, {"name": "Solution", "variables": ["FA", "theta", "DE", "CD", "dperp'", "dperp", "phi", "R"]}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Questions", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

A {F} force is applied to the handles of the compound pruning shears at the point shown.  Assuming that the cutting forces on the twig act along line $AB$,

\n

What is the force in member $DE$? [[0]]

\n

What is the cutting force at $A$ and $B$?  [[1]]

\n

What is the Mechanical Advantage of this tool?  [[2]] : 1.

\n

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "DE", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "DE", "right": "0.2", "close": "2.0", "C1": "80", "C2": "80", "C3": "60"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "FA", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

s

", "settings": {"correctAnswer": "FA", "right": "0.2", "close": "2.0", "C1": "80", "C2": "80", "C3": "60"}}, {"type": "numberentry", "useCustomName": true, "customName": "R", "marks": "5", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "0.098 R", "maxValue": "1.02 R", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Machine: Excavator", "extensions": ["geogebra", "quantities", "weh"], "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/shearFBD.png", "/srv/numbas/media/question-resources/shearFBD.png"], ["question-resources/shearFBD.gif", "/srv/numbas/media/question-resources/shearFBD.gif"], ["question-resources/shear.gif", "/srv/numbas/media/question-resources/shear.gif"], ["question-resources/shearFBD_XWaIQSM.png", "/srv/numbas/media/question-resources/shearFBD_XWaIQSM.png"], ["question-resources/FBD.png", "/srv/numbas/media/question-resources/FBD.png"], ["question-resources/FBD_UvxNguf.png", "/srv/numbas/media/question-resources/FBD_UvxNguf.png"], ["question-resources/FBD_ZA7RKPO.png", "/srv/numbas/media/question-resources/FBD_ZA7RKPO.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", "machine", "Mechanics", "mechanics", "rigid body", "Rigid Body", "Statics", "statics"], "metadata": {"description": "

Determine the forces in the pistons of a hydraulicly operated excavator.

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

{geogebra_applet('cbh4g7zm', {map(dx(n),n,1..6)} + {map(dy(n),n,1..6)} )}

\n

Diagram units are in:  [{units[1]}]

\n

", "advice": "

Draw and number neat, labeled free body diagrams.

\n

\n

Given: $W$ = {load}

\n

Find the necessarys angles.

\n

Let $\\theta_B$  and $\\theta_D$ be the angles that BC  and DE make with the horizontal.

\n

$\\theta_B = \\tan^{-1} \\left(\\dfrac{\\var{y1+y2}}{\\var{x2}}\\right) = \\var{siground(theta_B,4)}° \\qquad \\theta_D = \\tan^{-1} \\left(\\dfrac{\\var{y4}}{\\var{x4}} \\right)= \\var{siground(theta_D,4)}°$

\n

Use Free Body Diagram I to solve for the force in cylinder $BC$.

\n

$\\begin{align} \\textrm{I: } \\Sigma M_A &= 0 \\\\  BC_x ( \\var{y2}) - BC_y(\\var{x1 + x2}) + W ( \\var{x_t}) &= 0\\\\ BC ( -\\var{scalar(y2)} \\cos \\theta_B + \\var{scalar(x1+x2)} \\sin \\theta_B) &=  \\var{scalar(x_t)}\\ W \\\\ BC &= W \\left(\\dfrac{\\var{scalar(x_t)}}{-\\var{scalar(y2)} \\cos \\var{siground(theta_B,4)}° + \\var{scalar(x1+x2)} \\sin \\var{siground(theta_B,4)}°}\\right) \\\\  &= \\var{load} \\left(\\dfrac{\\var{x_t}}{\\var{siground(dperp_B,4)}}\\right)  \\\\ &= \\var{siground(BC,4)} \\textrm{ (compression)} \\end{align}$ 

\n

\n

Use Free Body Diagram II to solve for the force in cylinder $DE$.

\n

$\\begin{align} \\textrm{II: } \\Sigma M_F &= 0 \\\\  -DE_x ( \\var{y5}) - DE_y(\\var{x5}) + W ( \\var{x6}) &= 0\\\\ DE ( \\var{scalar(y5)} \\cos \\theta_D + \\var{scalar(x5)} \\sin \\theta_d) &=  \\var{scalar(x6)} W \\\\ DE &=  W \\left(\\dfrac{\\var{x6}}{\\var{siground(dperp_D,4)}}\\right)  \\\\ &= \\var{siground(DE,4)} \\textrm{ (tension)} \\end{align}$ 

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"y3": {"name": "y3", "group": "inputs", "definition": "round((1.2 L random(0.9..1.1#0.05)),units[2])", "description": "", "templateType": "anything", "can_override": false}, "x3": {"name": "x3", "group": "inputs", "definition": "round((2.6 L random(0.9..1.1#0.05)),units[2])", "description": "", "templateType": "anything", "can_override": false}, "BC": {"name": "BC", "group": "inputs", "definition": "load x_t /dperp_B", "description": "", "templateType": "anything", "can_override": false}, "x2": {"name": "x2", "group": "inputs", "definition": "round((3.9 L random(0.9..1.1#0.05)),units[2])", "description": "", "templateType": "anything", "can_override": false}, "units": {"name": "units", "group": "inputs", "definition": "random(['kN','m', \"5 cm\"],['lbf','ft', \"0.05 ft\"])", "description": "

units[2] large rounding base

\n

units[3] small rounding base

", "templateType": "anything", "can_override": false}, "DE": {"name": "DE", "group": "inputs", "definition": "load x6 /dperp_D", "description": "", "templateType": "anything", "can_override": false}, "dperp_D": {"name": "dperp_D", "group": "inputs", "definition": "y5 cos(radians(theta_D)) + x5 sin(radians(theta_d))", "description": "", "templateType": "anything", "can_override": false}, "y6": {"name": "y6", "group": "inputs", "definition": "round((9.4 L random(0.9..1.1#0.05)),units[2])", "description": "", "templateType": "anything", "can_override": false}, "L": {"name": "L", "group": "inputs", "definition": "round(qty(random(12..24),'in') in units[1],units[2])", "description": "

scaling value for all lengths, which are also randomly perterbed actual value as scaled.

", "templateType": "anything", "can_override": false}, "dperp_B": {"name": "dperp_B", "group": "inputs", "definition": "abs(y2 cos(radians(theta_B)) - (x1+x2) sin(radians(theta_B)))", "description": "

perpendicular distance from A to force BC

", "templateType": "anything", "can_override": false}, "theta_d": {"name": "theta_d", "group": "outputs", "definition": "degrees(arctan(scalar(y4/x4)))", "description": "", "templateType": "anything", "can_override": false}, "y4": {"name": "y4", "group": "inputs", "definition": "round((1.0 L random(0.9..1.1#0.05)),units[2])", "description": "", "templateType": "anything", "can_override": false}, "y1": {"name": "y1", "group": "inputs", "definition": "round((1.2 L random(0.9..1.1#0.05)),units[2])", "description": "", "templateType": "anything", "can_override": false}, "y2": {"name": "y2", "group": "inputs", "definition": "round((4.2 L random(0.9..1.1#0.05)),units[2])", "description": "", "templateType": "anything", "can_override": false}, "x1": {"name": "x1", "group": "inputs", "definition": "round((1.7 L random(0.9..1.1#0.05)),units[2])", "description": "", "templateType": "anything", "can_override": false}, "x_t": {"name": "x_t", "group": "inputs", "definition": "x1+x2+x3+x4+x5+x6", "description": "", "templateType": "anything", "can_override": false}, "y5": {"name": "y5", "group": "inputs", "definition": "round((2.3 L random(0.9..1.1#0.05)),units[2])", "description": "", "templateType": "anything", "can_override": false}, "x5": {"name": "x5", "group": "inputs", "definition": "round((0.8 L random(0.9..1.1#0.05)),units[2])", "description": "", "templateType": "anything", "can_override": false}, "load": {"name": "load", "group": "inputs", "definition": "siground(qty(random(3000..5000),'lbf') in units[0],2)", "description": "", "templateType": "anything", "can_override": false}, "theta_b": {"name": "theta_b", "group": "outputs", "definition": "degrees(arctan(scalar((y1+y2)/x2)))", "description": "", "templateType": "anything", "can_override": false}, "x6": {"name": "x6", "group": "inputs", "definition": "round((5.2 L random(0.9..1.1#0.05)),units[2])", "description": "", "templateType": "anything", "can_override": false}, "x4": {"name": "x4", "group": "inputs", "definition": "round((7.6 L random(0.9..1.1#0.05)),units[2])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "Unnamed group", "variables": []}, {"name": "inputs", "variables": ["L", "x1", "x2", "x3", "x4", "x5", "x6", "y1", "y2", "y3", "y4", "y5", "y6", "load", "units", "x_t", "dperp_B", "BC", "dperp_D", "DE"]}, {"name": "outputs", "variables": ["theta_b", "theta_d"]}], "functions": {"dy": {"parameters": [["ix", "number"]], "type": "number", "language": "jme", "definition": "let(n,ix,['y' + n,'\\\"'+ scalar(precround(eval(expression('y' + n)),2))\n + '\\\"'])"}, "dx": {"parameters": [["ix", "number"]], "type": "number", "language": "jme", "definition": "let(n,ix,['x' + n,'\\\"'+ scalar(precround(eval(expression('x' + n)),2))+ '\\\"'])"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

\n

The motion of the excavator is controled by three hydraulic cylinders.  Determine the force exerted by cylinders $BC$ and $DE$ when supporting a {load} downward vertical load at $G$.  Neglect the weights of the parts.

\n

\n

$BC$ = [[0]] [[1]]  

\n

$DE$ = [[2]] [[3]] 

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "BC", "marks": "10", "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": 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"], "matrix": [0, "1"], "distractors": ["", ""]}, {"type": "engineering-answer", "useCustomName": true, "customName": "DE", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "{DE}", "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"], "matrix": ["1", "0"], "distractors": ["", ""]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}, {"name": "Machine: lopping shears", "extensions": ["geogebra", "quantities", "weh"], "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/shearFBD.png", "/srv/numbas/media/question-resources/shearFBD.png"], ["question-resources/shearFBD.gif", "/srv/numbas/media/question-resources/shearFBD.gif"], ["question-resources/shear.gif", "/srv/numbas/media/question-resources/shear.gif"], ["question-resources/shearFBD_XWaIQSM.png", "/srv/numbas/media/question-resources/shearFBD_XWaIQSM.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": ["machine", "Mechanics", "mechanics", "rigid body equilibrium", "Rigid body equilibrium", "Statics", "statics"], "metadata": {"description": "

Determine the mechanical advantage of a pair of compound lopping shears.

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

{geogebra_applet('csq3j7yg', {map(dist(n),n,1..9)} )}

\n

Determine

\n

a) the mechanical advantage of the lopping shears shown, and 

\n

b) the {statement[version]}.

\n

Note: The mechanical advantage of the shears is the ratio of the cutting force developed at $A$ to the force $P$ applied to the handles.

\n

", "advice": "

1. Draw and number a neat, consistent, labeled set of free body diagrams for the parts of the shears.

\n

Note link DE is a two force member with a slope of $m = \\dfrac{\\var{d_7}} {\\var{d_9 - d_4}}$, in tension.  The free body diagrams must be consistent with each other and internal forces must occur in action-reaction pairs.

\n

\n

\n

2. Find the necessary angle.

\n

Let $\\theta$ be the angle that DE makes with the horizontal.

\n

$\\theta = \\tan^{-1} \\dfrac{\\var{d_7}}{\\var{d_9-d_4}} = \\var{siground(theta,4)}°$

\n

3. Use FBD II  and take moments about C to find the tension in DE.

\n

$\\begin{align}\\textrm{II: }\\Sigma M_C &= 0 \\\\ DE_x (\\var{d_6}) + DE_y(\\var{d_3}) &= P \\,(\\var{d_3 + d_4 })\\\\ DE &= \\left ( \\dfrac{\\var{scalar(d_3 + d_4 )}}{\\var{scalar(d_6)} \\cos \\theta + \\var{scalar(d_3)}\\sin \\theta} \\right)  P  \\\\&= \\left(\\dfrac{\\var{d_3 + d_4 }}{\\var{siground(dp_1,4)}} \\right )P \\\\&= \\var{siground(ma_1,4)} \\,P \\textrm{ (tension) } \\end{align}$

\n

4. FBD III and take moments about B to find the cutting force at A.

\n

$\\begin{align}\\textrm{III: }\\Sigma M_B &= 0 \\\\ A (\\var{d_1}) &=DE_x (\\var{d_5 +d_6 +d_7 }) + DE_y(\\var{d_8-d_1}) \\\\ A &= \\left ( \\dfrac{\\var{scalar(d_5 +d_6 +d_7 )}\\cos \\theta + \\var{scalar(d_8-d_1)}\\sin \\theta}{\\var{scalar(d_1 )}} \\right) DE \\\\&= \\left(\\dfrac{\\var{siground(dp_2,4)}}{\\var{d_1 }} \\right )DE \\\\&= \\var{siground(ma_2,4)} \\,DE \\\\ &= \\var{siground(ma_2,4)}\\, ( \\var{siground(ma_1,4)} \\,P )\\\\ &= \\var{siground(ma_t,4)} P \\end{align}$

\n

5.  Find the mechanical advantage

\n

Mechanical Advantage =  $\\dfrac{A}{P} = \\var{siground(ma_t,4)}$

\n

6. Find the {statement[version]}.

\n

$A = \\var{siground(ma_t,4)} P$, so for $A$ $P$ = {given[version]}:

\n

\n

$A = \\var{siground(ma_t,4)} (\\var{given[0]}) = \\var{siground(answer[0],4)}$

\n

$P = \\dfrac{\\var{given[1]}}{\\var{siground(ma_t,4)}} = \\var{siground(answer[1],4)}$

", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"units": {"name": "units", "group": "Ungrouped variables", "definition": "random(['N','mm', \"10 mm\", \"1 mm\" ],['lb','in', \"0.1 in\", \"0.1 in\"])", "description": "

units[2] large rounding base

\n

units[3] small rounding base

", "templateType": "anything", "can_override": false}, "d_6": {"name": "d_6", "group": "Ungrouped variables", "definition": "round((2.59 / 24.4 L random(0.9..1.1#0.05)),units[3])", "description": "", "templateType": "anything", "can_override": false}, "ma_2": {"name": "ma_2", "group": "Unnamed group", "definition": "scalar(dp_2)/scalar(d_1)", "description": "

mechanical advantage 2

", "templateType": "anything", "can_override": false}, "Statement": {"name": "Statement", "group": "Unnamed group", "definition": "[\"shearing force created at A when a \" + \n given[0] + \" force is applied to the handles at P\", \n 'force P that must be applied to the handles in order to create a '\n + given[1] + ' shearing force at A']", "description": "", "templateType": "anything", "can_override": false}, "theta": {"name": "theta", "group": "Unnamed group", "definition": "degrees(atan2(scalar(d_7),scalar(d_9-d_4)))", "description": "", "templateType": "anything", "can_override": false}, "d_9": {"name": "d_9", "group": "Ungrouped variables", "definition": "d_4+ round((0.4 / 24.4 L random(0.9..1.1#0.05)),units[3])", "description": "", "templateType": "anything", "can_override": false}, "dp_1": {"name": "dp_1", "group": "Unnamed group", "definition": "(d_6 cos(radians(theta)) + d_3 sin(radians(theta)))", "description": "

perpendicular distance from DE to C

", "templateType": "anything", "can_override": false}, "d_7": {"name": "d_7", "group": "Ungrouped variables", "definition": "round((1.3 / 24.4 L random(0.9..1.1#0.05)),units[3])", "description": "", "templateType": "anything", "can_override": false}, "ma_1": {"name": "ma_1", "group": "Unnamed group", "definition": "scalar(d_3 + d_4 )/scalar(dp_1)", "description": "

mechanical advantage 1

", "templateType": "anything", "can_override": false}, "d_5": {"name": "d_5", "group": "Ungrouped variables", "definition": "round((0.47 / 24.4 L random(0.9..1.1#0.05)),units[3])", "description": "", "templateType": "anything", "can_override": false}, "d_1": {"name": "d_1", "group": "Ungrouped variables", "definition": "round((4.1 / 24.4 L random(0.9..1.1#0.05)),units[2])", "description": "", "templateType": "anything", "can_override": false}, "d_3": {"name": "d_3", "group": "Ungrouped variables", "definition": "round((5.2 / 24.4 L random(0.9..1.1#0.05)),units[2])", "description": "", "templateType": "anything", "can_override": false}, "dp_2": {"name": "dp_2", "group": "Unnamed group", "definition": "(d_5 + d_6 +d_7 ) cos(radians(theta)) + (d_8-d_1) sin(radians(theta))", "description": "

perpendicular distance from DE to B

", "templateType": "anything", "can_override": false}, "version": {"name": "version", "group": "Unnamed group", "definition": "random(0,1)", "description": "", "templateType": "anything", "can_override": false}, "L": {"name": "L", "group": "Ungrouped variables", "definition": "round(qty(random(24..36#2),'in') in units[1],units[2])", "description": "", "templateType": "anything", "can_override": false}, "d_8": {"name": "d_8", "group": "Ungrouped variables", "definition": "L-d_9", "description": "", "templateType": "anything", "can_override": false}, "answer": {"name": "answer", "group": "Unnamed group", "definition": "[given[0] * ma_t, given[1] / ma_t]", "description": "", "templateType": "anything", "can_override": false}, "d_2": {"name": "d_2", "group": "Ungrouped variables", "definition": "round((3 / 24.4 L random(0.9..1.1#0.05)),units[2])", "description": "", "templateType": "anything", "can_override": false}, "ma_t": {"name": "ma_t", "group": "Unnamed group", "definition": "ma_1 * ma_2", "description": "

total mechanical advantage

", "templateType": "anything", "can_override": false}, "d_4": {"name": "d_4", "group": "Ungrouped variables", "definition": "L - (d_1 + d_2 + d_3)", "description": "", "templateType": "anything", "can_override": false}, "given": {"name": "given", "group": "Unnamed group", "definition": "[qty(random(10..40#5),units[0]),qty(random(50..200#10),units[0])]", "description": "

]]

", "templateType": "anything", "can_override": false}, "test": {"name": "test", "group": "Ungrouped variables", "definition": "dist(1)[1]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["units", "L", "d_1", "d_2", "d_3", "d_4", "d_5", "d_6", "d_7", "d_8", "d_9", "test"], "variable_groups": [{"name": "Unnamed group", "variables": ["theta", "dp_1", "ma_1", "dp_2", "ma_2", "ma_t", "version", "given", "Statement", "answer"]}], "functions": {"dist": {"parameters": [["ix", "number"]], "type": "list", "language": "jme", "definition": "let(n,ix,['d_' + n,'\\\"$'+ scalar(precround(eval(expression('d_' + n)),2))+ ' \\\\textrm{ ' + units[1] +'}$'+ '\\\"'])"}, "ggbtex": {"parameters": [["q", "quantity"]], "type": "string", "language": "jme", "definition": ""}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Mechanical advantage = [[0]]    $\\var{if(version=0,latex('A'),latex('P'))}$ = [[1]] 

", "gaps": [{"type": "engineering-answer", "useCustomName": true, "customName": "Advantage", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "qty(MA_t,\"\")", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}, {"type": "engineering-answer", "useCustomName": true, "customName": "Force", "marks": "10", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "settings": {"correctAnswer": "answer[version]", "right": "0.2", "close": "1.0", "C1": "75", "C2": "50", "C3": "25"}}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": false, "navigatemode": "menu", "onleave": {"action": "none", "message": ""}, "preventleave": true, "typeendtoleave": false, "startpassword": "", "autoSubmit": true, "allowAttemptDownload": false, "downloadEncryptionKey": "", "showresultspage": "oncompletion"}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"enterreviewmodeimmediately": true, "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "showexpectedanswerswhen": "inreview", "showadvicewhen": "inreview", "allowrevealanswer": true, "intro": "", "end_message": "", "results_options": {"printquestions": true, "printadvice": true}, "feedbackmessages": [], "reviewshowexpectedanswer": true, "showanswerstate": true, "reviewshowfeedback": true, "showactualmark": true, "showtotalmark": true, "reviewshowscore": true, "reviewshowadvice": true}, "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", "stats", "weh"], "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"], ["question-resources/joan-problem_fs07hWN.ggb", "/srv/numbas/media/question-resources/joan-problem_fs07hWN.ggb"], ["question-resources/Joint_B_6eszcTT.svg", "/srv/numbas/media/question-resources/Joint_B_6eszcTT.svg"], ["question-resources/Joint_D_EOoCf9Z.svg", "/srv/numbas/media/question-resources/Joint_D_EOoCf9Z.svg"], ["question-resources/fbds_jqa9zTW_0O5KNSm.afdesign", "/srv/numbas/media/question-resources/fbds_jqa9zTW_0O5KNSm.afdesign"], ["question-resources/Joint_A_j2xOQ6P.svg", "/srv/numbas/media/question-resources/Joint_A_j2xOQ6P.svg"], ["question-resources/FBD_kZRowVa.png", "/srv/numbas/media/question-resources/FBD_kZRowVa.png"], ["question-resources/truss150_ST2n1NE.png", "/srv/numbas/media/question-resources/truss150_ST2n1NE.png"], ["question-resources/FBD1_0gNiD65.png", "/srv/numbas/media/question-resources/FBD1_0gNiD65.png"], ["question-resources/FBD2_brSZxtl.png", "/srv/numbas/media/question-resources/FBD2_brSZxtl.png"], ["question-resources/FBD3_IU8eiX9.png", "/srv/numbas/media/question-resources/FBD3_IU8eiX9.png"], ["question-resources/FBD2_Vmzm7ke.png", "/srv/numbas/media/question-resources/FBD2_Vmzm7ke.png"], ["question-resources/pliers_taINXsR.svg", "/srv/numbas/media/question-resources/pliers_taINXsR.svg"], ["question-resources/pliers.afdesign", "/srv/numbas/media/question-resources/pliers.afdesign"], ["question-resources/vicegrips2FBD_VTYoSKJ.png", "/srv/numbas/media/question-resources/vicegrips2FBD_VTYoSKJ.png"], ["question-resources/vicegrips2.vwx", "/srv/numbas/media/question-resources/vicegrips2.vwx"], ["question-resources/shears_SL6Ej4S.svg", "/srv/numbas/media/question-resources/shears_SL6Ej4S.svg"], ["question-resources/shearFBD.png", "/srv/numbas/media/question-resources/shearFBD.png"], ["question-resources/shearFBD.gif", "/srv/numbas/media/question-resources/shearFBD.gif"], ["question-resources/shear.gif", "/srv/numbas/media/question-resources/shear.gif"], ["question-resources/shearFBD_XWaIQSM.png", "/srv/numbas/media/question-resources/shearFBD_XWaIQSM.png"], ["question-resources/FBD.png", "/srv/numbas/media/question-resources/FBD.png"], ["question-resources/FBD_UvxNguf.png", "/srv/numbas/media/question-resources/FBD_UvxNguf.png"], ["question-resources/FBD_ZA7RKPO.png", "/srv/numbas/media/question-resources/FBD_ZA7RKPO.png"]]}