Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature turbo interfaces #2349

Open
wants to merge 72 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
fdcfd8a
Implementation of mass flow outlet in Giles BC
joshkellyjak Feb 8, 2024
7d4d4ed
Added TURBO_INTERFACE_KIND options and updated interface preprocesing
joshkellyjak Feb 13, 2024
71c2279
Remove some unecssary code
joshkellyjak Feb 13, 2024
b8dd1c4
Updated testcases
joshkellyjak Feb 13, 2024
42abd3f
Removing unused variable
joshkellyjak Feb 13, 2024
ca911a4
cleanup
joshkellyjak Feb 13, 2024
2ff8fca
Implement method based on continuity
joshkellyjak Mar 6, 2024
c66f7ad
Change machine performance variable names
joshkellyjak Mar 6, 2024
5852f8c
Unused var
joshkellyjak Mar 6, 2024
b7fe757
Fix in mass flow outlet calculation
joshkellyjak Mar 19, 2024
8152334
Merge branch 'su2code:master' into feature_turbo_interfaces
joshkellyjak May 8, 2024
dd3b4b0
Merge branch 'develop' into feature_turbo_interfaces
joshkellyjak May 8, 2024
b253dc0
Revert to previous 'dampning' method
Tushma May 8, 2024
0346d0c
Revert "Revert to previous 'dampning' method"
Tushma May 8, 2024
df1a1c0
Merge branch 'develop' into pr/2209
joshkellyjak May 8, 2024
ecf4239
Merge branch 'develop' into feature_turbo_interfaces
joshkellyjak May 8, 2024
dc744ad
revert to previous 'dampning' method
joshkellyjak May 8, 2024
5201d80
removing some unused vars
joshkellyjak May 8, 2024
c8447a6
Add averaged quantities to recording (those which are used and commun…
oleburghardt Jul 2, 2024
01bdada
Merge branch 'feature_turbo_interfaces' of https://github.com/joshkel…
joshkellyjak Jul 10, 2024
2c9a2fb
Merge remote-tracking branch 'origin/fix_turbo_ramps' into pr/2209
joshkellyjak Jul 10, 2024
af8b1c1
Changes for comments
joshkellyjak Jul 10, 2024
eb2b40d
Merge branch 'develop' into feature_turbo_interfaces
bigfooted Jul 10, 2024
0fcf22f
Remove need more multiple specification of boundary markers
joshkellyjak Jul 16, 2024
68cde3e
White spaces and defaults options
joshkellyjak Jul 16, 2024
c3ddd76
Merge branch 'develop' into feature_turbo_interfaces
EvertBunschoten Jul 16, 2024
3f20abe
Bug fix for when one type of interface is specified
joshkellyjak Jul 16, 2024
f33ce99
Merge branch 'feature_turbo_interfaces' of https://github.com/joshkel…
joshkellyjak Jul 16, 2024
250f556
Remove superfluous options from reg test configs
joshkellyjak Jul 16, 2024
20aff4e
Releasing resources
joshkellyjak Jul 16, 2024
0d6fc3c
formatting
joshkellyjak Jul 16, 2024
8d3f866
heap after use
joshkellyjak Jul 16, 2024
8b7ca1b
Remove Marker_Turbomachinery
joshkellyjak Jul 16, 2024
eeb7ec7
fix for asan
joshkellyjak Jul 16, 2024
aac4bab
Potential fix
joshkellyjak Jul 17, 2024
deae2a9
a mistake
joshkellyjak Jul 17, 2024
3b88222
Potential fix
joshkellyjak Jul 17, 2024
8252f0d
Potential fix
joshkellyjak Jul 17, 2024
fd6d5cb
Merge branch 'develop' into pr/2209
joshkellyjak Jul 18, 2024
4313913
Merge branch 'develop' into feature_turbo_interfaces
bigfooted Jul 29, 2024
374abdd
Cleanup Giles BC initial commit
joshkellyjak Aug 9, 2024
e0877eb
missing break
joshkellyjak Aug 9, 2024
fe95eef
Cleanup MP implementation initial commit
joshkellyjak Aug 14, 2024
bbd399e
Merge branch 'develop' into feature_mz_adjoint_for_turbo
joshkellyjak Aug 14, 2024
6b4c180
Merge remote-tracking branch 'origin/feature_mz_adjoint_for_turbo' in…
joshkellyjak Aug 14, 2024
d6eba63
Merge branch 'feature_turbo_interfaces' of https://github.com/joshkel…
joshkellyjak Aug 14, 2024
9b4498c
Merge branch 'develop' into feature_turbo_interfaces
joshkellyjak Aug 14, 2024
55d4d16
Modification of some comments
joshkellyjak Aug 29, 2024
e1eba79
Fixed MP bug added additional outputs
joshkellyjak Sep 4, 2024
9324146
Merge branch 'develop' into feature_turbo_interfaces
joshkellyjak Sep 4, 2024
05f9d23
Revert "Merge remote-tracking branch 'origin/feature_mz_adjoint_for_t…
joshkellyjak Sep 4, 2024
9db6939
Changes for comments and reversion error fix
joshkellyjak Sep 4, 2024
d106401
Some changes after discussions
joshkellyjak Sep 4, 2024
ef3416a
This hopefully resolves the merge error I was having
joshkellyjak Sep 4, 2024
7f50852
submodule updates
joshkellyjak Sep 4, 2024
4c7327d
Revert changes in Giles BC that have persisted
joshkellyjak Sep 4, 2024
c5872c4
Resolving releasing resources warning
joshkellyjak Sep 5, 2024
b1e2a56
Merge branch 'develop' into feature_resolve_merge_turbo_interfaces
joshkellyjak Sep 5, 2024
52d8ca9
Actually releasing resources
joshkellyjak Sep 5, 2024
c903463
Merge branch 'feature_resolve_merge_turbo_interfaces' of https://gith…
joshkellyjak Sep 5, 2024
bfcc97c
release
joshkellyjak Sep 5, 2024
da798e7
Merge branch 'develop' into feature_resolve_merge_turbo_interfaces
joshkellyjak Sep 6, 2024
b2cfab0
Added test case, additional turbo outputs and fixed formatting
joshkellyjak Sep 11, 2024
1951aaa
Removing some debugging code
joshkellyjak Sep 11, 2024
384686a
typo
joshkellyjak Sep 11, 2024
2177010
rename
joshkellyjak Sep 11, 2024
f6c3535
Update reg test values
joshkellyjak Sep 12, 2024
6b57e55
Update Github workflows
joshkellyjak Sep 13, 2024
2483e10
Update Github workflows
joshkellyjak Sep 13, 2024
1b4b9d6
Update reg test values to match gh calcs
joshkellyjak Sep 13, 2024
ee45af5
Asan, Tsan workflows
joshkellyjak Sep 14, 2024
7e3647e
Changes for comments
joshkellyjak Sep 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ jobs:
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}}
args: -b ${{github.ref}} -t develop -c feature_resolve_merge_turbo_interfaces -s ${{matrix.testscript}}
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536
with:
Expand Down Expand Up @@ -255,7 +255,7 @@ jobs:
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tsan"
args: -b ${{github.ref}} -t develop -c feature_resolve_merge_turbo_interfaces -s ${{matrix.testscript}} -a "--tsan"
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536
with:
Expand Down Expand Up @@ -300,7 +300,7 @@ jobs:
uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536
with:
# -t <Tutorials-branch> -c <Testcases-branch>
args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--asan"
args: -b ${{github.ref}} -t develop -c feature_resolve_merge_turbo_interfaces -s ${{matrix.testscript}} -a "--asan"
- name: Cleanup
uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536
with:
Expand Down
16 changes: 15 additions & 1 deletion Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ class CConfig {
*Marker_MixingPlaneInterface, /*!< \brief MixingPlane interface boundary markers. */
*Marker_TurboBoundIn, /*!< \brief Turbomachinery performance boundary markers. */
*Marker_TurboBoundOut, /*!< \brief Turbomachinery performance boundary donor markers. */
*Marker_Turbomachinery, /*!< \breif Turbomachinery markers */
*Marker_NearFieldBound, /*!< \brief Near Field boundaries markers. */
*Marker_Deform_Mesh, /*!< \brief Deformable markers at the boundary. */
*Marker_Deform_Mesh_Sym_Plane, /*!< \brief Marker with symmetric deformation. */
Expand Down Expand Up @@ -443,6 +444,7 @@ class CConfig {

TURBO_PERF_KIND *Kind_TurboPerf; /*!< \brief Kind of turbomachynery architecture.*/
TURBOMACHINERY_TYPE *Kind_TurboMachinery;
su2vector<TURBO_INTERFACE_KIND> Kind_TurboInterface;

/* Gradient smoothing options */
su2double SmoothingEps1; /*!< \brief Parameter for the identity part in gradient smoothing. */
Expand All @@ -466,6 +468,7 @@ class CConfig {
unsigned short* nDV_Value; /*!< \brief Number of values for each design variable (might be different than 1 if we allow arbitrary movement). */
unsigned short nFFDBox; /*!< \brief Number of ffd boxes. */
unsigned short nTurboMachineryKind; /*!< \brief Number turbomachinery types specified. */
unsigned short nTurboInterfaces; /*!< \brief Number of turbomachiery interfaces */
unsigned short nParamDV; /*!< \brief Number of parameters of the design variable. */
string DV_Filename; /*!< \brief Filename for providing surface positions from an external parameterization. */
string DV_Unordered_Sens_Filename; /*!< \brief Filename of volume sensitivities in an unordered ASCII format. */
Expand Down Expand Up @@ -1375,7 +1378,7 @@ class CConfig {
su2double** & RotCenter, su2double** & RotAngles, su2double** & Translation);

void addTurboPerfOption(const string & name, unsigned short & nMarker_TurboPerf,
string* & Marker_TurboBoundIn, string* & Marker_TurboBoundOut);
string* & Marker_TurboBoundIn, string* & Marker_TurboBoundOut, string* & Marker_Turbomachinery);

void addActDiskOption(const string & name,
unsigned short & nMarker_ActDiskInlet, unsigned short & nMarker_ActDiskOutlet, string* & Marker_ActDiskInlet, string* & Marker_ActDiskOutlet,
Expand Down Expand Up @@ -5335,6 +5338,17 @@ class CConfig {
*/
TURBO_PERF_KIND GetKind_TurboPerf(unsigned short val_iZone) const { return Kind_TurboPerf[val_iZone]; };

/*!
* \brief gets interface kind for an interface marker in turbomachinery problem
* \return interface kind
*/
TURBO_INTERFACE_KIND GetKind_TurboInterface(unsigned short interfaceIndex) const { return Kind_TurboInterface[interfaceIndex]; }

/*!
* \brief Sets marker kind for an interface marker in turbomachinery problem
*/
void SetKind_TurboInterface(unsigned short interfaceIndex, TURBO_INTERFACE_KIND TurboInterfaceKind) {Kind_TurboInterface[interfaceIndex] = TurboInterfaceKind ;}
joshkellyjak marked this conversation as resolved.
Show resolved Hide resolved

/*!
* \brief get outlet bounds name for Turbomachinery performance calculation.
* \return name of the bound.
Expand Down
18 changes: 17 additions & 1 deletion Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1622,6 +1622,7 @@ enum BC_TYPE {
FLUID_INTERFACE = 39, /*!< \brief Domain interface definition. */
DISP_DIR_BOUNDARY = 40, /*!< \brief Boundary displacement definition. */
DAMPER_BOUNDARY = 41, /*!< \brief Damper. */
MIXING_PLANE_INTERFACE = 42, /*< \breif Mxing plane */
CHT_WALL_INTERFACE = 50, /*!< \brief Domain interface definition. */
SMOLUCHOWSKI_MAXWELL = 55, /*!< \brief Smoluchoski/Maxwell wall boundary condition. */
SEND_RECEIVE = 99, /*!< \brief Boundary send-receive definition. */
Expand Down Expand Up @@ -1752,7 +1753,8 @@ enum RIEMANN_TYPE {
TOTAL_CONDITIONS_PT_1D = 11,
STATIC_PRESSURE_1D = 12,
MIXING_IN_1D = 13,
MIXING_OUT_1D =14
MIXING_OUT_1D = 14,
MASS_FLOW_OUTLET = 15
};
static const MapType<std::string, RIEMANN_TYPE> Riemann_Map = {
MakePair("TOTAL_CONDITIONS_PT", TOTAL_CONDITIONS_PT)
Expand All @@ -1769,6 +1771,7 @@ static const MapType<std::string, RIEMANN_TYPE> Riemann_Map = {
MakePair("RADIAL_EQUILIBRIUM", RADIAL_EQUILIBRIUM)
MakePair("TOTAL_CONDITIONS_PT_1D", TOTAL_CONDITIONS_PT_1D)
MakePair("STATIC_PRESSURE_1D", STATIC_PRESSURE_1D)
MakePair("MASS_FLOW_OUTLET", MASS_FLOW_OUTLET)
};

static const MapType<std::string, RIEMANN_TYPE> Giles_Map = {
Expand All @@ -1786,6 +1789,7 @@ static const MapType<std::string, RIEMANN_TYPE> Giles_Map = {
MakePair("RADIAL_EQUILIBRIUM", RADIAL_EQUILIBRIUM)
MakePair("TOTAL_CONDITIONS_PT_1D", TOTAL_CONDITIONS_PT_1D)
MakePair("STATIC_PRESSURE_1D", STATIC_PRESSURE_1D)
MakePair("MASS_FLOW_OUTLET", MASS_FLOW_OUTLET)
};

/*!
Expand Down Expand Up @@ -1862,6 +1866,18 @@ static const MapType<std::string, TURBO_PERF_KIND> TurboPerfKind_Map = {
MakePair("PROPELLOR", TURBO_PERF_KIND::PROPELLOR)
};

/*!
* \brief Types of Turbomachinery interfaces.
*/
enum class TURBO_INTERFACE_KIND{
MIXING_PLANE = ENUM_TRANSFER::MIXING_PLANE,
FROZEN_ROTOR = ENUM_TRANSFER::SLIDING_INTERFACE,
};
static const MapType<std::string, TURBO_INTERFACE_KIND> TurboInterfaceKind_Map = {
MakePair("MIXING_PLANE", TURBO_INTERFACE_KIND::MIXING_PLANE)
MakePair("FROZEN_ROTOR", TURBO_INTERFACE_KIND::FROZEN_ROTOR)
};

/*!
* \brief Types of Turbomachinery performance flag.
*/
Expand Down
16 changes: 14 additions & 2 deletions Common/include/option_structure.inl
Original file line number Diff line number Diff line change
Expand Up @@ -1606,11 +1606,15 @@
unsigned short& size;
string*& marker_turboIn;
string*& marker_turboOut;
string*& markers;

public:
COptionTurboPerformance(const string option_field_name, unsigned short& nMarker_TurboPerf,
string*& Marker_TurboBoundIn, string*& Marker_TurboBoundOut)
: size(nMarker_TurboPerf), marker_turboIn(Marker_TurboBoundIn), marker_turboOut(Marker_TurboBoundOut) {
string*& Marker_TurboBoundIn, string*& Marker_TurboBoundOut, string*& Marker_Turbomachinery)
: size(nMarker_TurboPerf),
marker_turboIn(Marker_TurboBoundIn),
marker_turboOut(Marker_TurboBoundOut),
markers(Marker_Turbomachinery) {
this->name = option_field_name;
}

pcarruscag marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -1624,6 +1628,7 @@
this->size = 0;
this->marker_turboIn = nullptr;
this->marker_turboOut = nullptr;
this->markers = nullptr;
return "";
}

Expand All @@ -1634,10 +1639,16 @@
this->size = 0;
this->marker_turboIn = nullptr;
this->marker_turboOut = nullptr;
this->markers = nullptr;
;
return newstring;
}

this->markers = new string[totalVals];
pcarruscag marked this conversation as resolved.
Show resolved Hide resolved
for (unsigned long i = 0; i < totalVals; i++) {
this->markers[i].assign(option_value[i]);
}

unsigned long nVals = totalVals / mod_num;
this->size = nVals;
this->marker_turboIn = new string[nVals];
Expand All @@ -1654,6 +1665,7 @@
this->size = 0;
this->marker_turboIn = nullptr;
this->marker_turboOut = nullptr;
this->markers = nullptr;
}
};

Expand Down
43 changes: 38 additions & 5 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,10 @@ void CConfig::addPeriodicOption(const string & name, unsigned short & nMarker_Pe
}

void CConfig::addTurboPerfOption(const string & name, unsigned short & nMarker_TurboPerf,
string* & Marker_TurboBoundIn, string* & Marker_TurboBoundOut) {
string* & Marker_TurboBoundIn, string* & Marker_TurboBoundOut, string* & Marker_Turbomachinery) {
assert(option_map.find(name) == option_map.end());
all_options.insert(pair<string, bool>(name, true));
COptionBase* val = new COptionTurboPerformance(name, nMarker_TurboPerf, Marker_TurboBoundIn, Marker_TurboBoundOut);
COptionBase* val = new COptionTurboPerformance(name, nMarker_TurboPerf, Marker_TurboBoundIn, Marker_TurboBoundOut, Marker_Turbomachinery);
option_map.insert(pair<string, COptionBase *>(name, val));
}

Expand Down Expand Up @@ -1037,6 +1037,7 @@ void CConfig::SetPointersNull() {
Marker_MixingPlaneInterface = nullptr;
Marker_TurboBoundIn = nullptr;
Marker_TurboBoundOut = nullptr;
Marker_Turbomachinery = nullptr;
Marker_Giles = nullptr;
Marker_Shroud = nullptr;

Expand Down Expand Up @@ -1633,8 +1634,8 @@ void CConfig::SetConfig_Options() {
addStringListOption("MARKER_MIXINGPLANE_INTERFACE", nMarker_MixingPlaneInterface, Marker_MixingPlaneInterface);
/*!\brief TURBULENT_MIXINGPLANE \n DESCRIPTION: Activate mixing plane also for turbulent quantities \ingroup Config*/
addBoolOption("TURBULENT_MIXINGPLANE", turbMixingPlane, false);
/*!\brief MARKER_TURBOMACHINERY \n DESCRIPTION: Identify the inflow and outflow boundaries in which the turbomachinery settings are applied. \ingroup Config*/
addTurboPerfOption("MARKER_TURBOMACHINERY", nMarker_Turbomachinery, Marker_TurboBoundIn, Marker_TurboBoundOut);
/*!\brief MARKER_TURBOMACHINERY \n DESCRIPTION: Identify the boundaries for which the turbomachinery settings are applied. \ingroup Config*/
addTurboPerfOption("MARKER_TURBOMACHINERY", nMarker_Turbomachinery, Marker_TurboBoundIn, Marker_TurboBoundOut, Marker_Turbomachinery);
/*!\brief NUM_SPANWISE_SECTIONS \n DESCRIPTION: Integer number of spanwise sections to compute 3D turbo BC and Performance for turbomachinery */
addUnsignedShortOption("NUM_SPANWISE_SECTIONS", nSpanWiseSections_User, 1);
/*!\brief SPANWISE_KIND \n DESCRIPTION: type of algorithm to identify the span-wise sections at the turbo boundaries.
Expand Down Expand Up @@ -5808,7 +5809,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) {

for (iMarker_Fluid_InterfaceBound = 0; iMarker_Fluid_InterfaceBound < nMarker_Fluid_InterfaceBound; iMarker_Fluid_InterfaceBound++) {
Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_Fluid_InterfaceBound[iMarker_Fluid_InterfaceBound];
Marker_CfgFile_KindBC[iMarker_CfgFile] = FLUID_INTERFACE;
Marker_CfgFile_KindBC[iMarker_CfgFile] = BC_TYPE::FLUID_INTERFACE;
iMarker_CfgFile++;
}

Expand Down Expand Up @@ -6045,6 +6046,37 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) {
Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = indexMarker;
}

/*--- Once we have identified the MixingPlane and Turbomachinery markers
* we next need to determine what type of interface between zones is
* used. It is convenient to do this here as it tidies up the interface
* preproccesing in CDriver ---*/
if (nMarker_Turbomachinery != 0) {
nTurboInterfaces = (nMarker_Turbomachinery - 1)*2; //Two markers per zone minus inlet & outlet
Kind_TurboInterface.resize(nTurboInterfaces);
/*--- Loop over all markers ---*/
for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) {
/*--- Identify mixing plane markers ---*/
if (Marker_MixingPlaneInterface != nullptr){ // Necessary in cases where no mixing plane interfaces are defined
if (Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] != 0) { //Is a mixing plane
/*--- Find which list position this marker is in turbomachinery markers ---*/
const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]);
joshkellyjak marked this conversation as resolved.
Show resolved Hide resolved
const auto target_index = target - Marker_Turbomachinery;
/*--- Assert that we find the marker within the turbomachienry markers ---*/
assert(target != &Marker_Turbomachinery[nMarker_Turbomachinery*2-1]);
/*--- Assign the correct interface ---*/
SetKind_TurboInterface(target_index - 1, TURBO_INTERFACE_KIND::MIXING_PLANE); // Need to subtract 1 from index as to not consider the inlet an interface
}
}
if (Marker_Fluid_InterfaceBound != nullptr){ // No fluid interfaces are defined in the config file (nullptr if no interfaces defined)
if (Marker_CfgFile_KindBC[iMarker_CfgFile] == BC_TYPE::FLUID_INTERFACE) { // iMarker_CfgFile is a fluid interface
const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]);
const auto target_index = target - Marker_Turbomachinery;
SetKind_TurboInterface(target_index-1, TURBO_INTERFACE_KIND::FROZEN_ROTOR);
}
}
}
}

