Defining stop criteria within solver
Hello to all,
I am using the solver pimpleFoam in openFoam v7 to do some calculations. After I achieve convergence of the main fields I would like to solve another equation. So, I place the following: Code:
if (pimple.finalPimpleIter()) This works fine but I would like to end the loop by a predefined value of the residuals and not the number of cycles. Something like: Code:
while (residue > myPredefinedResidue) Does anyone know how to do this? Best regards |
Update:
in solve statement within #include "solveMyEquation.H" I made Code:
SymmTensor<scalar> Residue_ = solve(MyEquation).initialResidual(); Code:
It does the first pimple cycle and everything is Ok. During the 2nd cycle, I get the following error: Code:
--> FOAM FATAL ERROR: Any suggestions on what to do? |
All times are GMT -4. The time now is 00:18. |