FLUENT 6 - Utility to check if convergence has been reached with the current data without having to iterate
This solution provides a simple Scheme function that will enable the user to check if convergence has been attained with the solution in the currently loaded data file without having to iterate and display residual values.
;;; A Scheme Function does the trick. Just load this file into fluent and issue the command
;;;; It returns #t or #f depending on whether all convergence criteria have been met.
(define truth (lambda (ls) (if (null? ls) #t (and (car ls) (truth (cdr ls))))))
(let ((res (map cdr (solver-residuals)))
(convcrit (map caddddr (client-get-var 'residuals/settings)))
(truth (map (lambda (a b) (if (< a b) #t #f)) res convcrit))