josie.euler.schemes package¶
Submodules¶
josie.euler.schemes.hllx module¶
- class josie.euler.schemes.hllx.HLL(eos)¶
Bases:
josie.euler.schemes.scheme.EulerScheme
This class implements the HLL scheme. See [Tor09] for a detailed view on compressible schemes.
- F(cells, neighs)¶
This is the convective flux implementation of the scheme. See [Tor09] for a great overview on numerical methods for hyperbolic problems.
A general problem can be written in a compact way:
The convective term is discretized as follows:
A concrete implementation of this method needs to implement the discretization of the numerical flux on one face of a cell. It needs to implement the term
- Parameters
cells (MeshCellSet) – A
MeshCellSet
containing the state of the mesh cellsneighs (NeighboursCellSet) – A
NeighboursCellSet
containing data of neighbour cells corresponding to thevalues
- Returns
The value of the numerical convective flux multiplied by the surface value
- Return type
F
- static compute_sigma(U_L, U_R, c_L, c_R)¶
Returns the value of the :math:`sigma`(i.e. the wave velocity) for the the HLL and HLLC scheme.
- Parameters
U_L (
ndarray
) – The value of scalar velocity for each cell. Array dimensionsU_R (
ndarray
) – The value of scalar velocity for each cell neighbour. Array dimensionsc_L (
ndarray
) – The value of sound velocity for each cellc_R (
ndarray
) – The value of sound velocity for each cell neighbour
- Return type
Tuple
[ndarray
,ndarray
]- Returns
sigma_L – A containing the value of the per each cell
sigma_R – A containing the value of the per each cell
- problem: EulerProblem¶
- class josie.euler.schemes.hllx.HLLC(eos)¶
Bases:
josie.euler.schemes.hllx.HLL
This class implements the HLLC scheme. See [Tor09] for a detailed view on compressible schemes.
- F(cells, neighs)¶
This is the convective flux implementation of the scheme. See [Tor09] for a great overview on numerical methods for hyperbolic problems.
A general problem can be written in a compact way:
The convective term is discretized as follows:
A concrete implementation of this method needs to implement the discretization of the numerical flux on one face of a cell. It needs to implement the term
- Parameters
cells (MeshCellSet) – A
MeshCellSet
containing the state of the mesh cellsneighs (NeighboursCellSet) – A
NeighboursCellSet
containing data of neighbour cells corresponding to thevalues
- Returns
The value of the numerical convective flux multiplied by the surface value
- Return type
F
- problem: EulerProblem¶
josie.euler.schemes.rusanov module¶
- class josie.euler.schemes.rusanov.Rusanov(eos)¶
Bases:
josie.euler.schemes.scheme.EulerScheme
This class implements the Rusanov scheme. See [Tor09] for a detailed view on compressible schemes. The Rusanov scheme is discretized by:
- F(cells, neighs)¶
This is the convective flux implementation of the scheme. See [Tor09] for a great overview on numerical methods for hyperbolic problems.
A general problem can be written in a compact way:
The convective term is discretized as follows:
A concrete implementation of this method needs to implement the discretization of the numerical flux on one face of a cell. It needs to implement the term
- Parameters
cells (MeshCellSet) – A
MeshCellSet
containing the state of the mesh cellsneighs (NeighboursCellSet) – A
NeighboursCellSet
containing data of neighbour cells corresponding to thevalues
- Returns
The value of the numerical convective flux multiplied by the surface value
- Return type
F
- static compute_sigma(U_L, U_R, c_L, c_R)¶
Returns the value of the :math:`sigma`(i.e. the wave velocity) for the the Rusanov scheme.
- Parameters
U_L (
ndarray
) – The value of scalar velocity for each cell. Array dimensionsU_R (
ndarray
) – The value of scalar velocity for each cell neighbour. Array dimensionsc_L (
ndarray
) – The value of sound velocity for each cellc_R (
ndarray
) – The value of sound velocity for each cell neighbour
- Returns
A containing the value of the sigma per each cell
- Return type
sigma
- problem: EulerProblem¶
josie.euler.schemes.scheme module¶
- class josie.euler.schemes.scheme.EulerScheme(eos)¶
Bases:
josie.scheme.convective.ConvectiveScheme
A general base class for Euler schemes
- CFL(cells, CFL_value)¶
This method returns the optimal dt value that fulfills the CFL condition for the concrete the given scheme
- Parameters
cells (MeshCellSet) – A
MeshCellSet
containing the cell data at the current time stepCFL_value (float) – The value of the CFL coefficient to impose
- Returns
The Optimal dt fulfilling the CFL condition for the given CFL number
- Return type
dt
- static compute_U_norm(values, normals)¶
Returns the value of the normal velocity component to the given
normals
.- Parameters
values (SingleFluidState) – A
np.ndarray
that has dimension containing the values for all the states in all the mesh pointsnormals (np.ndarray) – A
np.ndarray
that has the dimensions containing the values of the normals to the faces of the cell
- Returns
- Return type
The value of the normal velocity
- post_step(cells)¶
During the step we update the conservative values. After the step we update the non-conservative variables. This method updates the values of the non-conservative (auxiliary) variables using the
EOS
- problem: EulerProblem¶