KratosMultiphysics / Kratos

Kratos Multiphysics (A.K.A Kratos) is a framework for building parallel multi-disciplinary simulation software. Modularity, extensibility and HPC are the main objectives. Kratos has BSD license and is written in C++ with extensive Python interface.
https://kratosmultiphysics.github.io/Kratos/
Other
1.01k stars 244 forks source link

[WARNING] NavierStokesSolverMonolithic: Fluid solver did not converge #8733

Closed demetrafabris closed 3 years ago

demetrafabris commented 3 years ago

Description My analysis lasts 200 s with 0.01 s time steps. Since almost 136 s it starts to not converge and it stopped with the error listed below

Scope Compilation

To Reproduce image image image image

Fluid Dynamics Analysis: STEP:  13655 
Fluid Dynamics Analysis: TIME:  136.5500000000208 
[WARNING] NavierStokesSolverMonolithic: Fluid solver did not converge for step 13655
corresponding to time 136.5500000000208

Fluid Dynamics Analysis: STEP:  13656 
Fluid Dynamics Analysis: TIME:  136.56000000002078 
[WARNING] NavierStokesSolverMonolithic: Fluid solver did not converge for step 13656
corresponding to time 136.56000000002078

Fluid Dynamics Analysis: STEP:  13657 
Fluid Dynamics Analysis: TIME:  136.57000000002077 
[WARNING] NavierStokesSolverMonolithic: Fluid solver did not converge for step 13657
corresponding to time 136.57000000002077

Fluid Dynamics Analysis: STEP:  13658 
Fluid Dynamics Analysis: TIME:  136.58000000002076 
[WARNING] NavierStokesSolverMonolithic: Fluid solver did not converge for step 13658
corresponding to time 136.58000000002076

Fluid Dynamics Analysis: STEP:  13659 
Fluid Dynamics Analysis: TIME:  136.59000000002075 
[WARNING] NavierStokesSolverMonolithic: Fluid solver did not converge for step 13659
corresponding to time 136.59000000002075

Fluid Dynamics Analysis: STEP:  13660 
Fluid Dynamics Analysis: TIME:  136.60000000002074 
[WARNING] NavierStokesSolverMonolithic: Fluid solver did not converge for step 13660
corresponding to time 136.60000000002074

Fluid Dynamics Analysis: STEP:  13661 
Fluid Dynamics Analysis: TIME:  136.61000000002073 
[WARNING] NavierStokesSolverMonolithic: Fluid solver did not converge for step 13661
corresponding to time 136.61000000002073

Fluid Dynamics Analysis: STEP:  13662 
Fluid Dynamics Analysis: TIME:  136.62000000002072 
[WARNING] NavierStokesSolverMonolithic: Fluid solver did not converge for step 13662
corresponding to time 136.62000000002072

Fluid Dynamics Analysis: STEP:  13663 
Fluid Dynamics Analysis: TIME:  136.63000000002071 
[WARNING] NavierStokesSolverMonolithic: Fluid solver did not converge for step 13663
corresponding to time 136.63000000002071

Fluid Dynamics Analysis: STEP:  13664 
Fluid Dynamics Analysis: TIME:  136.6400000000207 
[WARNING] NavierStokesSolverMonolithic: Fluid solver did not converge for step 13664
corresponding to time 136.6400000000207

Fluid Dynamics Analysis: STEP:  13665 
Fluid Dynamics Analysis: TIME:  136.6500000000207 
[WARNING] NavierStokesSolverMonolithic: Fluid solver did not converge for step 13665
corresponding to time 136.6500000000207

Fluid Dynamics Analysis: STEP:  13666 
Fluid Dynamics Analysis: TIME:  136.6600000000207 
[WARNING] AMGCL Linear Solver: Non converged linear solution. [0.00057943 > 1e-07]
[WARNING] AMGCL Linear Solver: Non converged linear solution. [0.465474 > 1e-07]
[WARNING] AMGCL Linear Solver: Non converged linear solution. [0.37408 > 1e-07]
[WARNING] AMGCL Linear Solver: Non converged linear solution. [0.15523 > 1e-07]
[WARNING] AMGCL Linear Solver: Non converged linear solution. [0.953023 > 1e-07]
[WARNING] AMGCL Linear Solver: Non converged linear solution. [0.739189 > 1e-07]
[WARNING] AMGCL Linear Solver: Non converged linear solution. [0.987086 > 1e-07]
[WARNING] AMGCL Linear Solver: Non converged linear solution. [0.501842 > 1e-07]
[WARNING] AMGCL Linear Solver: Non converged linear solution. [0.0900512 > 1e-07]
[WARNING] AMGCL Linear Solver: Non converged linear solution. [0.987132 > 1e-07]
[WARNING] NavierStokesSolverMonolithic: Fluid solver did not converge for step 13666
corresponding to time 136.6600000000207

