ExactSolnForUnsteadyHeat Namespace Reference

Namespace for unforced exact solution for UnsteadyHeat equation. More...

Functions

void get_exact_u (const double &time, const Vector< double > &x, Vector< double > &u)
 Exact solution as a Vector. More...
 
void get_exact_u (const double &time, const Vector< double > &x, double &u)
 Exact solution as a scalar. More...
 
void get_source (const double &time, const Vector< double > &x, double &source)
 Source function to make it an exact solution. More...
 
void prescribed_flux_on_fixed_y_boundary (const double &time, const Vector< double > &x, const Vector< double > &n, const double &u, double &flux)
 Flux required by the exact solution. More...
 

Variables

double K =10
 Decay factor. More...
 
double Phi =1.0
 Angle of bump. More...
 
double Gamma =10.0
 Factor controlling the rate of change. More...
 

Detailed Description

Namespace for unforced exact solution for UnsteadyHeat equation.

Namespace for forced exact solution for UnsteadyHeat equation.

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

Function Documentation

◆ get_exact_u() [1/2]

void ExactSolnForUnsteadyHeat::get_exact_u ( const double time,
const Vector< double > &  x,
double u 
)

Exact solution as a scalar.

73  {
74  double zeta=cos(Phi)*x[0]+sin(Phi)*x[1];
75  u=exp(-K*time)*sin(zeta*sqrt(K));
76  }
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 exp(const bfloat16 &a)
Definition: BFloat16.h:615
EIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:152
double K
Decay factor.
Definition: heat_transfer_and_melting/two_d_unsteady_heat_melt/two_d_unsteady_heat.cc:58
double Phi
Angle of bump.
Definition: heat_transfer_and_melting/two_d_unsteady_heat_melt/two_d_unsteady_heat.cc:61
list x
Definition: plotDoE.py:28

References cos(), Eigen::bfloat16_impl::exp(), K, Phi, sin(), sqrt(), plotDoE::x, and Eigen::zeta().

◆ get_exact_u() [2/2]

void ExactSolnForUnsteadyHeat::get_exact_u ( const double time,
const Vector< double > &  x,
Vector< double > &  u 
)

◆ get_source()

void ExactSolnForUnsteadyHeat::get_source ( const double time,
const Vector< double > &  x,
double source 
)

Source function to make it an exact solution.

80  {
81  source = 0.0;
82  }
void source(const Vector< double > &x, Vector< double > &f)
Source function.
Definition: unstructured_two_d_circle.cc:46

References TestProblem::source().

Referenced by main(), and run_it().

◆ prescribed_flux_on_fixed_y_boundary()

void ExactSolnForUnsteadyHeat::prescribed_flux_on_fixed_y_boundary ( const double time,
const Vector< double > &  x,
const Vector< double > &  n,
const double u,
double flux 
)

Flux required by the exact solution.

90  {
91  double NX = n[0];
92  double NY = n[1];
93 
94  //The flux in terms of the normal is
95  double zeta=cos(Phi)*x[0]+sin(Phi)*x[1];
96  flux=exp(-K*time)*sqrt(K)*cos(zeta*sqrt(K))*(cos(Phi)*NX+sin(Phi)*NY);
97  }
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
void flux(const double &time, const Vector< double > &x, double &flux)
Get flux applied along boundary x=0.
Definition: pretend_melt.cc:59

References cos(), Eigen::bfloat16_impl::exp(), ProblemParameters::flux(), K, n, Phi, sin(), sqrt(), plotDoE::x, and Eigen::zeta().

Variable Documentation

◆ Gamma

double ExactSolnForUnsteadyHeat::Gamma =10.0

Factor controlling the rate of change.

◆ K

double ExactSolnForUnsteadyHeat::K =10

◆ Phi

double ExactSolnForUnsteadyHeat::Phi =1.0