There are different boundary constraints in COMSOL structural, but in 2D/3D structural (smpn, smsld ...) there are no angular variables predefined, hence no easy way, as in the Euler beam modules, to enforce angles.

These are either by constrining the angles (which gives very wrong reaction forces) and a cleaner way by applying an external torque until the angle is restrained, through an optimisation approach, as per smeug.pdf p69 v3.5a.

Note:
I use reacf() reaction forces in there for the Torque calculations, so if you need the weak constraints you might get an error message, these reaction forces could be replaced by, albeit supposed to be less accurate, traction forces, or just the lm's.

Further explanations are given in the model properties.

I have added a second "PN" (BeamDispForce_1) and a third "SMPN" (BeamDispForce_smpn_1) example comparing displacement constraints and coupled force & moment load adapted by COMSOL to obtain the same constrained displacement, all on a fixed-free beam in 2D. Further explanations are given in the model properties. THe cntact case is active in the SMPN model. Porting to 3D is almost trivial ;)