# MBDyn-Adapter: Matrix Q is not sufficiently orthogonal

**URL:** <https://precice.discourse.group/t/mbdyn-adapter-matrix-q-is-not-sufficiently-orthogonal/593>\
**Category:** Using preCICE\
**Tags:** mbdyn\
**Created:** [May 13, 2021, 10:55am UTC](https://precice.discourse.group/t/mbdyn-adapter-matrix-q-is-not-sufficiently-orthogonal/593 "2021-05-13T10:55:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JulianSchl](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/julianschl/32/692_2.png) [@JulianSchl](https://precice.discourse.group/u/JulianSchl)\
**Post date:** [May 13, 2021, 10:55am UTC](https://precice.discourse.group/t/mbdyn-adapter-matrix-q-is-not-sufficiently-orthogonal/593/1 "2021-05-13T10:55:44Z")

</div>

Hi everyone,

I am trying to get used to the [preCICE adapter for MBDyn](https://github.com/precice/mbdyn-adapter) coupled with OpenFOAM. For the beginning, I am trying to get the [tutorialcase](https://github.com/precice/mbdyn-adapter/tree/master/tutorials/cavityFSI) working. After some porting of the Adapter to preCICE 2 and Python 3, I was able to run the case. Sadly the case crashes after a few iterations with the message (in the terminal of the MBDyn Adapter):

```
(0) 14:47:53 [acceleration::QRFactorization]:397 in orthogonalize:
WARNING: Matrix Q is not sufficiently orthogonal.
Failed to rorthogonalize new column after 4 iterations.
New column will be discarded. The least-squares system is very bad conditioned
and the quasi-Newton will most probably fail to converge.

```

I am not shure what this error message means.

Please also see the full case [here](https://github.com/JulianSchl/example-MBDyn-Adapter-membrane).  
To reproduce this issue, you need to have OpenFOAM, preCICE and MBDyn installed.  
Run the following commands in two seperate terminals:

Terminal 1:

```
cd tutorials/cavityFSI/fluid/
blockMesh
pimpleFoam

```

Terminal 2:

```
cd tutorials/cavityFSI/structure/
python cavityFSI.py
```

---

<div class="post-metadata">

**Author:** ![IshaanDesai](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/ishaandesai/32/1048_2.png) [@IshaanDesai](https://precice.discourse.group/u/IshaanDesai)\
**Post date:** [May 14, 2021, 2:18pm UTC](https://precice.discourse.group/t/mbdyn-adapter-matrix-q-is-not-sufficiently-orthogonal/593/2 "2021-05-14T14:18:30Z")

</div>

Hi @JulianSchl

Another user is also working on updating the MBDyn-Adapter and has got the cavity flow with flexible bottom case to work. Please check more details [here](https://github.com/precice/mbdyn-adapter/pull/4#issuecomment-840565102). The pull request is being reviewed at the moment, so please feel free to comment there in case you spot something peculiar.

---

<div class="post-metadata">

**Author:** ![JulianSchl](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/julianschl/32/692_2.png) [@JulianSchl](https://precice.discourse.group/u/JulianSchl)\
**Post date:** [May 16, 2021, 2:11pm UTC](https://precice.discourse.group/t/mbdyn-adapter-matrix-q-is-not-sufficiently-orthogonal/593/3 "2021-05-16T14:11:08Z")

</div>

Hi @IshaanDesai,  
this example seems to work after some path modifications in the config files 👍

---

<div class="post-metadata">

**Author:** ![IshaanDesai](https://yyz2.discourse-cdn.com/free1/user_avatar/precice.discourse.group/ishaandesai/32/1048_2.png) [@IshaanDesai](https://precice.discourse.group/u/IshaanDesai)\
**Post date:** [May 16, 2021, 7:40pm UTC](https://precice.discourse.group/t/mbdyn-adapter-matrix-q-is-not-sufficiently-orthogonal/593/4 "2021-05-16T19:40:25Z")

</div>

Hi @JulianSchl

That is good to know! 😄  
If you want, you can open an issue explaining which paths need to be modified in which configuration files to get the tutorial to work. Currently the above mentioned pull request is being reviewed and your issue could potentially help avoid the same mistake again there.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/precice/original/1X/67d2a5fa6f80e597e2267ff17fa8c1673cd11caa.svg) [@system](https://precice.discourse.group/u/system)\
**Post date:** [May 19, 2021, 7:41pm UTC](https://precice.discourse.group/t/mbdyn-adapter-matrix-q-is-not-sufficiently-orthogonal/593/5 "2021-05-19T19:41:08Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
