# Error in solve command while analysing a cantilever beam under prescribed displacement

**URL:** <https://fenicsproject.discourse.group/t/error-in-solve-command-while-analysing-a-cantilever-beam-under-prescribed-displacement/11351>\
**Category:** General\
**Created:** [May 31, 2023, 2:30am UTC](https://fenicsproject.discourse.group/t/error-in-solve-command-while-analysing-a-cantilever-beam-under-prescribed-displacement/11351 "2023-05-31T02:30:19Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [May 31, 2023, 5:22pm UTC](https://fenicsproject.discourse.group/t/error-in-solve-command-while-analysing-a-cantilever-beam-under-prescribed-displacement/11351/4 "2023-05-31T17:22:08Z")

</div>

There are many posts regarding this on the forum, including

> [@Issue in calculating reaction force by integration of stress over a subdomain](https://fenicsproject.discourse.group/t/issue-in-calculating-reaction-force-by-integration-of-stress-over-a-subdomain/9006):
>
> Hello everyone, I am trying to calculate the reaction force through integration of stresses over a subdomain as done on the following link: [https://comet-fenics.readthedocs.io/en/latest/demo/tips\_and\_tricks/computing\_reactions.html](https://comet-fenics.readthedocs.io/en/latest/demo/tips_and_tricks/computing_reactions.html) I am attaching a minimal working code for 1D bar in tension. Left end of this bar is fixed and a displacement is applied on the right end. The program is providing the zero reaction force. The same method worked for me in dolfin but in dolfinx it is giving zero rea…

and

> [@Computation of reaction force](https://fenicsproject.discourse.group/t/computation-of-reaction-force/129/2):
>
> Because all external forces come from BCs, and the solution is in static equilibrium, you expect the net reaction force to all BCs to be zero. If you want to get the reaction force from one BC, you need to apply the others to the residual. For example, to get the reaction to the force on the right end, you could do something like the following: for n in range(num\_steps): t += dt solve(F == 0, w, bc) (u,p)=w.split(True) p\_n.assign(p) f\_int = assemble(inn…

---

_[View the full topic](https://fenicsproject.discourse.group/t/error-in-solve-command-while-analysing-a-cantilever-beam-under-prescribed-displacement/11351)._
