TanhSolnForSteadyAxisymAdvectionDiffusion Namespace Reference

Functions

Exact solution as a Vector void get_exact_u (const Vector< double > &x, Vector< double > &u)
 
Exact solution as a scalar void get_exact_u (const Vector< double > &x, double &u)
 
Source function required to make the solution above an exact solution void source_function (const Vector< double > &x_vect, double &source)
 
Beta required by the exact solution on a boundary on which r is fixed void prescribed_beta_on_fixed_r_boundary (const Vector< double > &x_vect, double &beta)
 
Alfa required by the exact solution on a boundary on which r is fixed void prescribed_alpha_on_fixed_r_boundary (const Vector< double > &x_vect, double &alpha)
 
Wind void wind_function (const Vector< double > &x, Vector< double > &wind)
 

Variables

double Peclet = 0.0
 Peclet number. More...
 
double TanPhi = 0.5
 Parameter for angle of step. More...
 
double Omega = 0.5
 Parameter for switch z-dependence. More...
 
double Epsilon = 0.1
 Amplitude of boundary deflection (Epsilon<R!!!) More...
 
double K_Alpha = 1.0
 Relation between alfa and beta (. More...
 

Detailed Description

Namespace for exact solution for SteadyAxisymAdvectionDiffusion equation with "sharp" step

Function Documentation

◆ get_exact_u() [1/2]

Exact solution as a scalar void TanhSolnForSteadyAxisymAdvectionDiffusion::get_exact_u ( const Vector< double > &  x,
double u 
)
76  {
77  double f_rz = 1.0-(TanPhi*pow(x[0],2.0)-Omega*x[1]);
78  u = tanh(f_rz);
79 
80  }
EIGEN_DEVICE_FUNC const GlobalUnaryPowReturnType< Derived, ScalarExponent > pow(const Eigen::ArrayBase< Derived > &x, const ScalarExponent &exponent)
Definition: GlobalFunctions.h:137
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 tanh(const bfloat16 &a)
Definition: BFloat16.h:639
double Omega
Parameter for switch z-dependence.
Definition: steady_axisym_advection_diffusion.cc:57
double TanPhi
Parameter for angle of step.
Definition: steady_axisym_advection_diffusion.cc:54
list x
Definition: plotDoE.py:28

References Omega, Eigen::bfloat16_impl::pow(), Eigen::bfloat16_impl::tanh(), TanPhi, and plotDoE::x.

◆ get_exact_u() [2/2]

Exact solution as a Vector void TanhSolnForSteadyAxisymAdvectionDiffusion::get_exact_u ( const Vector< double > &  x,
Vector< double > &  u 
)
68  {
69  double f_rz = 1.0-(TanPhi*pow(x[0],2.0)-Omega*x[1]);
70  u[0] = tanh(f_rz);
71  }

References Omega, Eigen::bfloat16_impl::pow(), Eigen::bfloat16_impl::tanh(), TanPhi, and plotDoE::x.

Referenced by TwoMeshFluxSteadyAxisymAdvectionDiffusionProblem< ELEMENT >::doc_solution(), and for().

◆ prescribed_alpha_on_fixed_r_boundary()

Alfa required by the exact solution on a boundary on which r is fixed void TanhSolnForSteadyAxisymAdvectionDiffusion::prescribed_alpha_on_fixed_r_boundary ( const Vector< double > &  x_vect,
double alpha 
)
119  {
120  double r = x_vect[0];
121  double z = x_vect[1];
122 
123  double f_rz = 1.0-(TanPhi*pow(r,2.0)-Omega*z);
124 
125  alpha = -K_Alpha*( 1.0/( sqrt(1.0 + pow(Epsilon*cos(z),2.0) ) ) )*
126  ( 1.0/( 1.0 - K_Alpha*tanh(f_rz) ) )*
127  ( 1.0 - pow(tanh(f_rz),2.0))*
128  (-2.0*TanPhi*r + Epsilon*cos(z)*Omega);
129 
130  }
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
RealScalar alpha
Definition: level1_cplx_impl.h:151
double K_Alpha
Relation between alfa and beta (.
Definition: steady_axisym_advection_diffusion.cc:63
double Epsilon
Amplitude of boundary deflection (Epsilon<R!!!)
Definition: steady_axisym_advection_diffusion.cc:60
r
Definition: UniformPSDSelfTest.py:20

References alpha, cos(), Epsilon, K_Alpha, Omega, Eigen::bfloat16_impl::pow(), UniformPSDSelfTest::r, sqrt(), Eigen::bfloat16_impl::tanh(), and TanPhi.

Referenced by Wind_fct_pt().

◆ prescribed_beta_on_fixed_r_boundary()

Beta required by the exact solution on a boundary on which r is fixed void TanhSolnForSteadyAxisymAdvectionDiffusion::prescribed_beta_on_fixed_r_boundary ( const Vector< double > &  x_vect,
double beta 
)
101  {
102  double r = x_vect[0];
103  double z = x_vect[1];
104 
105  double f_rz = 1.0-(TanPhi*pow(r,2.0)-Omega*z);
106 
107  //The beta is (for the problem with bound1 = F(z) = R + epsilon*sin(z) with 0<z<H=2*Pi)
108 
109  beta = -1.0*( 1.0/( sqrt(1.0 + pow(Epsilon*cos(z),2.0) ) ) )*
110  ( 1.0/( 1.0 - K_Alpha*tanh(f_rz) ) )*
111  ( 1.0 - pow(tanh(f_rz),2.0))*
112  (-2.0*TanPhi*r + Epsilon*cos(z)*Omega);
113 
114  }
Scalar beta
Definition: level2_cplx_impl.h:36

References beta, cos(), Epsilon, K_Alpha, Omega, Eigen::bfloat16_impl::pow(), UniformPSDSelfTest::r, sqrt(), Eigen::bfloat16_impl::tanh(), and TanPhi.

Referenced by Wind_fct_pt().

◆ source_function()

Source function required to make the solution above an exact solution void TanhSolnForSteadyAxisymAdvectionDiffusion::source_function ( const Vector< double > &  x_vect,
double source 
)
85  {
86  double r = x_vect[0];
87  double z = x_vect[1];
88 
89  double f_rz = 1.0-(TanPhi*pow(r,2.0)-Omega*z);
90 
91  source =
92  (1.0-pow(tanh(f_rz),2.0))*
93  ( Peclet*(-2*r*TanPhi*sin(6.0*z) + Omega*cos(6.0*r)) +
94  2.0*tanh(f_rz)*( pow(Omega,2.0) + 4.0*pow(r*TanPhi,2.0) ) +
95  4.0*TanPhi);
96  }
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
double Peclet
Peclet number.
Definition: steady_axisym_advection_diffusion.cc:51
void source(const Vector< double > &x, Vector< double > &f)
Source function.
Definition: unstructured_two_d_circle.cc:46

References cos(), Omega, Peclet, Eigen::bfloat16_impl::pow(), UniformPSDSelfTest::r, sin(), TestProblem::source(), Eigen::bfloat16_impl::tanh(), and TanPhi.

Referenced by main().

◆ wind_function()

Wind void TanhSolnForSteadyAxisymAdvectionDiffusion::wind_function ( const Vector< double > &  x,
Vector< double > &  wind 
)
135  {
136  double r = x[0];
137  double z = x[1];
138 
139  wind[0] = sin(6.0*z);
140  wind[1] = cos(6.0*r);
141 
142  }

References cos(), UniformPSDSelfTest::r, sin(), and plotDoE::x.

Referenced by main().

Variable Documentation

◆ Epsilon

double TanhSolnForSteadyAxisymAdvectionDiffusion::Epsilon = 0.1

Amplitude of boundary deflection (Epsilon<R!!!)

Referenced by prescribed_alpha_on_fixed_r_boundary(), prescribed_beta_on_fixed_r_boundary(), and Wind_fct_pt().

◆ K_Alpha

double TanhSolnForSteadyAxisymAdvectionDiffusion::K_Alpha = 1.0

Relation between alfa and beta (.

Referenced by prescribed_alpha_on_fixed_r_boundary(), and prescribed_beta_on_fixed_r_boundary().

◆ Omega

double TanhSolnForSteadyAxisymAdvectionDiffusion::Omega = 0.5

◆ Peclet

double TanhSolnForSteadyAxisymAdvectionDiffusion::Peclet = 0.0

Peclet number.

Referenced by source_function(), and Wind_fct_pt().

◆ TanPhi

double TanhSolnForSteadyAxisymAdvectionDiffusion::TanPhi = 0.5