for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) {
Marker_CfgFile_DV[iMarker_CfgFile] = NO;
for (iMarker_DV = 0; iMarker_DV < nMarker_DV; iMarker_DV++)
Expand Down Expand Up @@ -8265,6 +8297,7 @@ CConfig::~CConfig() {

delete [] Marker_TurboBoundIn;
delete [] Marker_TurboBoundOut;
delete [] Marker_Turbomachinery;
delete [] Marker_Riemann;
delete [] Marker_Giles;

Expand Down
18 changes: 9 additions & 9 deletions SU2_CFD/include/interfaces/CInterface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,6 @@ class CInterface {
const CConfig *target_config, unsigned long Marker_Target,
unsigned long Vertex_Target, unsigned long Point_Target) = 0;

/*!
* \brief A virtual member.
* \param[in] target_solution - Solution from the target mesh.
* \param[in] target_solution - Solution from the target mesh.
* \param[in] donor_zone - Index of the donorZone.
*/
inline virtual void SetAverageValues(CSolver *donor_solution, CSolver *target_solution,
unsigned short donorZone) { }

/*!
* \brief A virtual member.
* \param[in] donor_geometry - Geometry of the target mesh.
Expand All @@ -185,6 +176,15 @@ class CInterface {
*/
inline virtual void SetSpanWiseLevels(const CConfig *donor_config, const CConfig *target_config) { }

/*!
* \brief A virtual member.
* \param[in] target_solution - Solution from the target mesh.
* \param[in] target_solution - Solution from the target mesh.
* \param[in] donor_zone - Index of the donorZone.
*/
inline virtual void SetAverageValues(CSolver *donor_solution, CSolver *target_solution,
unsigned short donorZone) { }

/*!
* \brief Transfer pre-processing for the mixing plane inteface.
* \param[in] donor_geometry - Geometry of the donor mesh.
Expand Down
10 changes: 8 additions & 2 deletions SU2_CFD/include/output/CTurboOutput.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class CTurbomachineryCombinedPrimitiveStates {
class CTurbomachineryState {
private:
su2double Density, Pressure, Entropy, Enthalpy, Temperature, TotalTemperature, TotalPressure, TotalEnthalpy;
su2double AbsFlowAngle, FlowAngle, MassFlow, Rothalpy, TotalRelPressure;
su2double AbsFlowAngle, FlowAngle, MassFlow, Rothalpy, TangVelocity, TotalRelPressure;
vector<su2double> Velocity, RelVelocity, Mach, RelMach;
su2double Area, Radius;

Expand Down Expand Up @@ -124,6 +124,8 @@ class CTurbomachineryState {

const su2double& GetRothalpy() const { return Rothalpy; }

const su2double& GetTangVelocity() const { return TangVelocity; }

const vector<su2double>& GetVelocity() const { return Velocity; }

const vector<su2double>& GetMach() const { return Mach; }
Expand Down Expand Up @@ -207,7 +209,7 @@ class CPropellorBladePerformance : public CTurbomachineryBladePerformance {
*/
class CTurbomachineryStagePerformance {
protected:
su2double TotalStaticEfficiency, TotalTotalEfficiency, NormEntropyGen, TotalStaticPressureRatio, TotalTotalPressureRatio, EulerianWork;
su2double TotalStaticEfficiency, TotalTotalEfficiency, NormEntropyGen, TotalStaticPressureRatio, TotalTotalPressureRatio, EulerianWork, TotalPressureLoss, KineticEnergyLoss;
CFluidModel& fluidModel;

public:
Expand All @@ -232,6 +234,10 @@ class CTurbomachineryStagePerformance {
su2double GetTotalStaticPressureRatio() const { return TotalStaticPressureRatio; }

su2double GetTotalTotalPressureRatio() const { return TotalTotalPressureRatio; }

su2double GetTotalPressureLoss() const { return TotalPressureLoss; }

su2double GetKineticEnergyLoss() const { return KineticEnergyLoss; }
};

/*!
Expand Down
1 change: 1 addition & 0 deletions SU2_CFD/include/solvers/CEulerSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class CEulerSolver : public CFVMFlowSolverBase<CEulerVariable, ENUM_REGIME::COMP
su2activematrix ExtAverageNu;
su2activematrix ExtAverageKine;
su2activematrix ExtAverageOmega;
su2activevector AverageMassFlowRate;

su2activematrix DensityIn;
su2activematrix PressureIn;
Expand Down
7 changes: 7 additions & 0 deletions SU2_CFD/include/solvers/CSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3799,6 +3799,13 @@ class CSolver {
*/
inline virtual su2double GetAverageDensity(unsigned short valMarker, unsigned short valSpan) const { return 0.0; }

/*!
* \brief virtual member
* \param[in] val_marker - boundary marker
* \return Value of the mass flow rate on the surface <i>val_marker</i>
*/
inline virtual su2double GetAverageMassFlowRate(unsigned short valMarker) const {return 0.0; }

/*!
* \brief A virtual member.
* \param[in] val_marker - bound marker.
Expand Down
25 changes: 17 additions & 8 deletions SU2_CFD/src/drivers/CDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2476,14 +2476,23 @@ void CDriver::InitializeInterface(CConfig **config, CSolver***** solver, CGeomet
if (rank == MASTER_NODE) cout << "boundary displacements from the structural solver." << endl;
}
else if (fluid_donor && fluid_target) {
/*--- Mixing plane for turbo machinery applications. ---*/
if (config[donor]->GetBoolMixingPlaneInterface()) {
interface_type = MIXING_PLANE;
auto nVar = solver[donor][INST_0][MESH_0][FLOW_SOL]->GetnVar();
interface[donor][target] = new CMixingPlaneInterface(nVar, 0);
if (rank == MASTER_NODE) {
cout << "Set mixing-plane interface from donor zone "
<< donor << " to target zone " << target << "." << endl;
/*--- Interface handling for turbomachinery applications. ---*/
if (config[donor]->GetBoolTurbomachinery()) {
auto interfaceIndex = donor+target; // Here we assume that the interfaces at each side are the same kind
switch (config[donor]->GetKind_TurboInterface(interfaceIndex)) {
case TURBO_INTERFACE_KIND::MIXING_PLANE: {
interface_type = MIXING_PLANE;
auto nVar = solver[donor][INST_0][MESH_0][FLOW_SOL]->GetnVar();
interface[donor][target] = new CMixingPlaneInterface(nVar, 0);
if (rank == MASTER_NODE) cout << "using a mixing-plane interface from donor zone " << donor << " to target zone " << target << "." << endl;
break;
}
case TURBO_INTERFACE_KIND::FROZEN_ROTOR: {
auto nVar = solver[donor][INST_0][MESH_0][FLOW_SOL]->GetnPrimVar();
interface_type = SLIDING_INTERFACE;
interface[donor][target] = new CSlidingInterface(nVar, 0);
if (rank == MASTER_NODE) cout << "using a fluid interface interface from donor zone " << donor << " to target zone " << target << "." << endl;
}
}
}
else{
Expand Down
Loading