# 3D geometry 'interrupted' between inlet and outlet

**URL:** <https://community.freefem.org/t/3d-geometry-interrupted-between-inlet-and-outlet/1128>\
**Category:** General Discussion\
**Created:** [July 30, 2021, 1:44pm UTC](https://community.freefem.org/t/3d-geometry-interrupted-between-inlet-and-outlet/1128 "2021-07-30T13:44:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chr222](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/chr222/32/673_2.png) [@chr222](https://community.freefem.org/u/chr222)\
**Post date:** [July 30, 2021, 1:44pm UTC](https://community.freefem.org/t/3d-geometry-interrupted-between-inlet-and-outlet/1128/1 "2021-07-30T13:44:09Z")

</div>

Dear all,

I am running into a problem while adapting a 2D U-channel flow into 3D. I am using [this](https://github.com/mbarzegary/navier-stokes-solver) NS solver and the `buildlayers` command to ‘extrude’ the previously used 2D geometry. When checking the results it seems as if there is virtually no flow between the inlet and outlet.  
I have noticed that the mesh refinement (including the amount of layers set in the `buildlayers` command) influence the result in an unexpected manner, with a higher refinement causing a seemingly more turbulent flow at the in- and outlet.  
I have attached the correctly working 2D script and the faulty 3D script, as well as a reference image from the 2D result and two images of the 3D result with `buildlayers` set to 10 and 30 layers, respectively, [here](https://we.tl/t-ZnzyeHHQ1d) (Sorry, I cannot attach anything here yet since I am a new user).

Any help is highly appreciated. Thank you!

---

<div class="post-metadata">

**Author:** ![Newhat](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/newhat/32/618_2.png) [@Newhat](https://community.freefem.org/u/Newhat)\
**Post date:** [July 31, 2021, 8:14pm UTC](https://community.freefem.org/t/3d-geometry-interrupted-between-inlet-and-outlet/1128/2 "2021-07-31T20:14:07Z")

</div>

Did you try to use your pre-built 3D mesh? Build the 3D mesh outside of FreeFem++, maybe by other software like tetgen, then just read it and run.

---

<div class="post-metadata">

**Author:** ![chr222](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/chr222/32/673_2.png) [@chr222](https://community.freefem.org/u/chr222)\
**Post date:** [August 5, 2021, 12:01pm UTC](https://community.freefem.org/t/3d-geometry-interrupted-between-inlet-and-outlet/1128/3 "2021-08-05T12:01:39Z")

</div>

This worked.  
Thank you for the help!

---

<div class="post-metadata">

**Author:** ![Newhat](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/newhat/32/618_2.png) [@Newhat](https://community.freefem.org/u/Newhat)\
**Post date:** [August 5, 2021, 11:39pm UTC](https://community.freefem.org/t/3d-geometry-interrupted-between-inlet-and-outlet/1128/4 "2021-08-05T23:39:54Z")

</div>

You are welcome.

However, I’m still worried about the trunc function and split mesh in FreeFem++ do not work properly in 3D. Because, I encountered the similar problems as you.

---

<div class="post-metadata">

**Author:** ![chr222](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/chr222/32/673_2.png) [@chr222](https://community.freefem.org/u/chr222)\
**Post date:** [September 1, 2021, 8:30am UTC](https://community.freefem.org/t/3d-geometry-interrupted-between-inlet-and-outlet/1128/5 "2021-09-01T08:30:59Z")

</div>

Turns out the issue is not resolved after all. Low mesh refinement initially made me believe things were working correctly, but now after refining it, the issue remains exactly as before.  
I am still very clueless as to why there seems to be no connected flow between inlet and outlet and any help is highly appreciated!  
I have attached the correctly working 2D script and the faulty 3D script (now reading in the also attached mesh), as well as a reference image from the 2D result and a slice from the 3D result, [here](https://we.tl/t-olgmz6EM73).  
Thank you!
