Convergence Issues #29644
-
Hello everybody, im trying to implement a 2-phase flow in my model. Right now im running into some convergence issues. Later on i'm trying to implement a open water body to the right and simulate the thermal influence of burried electrical cables on groundwater and open water bodies. I have a groundwaterflow from the left to the right that i implement over a FunctionDirichletBC with the porepressure. The gas pressure i set fixed to atmospheric pressure (101325 Pa). My gradient is 0,1 m/m and my model does have a width of 20 m. So the height difference of the groundwater from left to right border is 2 m. For the groundwater i use the Water97FluidProperties and for the gas phase i planed to use the NitrogenFluidProperties but then the code takes forever to compute the residual, so i use the IdealGasFluidProperties. In hopes to simplify my code and better the convergence i also used the SimpleFluidProperties but they gave worse convergence than the Water97Properties. I also reduced my timestep in order to improve convergence but that didn't have a great impact. This is my first big project and i'm kinda lost on what to do so i hope somebody could help me or point me in the right direction as to what is causing the bad convergence. I added my current state. This is my current output:
This is my mesh: This is my current code:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 15 replies
-
Hello
This is good feedback. I think these other properties have been implemented for correctness rather than performance. The trick here to speed it up is either do what you did, or use a TabulatedFluidProperties. This can be used to generate a tabulation (using a different fp object) then load the tabulation and only use that (no need to specify fp anymore) With regards to convergence issues, this page should help: |
Beta Was this translation helpful? Give feedback.
-
I think I have found your main problem. You have
The I think that is you have two fluid phases with a single fluid component in each (so only water in liquid phase, only gas in the gas phase) that you can just use |
Beta Was this translation helpful? Give feedback.
-
Also just noticed that you don't specify |
Beta Was this translation helpful? Give feedback.
I agree with @lynnmunday that it doesn't look big enough to run out of memory.
You could try a different preconditioned option instead of mumps. Another common one used for porous flow is
One more thing - your
PorousFlowOutflowBC
might work better if you specify the parameterso it doesn't try and remove non-existant water in the gas phase.