Skip to content

Commit

Permalink
Relax projection for FSI mapping to account for curvature
Browse files Browse the repository at this point in the history
  • Loading branch information
psakievich committed Oct 14, 2023
1 parent 589f45c commit e199966
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/aero/fsi/FSIturbine.C
Original file line number Diff line number Diff line change
Expand Up @@ -1765,6 +1765,8 @@ fsiTurbine::computeMapping()
vs::Vector ptCoords(xyz[0], xyz[1], xyz[2]);
bool foundProj = false;
double nDimCoord = -1.0;
double minDispMapInterp = 1.0e6;
int minDispMap = 1e6;
for (int i = 0; i < nPtsBlade - 1; i++) {
vs::Vector lStart = {
brFSIdata_.bld_ref_pos[(iStart + i) * 6],
Expand All @@ -1776,6 +1778,11 @@ fsiTurbine::computeMapping()
brFSIdata_.bld_ref_pos[(iStart + i + 1) * 6 + 2]};
nDimCoord = fsi::projectPt2Line(ptCoords, lStart, lEnd);

if(std::abs(nDimCoord) < minDispMapInterp){
minDispMapInterp = std::abs(nDimCoord);
minDispMap = i;
}

if ((nDimCoord >= 0) && (nDimCoord <= 1.0)) {
foundProj = true;
*dispMapInterpNode = nDimCoord;
Expand All @@ -1785,6 +1792,14 @@ fsiTurbine::computeMapping()
}
}

// if we are very very close to a point then we need to use it
// curvature issues can break the projection
if(!foundProj && minDispMapInterp < 0.50){
*dispMapInterpNode = 0.0;
*dispMapNode = minDispMap;
foundProj = true;
}

// If no element in the OpenFAST mesh contains this node do some sanity
// check on the perpendicular distance between the surface mesh node and
// the line joining the ends of the blade
Expand Down

0 comments on commit e199966

Please sign in to comment.