|
[Sponsors] |
August 26, 2015, 09:47 |
Get initialResidual of each space direction
|
#1 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi all,
I have a question about the initial residuals for the questions in the x, y and z direction. I can make a scalar where i get the lowest initial residuals of x,y and z like: Code:
scalar initResidual = UEqn.solve().initialResidual(); Code:
scalar initResidual_x = UEqn.solve().initialResidual().x(); scalar initResidual_y = UEqn.solve().initialResidual().y(); scalar initResidual_z = UEqn.solve().initialResidual().z();
__________________
Keep foaming, Tobias Holzmann |
|
August 27, 2015, 08:17 |
component(initialResidual, xyz)
|
#2 |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
Hi Tobi
have a look into /src/OpenFOAM/matrices/LduMatrix/LduMatrix/SolverPerformance.C. This is the part of OpenFOAM where all the solver outputs come from. Here they use component(initialResidual, xyz). May be this is what you're looking for. Code:
for(direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++) { if (pTraits<Type>::nComponents == 1) { os << solverName_ << ": Solving for " << fieldName_; } else { os << solverName_ << ": Solving for " << word(fieldName_ + pTraits<Type>::componentNames[cmpt]); } if (singular_[cmpt]) { os << ": solution singularity" << endl; } else { os << ", Initial residual = " << component(initialResidual_, cmpt) << ", Final residual = " << component(finalResidual_, cmpt) << ", No Iterations " << noIterations_ << endl; } } Fabian |
|
August 27, 2015, 09:13 |
|
#3 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Dear Fabian, thanks for the hint. Is exactly need component(finalResidual_, clot). But how to access to that value out of that function? I am not at my computer at the moment but will check it later.
__________________
Keep foaming, Tobias Holzmann |
|
August 5, 2016, 08:17 |
|
#4 |
Member
Kumar
Join Date: Jun 2013
Posts: 47
Rep Power: 12 |
Hi Tobi,
Have you found out a way to extract the individual components of the initialResidual()? If you make scalar initRes = UEqn.solve().initialResidual() I think you get the initial residual of the last equation solved. I need this for a transient solver I am making. Thanks, Kumar |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ERROR: Flow direction on the boundaries must not be tangential to the boundary. | turbomax | CFX | 2 | August 6, 2015 11:05 |
Flow Direction: normal to boundary!!! | Atit | CFX | 1 | August 2, 2015 13:42 |
Changing inflow velocity direction deteriorates lift and drag | ziggo | FLUENT | 3 | July 24, 2013 08:39 |
How to model the NR eqns in a domain with empty space | Vasilis | Main CFD Forum | 1 | April 14, 2009 04:35 |
Fatal error error writing to tmp No space left on device | maka | OpenFOAM Installation | 2 | April 3, 2006 08:48 |