Feedback for Free Body Diagrams - mkraska/meclib GitHub Wiki
FBD Generic Validation Feedback
Helper functions and feedback for specific objects
These functions are defined in fb_fbd.mac. To use them, include the macro file in the question variables
stack_include("https://raw.githubusercontent.com/mkraska/meclib/main/Maxima/fb_fbd.mac");
-
angle() angle between two directional objects
-
direction() Identify the direction of objects, e.g. for parallelity check
-
moment_of_force() Moment of a "force" object about a given point
-
parallelp() Check if two directional objects are parallel
-
fb_reactions() Check the number of reaction forces and reaction moments.
-
fb_system() Check of activation/deactivation of elements.
-
MatchByParallel() Reduce reactions in
names
to those who are parallel to the support
Duplicate Names
This is a temporary state of a function which finds duplicate names,
names
contents of the input fieldres
list of reserved names (perhaps used for external loads)user
list of indices of supports (where reactions can appear)
fb_duplicates(%_names, %_res, %_user):=block(
[%_loi: [], %_unames, %_tmp: [], %_dup: [], %_i, %_n],
/* user supplied names */
for %_i in %_user do (
if listp(%_names[%_i]) then %_loi: append(%_loi, %_names[%_i])
),
return([%_loi, true]),
%_unames: map(lambda([%_i], names[%_i]), %_loi),
/* check for duplicates */
for %_n in %_unames do (
if member(%_n,%_tmp)
then %_dup: append(%_dup, [%_n])
else %_tmp: append(%_tmp, [%_n])
),
if not emptyp(%_dup) then return([castext("Der Name \\({@%_dup[1]@}\\) tritt mehrfach auf."), false]),
["", true]
);
Attached Forces and Moments
if a de-activated element has active forces or moments nearby, a list of indices is returned in the names
list