v0.14.0
Functions
NavierStokesElement.cpp File Reference
#include <MoFEM.hpp>
#include <MethodForForceScaling.hpp>
#include <NavierStokesElement.hpp>

Go to the source code of this file.

Functions

VectorDouble3 stokes_flow_velocity (double x, double y, double z)
 

Function Documentation

◆ stokes_flow_velocity()

VectorDouble3 stokes_flow_velocity ( double  x,
double  y,
double  z 
)
Examples
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);
1077  VectorDouble3 res(3);
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 }
MoFEM::Types::VectorDouble3
VectorBoundedArray< double, 3 > VectorDouble3
Definition: Types.hpp:92
phi
static double phi
Definition: poisson_2d_dis_galerkin.cpp:30
sdf.r
int r
Definition: sdf.py:8