Can't converge a simple pipe elbow case
Moderator: oliveroxtoby
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Can't converge a simple pipe elbow case
Hi,
after doing some experiments with external flow, I decided to test internal flow simulations as well. The first analysis (Venturi tube) was successful, at least when I switched to transient flow. However, the next model that I wanted to check (pipe elbow) can't converge at all. I've tried several tricks:
- transient instead of steady-state, various time incrementation settings
- different mesh size
- lower inlet velocity
but none of them helped. Maybe there's something wrong with the setup but I made it as simple as possible. It would be great if you could give me some suggestions. They will likely help me deal with more complex models in the future.
Here's the FreeCAD file with this model:
P.S. I still keep having that issue with zero results (https://forum.freecadweb.org/viewtopic.php?f=37&t=64740) but it disappears when I remesh the model. That's really strange.
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: Polish/Poland (pl_PL)
after doing some experiments with external flow, I decided to test internal flow simulations as well. The first analysis (Venturi tube) was successful, at least when I switched to transient flow. However, the next model that I wanted to check (pipe elbow) can't converge at all. I've tried several tricks:
- transient instead of steady-state, various time incrementation settings
- different mesh size
- lower inlet velocity
but none of them helped. Maybe there's something wrong with the setup but I made it as simple as possible. It would be great if you could give me some suggestions. They will likely help me deal with more complex models in the future.
Here's the FreeCAD file with this model:
P.S. I still keep having that issue with zero results (https://forum.freecadweb.org/viewtopic.php?f=37&t=64740) but it disappears when I remesh the model. That's really strange.
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: Polish/Poland (pl_PL)
-
- Veteran
- Posts: 3158
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: Can't converge a simple pipe elbow case
You used Ux as inlet-vector, should be Uy.
Initialize with potentialFoam.
Start with low Uy (here: 50 mm/s)
Laminar, steady-state. See here: BTW: using 16 cores is a little bit overkill...
Initialize with potentialFoam.
Start with low Uy (here: 50 mm/s)
Laminar, steady-state. See here: BTW: using 16 cores is a little bit overkill...
Re: Can't converge a simple pipe elbow case
Thank you very much, it works now. I don’t know how I could have missed such a basic mistake. Maybe I should use the definition of velocity normal to the inlet face instead
Out of habit, I always set the number of cores for simulations to maximum available but in some cases it’s not necessary, right.
Out of habit, I always set the number of cores for simulations to maximum available but in some cases it’s not necessary, right.
-
- Posts: 27
- Joined: Fri Oct 08, 2021 9:21 pm
Re: Can't converge a simple pipe elbow case
Quick thanks to both of you!
It has really helped to have a file, which is expected to run (of course meshing needs to be done.) to confirm a working installation.
Now further troubleshooting here...
It has really helped to have a file, which is expected to run (of course meshing needs to be done.) to confirm a working installation.
Now further troubleshooting here...
Re: Can't converge a simple pipe elbow case
You might be meshing the wrong side of the surface you have marking the region boundaries. One of the inputs into snappyHexMesh/cfMesh is a point (XYZ coordinates) that tells the mesher which region is being meshed. It defaults to the origin, which is often not where you want it to be. Maybe it's getting changed when it shouldn't be/not changed when it should be? That point being wrong was the problem the last time I got a zero result field.NewJoker wrote: ↑Mon Dec 27, 2021 1:48 pm
P.S. I still keep having that issue with zero results (https://forum.freecadweb.org/viewtopic.php?f=37&t=64740) but it disappears when I remesh the model. That's really strange.
Re: Can't converge a simple pipe elbow case
That's interesting. I've heard that OpenFOAM uses such a point to determine whether the mesh is for internal or external flow but I don't know how it's realized in CfdOF module. Meshing here requires only the selection of a volume (wind tunnel for external flow or pipe/channel for internal flow) and I assume that the rest happens automatically since the mesh is created for the correct volume. But maybe there are situations when it works unexpectedly. I guess that it's not possible to pick such a point in CfdOF, right ? Those errors that you've encountered happened in FreeCAD's implementation of OpenFOAM or in the standalone solver ?KAKM wrote: ↑Mon Dec 27, 2021 8:40 pm You might be meshing the wrong side of the surface you have marking the region boundaries. One of the inputs into snappyHexMesh/cfMesh is a point (XYZ coordinates) that tells the mesher which region is being meshed. It defaults to the origin, which is often not where you want it to be. Maybe it's getting changed when it shouldn't be/not changed when it should be? That point being wrong was the problem the last time I got a zero result field.
Re: Can't converge a simple pipe elbow case
I was using CfdOF when that happened, and I did wind up fixing it by changing that point value. I wasn't actually able to get the mesher to run on a volume, I had to convert it to a shell.
I can look for that for you, but my installation is somewhat broken at the moment because I've been trying to get Cfd and CfdOF to coexist on my computer and they like to interfere with each other, so I need to fix the meshing command enough to access that menu, which might take a bit.
It is, it's just that finding the spot in CfdOF where you can change it is a bit tricky. I think it's somewhere in the mesh creation dialog?
I can look for that for you, but my installation is somewhat broken at the moment because I've been trying to get Cfd and CfdOF to coexist on my computer and they like to interfere with each other, so I need to fix the meshing command enough to access that menu, which might take a bit.
-
- Posts: 27
- Joined: Fri Oct 08, 2021 9:21 pm
Re: Can't converge a simple pipe elbow case
Point can be specified during Meshing, of course only for snappyHexMesh
- Attachments
-
- Screenshot from 2021-12-27 22-45-19.png (24.88 KiB) Viewed 3033 times
Re: Can't converge a simple pipe elbow case
So far I've only used cfMesh in my models. In that case, the location of this point shouldn't be a problem here, right ?justwanttoknow wrote: ↑Mon Dec 27, 2021 9:47 pm Point can be specified during Meshing, of course only for snappyHexMesh
-
- Posts: 27
- Joined: Fri Oct 08, 2021 9:21 pm
Re: Can't converge a simple pipe elbow case
Correct, as far as I know.