Hi all,

I am still using TH2M to explore the process of injection and production in an oil-saturated reservoir. I compile OGS again with mpich and Petsc packages to achieve parallel computing. Particularly, I apply line source terms as the injector and producer in a 2D model and the total injection time is 1 year. However, I feel confused when choosing Pestc linear solver. First I choose a default linear solver and the code is like:

```
<linear_solvers>
<linear_solver>
<name>general_linear_solver</name>
<eigen>
<solver_type>BiCGSTAB</solver_type>
<precon_type>ILUT</precon_type>
<max_iteration_step>10000</max_iteration_step>
<error_tolerance>1e-16</error_tolerance>
</eigen>
<petsc>
<prefix>p</prefix>
<parameters>-p_ksp_type cg -p_pc_type jacobi -p_ksp_atol 1e-12 -p_ksp_rtol 1e-12</parameters>
</petsc>
</linear_solver>
</linear_solvers>
```

However, `Divergence Detected `

error will happen during the solving process. I apply some other linear solvers’ code according to the benchmark files, but the divergence cannot be avoided. Then I choose to use MUMPS solver according to a post in the discourse and the link is: https://discourse.opengeosys.org/t/parameters-for-mumps-solver/804

and the MUMPs code is like:

```
<petsc>
<prefix>hc</prefix>
<parameters>-hc_mat_type aij -hc_pc_type lu -hc_pc_factor_mat_solver_type mumps -hc_ksp_view</parameters>
</petsc>
```

When the mesh density around the line source term is relatively sparse as shown in Fig. 1, the simulation can be conducted smoothly and fast but the numerical fluctuation is obvious in saturation field like Fig. 2. I refine the mesh and run the OGS again, the solving process can run normally, it won’t stop but after a certain amount of time, huge errors start to appear in the liquid-pressure field. I am very confused that I just refine the mesh without any other modification in the .prj file and the simulation cannot work correctly. I think there must be something wrong in the linear solver part in my .prj file. In fact there are many linear solver options in the Petsc library and I don’t which one to choose. The refined mesh file (including .vtu file and .bin file) and .prj file are attached in the end.

Could anyone give me some advice?

large-hysiara-2D-PETSc.zip (1.3 MB)

Best,

Yuhao