// Numbas version: exam_results_page_options {"name": "29. Special Loading Conditions", "metadata": {"description": "

Homework set.  Identify zero force members and utilize special loading conditions to simplify trusses.

", "licence": "Creative Commons Attribution-ShareAlike 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", ""], "variable_overrides": [[], []], "questions": [{"name": "Truss: 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}, "constants": [], "variables": {"num_ans": {"name": "num_ans", "group": "setup", "definition": "length(filter(m,m,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"}, {"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"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": false, "showresultspage": "oncompletion", "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": true, "startpassword": ""}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"showactualmark": true, "showtotalmark": true, "showanswerstate": true, "allowrevealanswer": true, "advicethreshold": 0, "intro": "", "end_message": "", "reviewshowscore": true, "reviewshowfeedback": true, "reviewshowexpectedanswer": true, "reviewshowadvice": true, "feedbackmessages": []}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "William Haynes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2530/"}], "extensions": ["geogebra", "quantities"], "custom_part_types": [{"source": {"pk": 19, "author": {"name": "William Haynes", "pk": 2530}, "edit_page": "/part_type/19/edit"}, "name": "Engineering Accuracy with units", "short_name": "engineering-answer", "description": "

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

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

Modify the unit portion of the student's answer by

\n

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

\n

2. replacing '-' with ' ' 

\n

3. replacing '°' with ' deg' 

\n

to allow answers like 10 ft-lb and 30°

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

This fixes the student answer for two common errors.  

\n

If student_units are wrong  - replace with correct units

\n

If student_scalar has the wrong sign - replace with right sign

\n

If student makes both errors, only one gets fixed.

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

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

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