diff --git a/blast/coupler.py b/blast/coupler.py index 58430e8e2d4bbaabc7fb114a7cf9d0e7551b0f14..4d7cfa0654096a393fdddf07cd475dfe882abfa6 100644 --- a/blast/coupler.py +++ b/blast/coupler.py @@ -22,6 +22,7 @@ import fwk from fwk.coloring import ccolors import math import numpy as np +import blast.utils as vutils class Coupler: def __init__(self, iSolverAPI, vSolver, _maxCouplIter=150, _couplTol=1e-4, _iterPrint=1, _resetInv=False, sfx=''): @@ -88,7 +89,6 @@ class Coupler: self.isol.updateStagnation() if write: self.isol.writeCp(sfx='_inviscid'+self.filesfx) - # Impose inviscid boundary in the viscous solver. self.tms['processing'].start() self.isol.getInviscidBC() @@ -116,6 +116,7 @@ class Coupler: print(ccolors.ANSI_RED, 'Warning: Solver(s) did not converge', ccolors.ANSI_RESET) if write: self.isol.writeCp(sfx='_viscous'+self.filesfx) + _ = vutils.getSolution(self.isol.sec, write=True, toW='all') return aeroCoeffs cdPrev = cd @@ -136,6 +137,7 @@ class Coupler: print(ccolors.ANSI_RED, '{:>4.0f}| {:>7.5f} {:>7.5f} {:>7.5f} | {:>6.4f} {:>7.4f} | {:>6.3f}\n'.format(couplIter-1, self.isol.getCl(), self.isol.getCd()+self.vsol.Cdf, self.vsol.Cdt, self.vsol.getAverageTransition(0), self.vsol.getAverageTransition(1), np.log10(error)), ccolors.ANSI_RESET) if write: self.isol.writeCp(sfx='_viscous'+self.filesfx) + _ = vutils.getSolution(self.isol.sec, write=True, toW='all') return aeroCoeffs def reset(self):