StokesFlowExactWind Namespace Reference

Functions

void get_wind (const Vector< double > &x, Vector< double > &wind)
 Wind that represents a constantly translating sphere. More...
 

Detailed Description

//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

Function Documentation

◆ get_wind()

void StokesFlowExactWind::get_wind ( const Vector< double > &  x,
Vector< double > &  wind 
)

Wind that represents a constantly translating sphere.

82  {
83  double x_sc = x[0] - 0.0;
84  double z_sc = x[1] - Global_Parameters::Sphere_centre_z;
85  double r = sqrt(x_sc*x_sc + z_sc*z_sc);
86  double theta = atan2(x_sc,z_sc);
87  double sp_r=0.5;
88  double r_sc = r/sp_r;
89 
90  double u_r_sph = -(-1.0 + 1.5/(r_sc) - 0.5/(r_sc*r_sc*r_sc))*cos(theta);
91  double u_theta_sph = -(1.0 - 0.75/(r_sc) - 0.25/(r_sc*r_sc*r_sc))*sin(theta);
92 
93  wind[0]= u_r_sph*sin(theta) + u_theta_sph*cos(theta);
94  wind[1]= u_r_sph*cos(theta) - u_theta_sph*sin(theta);
95  }
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar atan2(const AnnoyingScalar &y, const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:139
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
double theta
Definition: two_d_biharmonic.cc:236
double Sphere_centre_z
Location of the centre of the sphere on the axis.
Definition: axisym_heat_sphere.cc:68
r
Definition: UniformPSDSelfTest.py:20
list x
Definition: plotDoE.py:28

References atan2(), cos(), UniformPSDSelfTest::r, sin(), Global_Parameters::Sphere_centre_z, sqrt(), BiharmonicTestFunctions2::theta, and plotDoE::x.