CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Print pressure correction matrix coefficients in openFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 26, 2017, 07:33
Default Print pressure correction matrix coefficients in openFoam
  #1
Senior Member
 
Join Date: Dec 2017
Posts: 153
Rep Power: 9
AliE is on a distinguished road
Dear Foamers,

I am actually trying to print to screen the coefficients related to the pressure- correction equation in icoFoam (diagonal and off-diagonal). Until now, I have followed the suggestions in this post:

Accessing Coefficient Matrix

Here is the code:

// -------

fvScalarMatrix pEqn
(
fvm::laplacian(rAU, p) == fvc::div(phiHbyA)
);


label Nc = mesh.nCells(); //Total number of cells

//Diagonal coefficients
for(label i=0; i<Nc; i++)
{
Info<< pEqn.diag()[i] << endl;
}

//Off-diagonal coefficients
for(label faceI=0; faceI<UEqn.lduAddr().lowerAddr().size(); faceI++)
{
Info<< pEqn.upper()[faceI] << endl; //Lower coefficients
Info<< pEqn.lower()[faceI] << endl; //Upper coefficients
}

// ------

It seems to work, but for some reasons in the diagonal coefficents printed out the contribution of the boundary conditions is not included.

Do you have any suggestion to fix my problem?

Thank you very much for the help,

AliE
AliE is offline   Reply With Quote

Reply

Tags
icofoam, openfoam


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
Wind tunnel Boundary Conditions in Fluent metmet FLUENT 6 October 30, 2019 13:23
Which pressure OpenFOAM use for incompressible flow? P/rho or (P-101325)/rho ? panda60 OpenFOAM 16 August 14, 2018 05:57
SIMPLE algorithm does not converge when using old pressure (correction) values andreasp Main CFD Forum 3 February 9, 2016 22:18
[blockMesh] Another cylinder question bendel_boy OpenFOAM Meshing & Mesh Conversion 5 January 6, 2015 06:09
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) HB &DS CFX 0 January 9, 2000 14:19


All times are GMT -4. The time now is 12:42.