Skip to content
Snippets Groups Projects
Commit 5709a6a1 authored by LEGOLAS\lenz's avatar LEGOLAS\lenz
Browse files

new method for setting velocity profiles in Velocity boundary conditions

parent 5dcc99e8
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,18 @@ bool BoundaryCondition::isSide( SideType side ) const
return this->side->whoAmI() == side;
}
VF_PUBLIC void VelocityBoundaryCondition::setVelocityProfile(SPtr<Grid> grid, std::function<void(real, real, real, real&, real&, real&)> velocityProfile)
{
for( uint index = 0; index < this->indices.size(); index++ ){
real x, y, z;
grid->transIndexToCoords( this->indices[index], x, y, z );
velocityProfile(x,y,z,this->vxList[index],this->vyList[index],this->vzList[index]);
}
}
void GeometryBoundaryCondition::setTangentialVelocityForPatch(SPtr<Grid> grid, uint patch,
real p1x, real p1y, real p1z,
real p2x, real p2y, real p2z,
......
......@@ -2,6 +2,7 @@
#define BoundaryCondition_H
#include <vector>
#include <functional>
#include "global.h"
......@@ -94,6 +95,8 @@ public:
real getVx(uint index) { return this->vxList[index]; }
real getVy(uint index) { return this->vyList[index]; }
real getVz(uint index) { return this->vzList[index]; }
VF_PUBLIC void setVelocityProfile( SPtr<Grid> grid, std::function<void(real,real,real,real&,real&,real&)> velocityProfile );
};
//////////////////////////////////////////////////////////////////////////
......
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