CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Howto disable Solver Outputs (

holger_marschall August 31, 2008 14:00

Dear FOAMers, does anybody
Dear FOAMers,

does anybody know howto disable solver outputs during a simulation run for ONE variable? E.g. I don't want to display solver and initial resp. final residuals for one variable on my terminal window.

I know "lduMatrix::debug = 0;" which can be added to the code giving no output for all variables.

best regards

dbxmcf August 31, 2008 17:53

Hi, Just edit the $OPENFOA

Just edit the $OPENFOAM/.OpenFOAM-1.4.1/controlDict find the below DebugSwitches
lduMatrix : about "BICCG, ICCG info"
solution : about "Look up solver for U, p..."
change them to 0 will disable those outputs

holger_marschall September 1, 2008 05:15

Hi, thanks a lot for your r

thanks a lot for your reply.

But is this really the right place to change that? I only need to switch of the solver output for ONE variable, I solve for in addition(*) to the standards (p,k,epsilon, etc.)! I think changing the DebugSwitches will not change the output for an additional variable!

(*) I added the corresponding transport equation for this variable to the top-level solver. Therefore it is not in the standard release of the solver.

best regards

gschaider September 1, 2008 05:16

Hi Holger! You are halfway
Hi Holger!

You are halfway there. Just store the old value of lduMatrix::debug in a temporary. Set debug to 0. Solve the variable. Reset debug to the stored value. Voila: No output for the mystery-variable, but for everybody else


holger_marschall September 1, 2008 05:24

Hi Bernhard, how and where
Hi Bernhard,

how and where do I store the old value of lduMatrix::debug in a temporary? Can this be done in the code?

Btw, it's not that mysterious: I solve for a quasi-stationary solution within a time step using an artificial time-instance. Therefore the corresponding solver output in the terminal window is quite long. As I run a convergence control I only need the last line of that

best regards

holger_marschall September 1, 2008 09:16

Hi, it works... I used cur

it works...
I used curly brackets around the lduMatrix::debug = 0; and .solve()-statement.
After the brackets I just set the switch back to "lduMatrix::debug = 1;".

I think that's the easiest way to do this. Thanks!

best regards

gschaider September 1, 2008 09:18

Hi Holger! Storing the valu
Hi Holger!

Storing the value (not tested so the syntax may vary) should be quite simple

label tmpDepug=lduMatrix::debug;

// do the silent stuff


// Life goes on (other solutions)

All times are GMT -4. The time now is 16:53.