Closed ShadowEngineer closed 2 months ago
Dear @ShadowEngineer Sorry for the delay in getting back at you. It was a good idea to open an issue.
The solver you are reporting (gls_navier_stokes_2d) is very dated, we have changed the naming scheme of the solvers around 8 months ago. That solver is now lethe-fluid
. Still the underlying numerics have not changed significantly.
The issue you are getting (as seen in your movie) that is your simulation crashes as soon as you have a vortex hitting the outlet. This is a well-established issue with "do-nothing" boundary conditions in FEM because they impose a zero traction at the outlet boundary condition. In essence, this is a blend between imposing a zero pressure value and a zero gradient of the normal velocity. The issue is that when you have backflow (aka a vortex that touches the wall) you have re-entry of fluid and the results become essentially garbage since it is unclear with what information the fluid comes back in.
However, we actually have a good way to mitigate this. The best approach is to use a the outlet boundary condition provided in Lethe: https://chaos-polymtl.github.io/lethe/documentation/parameters/cfd/boundary_conditions_cfd.html
In the outlet boundary, there is a coefficient "beta" that you can set that prevent backflow. The idea is to set it at an increasingly high value (aka 10, 1000 or 1e4) to prevent this type of backflow while ensuring the simulation remains stable.
To achieve this, you would add the following information
subsection bc 3
set type = outlet
set beta = 100
end
They are also other alternative that can work quite well:
Yet the first thing I would try is to play with the outlet boundary and increase the beta
Feel free to reach out if you have more questions in this issue. I'll be faster to answer next time :)
@blaisb I also recently got as similar error. However, in my case, it was due to the smoothing post-processor having trouble converging with very messy q_criterion results. This could also be the case here since the smoothing post-processor is activated. Maybe adding the possibility to tune the linear solver for the post-processor or adding some fail-safe mecanisme when this happen due to the smoothing could also help.
I'm attempting to run a simple 2D incompressible flow over a cylinder (similar to the example) simulation for a prolonged period of time (at least 3 minutes of sim time) in very turbulent conditions at 50000 Reynolds number with initial velocity
1
and kinematic viscosity2e-05
with:gls_navier_stokes_2d
solver2
1_000_000
mesh elements1e-12
After many re-runs and attempts with various results, I keep getting the same error:
After diving through the Trilinos source code, I found this definition in
az_solve.c
I've attempted to change many variables in my parameters file, including:
1e-8
, and is now1e-12
)All of these only made the simulation survive for longer, not fix the issue completely. I've tried looking through lethe documentation and deal.II and trilinos documentation to better understand what might be causing this error, but have not found anything of great use.
So my questions are:
A video of the simulation has been made, for demonstration purposes. At the 0:10 second mark, notice the large growth of >2 m/s velocity after a vortex tries to leave the Outlet right boundary, causing a rapid growth of turbulent kinetic energy in the system and a subsequent "loss of precision" error causing the simulation to end.
My
.geo
file for generating the mesh and the.prm
for the simulation are attached: