CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

sequential solving - matrix manipulation

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

LinkBack Thread Tools Search this Thread Display Modes
Old   October 9, 2020, 05:48
Default sequential solving - matrix manipulation
New Member
Join Date: Sep 2020
Posts: 5
Rep Power: 4
AxelS is on a distinguished road
Dear Foamers,

I still try to implement a special update scheme in the interFoam solver ( 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:


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,
AxelS is offline   Reply With Quote

Old   October 9, 2020, 06:56
Senior Member
Domenico Lahaye
Join Date: Dec 2013
Posts: 541
Blog Entries: 1
Rep Power: 15
dlahaye is on a distinguished road
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 ,


dlahaye is offline   Reply With Quote

Old   October 12, 2020, 05:55
Default interfaces
New Member
Join Date: Sep 2020
Posts: 5
Rep Power: 4
AxelS is on a distinguished road
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 (

Thank you once more and appreciate your response.
AxelS is offline   Reply With Quote


manipulation, matrix, sequential, solving

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Segmentation fault when using reactingFOAM for Fluids Tommy Floessner OpenFOAM Running, Solving & CFD 4 April 22, 2018 13:30
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 03:50
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 03:20
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 04:34
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07

All times are GMT -4. The time now is 17:52.