CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Howto disable Solver Outputs (https://www.cfd-online.com/Forums/openfoam-solving/58587-howto-disable-solver-outputs.html)

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
Holger

dbxmcf August 31, 2008 17:53

Hi, Just edit the $OPENFOA
 
Hi,

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
 
Hi,

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
Holger

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

Bernhard

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 http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

---
best regards
Holger

holger_marschall September 1, 2008 09:16

Hi, it works... I used cur
 
Hi,

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
Holger

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;
lduMatrix::debug=0;

// do the silent stuff

ldUMatrix::debug=tmpDebug;

// Life goes on (other solutions)

victorious_BIG January 25, 2018 17:33

Does this work for direct calls to solve?
 
I've implemented included both

lduMatrix::debug=0;
solverPerformance::debug=0;

but though this work to remove the output from solver calls like XEqn.solve(). It does not suppress output from solver call like:

solve(UEqn == -fvc::grad(p));

Any idea what's going on here?


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