Feedback for "fix123" - mkraska/meclib GitHub Wiki

[txt, isOK]: fb_fix123(o, n, i, description)

  • txt feedback text
  • isOK correctness flag
  • o list of objects
  • n names field
  • i index of "fix123" object
  • description string with Text to identify the object for the user

[txt, isOK]: fb_fix123_name(o, n, i)

  • txt feedback text
  • isOK correctness flag
  • o list of objects
  • n names field
  • i index of "fix123" object

Requires: fb_force_hvxy, function for detailled feedback on force names.

These functions provide Feedback for Free Body Diagrams.

Source

"fix123" is a built-in support with no degree of freedom. It is to be replaced by two reaction forces and a moment.

Checks done by fb_fix123():

  • Is the object really of type "fix123" (just for developers)?
  • Is the object deactivated?
  • Has meclib found any reactions by proximity check?
  • Are there exactly three reactions?
  • Are two reactions of type "force" and one of type "moment"?
  • Are the two forces non-parallel?

Checks done by fb_fix123_names():

  • Do the names of the reactions match the name of the support point?
  • For force reactions
    • Is there a direction index?
    • Is the index a single character?
    • Is the index one of x, y, h(orizontal), v(ertical)?
    • Does the index match the actual direction?
  • For moment reactions:
    • Is the base name equal to M?
    • Does the index match the support name?

Example question: FBD Tutorial Einspannung (I) at abacus.aalto.fi/develop/4.4beta

Typical PRT

Feedback variables:

obj: stackjson_parse(objects);
[text, isOK]: fb_fix123(obj, names, i_fix123, "Einspannung bei B: ");
[ntext, nOK]: fb_fix123_name(obj, names, i_fix123);

PRT node 1 test for correct direction

Algebraic test for isOK = true and feedback of {@text@} for both branches.

PRT node 2 test for correct name

Algebraic test for nOK = true and feedback of {@ntext@} in the false branch (with penalty of 0.5).