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

(fix) Security check in blowing velocity computation

Now the velocity value is checked for possible nan.
parent 1b37099b
No related branches found
No related tags found
No related merge requests found
Pipeline #21132 failed
......@@ -157,6 +157,10 @@ void BoundaryLayer::computeBlwVel()
blowingVelocity[iPoint - 1] = (blEdge->getRhoe(iPoint) * blEdge->getVt(iPoint) * deltaStar[iPoint] - blEdge->getRhoe(iPoint - 1) * blEdge->getVt(iPoint - 1) * deltaStar[iPoint - 1]) / (blEdge->getRhoe(iPoint) * (mesh->getLoc(iPoint) - mesh->getLoc(iPoint - 1)));
if (std::isnan(blowingVelocity[iPoint - 1]))
{
if (std::isnan(blEdge->getVt(iPoint)))
std::cout << "Velocity is nan at position " << iPoint << std::endl;
if (std::isnan(blEdge->getVt(iPoint-1)))
std::cout << "Velocity is nan at position " << iPoint-1 << std::endl;
if (blEdge->getRhoe(iPoint) == 0.)
std::cout << "Density is zero at point " << iPoint << std::endl;
if ((mesh->getLoc(iPoint) - mesh->getLoc(iPoint - 1)) == 0.)
......
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