Say we are dealing with a 2 dimensional square domain, on regular grid, top corner at (XMax, YMax). We can set the boundary condition type with the problem function "boundaryTypesAtPos(BoundaryTypes &, const GlobalPosition &)". When using the box method, the values in GlobalPosition correspond to the nodes of the user input grid.
Thus, when determining the boundary type condition, the function will be called with (0,0), (0,YMax), (YMax,0) and (XMax,YMax). If we have Dirichlet conditions on segment (0,0)-(XMax,0) and on segment (0,YMax)-(XMax,YMax) and Neuman on the other two borders, there is an apparent issue on type determination. Take the behavior of the function when GlobalPosition is (0,0). If the size of the subcontrol volume is L (element size 2L), then we have segments (0,0)-(0,L) and (0,0)-(L,0) to consider. If our code reads: if (globalPos[0] < epsilon) values.setDirichlet(idx1); if (globalPos[1] < epsilon) values.setNeumann(idx1); Both segments will end up with Neumann, which is not right. But if we change the order in which the logical instruction is executed to: if (globalPos[1] < epsilon) values.setNeumann(idx1); if (globalPos[0] < epsilon) values.setDirichlet(idx1); Both segments will be assigned a Dirichlet type condition. The confusion will also occur at the other three corners of the square domain. This may seem a minor issue, but in the geomechanics problems (the ones not using pdelab in 2.12) the order in which the condition types are specified has led to a singular matrix for the Newton iteration. Reversing the order allows the method to converge in some cases. In other geomechanical problems we cannot get the Newton method to converge, so we suspect the describe boundary type confusion may be involved. Is there a way to solve this issue in the box method? Or would it be necessary to use the cell centered method perhaps? Any ideas or pointers, no matter how small, would be greatly appreciated. Best regards, Edscott _______________________________________________ Dumux mailing list [email protected] https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
