FEM ConstraintSelfWeight

    From FreeCAD Documentation
    This page contains changes which are not marked for translation.

    FEM ConstraintSelfWeight.svg FEM ConstraintSelfWeight

    Menu location
    Model → Mechanical Constraints → Constraint self weight
    Default shortcut
    Introduced in version
    See also
    FEM tutorial


    Defines gravity acceleration 9,81 m/s^2 acting on the whole model in the prescribed direction.


    1. There are several ways to invoke the command:
      • Press the FEM ConstraintSelfWeight.svg FEM ConstraintSelfWeight button.
      • Select the Model → Mechanical Constraints → FEM ConstraintSelfWeight.svg Constraint self weight option from the menu.
    2. You can modify the direction of gravitation by changing its vector coordinates in the property bar of newly created ConstraintSelfWeight object.


    New object:

    import ObjectsFem

    Add object to the analysis named Analysis:

    App.ActiveDocument.Analysis.Member = App.ActiveDocument.Analysis.Member + [(object)]


    import ObjectsFem
    selfweight_obj = ObjectsFem.makeConstraintSelfWeight("MySelfWeightObject")
    App.ActiveDocument.Analysis.Member = App.ActiveDocument.Analysis.Member + [selfweight_obj]

    Solver CalculiX


    • You need to modify the .inp file to edit gravity acceleration.
    • Self-weight is applied to the element set Eall which includes the whole model.

    Editing CalculiX input file

    The acceleration constant can be manually edited after generating the CalculiX input file.

    Example of lines in the .inp file:


    where 9810 is a gravity acceleration magnitude in [mm/s^2], and 0,0,-1 is the direction vector.

    Solver Z88

    • not implemented in Z88 solver (March 2017)