48 return this->side->whoAmI() ==
side;
55 for (
uint index = 0; index < this->indices.size(); index++) {
59 grid->transIndexToCoords(this->indices[index],
x,
y,
z);
61 velocityProfile(
x,
y,
z, this->vxList[index], this->vyList[index], this->vzList[index]);
72 for(
uint index = 0; index < this->indices.size(); index++ ){
73 if( this->patches[index] ==
patch ){
77 grid->transIndexToCoords( this->indices[index],
x,
y,
z );
107 this->vxList[index] =
tangentX * d /
r * v;
108 this->vyList[index] =
tangentY * d /
r * v;
109 this->vzList[index] =
tangentZ * d /
r * v;
122 const auto normal = side->getNormal();
129 throw std::runtime_error(
"StressBoundaryCondition::setAdditionalIndices could not find sampling index");
132 const auto qNode = qs.back();
134 switch (side->whoAmI()) {
154 throw std::runtime_error(
"Side type not implemented!");
157 const real samplingDistance =
159 samplingDistanceList.push_back(samplingDistance);
161 const real wallX =
nodeX + normal[0] * vf::basics::constant::c1o2 * grid->getDelta();
162 const real wallY =
nodeY + normal[1] * vf::basics::constant::c1o2 * grid->getDelta();
163 const real wallZ =
nodeZ + normal[2] * vf::basics::constant::c1o2 * grid->getDelta();
165 roughnessLengthList.push_back(roughnessLength / grid->getDelta());
173 grid->transIndexToCoords(index,
x,
y,
z);
179 if (side->getCoordinate() ==
X_INDEX)
180 nx = -side->getDirection() * grid->getDelta() +
x;
181 if (side->getCoordinate() ==
Y_INDEX)
182 ny = -side->getDirection() * grid->getDelta() +
y;
183 if (side->getCoordinate() ==
Z_INDEX)
184 nz = -side->getDirection() * grid->getDelta() +
z;
193 throw std::runtime_error(
"PrecursorBoundaryCondition: reader has not been set");
200 grid->transIndexToCoords(index,
x,
y,
z);
206 if (side->getCoordinate() ==
X_INDEX)
207 nx = -side->getDirection() * grid->getDelta() +
x;
208 if (side->getCoordinate() ==
Y_INDEX)
209 ny = -side->getDirection() * grid->getDelta() +
y;
210 if (side->getCoordinate() ==
Z_INDEX)
211 nz = -side->getDirection() * grid->getDelta() +
z;
219 const real gradient =
static_cast<real>(side->getDirection()) * this->gradient;
220 std::fill_n(std::back_inserter(this->vxList), this->indices.size(), vx);
221 std::fill_n(std::back_inserter(this->vyList), this->indices.size(), vy);
222 std::fill_n(std::back_inserter(this->vzList), this->indices.size(), vz);
223 std::fill_n(std::back_inserter(this->gradientList), this->indices.size(), gradient);
228 const real gradient =
static_cast<real>(side->getDirection()) * this->gradient;
229 std::fill_n(std::back_inserter(this->normalXList), this->indices.size(), normalX);
230 std::fill_n(std::back_inserter(this->normalYList), this->indices.size(), normalY);
231 std::fill_n(std::back_inserter(this->normalZList), this->indices.size(), normalZ);
232 std::fill_n(std::back_inserter(this->gradientList), this->indices.size(), gradient);
void fillBoundaryValueLists()
void fillBoundaryValueLists()
void setAdditionalIndices(const SPtr< Grid > &grid, uint index) override
void setTangentialVelocityForPatch(SPtr< Grid > grid, uint patch, real p1x, real p1y, real p1z, real p2x, real p2y, real p2z, real v, real r)
SPtr< TransientBCInputFileReader > getReader()
void setAdditionalIndices(const SPtr< Grid > &grid, uint index) override
void setAdditionalIndices(const SPtr< Grid > &grid, uint index) override
void setVelocityProfile(SPtr< Grid > grid, std::function< void(real, real, real, real &, real &, real &)> velocityProfile)
bool isSide(SideType side) const
std::shared_ptr< T > SPtr