|
[Sponsors] |
July 1, 2008, 08:01 |
Hi,
I'm working on a modifi
|
#1 |
Member
Juho Peltola
Join Date: Mar 2009
Location: Finland
Posts: 89
Rep Power: 17 |
Hi,
I'm working on a modified version of the twoPhaseEulerFoam and I would like to make the number of PISO loops (or iterations within the timestep) adaptive. ie. the solver would vary the number of loops based on the convergence. How could I access the initial residual or the number of iterations of the pressure solver? I see that the lduMatrix.H includes a member function initialResidual() which I tried to use to access the residual with a command pEqn.initialResidual() This however resulted in an error message by the compiler: "Foam::fvScalarMatrix has no member named 'initialResidual'" This obviously isn't the right way to do it and no such functions can be found in the scalarMatrix.H Any help or tips would be appreciated! |
|
July 1, 2008, 08:23 |
You could try something like t
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
You could try something like this:
// retain the residual from the first iteration if (nonOrth == 0) { eqnResidual = pEqn.solve().initialResidual(); maxResidual = max(eqnResidual, maxResidual); } Where maxResidual has been initialized elsewhere ... |
|
July 1, 2008, 08:35 |
Hi Juho!
Every call to solv
|
#3 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi Juho!
Every call to solve returns such an object: http://foam.sourceforge.net/doc/Doxygen/html/classFoam_1_1lduMatrix_1_1solverPer formance.html This object contains all the information that you need Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
July 1, 2008, 08:49 |
Thank you very much! Just what
|
#4 |
Member
Juho Peltola
Join Date: Mar 2009
Location: Finland
Posts: 89
Rep Power: 17 |
Thank you very much! Just what I needed!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
accessing solver data with UDF macros | Dushan | FLUENT | 1 | April 22, 2017 22:05 |
Residuals in CFX-Solver | Andy | CFX | 3 | July 18, 2012 17:40 |
Accessing Solver Variable for UDF | CFDtoy | FLUENT | 0 | May 9, 2006 20:29 |
Accessing Solver data for UDF | CFDtoy | FLUENT | 7 | April 13, 2006 17:52 |
Accessing a specific solver data | Paul | FLUENT | 0 | November 19, 2003 15:51 |