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 ...@@ -3,6 +3,7 @@ import blast
import fwk import fwk
import tbox import tbox
from blast.interfaces.blDataStructure import Group from blast.interfaces.blDataStructure import Group
from fwk.coloring import ccolors
class SolversInterface: class SolversInterface:
""" """
...@@ -45,6 +46,8 @@ class SolversInterface: ...@@ -45,6 +46,8 @@ class SolversInterface:
if 'nSections' not in self.cfg: if 'nSections' not in self.cfg:
self.cfg['nSections'] = len(self.cfg['sections']) 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. # Initialize data structures.
self.iBnd = [Group('iWing' if iReg == 0 else 'iWake', self.getnDim()) for iReg in range(2)] self.iBnd = [Group('iWing' if iReg == 0 else 'iWake', self.getnDim()) for iReg in range(2)]
...@@ -459,6 +462,11 @@ class SolversInterface: ...@@ -459,6 +462,11 @@ class SolversInterface:
""" """
raise NotImplementedError('SolverInterface - getAoA not implemented') raise NotImplementedError('SolverInterface - getAoA not implemented')
def getMinf(self)->float:
"""Get freestream Mach number
"""
raise NotImplementedError('SolverInterface - getMinf not implemented')
def getCl(self)->float: def getCl(self)->float:
"""Get lift coefficient """Get lift coefficient
""" """
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define BLDRIVER_H #define BLDRIVER_H
#include "blBoundaryLayer.h" #include "blBoundaryLayer.h"
#include "blSolver.h"
#include "blast.h" #include "blast.h"
#include "wObject.h" #include "wObject.h"
#include "wTimers.h" #include "wTimers.h"
...@@ -50,6 +51,7 @@ public: ...@@ -50,6 +51,7 @@ public:
// Getters. // Getters.
double getAverageTransition(size_t const iRegion) const; double getAverageTransition(size_t const iRegion) const;
double getRe() const { return Re; } double getRe() const { return Re; }
double getMinf() const { return tSolver->getMinf(); }
std::vector<std::vector<double>> getSolution(size_t iSec); std::vector<std::vector<double>> getSolution(size_t iSec);
// Setters. // Setters.
......
...@@ -34,6 +34,7 @@ public: ...@@ -34,6 +34,7 @@ public:
// Getters. // Getters.
double getCFL0() const { return CFL0; } double getCFL0() const { return CFL0; }
double getMinf() const { return Minf; }
unsigned int getmaxIt() const { return maxIt; } unsigned int getmaxIt() const { return maxIt; }
unsigned int getitFrozenJac() const { return itFrozenJac0; } 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