Fluid Dynamics Analysis: STEP:  13667 
Fluid Dynamics Analysis: TIME:  136.67000000002068 
[WARNING] AMGCL Linear Solver: Non converged linear solution. [0.776778 > 1e-07]
[WARNING] AMGCL Linear Solver: Non converged linear solution. [2.4311e+06 > 1e-07]
Traceback (most recent call last):
  File "MainKratos_custom_prova.py", line 32, in <module>
    simulation.Run()
  File "/home/kratos/Kratos/bin/Release/KratosMultiphysics/analysis_stage.py", line 48, in Run
    self.RunSolutionLoop()
  File "/home/kratos/Kratos/bin/Release/KratosMultiphysics/analysis_stage.py", line 65, in RunSolutionLoop
    is_converged = self._GetSolver().SolveSolutionStep()
  File "/home/kratos/Kratos/bin/Release/KratosMultiphysics/FluidDynamicsApplication/fluid_solver.py", line 127, in SolveSolutionStep
    is_converged = self._GetSolutionStrategy().SolveSolutionStep()
RuntimeError: Error: Zero pivot in ILU

in kratos/solving_strategies/builder_and_solvers/residualbased_block_builder_and_solver.h:496:void ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::InternalSystemSolveWithPhysics(ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemMatrixType&, ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemVectorType&, ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemVectorType&, ModelPart&) [with TSparseSpace = UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::ublas::vector<double> >; TDenseSpace = UblasSpace<double, boost::numeric::ublas::matrix<double>, boost::numeric::ublas::vector<double> >; TLinearSolver = LinearSolver<UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::ublas::vector<double> >, UblasSpace<double, boost::numeric::ublas::matrix<double>, boost::numeric::ublas::vector<double> > >; ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemMatrixType = boost::numeric::ublas::compressed_matrix<...>; ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemVectorType = boost::numeric::ublas::vector<double>]
   kratos/solving_strategies/builder_and_solvers/residualbased_block_builder_and_solver.h:545:void ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::BuildAndSolve(typename ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::BaseType::TSchemeType::Pointer, ModelPart&, ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemMatrixType&, ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemVectorType&, ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemVectorType&) [with TSparseSpace = UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::ublas::vector<double> >; TDenseSpace = UblasSpace<double, boost::numeric::ublas::matrix<double>, boost::numeric::ublas::vector<double> >; TLinearSolver = LinearSolver<UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::ublas::vector<double> >, UblasSpace<double, boost::numeric::ublas::matrix<double>, boost::numeric::ublas::vector<double> > >; typename ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::BaseType::TSchemeType::Pointer = shared_ptr<Scheme<UblasSpace<double, boost::numeric::ublas::compressed_matrix<...>, boost::numeric::ublas::vector<double> >, UblasSpace<double, boost::numeric::ublas::matrix<double>, boost::numeric::ublas::vector<double> > > >; ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemMatrixType = boost::numeric::ublas::compressed_matrix<...>; ResidualBasedBlockBuilderAndSolver<TSparseSpace,...>::TSystemVectorType = boost::numeric::ublas::vector<double>]

Expected behavior The analysis should arrive to 200 s without this problem

Environment

rubenzorrilla commented 3 years ago

The linear solver is not converging. Which are your Reynolds and maximum Courant numbers?

demetrafabris commented 3 years ago

This is thee file with my Courant's numbers, the maximum was around 6, before it starts to not converging

cfl_results.txt

rubenzorrilla commented 3 years ago

These are not too high. What about the Reynolds?

demetrafabris commented 3 years ago

If I'm not wrong, at the height of the bridge deck (approximately 30 m) I obtained Re=92659074 (the chartacteristic dimension of the bridge deck is the width l=45.86 m and the medium wind velocity is v(z=30m)=30.31 m/s) Isn't it strange?

rubenzorrilla commented 3 years ago

Don't know if it's strange, but for sure is super large. As characteristic dimension, I'd use the cross-section thickness, which would yield something of the order of 5M. How many elements do you have in the mesh? Can you attach a snapshot of the mesh close to the cross-section.

demetrafabris commented 3 years ago

I've got 27K elements in the mesh

Without the mesh image

With the mesh image

Here there is the structure image

rubenzorrilla commented 3 years ago

First of all, I think that this mesh is super coarse for such a high Re number. Secondly, as this is super turbulent, might it be the case that you have some vortexes that travel through the domain and arrive to the outlet?

demetrafabris commented 3 years ago

Yes, it is image

rubenzorrilla commented 3 years ago

Yes, it is image

When the simulation starts to converge badly, is there inflow through the outlet?

demetrafabris commented 3 years ago

Actually it seems to have some problems at the inlet. The simulation starts to converge badly around 135 s (the simulation should last 200 s). I show you some pictures at different time steps.

100 s image

110 s image

120 s image

130 s image

136.65 s (When the analysis stopped) image

rubenzorrilla commented 3 years ago

:confused: this is strange... The values in the inlet must be fixed during the entire simulation. Is there any chance that the time intervals of your inlet function are not set in accordance to the total simulation time?

demetrafabris commented 3 years ago

Maybe I found out the problem I modified the end time of the analysis from 100 s to 200 s in the project parameter, but I forgot to modify the end time in the ramp-up too (I divided in ramp-up time from 0.0 s to 10.0 s and in the flow time from 10.0 s to 100.05 s). Maybe it was there the problem. Cuold it be?

rubenzorrilla commented 3 years ago

ided in ramp-up time from 0.0 s to 10.0 s and in the flow time from 10.0 s to 100.05

I bet this is the problem. From 100.05 onwards you have no inlet BC. For this to be valid for any end time you can just put "interval" : [10.0,"End"] in your inlet process. Then it will apply your inlet function regardless the end time.

rubenzorrilla commented 3 years ago

Closing as it seems to be solved. @demetrafabris feel free to reopen again if required.