#include <MoFEM.hpp>
#include <MethodForForceScaling.hpp>
#include <NavierStokesElement.hpp>
Go to the source code of this file.
◆ stokes_flow_velocity()
- Examples
- mofem/users_modules/basic_finite_elements/src/impl/NavierStokesElement.cpp.
Definition at line 1071 of file NavierStokesElement.cpp.
 1071                                                                 {
 1072  double r = std::sqrt(x * x + y * y + z * z);
 
 1073  double theta = acos(x / r);
 1074  double phi = atan2(y, z);
 
 1075  double ur = cos(theta) * (1.0 + 0.5 / (
r * 
r * 
r) - 1.5 / r);
 
 1076  double ut = -sin(theta) * (1.0 - 0.25 / (
r * 
r * 
r) - 0.75 / r);
 
 1078  res[0] = ur * cos(theta) - ut * sin(theta);
 1079  res[1] = ur * sin(theta) * sin(
phi) + ut * cos(theta) * sin(
phi);
 
 1080  res[2] = ur * sin(theta) * cos(
phi) + ut * cos(theta) * cos(
phi);
 
 1081  return res;
 1082}
VectorBoundedArray< double, 3 > VectorDouble3