fb_system() - mkraska/meclib GitHub Wiki
[txt, OK]: fb_system(names, sys, env, hint)
nameslist from thenamesinput fieldsyslist of indices of elements which belong to the system (to be active)envlist of indices of elements which belong to the environment and have to be deactivated and replaced by reactionshinttext, problem-specific hint if the system boundaries aren't correct.
Templates
Question variables: Define the lists
i_sys: [....];
i_env: [....];
Question text
[feedback:System](/mkraska/meclib/wiki/feedback:System)
Feedback variables
obj: stackjson_parse(objects);
[txt, OK]: fb_system(names, i_sys, i_env, "");
Feedback:
| Field | Value |
|---|---|
| sans | OK |
| tans | true |
| feedback true | {@txt@} |
| feedback false | {@txt@} |
Activation/Deactivation
names[n]="show" is true if element with index n is activated and false if not.
This can be used to check if all supports or distributed loads are de-activated.
The following snippet from the Feedback variables sets OK to true if the object with number i_beam are activated and the objects i_S1, i_S2 and i_S3 are not.
i_beam: 2; i_S1: 5; i_S2: 6; i_S3: 7;
OK: is(
names[i_S1] # "show" and
names[i_S2] # "show" and
names[i_S3] # "show" and
names[i_beam] = "show");
txt: if OK then " Die Systemgrenzen stimmen."
else " Die Systemgrenzen stimmen nicht. Nur der Balken gehört zum System. Mindestens die Stäbe müssen entfernt (deaktiviert) werden.";
Use AlgEquiv question test with OK as sans and true as tans.
In both branches, say
{@txt@}