Peano
Loading...
Searching...
No Matches
adiabatic_index.h File Reference

Defines the adiabatic index (polytropix index) \(\gamma\) of the problem and (fast) mathematical functions involving it. More...

#include <config.h>
#include <math.h>
#include "cbrt.h"
#include "error.h"
#include "inline.h"
Include dependency graph for adiabatic_index.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 __attribute__ ((always_inline, const)) INLINE static float pow_gamma(float x)
 Returns the argument to the power given by the adiabatic index.
 

Detailed Description

Defines the adiabatic index (polytropix index) \(\gamma\) of the problem and (fast) mathematical functions involving it.

Definition in file adiabatic_index.h.

Function Documentation

◆ __attribute__()

__attribute__ ( (always_inline, const) )

Returns the argument to the power given by the adiabatic index.

Returns the sound speed given density and pressure.

Returns the sound speed given density and internal energy.

Returns the internal energy given density and pressure.

Returns the pressure given density and internal energy.

Returns the entropy given density and internal energy.

Returns the sound speed given density and entropy.

Returns the entropy given density and pressure.

Returns the pressure given density and entropy.

Approximate version of exp(x) using a 6th order Taylor expansion.

Approximate version of expf(x) using a 6th order Taylor expansion.

Return the argument to the power three (adiabatic index - 1).

Return the argument to the power three adiabatic index minus five over two.

Return the argument to the power three adiabatic index minus two.

Return the argument to the power one over the adiabatic index.

Return the inverse argument to the power given by the adiabatic index plus one divided by two times the adiabatic index.

Return the argument to the power given by the adiabatic index minus one divided by two times the adiabatic index.

Return the argument to the power given by two times the adiabatic index divided by the adiabatic index minus one.

Return the argument to the power given by two divided by the adiabatic index minus one.

Returns one over the argument to the power given by the adiabatic index.

Returns one over the argument to the power given by the adiabatic index minus one.

Returns the argument to the power given by the adiabatic index minus one.

Computes \(x^\gamma\).

Computes \(x^{(\gamma-1)}\).

Computes \(x^{-(\gamma-1)}\).

Computes \(x^{-\gamma}\).

Parameters
xArgument
Returns
One over the argument to the power given by the adiabatic index

Computes \(x^{\frac{2}{\gamma - 1}}\).

Parameters
xArgument
Returns
Argument to the power two divided by the adiabatic index minus one

Computes \(x^{\frac{2\gamma}{\gamma - 1}}\).

Parameters
xArgument
Returns
Argument to the power two times the adiabatic index divided by the adiabatic index minus one

Computes \(x^{\frac{\gamma - 1}{2\gamma}}\).

Parameters
xArgument
Returns
Argument to the power the adiabatic index minus one divided by two times the adiabatic index

Computes \(x^{-\frac{\gamma + 1}{2\gamma}}\).

Parameters
xArgument
Returns
Inverse argument to the power the adiabatic index plus one divided by two times the adiabatic index

Computes \(x^{\frac{1}{\gamma}}\).

Parameters
xArgument
Returns
Argument to the power one over the adiabatic index

Computes \(x^{3\gamma - 2}\).

Parameters
xArgument

Computes \(x^{(3\gamma - 5)/2}\).

Parameters
xArgument

Computes \(x^{3(\gamma - 1)}\).

Parameters
xArgument

Computes \(P = A\rho^\gamma\).

Parameters
densityThe density \(\rho\).
entropyThe entropy \(A\).

Computes \(A = \frac{P}{\rho^-\gamma}\).

Parameters
densityThe density \(\rho\).
pressureThe pressure \(P\).
Returns
The entropy \(A\).

Computes \(c = \sqrt{\gamma A \rho^{\gamma-1}}\).

Parameters
densityThe density \(\rho\).
entropyThe entropy \(A\).

Computes \(A = \frac{(\gamma - 1)u}{\rho^{\gamma-1}}\).

Parameters
densityThe density \(\rho\)
uThe internal energy \(u\)

Computes \(P = (\gamma - 1)u\rho\).

Parameters
densityThe density \(\rho\)
uThe internal energy \(u\)

Computes \(u = \frac{1}{\gamma - 1}\frac{P}{\rho}\).

Parameters
densityThe density \(\rho\).
pressureThe pressure \(P\).
Returns
The internal energy \(u\).

Computes \(c = \sqrt{\gamma (\gamma - 1) u }\).

Parameters
densityThe density \(\rho\)
uThe internal energy \(u\)

Computes \(c = \sqrt{\frac{\gamma P}{\rho} }\).

Parameters
densityThe density \(\rho\)
PThe pressure \(P\)

Definition at line 112 of file adiabatic_index.h.