edg_acoustics.time_integration

This module contains the abstract base class for time integrators and the implementation of the Taylor-series time integration scheme.

The edg_acoustics.time_integration provide more necessary functionalities (based upon edg_acoustics.acoustics_simulation) to setup time integration.

Module Contents

Classes

TimeIntegrator

Base class for time integrators.

TSI_TI

Class for time integrator of Taylor-series time integration scheme.

Attributes

CFL_Default

Default value of the CFL number for time integration schemes.

edg_acoustics.time_integration.CFL_Default = 0.5[source]

Default value of the CFL number for time integration schemes.

Type:

float

class edg_acoustics.time_integration.TimeIntegrator(L_operator, dtscale, CFL=CFL_Default)[source]

Bases: abc.ABC

Base class for time integrators.

Parameters:
L_operator

the function in AcousticSimulation that enables the computation of Lq, given q = [P, Vx, Vy, Vz]

Type:

Callable[[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, list]]

CFL

the CFL number

Type:

float

dt

the time step size

Type:

float

abstract step_dt(P, Vx, Vy, Vz, BC)[source]

Takes the pressure, velocity at the time T and evolves it to time T + dt.

Parameters:
  • P (None)

  • Vx (None)

  • Vy (None)

  • Vz (None)

  • BC (None)

class edg_acoustics.time_integration.TSI_TI(L_operator, dtscale, CFL=CFL_Default, **kwargs)[source]

Bases: TimeIntegrator

Class for time integrator of Taylor-series time integration scheme.

TSI_TI is used to evolve the pressure and velocity at the time T to time T + dt, based on the Taylor-series time integration scheme.

Parameters:
L_operator

the function in AcousticSimulation that enables the computation of Lq, given q = [P, Vx, Vy, Vz]

Type:

Callable[[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray, list]]

CFL

the CFL number

Type:

float

dt

the time step size

Type:

float

Nt

the order of the time integration scheme.

Type:

int

step_dt(P, Vx, Vy, Vz, BC)[source]

Takes the pressure, velocity at the time T and evolves/updates them to time T + dt.

Parameters:
  • P (numpy.ndarray) – the pressure at the time T, will be updated to the pressure at the time T + dt

  • Vx (numpy.ndarray) – the x-component of the velocity at the time T, will be updated to the x-component of the velocity at the time T + dt

  • Vy (numpy.ndarray) – the y-component of the velocity at the time T, will be updated to the y-component of the velocity at the time T + dt

  • Vz (numpy.ndarray) – the z-component of the velocity at the time T, will be updated to the z-component of the velocity at the time T + dt

  • BC (edg_acoustics.AbsorbBC) – the boundary condition object