# Get initialResidual of each space direction

 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 26, 2015, 09:47 Get initialResidual of each space direction #1 Senior Member     Tobias Holzmann Join Date: Oct 2010 Location: Leoben (Austria) Posts: 1,554 Blog Entries: 6 Rep Power: 27 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();` Does anybody know if its possible to access x, y and z like: Code: ```scalar initResidual_x = UEqn.solve().initialResidual().x(); scalar initResidual_y = UEqn.solve().initialResidual().y(); scalar initResidual_z = UEqn.solve().initialResidual().z();``` Via Doxygen I did not find a call function that return the value I need. I need it because my stress solver (2d-rotational symmetric - wedge) is not stopping because the wedge side's are fluctuating and do not fall down. __________________ Best regards, Tobias Holzmann Some interesting OpenFOAM tutorials, publications and videos on www.Holzmann-cfd.de OpenFOAM Beginners should check out the new wiki on wiki.openfoam.com A list of some active OpenFOAM contributers can be found »here« A book about the basics of »Mathematics, Numerics, Derivations and OpenFOAM« can be found on www.Holzmann-cfd.de

 August 27, 2015, 08:17 component(initialResidual, xyz) #2 Senior Member   Fabian Roesler Join Date: Mar 2009 Location: Germany Posts: 210 Rep Power: 10 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::nComponents; cmpt++) { if (pTraits::nComponents == 1) { os << solverName_ << ": Solving for " << fieldName_; } else { os << solverName_ << ": Solving for " << word(fieldName_ + pTraits::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; } }``` Cheers Fabian

 August 27, 2015, 09:13 #3 Senior Member     Tobias Holzmann Join Date: Oct 2010 Location: Leoben (Austria) Posts: 1,554 Blog Entries: 6 Rep Power: 27 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. __________________ Best regards, Tobias Holzmann Some interesting OpenFOAM tutorials, publications and videos on www.Holzmann-cfd.de OpenFOAM Beginners should check out the new wiki on wiki.openfoam.com A list of some active OpenFOAM contributers can be found »here« A book about the basics of »Mathematics, Numerics, Derivations and OpenFOAM« can be found on www.Holzmann-cfd.de

 August 5, 2016, 08:17 #4 New Member   Kumar Join Date: Jun 2013 Posts: 20 Rep Power: 5 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

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post turbomax CFX 2 August 6, 2015 11:05 Atit CFX 1 August 2, 2015 13:42 ziggo FLUENT 3 July 24, 2013 08:39 Vasilis Main CFD Forum 1 April 14, 2009 04:35 maka OpenFOAM Installation 2 April 3, 2006 08:48

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