Skip to content
Snippets Groups Projects
Verified Commit 86f5fd63 authored by Paul Dechamps's avatar Paul Dechamps :speech_balloon:
Browse files

(feat) Added warning when inviscid and viscous freestream Mach numbers are different

parent b18ce465
No related branches found
No related tags found
1 merge request!1BLASTER v1.0
Pipeline #51053 passed
......@@ -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
"""
......
......@@ -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.
......
......@@ -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; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment