version 0.6.0
Loading...
Searching...
No Matches

Extrapolation schemes. More...

Topics

 Extrapolation: grid based routines
 Module containing grid based routines/functions for extrapolation.
 
 Extrapolation schemes
 Scheme submodules
 

Namespaces

module  mod_extrapolation_computer
 Computer for evaluating Extrapolation Schemes.
 
module  mod_extrapolation_init
 Initialization of declared extrapolation chemes.
 
module  type_ext_neumann_scheme
 Extrapolation Neumann Schemes type.
 
module  type_ext_scheme
 Extrapolation Schemes type.
 

Detailed Description

This module provides all the functions and routines to extrapolate a function/field outside its known values.

Extrapolation with Neumann condition

The Neumann extrapolation is based on a rewritting of offcentered Finite Difference schemes.

Mathematical construction

Let \(\frac{d \phi}{d \xi}(\xi_0)\) be the known derivative of \(\phi\) at the position \(\xi=\xi_0\). Let

\[ \frac{d \phi}{d \xi} ( \xi_0 ) \simeq \sum_i w_i \phi( \xi_i ) + O(\Delta \xi^M) = \sum_i w_i \phi_i + O(\Delta \xi^M) \]

be an approximation of the first derivative at the order \(M\). Then, the \((M+1)^{th}\) order extrapolation of \(\phi\) at \(\xi_0\) is:

\[ \phi(\xi_0) = \phi_0 = w_0^{-1} \left( \frac{d^n \phi}{d \xi} ( \xi_0 ) - \sum_{i\neq0} w_i \phi_i \right) + O(\Delta \xi^M w_0^{-1}) \]

As \(w_0^{-1}\) is of the order of \(\Delta \xi\), the extrapolation is of order \(M+1\) as excepted by the fact that the known derivative acts as a supplementary disretization point.

Warning
This principle only applies for extrapolation, ie. offcentered schemes. For example, the second order centered scheme with uniform spacing induces \(w_0=0\) as cross terms cancel. Hence, there is an infinite number of solution for \(\phi_0\) which is not what we seek.

Usage

This particular extrapolation relies on finite difference schemes. The ext_neumann_scheme type is a derivation of the fd_scheme. Concretely, the defined Neumann Extrapolation schemes are pointing to FD schemes.

Example
Extrapolate backwardly at a distance of \(0.23\) of \( x_1 \) values defined by phi_i, separated by steps dx_ij and knowing the derivative \(12\) at the extrapolation point, with a fourth order scheme:
result = ext_compute( ext_neumann_o4_forward_instance, 0.23d0, [ dx_12, dx_23 ], [ phi_1, phi_2, phi_3 ], 12.d0 )