# sequential solving - matrix manipulation

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 9, 2020, 04:48 sequential solving - matrix manipulation #1 New Member   Join Date: Sep 2020 Posts: 5 Rep Power: 3 Dear Foamers, I still try to implement a special update scheme in the interFoam solver (https://doi.org/10.1016/j.jcp.2019.109067). The scheme requires to sequentially solve the equations inside the domain. From what I understand right now (I just started to work with OpenFOAM a few weeks ago), an equation is set-up according to: A*u=b where A is the matrix containing the coefficients from the implicit parts, u containing the values after the update in the step .solve() and b containing source terms and explicit parts, right? What I would like to do know is to extract a number of rows from A, u and b and solve this subsystem. Is there an straight forward way in OpenFoam to handle this kind of operation? I hope my question got clear, otherwise don't hesitate to ask. I really appreciate any kind of help. Thanks a lot, Axel

 October 9, 2020, 05:56 #2 Senior Member   Domenico Lahaye Join Date: Dec 2013 Posts: 415 Blog Entries: 1 Rep Power: 13 OpenFoam stores linear system in sparse LDU format, see e.g. [1,2]. Extracting rows from A requires going through the same bookkeeping as implemented in the matrix-vector multiplication implemented in the Amul function, see Section 5/8 of [3]. [1]: Moukalled, Manga and Darwish, The finite volume method in computational fluid dynamics, Springer 2015 , http://www.springer.com/gp/book/9783319168739 [2]: https://www.foamacademy.com/wp- content/uploads/2018/03/OF2018matrix.pdf [3]: https://www.linkedin.com/pulse/openf...menico-lahaye/

 October 12, 2020, 04:55 interfaces #3 New Member   Join Date: Sep 2020 Posts: 5 Rep Power: 3 Dear Domenico, thank you very much for the provided references. They seem to be very helpful. I understood know the setup of the coefficient matrix but still struggle with some parts of the implementation. Can you tell me whats the purpose of the functions initMatrixInterfaces() (Line 83) and updateMatrixInterfaces() (Line 105) in LduMatrixATmul.C (https://github.com/OpenFOAM/OpenFOAM...atrixATmul.C)? Thank you once more and appreciate your response.

 Tags manipulation, matrix, sequential, solving