// Numbas version: exam_results_page_options {"name": "Frame: A-frame Difficulty 1", "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": [{"metadata": {"description": "

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

$A_x =$ [[0]]   $A_y =$ [[1]]  {vecA}

\n

$C_x =$ [[2]]   $C_y =$ [[3]]  {vecC}

", "customMarkingAlgorithm": "", "customName": ""}], "variables": {"magA": {"templateType": "anything", "definition": "F_w cos(radians(beta))/sin(radians(alpha+beta))", "description": "", "name": "magA", "group": "magnitudes"}, "F_w": {"templateType": "anything", "definition": "qty(w,units[0])", "description": "", "name": "F_w", "group": "magnitudes"}, "fd": {"templateType": "anything", "definition": "0//random(-250..250#50 except 0)", "description": "", "name": "fd", "group": "Ungrouped variables"}, "units": {"templateType": "anything", "definition": "random(['N','m'],['lb','ft'])", "description": "", "name": "units", "group": "Ungrouped variables"}, "B": {"templateType": "anything", "definition": "vector(random(3..5),random(3..5))", "description": "", "name": "B", "group": "Ungrouped variables"}, "C": {"templateType": "anything", "definition": "vector(B[0]+ random(3..5),random(-2..3))", "description": "", "name": "C", "group": "Ungrouped variables"}, "ggb_load": {"templateType": "anything", "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]]

", "name": "ggb_load", "group": "Ungrouped variables"}, "debug": {"templateType": "anything", "definition": "false", "description": "", "name": "debug", "group": "Ungrouped variables"}, "sigma_f": {"templateType": "anything", "definition": "vecW+vecA+vecC", "description": "", "name": "sigma_f", "group": "vectors"}, "beta": {"templateType": "anything", "definition": "degrees(angle(vector(-1,0),B-C))", "description": "", "name": "beta", "group": "magnitudes"}, "vecC": {"templateType": "anything", "definition": "siground(scalar(magC) *\nvector(cos(radians(180-beta)),\n sin(radians(180-beta))),4)", "description": "", "name": "vecC", "group": "vectors"}, "y1": {"templateType": "anything", "definition": "qty(B[1],units[1])", "description": "", "name": "y1", "group": "magnitudes"}, "x1": {"templateType": "anything", "definition": "qty(B[0],units[1])", "description": "", "name": "x1", "group": "magnitudes"}, "vecW": {"templateType": "anything", "definition": "vector(0,-w)", "description": "", "name": "vecW", "group": "vectors"}, "y2": {"templateType": "anything", "definition": "qty(abs(b[1]-c[1]),units[1])", "description": "", "name": "y2", "group": "magnitudes"}, "alpha": {"templateType": "anything", "definition": "degrees(angle(vector(1,0),B))", "description": "", "name": "alpha", "group": "magnitudes"}, "vecA": {"templateType": "anything", "definition": "siground(scalar(magA)*\nvector(cos(radians(alpha)),\n sin(radians(alpha))),4)", "description": "", "name": "vecA", "group": "vectors"}, "magC": {"templateType": "anything", "definition": "F_w cos(radians(alpha))/sin(radians(alpha+beta))", "description": "", "name": "magC", "group": "magnitudes"}, "me": {"templateType": "anything", "definition": "0//random(-1000..1000#100 except 0)", "description": "", "name": "me", "group": "Ungrouped variables"}, "w": {"templateType": "anything", "definition": "random(100..500#25)", "description": "", "name": "w", "group": "Ungrouped variables"}, "x2": {"templateType": "anything", "definition": "qty(abs(b[0]-c[0]),units[1])", "description": "", "name": "x2", "group": "magnitudes"}}, "name": "Frame: A-frame Difficulty 1", "tags": ["equilibrium", "Equilibrium", "frame", "Frame", "mechanics", "Mechanics", "Statics", "statics"], "rulesets": {}, "ungrouped_variables": ["B", "C", "fd", "me", "w", "units", "ggb_load", "debug"], "advice": "

\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)}$°

\n

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

\n

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

\n

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

\n

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

\n

$C = W \\dfrac{\\cos(\\beta)}{\\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}

", "variable_groups": [{"variables": ["F_w", "alpha", "beta", "magA", "magC", "x1", "y1", "x2", "y2"], "name": "magnitudes"}, {"variables": ["vecW", "vecA", "vecC", "sigma_f"], "name": "vectors"}], "functions": {"display": {"type": "string", "parameters": [["Q", "quantity"]], "definition": "string(siground(q,4))", "language": "jme"}}, "statement": "