FBD: Feedback for System Sketch - mkraska/meclib GitHub Wiki
This is part of the tutorial FBD Example Question. We assume that you already did the steps
We create PRTs for
- General properties of the sketch
- Each support
Question Variables
- Create indices for the relevant objects (number of the object in the list)
- Define list of objects for the system check
sys
objects which must not be deactivated (which represent the structure and aren't replaced by reactions or resultants)env
objects which must be deactivated (supports, distributed loads)
- Include the Meclib macros for feedback functions
Insert this wherever convenient in the question variables:
stack_include("https://raw.githubusercontent.com/mkraska/meclib/main/Maxima/fb_fbd.mac" );
stack_include("https://raw.githubusercontent.com/mkraska/meclib/main/Maxima/fb_value.mac");
i_A: 2; i_B: 7; i_P: 4; i_q: 9; i_beam: 3;
sys: [i_beam]; env: [i_A, i_B, i_q];
Question Text
Add feedback specifiers for each support, distributed load and the general system check
<p>[feedback:fb_A](/mkraska/meclib/wiki/feedback:fb_A)</p>
<p>[feedback:fb_B](/mkraska/meclib/wiki/feedback:fb_B)</p>
<p>[feedback:fb_q](/mkraska/meclib/wiki/feedback:fb_q)</p>
<p>[feedback:System](/mkraska/meclib/wiki/feedback:System)</p>
Verify the question text and update the form. You may want to insert 1 in the fields for Sans and Tans of the PRTs, so that you can save the question before fully specifying the PRTs.
Set all PRT feedback styles to "Compact". This get's us rid of texts like "Well done". Check marks are sufficient. Set all node feedback texts to HTML format. This ensures yellow background of the feedback.
fb_A
Feedback for bar 1 at point A
PRT The "bar" at support A is to be replaced by a force with index 1 in it's name because it replaces bar 1. Other names might be acceptable (e.g. A), but that would require a different name checking logic. See fb_bar for details on the checks performed by the feedback function.
Feedback variables
obj: stackjson_parse(objects);
[text, isOK]: fb_bar(obj, names, i_A);
[ntext, nOK]: fb_bar_name(obj, names, i_A);
PRT node
Node 1:
- Algebraic test for
isOK = true
. - feedback of
{@text@}
for both branches. - Set "Next" to "Node 2" for both branches.
Node 2:
- Algebraic test for
nOK = true
and - feedback of
{@ntext@}
for both branches. - Adjust scoring if false.
fb_B
Feedback for the sliding support at point B
PRT The "fix13" at support A is to be replaced by a force $B$ and a moment $M_B$. See Feedback for "fix13" for details on the checks performed by the feedback function.
Feedback variables
obj: stackjson_parse(objects);
[text, isOK]: fb_fix13(obj, names, i_B, "Parallelführung bei B: ");
[ntext, nOK]: fb_fix13_names(obj, names, i_B);
PRT node
Node 1:
- Algebraic test for
isOK = true
. - feedback of
{@text@}
for both branches. - Set "Next" to "Node 2" for both branches.
Node 2:
- Algebraic test for
nOK = true
and - feedback of
{@ntext@}
for both branches. - Adjust scoring if false.
fb_q
Feedback for the distributed load
PRT The distributed load "q" is to be replaced by a force $3/2 \,a\, q_0$ with correct location (through the center of gravity) and the correct direction. See Feedback for line loads for details on the checks performed by the feedback function.
Feedback variables
obj: stackjson_parse(objects);
[text, isOK]: fb_q(obj, names, i_q, "Streckenlast: ", 0, q_0, a);
PRT node
Node 1:
- Algebraic test for
isOK = true
. - feedback of
{@text@}
for both branches.
PRT System
This check is used to complain about deactivated elements, which belong to the isolated system. It also complains about spurious forces or moments, which were generated in the editor but aren't sensible reactions or resultants. See fb_system() and fb_reactions() for details on the checks performed by the feedback function.
Feedback variables
We rely on the variables sys
and env
which contain the indices of the objects that must be kept active or must be deactivated, respectively.
We expect 2 forces and 1 moment as reactions. The resultant of the distributed load is not counted here.
[txt, isOK]: fb_system(names, sys, env, " Der Balken gehört zum System, der Stab, das Lager und die Streckenlast gehören zur Umgebung." );
obj: stackjson_parse(objects);
[rtxt, rOK]: fb_reactions(obj, 2, 1);
PRT node
Node 1:
- Algebraic test for
isOK = true
. - feedback of
{@txt@}
for both branches. - Set "Next" to "Node 2" for both branches.
Node 2:
- Algebraic test for
rOK = true
and - feedback of
<br>{@rtxt@}
for both branches. - Adjust scoring if false.
Check
- Save and continue editing, Preview
- Fill in correct responses, Check.