File snb.hxx#
-
namespace bout
Provides access to the Hypre library, handling initialisation and finalisation.
Usage
#include <bout/hyprelib.hxx>
class MyClass { public:
private: HypreLib lib; };
This will then automatically initialise Hypre the first time an object is created, and finalise it when the last object is destroyed.
Copyright 2012 B.D.Dudson, S.Farley, M.V.Umansky, X.Q.Xu
Contact: Ben Dudson, bd512@york.ac.uk
This file is part of BOUT++.
BOUT++ is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
BOUT++ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with BOUT++. If not, see http://www.gnu.org/licenses/.
Explicit inversion of a 3x3 matrix
aIf the matrix is singular (ill conditioned), the determinant is return. Otherwise, an empty
std::optionalis returnSNB model
-
class HeatFluxSNB#
- #include <snb.hxx>
Calculate heat flux using the Shurtz-Nicolai-Busquet (SNB) model
Useful references:
Braginskii equations by R.Fitzpatrick: http://farside.ph.utexas.edu/teaching/plasma/Plasmahtml/node35.html
J.P.Brodrick et al 2017: https://doi.org/10.1063/1.5001079 and https://arxiv.org/abs/1704.08963
Shurtz, Nicolai and Busquet 2000: https://doi.org/10.1063/1.1289512
Public Functions
-
inline HeatFluxSNB()#
Construct using the options in the “snb” section.
-
~HeatFluxSNB() = default#
-
HeatFluxSNB(HeatFluxSNB&&) = default#
-
HeatFluxSNB &operator=(HeatFluxSNB&&) = default#
-
HeatFluxSNB(const HeatFluxSNB&) = delete#
-
HeatFluxSNB &operator=(const HeatFluxSNB&) = delete#
-
Field3D divHeatFlux(const Field3D &Te, const Field3D &Ne, Field3D *Div_Q_SH_out = nullptr)#
Calculate divergence of heat flux Te: Electron temperature in eV Ne: Electron density in m^-3
Div_Q_SH_out : An optional output field to store the Spitzer-Harm heat flux
Returns the divergence of heat flux in units of eV per cubic meter per second -> multiply by e=1.602e-19 to get Watts per cubic meter.
Private Functions
Private Members
-
std::unique_ptr<InvertParDiv> invertpardiv = {nullptr}#
Parallel inversion of tridiagonal matrices.
-
int ngroups = {40}#
Number of energy groups.
-
inline HeatFluxSNB()#
-
class HeatFluxSNB#