diff --git a/blast/interfaces/blSolversInterface.py b/blast/interfaces/blSolversInterface.py index 724bdffc6bbccd9fa71bb7bdba0a1881b44d4d97..9561448aaf09f6338cff224270f9ee7b35c680e0 100644 --- a/blast/interfaces/blSolversInterface.py +++ b/blast/interfaces/blSolversInterface.py @@ -3,6 +3,7 @@ import blast import fwk import tbox from blast.interfaces.blDataStructure import Group +from fwk.coloring import ccolors class SolversInterface: """ @@ -45,6 +46,8 @@ class SolversInterface: if 'nSections' not in self.cfg: self.cfg['nSections'] = len(self.cfg['sections']) + if self.getMinf() != self.vSolver.getMinf(): + print(ccolors.ANSI_YELLOW, 'Warning: Inviscid and viscous freestream Mach numbers are different', ccolors.ANSI_RESET) # Initialize data structures. self.iBnd = [Group('iWing' if iReg == 0 else 'iWake', self.getnDim()) for iReg in range(2)] @@ -459,6 +462,11 @@ class SolversInterface: """ raise NotImplementedError('SolverInterface - getAoA not implemented') + def getMinf(self)->float: + """Get freestream Mach number + """ + raise NotImplementedError('SolverInterface - getMinf not implemented') + def getCl(self)->float: """Get lift coefficient """ diff --git a/blast/src/blDriver.h b/blast/src/blDriver.h index fc1be8bc9e48694fe60fdcff3e5e83b7bb04c9c0..601a9a8814833b48fda31e2a9dbb823ec177196a 100644 --- a/blast/src/blDriver.h +++ b/blast/src/blDriver.h @@ -2,6 +2,7 @@ #define BLDRIVER_H #include "blBoundaryLayer.h" +#include "blSolver.h" #include "blast.h" #include "wObject.h" #include "wTimers.h" @@ -50,6 +51,7 @@ public: // Getters. double getAverageTransition(size_t const iRegion) const; double getRe() const { return Re; } + double getMinf() const { return tSolver->getMinf(); } std::vector<std::vector<double>> getSolution(size_t iSec); // Setters. diff --git a/blast/src/blSolver.h b/blast/src/blSolver.h index 489062d7feb1c93da5c0cf3b02ca42ef98212538..8f33bcd041811919c66efc6a05abe36ccb74888b 100644 --- a/blast/src/blSolver.h +++ b/blast/src/blSolver.h @@ -34,6 +34,7 @@ public: // Getters. double getCFL0() const { return CFL0; } + double getMinf() const { return Minf; } unsigned int getmaxIt() const { return maxIt; } unsigned int getitFrozenJac() const { return itFrozenJac0; }