Peano
Loading...
Searching...
No Matches
initialvalues.py
Go to the documentation of this file.
1
""" This file is part of the ExaGRyPE project. For conditions of distribution and
2
use, please see the copyright notice at www.peano-framework.org
3
"""
4
5
import
exahype2.api
6
7
8
def
smooth_wave
(
9
amplitude: float = 0.2, velocity: float = 1.0, pressure: float = 1.0
10
) ->
exahype2.api.InitPointWisely
:
11
"""!
12
13
Density wave on constant pressure, @see exagrype::euler::initialvalues::smoothWave()
14
15
The wave is an exact solution of the Euler equations which the fluid
16
advects along the x-axis. The adiabatic index is the one of the solver
17
(its attribute Gamma), i.e. the routine is for exagrype.api.euler.Euler.
18
19
@param amplitude: float
20
Amplitude of the density wave. Has to be smaller than one in modulus
21
to keep the density positive.
22
23
@param velocity: float
24
Speed along the x-axis.
25
26
@param pressure: float
27
Constant pressure.
28
29
"""
30
if
abs(amplitude) >= 1.0:
31
raise
ValueError(
"amplitude has to be smaller than one in modulus"
)
32
return
exahype2.api.InitPointWisely
(
33
implementation=f
"""
34
::exagrype::euler::initialvalues::smoothWave( Q, x, 0.0, {amplitude!r}, {velocity!r}, {pressure!r}, Gamma );
35
"""
36
)
exahype2.api.InitPointWisely.InitPointWisely
Point-wise initial condition: given the physical position of a single degree of freedom,...
Definition
InitPointWisely.py:8
exagrype.api.euler.initialvalues.smooth_wave
exahype2.api.InitPointWisely smooth_wave(float amplitude=0.2, float velocity=1.0, float pressure=1.0)
Density wave on constant pressure,.
Definition
initialvalues.py:10
exahype2.api
Definition
__init__.py:1
src
exagrype
api
euler
initialvalues.py
Generated on
for Peano by
1.15.0