4.2.2.3. pde.grids.operators.cylindrical_sym module

This module implements differential operators on cylindrical grids

make_laplace

make a discretized laplace operator for a cylindrical grid

make_gradient

make a discretized gradient operator for a cylindrical grid

make_divergence

make a discretized divergence operator for a cylindrical grid

make_vector_gradient

make a discretized vector gradient operator for a cylindrical grid

make_vector_laplace

make a discretized vector laplace operator for a cylindrical grid

make_tensor_divergence

make a discretized tensor divergence operator for a cylindrical grid

make_divergence(grid)[source]

make a discretized divergence operator for a cylindrical grid

The cylindrical grid assumes polar symmetry, so that fields only depend on the radial coordinate r and the axial coordinate z. Here, the first axis is along the radius, while the second axis is along the axis of the cylinder. The radial discretization is defined as \(r_i = (i + \frac12) \Delta r\) for \(i=0, \ldots, N_r-1\).

Parameters

grid (CylindricalSymGrid) – The grid for which the operator is created

Returns

A function that can be applied to an array of values

Return type

OperatorType

make_gradient(grid)[source]

make a discretized gradient operator for a cylindrical grid

The cylindrical grid assumes polar symmetry, so that fields only depend on the radial coordinate r and the axial coordinate z. Here, the first axis is along the radius, while the second axis is along the axis of the cylinder. The radial discretization is defined as \(r_i = (i + \frac12) \Delta r\) for \(i=0, \ldots, N_r-1\).

Parameters

grid (CylindricalSymGrid) – The grid for which the operator is created

Returns

A function that can be applied to an array of values

Return type

OperatorType

make_gradient_squared(grid, central=True)[source]

make a discretized gradient squared operator for a cylindrical grid

The cylindrical grid assumes polar symmetry, so that fields only depend on the radial coordinate r and the axial coordinate z. Here, the first axis is along the radius, while the second axis is along the axis of the cylinder. The radial discretization is defined as \(r_i = (i + \frac12) \Delta r\) for \(i=0, \ldots, N_r-1\).

Parameters
  • grid (CylindricalSymGrid) – The grid for which the operator is created

  • central (bool) – Whether a central difference approximation is used for the gradient operator. If this is False, the squared gradient is calculated as the mean of the squared values of the forward and backward derivatives.

Returns

A function that can be applied to an array of values

Return type

OperatorType

make_laplace(grid)[source]

make a discretized laplace operator for a cylindrical grid

The cylindrical grid assumes polar symmetry, so that fields only depend on the radial coordinate r and the axial coordinate z. Here, the first axis is along the radius, while the second axis is along the axis of the cylinder. The radial discretization is defined as \(r_i = (i + \frac12) \Delta r\) for \(i=0, \ldots, N_r-1\).

Parameters

grid (CylindricalSymGrid) – The grid for which the operator is created

Returns

A function that can be applied to an array of values

Return type

OperatorType

make_tensor_divergence(grid)[source]

make a discretized tensor divergence operator for a cylindrical grid

The cylindrical grid assumes polar symmetry, so that fields only depend on the radial coordinate r and the axial coordinate z. Here, the first axis is along the radius, while the second axis is along the axis of the cylinder. The radial discretization is defined as \(r_i = (i + \frac12) \Delta r\) for \(i=0, \ldots, N_r-1\).

Parameters

grid (CylindricalSymGrid) – The grid for which the operator is created

Returns

A function that can be applied to an array of values

Return type

OperatorType

make_vector_gradient(grid)[source]

make a discretized vector gradient operator for a cylindrical grid

The cylindrical grid assumes polar symmetry, so that fields only depend on the radial coordinate r and the axial coordinate z. Here, the first axis is along the radius, while the second axis is along the axis of the cylinder. The radial discretization is defined as \(r_i = (i + \frac12) \Delta r\) for \(i=0, \ldots, N_r-1\).

Parameters

grid (CylindricalSymGrid) – The grid for which the operator is created

Returns

A function that can be applied to an array of values

Return type

OperatorType

make_vector_laplace(grid)[source]

make a discretized vector laplace operator for a cylindrical grid

The cylindrical grid assumes polar symmetry, so that fields only depend on the radial coordinate r and the axial coordinate z. Here, the first axis is along the radius, while the second axis is along the axis of the cylinder. The radial discretization is defined as \(r_i = (i + \frac12) \Delta r\) for \(i=0, \ldots, N_r-1\).

Parameters

grid (CylindricalSymGrid) – The grid for which the operator is created

Returns

A function that can be applied to an array of values

Return type

OperatorType