Global Namespace Reference

Functions

void constant_wind (const oomph::Vector< double > &x, oomph::Vector< double > &wind)
 
void initial_condition (const double &time, const Vector< double > &x, Vector< double > &u)
 Function that determines the initial conditions. More...
 
void two_d_wind (const oomph::Vector< double > &x, oomph::Vector< double > &wind)
 
void exact_solution (const double &t, const Vector< double > &x, Vector< double > &u)
 Function that determines the initial conditions. More...
 
void initial_left (Vector< double > &u, const bool &sod)
 
void initial_right (Vector< double > &u, const bool &sod)
 

Variables

const double pi = MathematicalConstants::Pi
 
double Gamma = 1.4
 
Vector< doublex0 (2, 0.0)
 
double Beta = 5.0
 

Function Documentation

◆ constant_wind()

void Global::constant_wind ( const oomph::Vector< double > &  x,
oomph::Vector< double > &  wind 
)
46  {
47  wind.resize(1);
48  wind[0] = 1.0;
49  }

Referenced by ContProblem< ELEMENT >::ContProblem(), DGProblem< ELEMENT >::DGProblem(), and AdvectionProblem::set_initial_conditions().

◆ exact_solution()

void Global::exact_solution ( const double t,
const Vector< double > &  x,
Vector< double > &  u 
)

Function that determines the initial conditions.

49  {
50  double r = sqrt(x[0]*x[0] + x[1]*x[1]);
51  double theta = atan2(x[1],x[0]);
52 
53  double u_theta = (1.0/75.0)*(-r + 16.0/r);
54 
55  //Set the density
56  u[0] = 1.0;
57  //Set the momenta
58  u[2] = -sin(theta)*u_theta;
59  u[3] = cos(theta)*u_theta;
60 
61  double p = 1.0 + (1.0/(75.0*75.0))*(0.5*r*r - 32*log(r) - 128/(r*r));
62 
63  u[1] = p/(Gamma-1.0) + 0.5*u[0]*u_theta*u_theta;
64  }
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
float * p
Definition: Tutorial_Map_using.cpp:9
double theta
Definition: two_d_biharmonic.cc:236
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 log(const bfloat16 &a)
Definition: BFloat16.h:618
double u_theta(const double &time, const Vector< double > &x)
Calculate the time dependent form of the theta-component of displacement.
Definition: axisym_linear_elasticity/cylinder/cylinder.cc:146
double Gamma
Definition: couette.cc:44
r
Definition: UniformPSDSelfTest.py:20
list x
Definition: plotDoE.py:28

References atan2(), cos(), Gamma, Eigen::bfloat16_impl::log(), p, UniformPSDSelfTest::r, sin(), sqrt(), BiharmonicTestFunctions2::theta, Global_Parameters::u_theta(), and plotDoE::x.

Referenced by TwoDDGProblem< ELEMENT >::apply_boundary_conditions(), TwoDDGProblem< ELEMENT >::apply_initial_conditions(), TwoDDGProblem< ELEMENT >::compute_error(), and TwoDDGProblem< ELEMENT >::TwoDDGProblem().

◆ initial_condition()

void Global::initial_condition ( const double time,
const Vector< double > &  x,
Vector< double > &  u 
)

Function that determines the initial conditions.

53  {
54  u[0] = sin(8.0*atan(1.0)*x[0]);
55  }
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 atan(const bfloat16 &a)
Definition: BFloat16.h:636

References Eigen::bfloat16_impl::atan(), sin(), and plotDoE::x.

Referenced by TwoDDGProblem< ELEMENT >::apply_initial_conditions(), AdvectionProblem::compute_error(), TwoDDGProblem< ELEMENT >::compute_error(), and AdvectionProblem::set_initial_conditions().

◆ initial_left()

void Global::initial_left ( Vector< double > &  u,
const bool sod 
)
47  {
48  //Sod
49  double ro, vel, pres;
50  if(sod)
51  {
52  ro = 1.0;
53  vel = 0.0;
54  pres = 1.0;
55  }
56  else
57  {
58  //Lax
59  ro = 0.445;
60  vel = 0.698;
61  pres = 3.528;
62  }
63 
64  double m = vel*ro;
65  double E = pres/(Gamma-1.0) + 0.5*ro*vel*vel;
66 
67  u[0] = ro;
68  u[1] = E;
69  u[2] = m;
70  }
int * m
Definition: level2_cplx_impl.h:294
double Gamma
Aspect ratio (cylinder height / cylinder radius)
Definition: axisym_navier_stokes/counter_rotating_disks/counter_rotating_disks.cc:70
double E
Elastic modulus.
Definition: TwenteMeshGluing.cpp:68

References Global_Physical_Variables::E, GlobalPhysicalVariables::Gamma, and m.

Referenced by EulerProblem::set_initial_conditions().

◆ initial_right()

void Global::initial_right ( Vector< double > &  u,
const bool sod 
)
73  {
74  double ro, vel, pres;
75  //Sod
76  if(sod)
77  {
78  ro = 0.125;
79  vel = 0.0;
80  pres = 0.1;
81  }
82  else
83  {
84  //Lax
85  ro = 0.5;
86  vel = 0.0;
87  pres = 0.571;
88  }
89 
90  double m = vel*ro;
91  double E = pres/(Gamma-1.0) + 0.5*ro*vel*vel;
92 
93  u[0] = ro;
94  u[1] = E;
95  u[2] = m;
96  }

References Global_Physical_Variables::E, GlobalPhysicalVariables::Gamma, and m.

Referenced by EulerProblem::set_initial_conditions().

◆ two_d_wind()

void Global::two_d_wind ( const oomph::Vector< double > &  x,
oomph::Vector< double > &  wind 
)
49  {
50  wind.resize(2);
51  wind[0] = 1.0; wind[1] = 1.0;
52  }

Referenced by TwoDDGProblem< ELEMENT >::TwoDDGProblem().

Variable Documentation

◆ Beta

◆ Gamma

◆ pi

const double Global::pi = MathematicalConstants::Pi

◆ x0