recon1d_ppm_cwk module reference

Piecewise Parabolic Method 1D reconstruction in model index space.

More…

Data Types

ppm_cwk

PPM reconstruction in index space (no grid dependence).

Functions/Subroutines

init()

Initialize a 1D PPM_CWK reconstruction for n cells.

reconstruct()

Calculate a 1D PPM_CWK reconstructions based on h(:) and u(:)

f()

Value of PPM_CWK reconstruction at a point in cell k [A].

dfdx()

Derivative of PPM_CWK reconstruction at a point in cell k [A].

x()

Solver for x: f(x)=t.

average()

Average between xa and xb for cell k of a 1D PPM reconstruction [A].

destroy()

Deallocate the PPM_CWK reconstruction.

check_reconstruction()

Checks the PPM_CWK reconstruction for consistency.

unit_tests()

Runs PPM_CWK reconstruction unit tests and returns True for any fails, False otherwise.

Detailed Description

This implementation of PPM follows Colella and Woodward, 1984, using uniform thickness and with cells resorting to PCM for local extrema including the first and last cells.

“Fourth order” estimates of edge values use PLM also calculated in index space (i.e. with no grid dependence). First and last PLM slopes are extrapolated. Limiting follows Colella and Woodward thereafter. The high accuracy of this scheme is realized only when the grid-spacing is exactly uniform. This scheme deviates from CW84 when the grid spacing is variable.

Type Documentation

type  recon1d_ppm_cwk/ppm_cwk

PPM reconstruction in index space (no grid dependence).

Type fields:
  • % ul :: real, dimension(:), allocatable, private Left edge value [A].

  • % ur :: real, dimension(:), allocatable, private Right edge value [A].

  • % plm :: type(plm_cwk), private The PLM reconstruction used to estimate edge values.

  • % init :: procedure, private Implementation of the PPM_CWK initialization.

  • % reconstruct :: procedure, private Implementation of the PPM_CWK reconstruction.

  • % average :: procedure, private Implementation of the PPM_CWK average over an interval [A].

  • % f :: procedure, private Implementation of evaluating the PPM_CWK reconstruction at a point [A].

  • % dfdx :: procedure, private Implementation of the derivative of the PPM_CWK reconstruction at a point [A].

  • % x :: procedure, private Implementation of solver for x: f(x)=t.

  • % destroy :: procedure, private Implementation of deallocation for PPM_CWK.

  • % check_reconstruction :: procedure, private Implementation of check reconstruction for the PPM_CWK reconstruction.

  • % unit_tests :: procedure, private Implementation of unit tests for the PPM_CWK reconstruction.

  • % init_parent :: procedure, private Duplicate interface to

  • % reconstruct_parent :: procedure, private Duplicate interface to

[source]

Function/Subroutine Documentation

subroutine recon1d_ppm_cwk/init(this, n, h_neglect, check)

Initialize a 1D PPM_CWK reconstruction for n cells.

Parameters:
  • this :: this [out] This reconstruction

  • n :: n [in] Number of cells in this column

  • h_neglect :: h_neglect [in] A negligibly small width used in cell reconstructions [H]

  • check :: check [in] If true, enable some consistency checking

[source]

subroutine recon1d_ppm_cwk/reconstruct(this, h, u)

Calculate a 1D PPM_CWK reconstructions based on h(:) and u(:)

Parameters:
  • this :: this [inout] This reconstruction

  • h :: h [in] Grid spacing (thickness) [typically H]

  • u :: u [in] Cell mean values [A]

[source]

function  recon1d_ppm_cwk/f(this, k, x)

Value of PPM_CWK reconstruction at a point in cell k [A].

Parameters:
  • this :: this [in] This reconstruction

  • k :: k [in] Cell number

  • x :: x [in] Non-dimensional position within element [nondim]

Call to:

x

[source]

function  recon1d_ppm_cwk/dfdx(this, k, x)

Derivative of PPM_CWK reconstruction at a point in cell k [A].

Parameters:
  • this :: this [in] This reconstruction

  • k :: k [in] Cell number

  • x :: x [in] Non-dimensional position within element [nondim]

Call to:

x

[source]

function  recon1d_ppm_cwk/x(this, k, t)

Solver for x: f(x)=t.

Parameters:
  • this :: this [in] This reconstruction

  • k :: k [in] Cell number

  • t :: t [in] Value to solve for [A]

Called from:

dfdx f

[source]

function  recon1d_ppm_cwk/average(this, k, xa, xb)

Average between xa and xb for cell k of a 1D PPM reconstruction [A].

Parameters:
  • this :: this [in] This reconstruction

  • k :: k [in] Cell number

  • xa :: xa [in] Start of averaging interval on element (0 to 1)

  • xb :: xb [in] End of averaging interval on element (0 to 1)

[source]

subroutine recon1d_ppm_cwk/destroy(this)

Deallocate the PPM_CWK reconstruction.

Parameters:

this :: this [inout] This reconstruction

[source]

function  recon1d_ppm_cwk/check_reconstruction(this, h, u)

Checks the PPM_CWK reconstruction for consistency.

Parameters:
  • this :: this [in] This reconstruction

  • h :: h [in] Grid spacing (thickness) [typically H]

  • u :: u [in] Cell mean values [A]

[source]

function  recon1d_ppm_cwk/unit_tests(this, verbose, stdout, stderr)

Runs PPM_CWK reconstruction unit tests and returns True for any fails, False otherwise.

Parameters:
  • this :: this [inout] This reconstruction

  • verbose :: verbose [in] True, if verbose

  • stdout :: stdout [in] I/O channel for stdout

  • stderr :: stderr [in] I/O channel for stderr

[source]

[source]