Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 58 additions & 6 deletions doc/source/modules/braginskii.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Braginskii module
===================

Equations solved and methods
---------------------------
----------------------------

The ``Braginskii`` module implements the anisotropic heat and momentum fluxes specific
to weakly collisional, magnetised plasma like the intracluster medium
Expand Down Expand Up @@ -37,7 +37,7 @@ though adapted to vector quantities.
cell interface by a simple arithmetic average
(Eq. (6)-(7) from Sharma & Hammett 2007).
However in the same paper, the authors showed that this implementation can lead to
unphysical heat flux from high to low temperature regions.
unphysical heat flux from low to high temperature regions.
So we implemented slope limiters for the computation of these transverse heat fluxes,
as described in Eq. (17) from Sharma & Hammett (2007).
Only the van Leer and the Monotonized Central (MC) limiters are available
Expand Down Expand Up @@ -72,18 +72,68 @@ of the Braginskii heat flux and viscosity.

.. _braginskiiParameterSection:


Saturation with collisionless heat flux
---------------------------------------

The ``Braginskii`` module can include a collisionless saturation of the Braginskii heat flux, typically due to supra-thermal electrons.
The heat flux is then computed as follows:

:math:`q = \alpha (q_B + q_\perp) + (1-\alpha)\beta*p*v`,

where :math:`\alpha \in [0,1]` controls the transition between the Braginskii heat flux and the collisionless heat flux
and :math:`\beta` controls the amplitude of the collisionless heat flux (typically :math:`\beta \in [1,4]`, see Hollweg 1976).

.. note::
As a result, even with :math:`\kappa_\perp = 0`, the heat flux is no longer necessarilly strictly aligned with the magnetic field.
.. note::
The collisionless heat flux is a hyperbolic term and the diffusion coefficient is set proportional to :math:`\alpha`.
.. note::
If selected, slope limiters are also used in the collisionless flux, where an upwind scheme has been implemented for stability.
.. note::
This saturation has been thought to be used mostly using the userdef function that takes four userdef arrays as input.

Main parameters of the module
-----------------------------

The ``Braginskii`` module can be enabled adding one or two lines in the ``[Hydro]`` section
starting with the keyword
`bragTDiffusion` or/and *bragViscosity*. The following table summarises the different options
starting with the keyword `bragTDiffusion` or/and *bragViscosity*. The following tables summarise the different options
associated to the activation of the Braginskii module:

+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| Column | Entry name | Parameter type | Comment |
+========+=======================+=========================+=======================================================================================+
| 0 | bragModule | string | | Activates Braginskii diffusion. Can be ``bragTDiffusion`` or ``bragViscosity``. |
| 0 | bragTDiffusion | string | | Activates Braginskii thermal diffusion. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 1 | integration | string | | Specifies the type of scheme to be used to integrate the parabolic term. |
| | | | | Can be ``rkl`` or ``explicit``. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 2 | slope limiter | string | | Choose the type of limiter to be used to compute anisotropic transverse flux terms. |
| | | | | Can be ``mc``, ``vanleer`` or ``nolimiter``. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 3 | saturation mode | string | | Include or not collisionless saturation. Can be ``nosat`` or ``wcless``. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 4 | diffusivity type | string | | Specifies the type of diffusivity wanted. Can be ``constant`` or ``userdef``. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 5 | parallel diffusivity | real | | Mandatory if the diffusivity type is ``constant``. Not needed otherwise. |
| | | | | Value of the parallel diffusivity. Should be a real number. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 6 | normal diffusivity | real | | When bragModule ``bragTDiffusion`` and diffusivity type ``constant``, |
| | | | | value of the normal diffusivity. Should be a real number. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 7 | alpha collisionless | real | | If the diffusivity type is ``constant`` and saturation is ``wcless``. |
| | | | | Set to 1 if not provided. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 8 | beta collisionless | real | | If the diffusivity type is ``constant`` and saturation is ``wcless``. |
| | | | | Set to 0 if not provided. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+

for the *bragViscosity*:

+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| Column | Entry name | Parameter type | Comment |
+========+=======================+=========================+=======================================================================================+
| 0 | bragViscosity | string | | Activates Braginskii viscosity. |
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+
| 1 | integration | string | | Specifies the type of scheme to be used to integrate the parabolic term. |
| | | | | Can be ``rkl`` or ``explicit``. |
Expand All @@ -101,7 +151,7 @@ associated to the activation of the Braginskii module:
+--------+-----------------------+-------------------------+---------------------------------------------------------------------------------------+

Numerical checks
---------------
----------------

In Cartesian geometry, the ``Braginskii`` module has been tested with many setups
and in all configurations of magnetic polarisation:
Expand All @@ -119,3 +169,5 @@ The same goes for the anisotropic heat flux in Cylindrical/Polar geometry while
the anisotropic viscosity has *never* been tested in this geometry.
In spherical geometry, both ``Braginskii`` operators have been partially validated
(diffusion along the polar axis has not been directly tested).

The collisionless saturation has been tested in 1D and 2D spherical geometry.
22 changes: 16 additions & 6 deletions src/fluid/braginskii/bragThermalDiffusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@
#include "eos.hpp"



void BragThermalDiffusion::ShowConfig() {
if(status.status==Constant) {
idfx::cout << "Braginskii Thermal Diffusion: ENABLED with constant diffusivity kpar="
<< this->kpar << " and knor=" << this->knor << " ."<< std::endl;
} else if (status.status==UserDefFunction) {
idfx::cout << "Braginskii Thermal Diffusion: ENABLED with user-defined diffusivity function."
<< std::endl;
if(!diffusivityFunc) {
if(!bragDiffusivityFunc) {
IDEFIX_ERROR("No braginskii thermal diffusion function has been enrolled");
}
} else {
IDEFIX_ERROR("Unknown braginskii thermal diffusion mode");
IDEFIX_ERROR("Unknown Braginskii thermal diffusion mode");
}
if(status.isExplicit) {
idfx::cout << "Braginskii Thermal Diffusion: uses an explicit time integration." << std::endl;
Expand All @@ -42,16 +41,27 @@ void BragThermalDiffusion::ShowConfig() {
IDEFIX_ERROR("Unknown time integrator for braginskii thermal diffusion.");
}
if(haveSlopeLimiter) {
idfx::cout << "Braginskii Thermal Diffusion: uses a slope limiter." << std::endl;
if(haveMonotonizedCentral) {
idfx::cout << "Braginskii Thermal Diffusion: "
"uses the monotonized central slope limiter." << std::endl;
} else if(haveVanLeer) {
idfx::cout << "Braginskii Thermal Diffusion: uses the van Leer slope limiter." << std::endl;
} else {
IDEFIX_ERROR("Unknown slope limiter for braginskii thermal diffusion.");
}
}
if(includeCollisionlessTD) {
idfx::cout << "Braginskii Thermal Diffusion: saturation"
" with collisionless flux is enabled." << std::endl;
}
}

void BragThermalDiffusion::EnrollBragThermalDiffusivity(BragDiffusivityFunc myFunc) {
if(this->status.status != UserDefFunction) {
IDEFIX_WARNING("Braginskii thermal diffusivity enrollment requires Hydro/BragThermalDiffusion "
"to be set to userdef in .ini file");
"to be set to userdef in .ini file");
}
this->diffusivityFunc = myFunc;
this->bragDiffusivityFunc = myFunc;
}

void BragThermalDiffusion::AddBragDiffusiveFlux(int dir, const real t,
Expand Down
Loading