|
[Sponsors] |
Print pressure correction matrix coefficients in openFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 26, 2017, 07:33 |
Print pressure correction matrix coefficients in openFoam
|
#1 |
Senior Member
Join Date: Dec 2017
Posts: 153
Rep Power: 9 |
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 |
|
Tags |
icofoam, openfoam |
|
|
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 |