// Numbas version: exam_results_page_options {"name": "Method of sections: Pratt Truss", "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.

Does clumsy substitution to

\n

1. replace '-' with ' '

\n

2. replace '°' with ' deg'

\n

to allow answers like 10 ft-lb and 30°

", "name": "student_units"}, {"definition": "try(\ncompatible(quantity(1, student_units),correct_units),\nmsg,\nfeedback(msg);false)\n", "description": "", "name": "good_units"}, {"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", "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.

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

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

", "name": "close"}, {"definition": "sign(student_scalar) = sign(correct_quantity) ", "description": "", "name": "right_sign"}], "settings": [{"input_type": "code", "evaluate": true, "hint": "The correct answer given as a JME quantity.", "default_value": "", "label": "Correct Quantity.", "help_url": "", "name": "correctAnswer"}, {"input_type": "code", "evaluate": true, "hint": "Question will be considered correct if the scalar part of the student's answer is within this % of correct value.", "default_value": "0.2", "label": "% Accuracy for right.", "help_url": "", "name": "right"}, {"input_type": "code", "evaluate": true, "hint": "Question will be considered close if the scalar part of the student's answer is within this % of correct value.", "default_value": "1.0", "label": "% Accuracy for close.", "help_url": "", "name": "close"}, {"input_type": "percent", "hint": "Partial Credit for close value with appropriate units.  if correct answer is 100 N and close is ±1%,
99  N is accepted.", "default_value": "75", "label": "Close with units.", "help_url": "", "name": "C1"}, {"input_type": "percent", "hint": "Partial credit for forgetting units or using wrong sign.
If the correct answer is 100 N, both 100 and -100 N are accepted.", "default_value": "50", "label": "No units or wrong sign", "help_url": "", "name": "C2"}, {"input_type": "percent", "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.", "default_value": "25", "label": "Close, no units.", "help_url": "", "name": "C3"}], "public_availability": "restricted", "published": false, "extensions": ["quantities"]}], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"extensions": ["geogebra", "quantities", "weh"], "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": []}], "variables": {"ans_name": {"description": "", "name": "ans_name", "templateType": "anything", "group": "magnitudes", "definition": "[[\"CD\",\"DE\"][version],[\"HJ\",\"EJ\"][version],[\"CJ\",\"JK\"][version]]"}, "HJ": {"description": "", "name": "HJ", "templateType": "anything", "group": "magnitudes", "definition": "(A_y width - A_x height)/height"}, "units": {"description": "", "name": "units", "templateType": "anything", "group": "Inputs", "definition": "random(['N','m'],['lb','ft'])"}, "DE": {"description": "", "name": "DE", "templateType": "anything", "group": "magnitudes", "definition": "((F[\"E\"] + F[\"K\"] - 2 G) width/height + F[\"F\"])"}, "CD": {"description": "

sigma M_j = 0

", "name": "CD", "templateType": "anything", "group": "magnitudes", "definition": "((F[\"C\"]+F[\"H\"]-2 A_y) width + F[\"B\"]* height)/height"}, "version": {"description": "", "name": "version", "templateType": "anything", "group": "Inputs", "definition": "random(0,1)"}, "JK": {"description": "", "name": "JK", "templateType": "anything", "group": "magnitudes", "definition": "G width / height"}, "EJ_y": {"description": "

sigma f_y=0

", "name": "EJ_y", "templateType": "anything", "group": "magnitudes", "definition": "G - F[\"E\"] - f[\"K\"]"}, "ggb_forces": {"description": "", "name": "ggb_forces", "templateType": "anything", "group": "Inputs", "definition": "map([lower(n),F[n]],n,loads)"}, "CJ": {"description": "", "name": "CJ", "templateType": "anything", "group": "magnitudes", "definition": "CJ_y/sin(radians(theta))"}, "ans": {"description": "", "name": "ans", "templateType": "anything", "group": "magnitudes", "definition": "[[CD,DE][version],[HJ,EJ][version],[CJ,JK][version]]\n\n"}, "G": {"description": "

sum of moments about A / dperp

", "name": "G", "templateType": "anything", "group": "magnitudes", "definition": "sum(map(F[k]*D[k],k,loads))/4"}, "F": {"description": "

force magnitudes

", "name": "F", "templateType": "anything", "group": "Inputs", "definition": "dict(map([n,if(n in loads,random(100..500#25),0)],n,names))"}, "D": {"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

", "name": "D", "templateType": "anything", "group": "Inputs", "definition": "dict(map([names[n],[0,-height/width,1,1,2,2,3,3,4,4,height/width,5][n]],n,0..9))"}, "width": {"description": "", "name": "width", "templateType": "anything", "group": "Inputs", "definition": "random(3,4,5,6)"}, "height": {"description": "", "name": "height", "templateType": "anything", "group": "Inputs", "definition": " width + random(-1.5..1.5#0.5)\n"}, "EJ": {"description": "", "name": "EJ", "templateType": "anything", "group": "magnitudes", "definition": "EJ_y/sin(radians(theta))"}, "CJ_y": {"description": "

", "name": "CJ_y", "templateType": "anything", "group": "magnitudes", "definition": "A_y - F[\"C\"]-F[\"H\"]"}, "theta": {"description": "

Angle of diagonal members

", "name": "theta", "templateType": "anything", "group": "Inputs", "definition": "degrees(arctan(height/width))"}, "A": {"description": "", "name": "A", "templateType": "anything", "group": "magnitudes", "definition": "sqrt(A_x^2+A_y^2)"}, "names": {"description": "", "name": "names", "templateType": "anything", "group": "Inputs", "definition": "[\"A\",\"B\",\"H\",\"C\",\"J\",\"D\",\"K\",\"E\",\"F\",\"G\"]"}, "A_y": {"description": "", "name": "A_y", "templateType": "anything", "group": "magnitudes", "definition": "sum(map(F[k],k,[\"C\",\"D\",\"E\",\"H\",\"J\",\"K\"]))-G"}, "loads": {"description": "

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

", "name": "loads", "templateType": "anything", "group": "Inputs", "definition": "sort(shuffle(names[1..9])[0..3])"}, "debug": {"description": "", "name": "debug", "templateType": "anything", "group": "Inputs", "definition": "false"}, "A_x": {"description": "", "name": "A_x", "templateType": "anything", "group": "magnitudes", "definition": "f[\"B\"]-f[\"F\"]"}}, "ungrouped_variables": [], "tags": ["mechanics", "Mechanics", "method of sections", "Statics", "statics", "truss"], "functions": {"load_html": {"type": "html", "parameters": [["k", "number"], ["u", "string"]], "language": "jme", "definition": "\"\" + loads[k] + \" = \" + qty(f[loads[k]],u)"}, "display": {"type": "string", "parameters": [["q", "number"]], "language": "jme", "definition": "string(siground(q,4))"}, "ans": {"type": "string", "parameters": [["f", "number"], ["u", "string"]], "language": "jme", "definition": "string(siground(qty(abs(f),u),4)) + if(f<0,' (C)', ' (T)')"}}, "rulesets": {}, "metadata": {"description": "

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

\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
", "parts": [{"unitTests": [], "showCorrectAnswer": true, "prompt": "

Determine the reactions at A and G.

\n

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

\n

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

\n

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

\n

Determine the force in member {ans_name[0]}.

\n

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

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"type": "engineering-answer", "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "marks": "4", "settings": {"close": "1.0", "C1": "75", "right": "0.2", "C3": "25", "C2": "50", "correctAnswer": "qty(abs(ans[0]),units[0])"}}, {"unitTests": [], "scripts": {}, "choices": ["Tension", "Compression", "Neither"], "variableReplacements": [], "matrix": "map(if(sign(ans[0])=s,2,0),s,[1,-1,0])", "customMarkingAlgorithm": "", "displayType": "dropdownlist", "maxMarks": 0, "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "displayColumns": 0, "minMarks": 0, "marks": 0, "type": "1_n_2", "shuffleChoices": false}], "extendBaseMarkingAlgorithm": true, "scripts": {}, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "sortAnswers": false, "type": "gapfill", "marks": 0}, {"unitTests": [], "showCorrectAnswer": true, "prompt": "

Determine the force in member {ans_name[1]}.

\n

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

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"type": "engineering-answer", "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "marks": "4", "settings": {"close": "1.0", "C1": "75", "right": "0.2", "C3": "25", "C2": "50", "correctAnswer": "qty(abs(ans[1]),units[0])"}}, {"unitTests": [], "scripts": {}, "choices": ["Tension", "Compression", "Neither"], "variableReplacements": [], "matrix": "map(if(sign(ans[1])=s,2,0),s,[1,-1,0])", "customMarkingAlgorithm": "", "displayType": "dropdownlist", "maxMarks": 0, "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "displayColumns": 0, "minMarks": 0, "marks": 0, "type": "1_n_2", "shuffleChoices": false}], "extendBaseMarkingAlgorithm": true, "scripts": {}, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "sortAnswers": false, "type": "gapfill", "marks": 0}, {"unitTests": [], "showCorrectAnswer": true, "prompt": "

Determine the force in member {ans_name[2]}.

\n

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

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"type": "engineering-answer", "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "marks": "4", "settings": {"close": "1.0", "C1": "75", "right": "0.2", "C3": "25", "C2": "50", "correctAnswer": "qty(abs(ans[2]),units[0])"}}, {"unitTests": [], "scripts": {}, "choices": ["Tension", "Compression", "Neither"], "variableReplacements": [], "matrix": "map(if(sign(ans[2])=s,2,0),s,[1,-1,0])", "customMarkingAlgorithm": "", "displayType": "dropdownlist", "maxMarks": 0, "extendBaseMarkingAlgorithm": true, "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "displayColumns": 0, "minMarks": 0, "marks": 0, "type": "1_n_2", "shuffleChoices": false}], "extendBaseMarkingAlgorithm": true, "scripts": {}, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "sortAnswers": false, "type": "gapfill", "marks": 0}], "preamble": {"js": "", "css": ""}, "name": "Method of sections: Pratt Truss", "variablesTest": {"maxRuns": 100, "condition": ""}, "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