#include <iostream>
#include <cmath>
#include <limits>
#include "antioch/sutherland_viscosity.h"
Go to the source code of this file.
|
template<typename Scalar > |
int | test_viscosity (const Scalar mu, const Scalar mu_exact, const Scalar tol) |
|
template<typename Scalar > |
int | tester () |
|
int | main () |
|
template<typename Scalar >
int test_viscosity |
( |
const Scalar |
mu, |
|
|
const Scalar |
mu_exact, |
|
|
const Scalar |
tol |
|
) |
| |
Definition at line 42 of file sutherland_viscosity_unit.C.
Referenced by tester().
48 const Scalar rel_error = abs( (mu - mu_exact)/mu_exact);
52 std::cerr <<
"Error: Mismatch in viscosity" << std::endl
53 <<
"mu(T) = " << mu << std::endl
54 <<
"mu_exact = " << mu_exact << std::endl
55 <<
"rel_error = " << rel_error << std::endl
56 <<
"tol = " << tol << std::endl;
template<typename Scalar >
Definition at line 65 of file sutherland_viscosity_unit.C.
References Antioch::SutherlandViscosity< CoeffType >::reset_coeffs(), and test_viscosity().
67 const Scalar mu_ref = 1.0e-3L;
68 const Scalar T_ref = 300.0L;
72 std::cout << mu << std::endl;
74 const Scalar T = 1521.2L;
77 const Scalar mu_exact = .0325778060534850406481862157435995107036L;
81 const Scalar tol = std::numeric_limits<Scalar>::epsilon() * 10;
85 const Scalar mu_ref2 = 3.14159e-3L;
86 const Scalar T_ref2 = 420.42L;
88 mu.reset_coeffs(mu_ref2,T_ref2);
91 const Scalar mu_exact2 = .0959985656417205050367745642313443587197L;
int test_viscosity(const Scalar mu, const Scalar mu_exact, const Scalar tol)