|
rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
|
Unit tests for CollisionModel at states it cannot describe. More...
#include "numeric/TrialStateError.h"#include "transport/CollisionModel.h"#include <gtest/gtest.h>#include <limits>#include <stdexcept>#include <vector>Go to the source code of this file.
Unit tests for CollisionModel at states it cannot describe.
Every collision frequency carries a power of Te (the thermal velocity goes as Te^0.5, the Coulomb term as Te^-1.5), so a non-positive or NaN Te has no answer. Returning zeros for it hands the caller sigma = 0 and nu_E = 0, which reads as a cold neutral gas rather than as a broken state. The Coulomb logarithm is likewise refused where it is undefined, as the Python reference refuses it, rather than floored.
These depend on the state, not on the configuration, so they raise a TrialStateError: a CanteraError, which CVODE retries with a smaller step rather than abandoning the solve. A wrong-length density array is a caller bug and stays a std::invalid_argument.
Definition in file CollisionModel_test.cpp.