Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
cc64d25
Initial commit with roughness corrections for SA and SST models.
koodlyakshay Jan 19, 2020
977cc75
Merge with develop.
koodlyakshay Jan 28, 2020
75e68fc
Small changes.
koodlyakshay Jan 31, 2020
956c1d4
Merge with develop.
koodlyakshay Jan 31, 2020
015b46b
Fix boundary condition implementation.
koodlyakshay Feb 2, 2020
f1f35e2
Temporary fix for wall distance modification when run in parallel.
koodlyakshay Feb 6, 2020
a211446
Fix postprocessing routines.
koodlyakshay Feb 8, 2020
305667b
Fix for zero wall distance and zero roughness by adding EPS.
koodlyakshay Feb 8, 2020
2fb7cc1
Add some comments.
koodlyakshay Feb 11, 2020
a433aca
Merge branch 'develop' into feature_roughwall
koodlyakshay Feb 11, 2020
456db04
Fix some issues in roughness values and change back to jPoint in SST …
koodlyakshay Feb 17, 2020
5a9ad66
Fix nWallTypes and initialize Roughness in constructor.
koodlyakshay Feb 18, 2020
06ca570
Merge branch 'develop' into feature_roughwall
koodlyakshay Feb 26, 2020
529772a
Fix tabs and spaces.
koodlyakshay Feb 26, 2020
f0b88e3
Fix comments mentioned in review and update config tempelate
koodlyakshay Feb 27, 2020
d69313d
Merge with develop and fix conflicts.
koodlyakshay Feb 27, 2020
8071913
Fix comments, indentations and MARKER_ISOTHERMAL.
koodlyakshay Feb 28, 2020
4b440f3
Merge with develop(I).
koodlyakshay Mar 2, 2020
93ec8c0
Merge branch 'develop' into feature_roughwall(II)
koodlyakshay Mar 2, 2020
444698f
Merge with develop (III).
koodlyakshay Mar 2, 2020
782ca72
Fix indentation and spaces.
koodlyakshay Mar 5, 2020
fa49699
Merge branch 'develop' into feature_roughwall
koodlyakshay Mar 5, 2020
d4aa0a5
Merge with develop, not fixed ADT yet.
koodlyakshay Apr 28, 2020
1e22601
Fix issue with cht test case.
koodlyakshay Apr 30, 2020
d629824
Merge with develop.
koodlyakshay May 18, 2020
b56ff10
Remove roughness elements in ADT files and add routines to get the co…
koodlyakshay May 19, 2020
44ee968
Fix spaces and errors.
koodlyakshay May 19, 2020
8af1dbb
Merge branch 'develop' into feature_roughwall
koodlyakshay May 19, 2020
e73cba1
Clean up comments and spaces.
koodlyakshay May 19, 2020
bb90518
Simplify input method.
koodlyakshay Jun 11, 2020
d023701
Merge with develop.
koodlyakshay Jun 11, 2020
a12bc5f
Merge branch 'develop' into feature_roughwall
koodlyakshay Jun 30, 2020
daa9700
Merge branch 'develop' into feature_roughwall
pcarruscag Jul 1, 2020
398cf3b
Merge branch 'feature_roughwall' of https://github.com/su2code/SU2 in…
koodlyakshay Jul 2, 2020
999a631
Move global arrays from config into geometry and update option name.
koodlyakshay Jul 3, 2020
42e5fd4
Merge branch 'develop' into feature_roughwall
koodlyakshay Jul 3, 2020
c60cb5f
Clean up and remove unused code.
koodlyakshay Jul 7, 2020
e1d8c0c
Merge branch 'develop' into feature_roughwall
koodlyakshay Jul 7, 2020
eb5c9fe
Simplify some routines and clean up.
koodlyakshay Jul 7, 2020
c7dbe19
Fix compile error.
koodlyakshay Jul 7, 2020
594ba80
Fix turb viscosity in output routines in flow solver.
koodlyakshay Jul 7, 2020
d9f5eea
Merge branch 'develop' into feature_roughwall
pcarruscag Jul 7, 2020
97c687d
Small fixes to ease memory handling.
koodlyakshay Jul 8, 2020
a46aff3
Change travis, config template and add delete statements for free var…
koodlyakshay Jul 8, 2020
62133e6
fix bug in signature of Allgatherv in base mpi wrapper
pcarruscag Jul 8, 2020
0d52be9
Merge branch 'develop' into feature_roughwall
koodlyakshay Jul 16, 2020
3b03170
Add test case config file.
koodlyakshay Jul 29, 2020
1740007
Fix conflicts and merge with develop.
koodlyakshay Jul 29, 2020
c518c86
revert changes to codi and medi
pcarruscag Jul 29, 2020
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
28 changes: 26 additions & 2 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ class CConfig {
*Marker_Outlet, /*!< \brief Outlet flow markers. */
*Marker_Isothermal, /*!< \brief Isothermal wall markers. */
*Marker_HeatFlux, /*!< \brief Constant heat flux wall markers. */
*Marker_RoughWall, /*!< \brief Constant heat flux wall markers. */
*Marker_EngineInflow, /*!< \brief Engine Inflow flow markers. */
*Marker_EngineExhaust, /*!< \brief Engine Exhaust flow markers. */
*Marker_Clamped, /*!< \brief Clamped markers. */
Expand Down Expand Up @@ -308,6 +309,7 @@ class CConfig {
su2double *Outlet_Pressure; /*!< \brief Specified back pressures (static) for outlet boundaries. */
su2double *Isothermal_Temperature; /*!< \brief Specified isothermal wall temperatures (static). */
su2double *Heat_Flux; /*!< \brief Specified wall heat fluxes. */
su2double *Roughness_Height; /*!< \brief Equivalent sand grain roughness for the marker according to config file. */
su2double *Displ_Value; /*!< \brief Specified displacement for displacement boundaries. */
su2double *Load_Value; /*!< \brief Specified force for load boundaries. */
su2double *Damper_Constant; /*!< \brief Specified constant for damper boundaries. */
Expand Down Expand Up @@ -555,6 +557,8 @@ class CConfig {
*Kind_Inc_Outlet,
*Kind_Data_Riemann,
*Kind_Data_Giles; /*!< \brief Kind of inlet boundary treatment. */
unsigned short *Kind_Wall; /*!< \brief Type of wall treatment. */
unsigned short nWall_Types; /*!< \brief Number of wall treatment types listed. */
unsigned short nInc_Inlet; /*!< \brief Number of inlet boundary treatment types listed. */
unsigned short nInc_Outlet; /*!< \brief Number of inlet boundary treatment types listed. */
su2double Inc_Inlet_Damping; /*!< \brief Damping factor applied to the iterative updates to the velocity at a pressure inlet in incompressible flow. */
Expand Down Expand Up @@ -918,7 +922,8 @@ class CConfig {
nMarkerPitching_Ampl, /*!< \brief Number of values provided for pitching amplitude of marker. */
nMarkerPitching_Phase, /*!< \brief Number of values provided for pitching phase offset of marker. */
nMarkerPlunging_Omega, /*!< \brief Number of values provided for angular frequency of marker. */
nMarkerPlunging_Ampl; /*!< \brief Number of values provided for plunging amplitude of marker. */
nMarkerPlunging_Ampl, /*!< \brief Number of values provided for plunging amplitude of marker. */
nRough_Wall; /*!< \brief Number of rough walls. */
su2double *Omega_HB; /*!< \brief Frequency for Harmonic Balance Operator (in rad/s). */
unsigned short
nOmega_HB, /*!< \brief Number of frequencies in Harmonic Balance Operator. */
Expand Down Expand Up @@ -1077,7 +1082,8 @@ class CConfig {
default_body_force[3], /*!< \brief Default body force vector for the COption class. */
default_nacelle_location[5], /*!< \brief Location of the nacelle. */
default_hs_axes[3], /*!< \brief Default principal axes (x, y, z) of the ellipsoid containing the heat source. */
default_hs_center[3]; /*!< \brief Default position of the center of the heat source. */
default_hs_center[3], /*!< \brief Default position of the center of the heat source. */
default_roughness[1];

unsigned short Riemann_Solver_FEM; /*!< \brief Riemann solver chosen for the DG method. */
su2double Quadrature_Factor_Straight; /*!< \brief Factor applied during quadrature of elements with a constant Jacobian. */
Expand Down Expand Up @@ -2924,6 +2930,12 @@ class CConfig {
*/
unsigned short GetnMarker_HeatFlux(void) const { return nMarker_HeatFlux; }

/*!
* \brief Get the total number of rough markers.
* \return Total number of heat flux markers.
*/
unsigned short GetnRoughWall(void) const { return nRough_Wall; }

/*!
* \brief Get the total number of objectives in kind_objective list
* \return Total number of objectives in kind_objective list
Expand Down Expand Up @@ -5004,6 +5016,11 @@ class CConfig {
*/
unsigned short GetKind_ActDisk(void) const { return Kind_ActDisk; }

/*!
* \brief Set the kind of wall - rough or smooth.
*/
void SetKindWall(string val_marker, unsigned short val_kindwall);

/*!
* \brief Get the number of sections.
* \return Number of sections
Expand Down Expand Up @@ -6754,6 +6771,13 @@ class CConfig {
*/
su2double* GetWallFunction_DoubleInfo(string val_marker);

/*!
* \brief Get the type of wall and roughness height on a wall boundary (Heatflux or Isothermal).
* \param[in] val_index - Index corresponding to the boundary.
* \return The wall type and roughness height.
*/
pair<unsigned short, su2double> GetWallRoughnessProperties(string val_marker) const;

/*!
* \brief Get the target (pressure, massflow, etc) at an engine inflow boundary.
* \param[in] val_index - Index corresponding to the engine inflow boundary.
Expand Down
9 changes: 9 additions & 0 deletions Common/include/geometry/CPhysicalGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "meshreader/CMeshReaderFVM.hpp"
#include "../toolboxes/C2DContainer.hpp"


/*!
* \class CPhysicalGeometry
* \brief Class for reading a defining the primal grid which is read from the grid file in .su2 or .cgns format.
Expand Down Expand Up @@ -105,6 +106,9 @@ class CPhysicalGeometry final : public CGeometry {
unsigned long *Elem_ID_BoundTria_Linear{nullptr};
unsigned long *Elem_ID_BoundQuad_Linear{nullptr};

vector<int> GlobalMarkerStorageDispl;
vector<su2double> GlobalRoughness_Height;

public:
/*--- This is to suppress Woverloaded-virtual, omitting it has no negative impact. ---*/
using CGeometry::SetVertex;
Expand Down Expand Up @@ -804,4 +808,9 @@ class CPhysicalGeometry final : public CGeometry {
}
}

/*!
* \brief Set roughness values for markers in a global array.
*/
void SetGlobalMarkerRoughness(const CConfig* config);

};
15 changes: 15 additions & 0 deletions Common/include/geometry/dual_grid/CPoint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class CPoint {
su2activevector SharpEdge_Distance; /*!< \brief Distance to a sharp edge. */
su2activevector Curvature; /*!< \brief Value of the surface curvature (SU2_GEO). */
su2activevector MaxLength; /*!< \brief The maximum cell-center to cell-center length. */
su2activevector RoughnessHeight; /*!< \brief Roughness of the nearest wall. */

su2matrix<int> AD_InputIndex; /*!< \brief Indices of Coord variables in the adjoint vector. */
su2matrix<int> AD_OutputIndex; /*!< \brief Indices of Coord variables in the adjoint vector after having been updated. */
Expand Down Expand Up @@ -400,6 +401,20 @@ class CPoint {
*/
inline su2double GetWall_Distance(unsigned long iPoint) const { return Wall_Distance(iPoint); }

/*!
* \brief Set the value of the distance to the nearest wall.
* \param[in] iPoint - Index of the point.
* \param[in] distance - Value of the distance.
*/
inline void SetRoughnessHeight(unsigned long iPoint, su2double roughheight) { RoughnessHeight(iPoint) = roughheight; }

/*!
* \brief Get the value of the distance to the nearest wall.
* \param[in] iPoint - Index of the point.
* \return Value of the distance to the nearest wall.
*/
inline su2double GetRoughnessHeight(unsigned long iPoint) const { return RoughnessHeight(iPoint); }

/*!
* \brief Set the value of the distance to a sharp edge.
* \param[in] iPoint - Index of the point.
Expand Down
2 changes: 1 addition & 1 deletion Common/include/geometry/dual_grid/CTurboVertex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class CTurboVertex final : public CVertex {
* \brief get global index for ordered span-wise turbovertex.
*/
inline int GetGlobalVertexIndex(void) const {return GlobalIndex;}

/*!
* \brief set angular coord.
*/
Expand Down
2 changes: 1 addition & 1 deletion Common/include/mpi_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ class CBaseMPIWrapper {
void *recvbuf, int recvcnt, Datatype recvtype, Comm comm);

static void Allgatherv(void *sendbuf, int sendcnt, Datatype sendtype,
void *recvbuf, int recvcnt, int *displs, Datatype recvtype, Comm comm);
void *recvbuf, int *recvcnt, int *displs, Datatype recvtype, Comm comm);

static void Sendrecv(void *sendbuf, int sendcnt, Datatype sendtype,
int dest, int sendtag, void *recvbuf, int recvcnt,
Expand Down
2 changes: 1 addition & 1 deletion Common/include/mpi_structure.inl
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ inline void CBaseMPIWrapper::Scatter(void *sendbuf, int sendcnt, Datatype sendty
}

inline void CBaseMPIWrapper::Allgatherv(void *sendbuf, int sendcnt, Datatype sendtype,
void *recvbuf, int recvcnt, int *displs, Datatype recvtype, Comm comm){
void *recvbuf, int *recvcnt, int *displs, Datatype recvtype, Comm comm){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the problem, the signature was incorrect, I've had some issues (weird segfaults) in the past with AD and allgatherv by the way... not because of this problem, and maybe it was my fault... But anyway just something to keep in the back of your mind if it causes you problems too.

CopyData(sendbuf, recvbuf, sendcnt, sendtype);
}

Expand Down
12 changes: 12 additions & 0 deletions Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,18 @@ static const MapType<string, ACTDISK_TYPE> ActDisk_Map = {
MakePair("VARIABLE_LOAD", VARIABLE_LOAD)
};

/*!
* \brief types of wall boundary condition - smooth or rough
*/
enum WALL_TYPE {
SMOOTH = 1, /*!< \brief Smooth wall */
ROUGH = 2, /*!< \brief Rough wall */
};
static const MapType<string, WALL_TYPE> WallType_Map = {
MakePair("SMOOTH", SMOOTH)
MakePair("ROUGH", ROUGH)
};

/*!
* \brief Types of geometric entities based on VTK nomenclature
*/
Expand Down
Loading