edg_acoustics.preprocessing
This module provides preprocessing functionalities for the edg_acoustics package.
Module Contents
Classes
abstract base class for fluxes. |
|
Calculation of upwind fluxes. |
- class edg_acoustics.preprocessing.UpwindFlux(rho0, c0, n_xyz)[source]
Bases:
FluxCalculation of upwind fluxes. :param rho0: The reference density. :type rho0: float :param c0: The reference speed of sound. :type c0: float :param n_xyz: The array representing the normal vector of the face. :type n_xyz: numpy.ndarray
- Parameters:
rho0 (float)
c0 (float)
n_xyz (numpy.ndarray)
- rho0
see
edg_acoustics.AcousticsSimulation.rho0.- Type:
- c0
see
edg_acoustics.AcousticsSimulation.c0.- Type:
- n_xyz
see
edg_acoustics.AcousticsSimulation.n_xyz.- Type:
- cn1s
precalculated constant for the calculation of the flux of velocity in x-direction.
- Type:
- cn2s
precalculated constant for the calculation of the flux of velocity in y-direction.
- Type:
- cn3s
precalculated constant for the calculation of the flux of velocity in z-direction.
- Type:
- cn1n2
precalculated constant for the calculation of the flux of velocity.
- Type:
- cn1n3
precalculated constant for the calculation of the flux of velocity.
- Type:
- cn2n3
precalculated constant for the calculation of the flux of velocity.
- Type:
- n1rho
precalculated constant for the calculation of the flux of velocity in x-direction.
- Type:
- n2rho
precalculated constant for the calculation of the flux of velocity in y-direction.
- Type:
- n3rho
precalculated constant for the calculation of the flux of velocity in z-direction.
- Type:
- csn1rho
precalculated constant for the calculation of the pressure flux.
- Type:
- csn2rho
precalculated constant for the calculation of the pressure flux.
- Type:
- csn3rho
precalculated constant for the calculation of the pressure flux.
- Type:
- FluxP(dvx, dvy, dvz, dp)[source]
This method calculates the pressure flux using the given input arrays.
- Parameters:
dvx (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in velocity in the x-direction.
dvy (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in velocity in the y-direction.
dvz (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in velocity in the z-direction.
dp (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in pressure.
- Returns:
numpy.ndarray – The calculated pressure flux.
- FluxVx(dvx, dvy, dvz, dp)[source]
This method calculates the flux of velocity in x-direction using the given input arrays.
- Parameters:
dvx (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in velocity in the x-direction.
dvy (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in velocity in the y-direction.
dvz (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in velocity in the z-direction.
dp (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in pressure.
- Returns:
numpy.ndarray – The calculated flux of velocity in x-direction.
- FluxVy(dvx, dvy, dvz, dp)[source]
This method calculates the flux of velocity in y-direction using the given input arrays.
- Parameters:
dvx (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in velocity in the x-direction.
dvy (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in velocity in the y-direction.
dvz (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in velocity in the z-direction.
dp (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in pressure.
- Returns:
numpy.ndarray – The calculated flux of velocity in y-direction.
- FluxVz(dvx, dvy, dvz, dp)[source]
This method calculates the flux of velocity in z-direction using the given input arrays.
- Parameters:
dvx (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in velocity in the x-direction.
dvy (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in velocity in the y-direction.
dvz (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in velocity in the z-direction.
dp (numpy.ndarray) – The array representing jump values across the faces of neighboring elements in pressure.
- Returns:
numpy.ndarray – The calculated flux of velocity in z-direction.