pg_utils.pg_model.expansion

Define expansions of the fields. The methods and classes in this file are mainly for expanding fields in polar coordinates, in the unit disk (\(s \in (0, 1), \phi \in (0, \pi)\)).

These utilities depend on coordinate variables in the PG formulation, but are not directly linked to PG variables. As a result, classes and methods in this file will no longer be bound to use with PG-formulation-specific classes such as CollectionPG, but work with general LabeledCollection class and its instances.

This is mostly for flexible implementation. For instance, in eigenvalue problems, the radial magnetic field at the boundary and the corresponding evolution equation is often replaced by B-fields in cylindrical coordinates at the boundary; Lorentz force terms may be combined into one single dynamical variable, etc.

Module Attributes

n

Integers denoting the indices of the radial and azimuthal bases

m

Integers denoting the indices of the radial and azimuthal bases

n_test

Index for the radial test functions

n_trial

Index for the radial trial functions

omega

Angular frequency

xi

Integration variable for the radial direction

xi_s

xi as a function of s

s_xi

s as a function of xi

pgvar_s

Radial placeholder functions of PG fields in 2-D disk.

cgvar_s

Radial placeholder functions for conjugate variables in 2-D disk.

reduced_var_s

Radial placeholder functions for reduced system in 2-D disk.

Functions

orth_pref_jacobi(pow_H, pow_s)

Form the basis given on the power of s and H This set of bases is guaranteed to form an orthogonal bases in an approriate Hilbert space.

placeholder_collection(names, notation, *vars)

Build collection of placeholder symbolic functions

Classes

ExpansionRecipe(identifier, fourier_expand, ...)

The top-level class used for spectral expansion, which defines the recipe concerning radial and azimuthal expansions.

FourierExpansions(argument, fields, ...)

Fourier expansion for fields

InnerProduct1D(*args)

1-D (integration) inner product \(\langle a, b \rangle\)

InnerProductOp1D(int_var, wt, bound[, conj])

Inner product defined on 1-D function space \(\langle \cdot, \cdot \rangle\)

RadialExpansions(fields, bases, coeffs, ...)

Radial expansions, a collection of radial expansions for each field in the collection of dynamical variables.

RadialInnerProducts(names, **inner_prod_op)

Collection of inner products

RadialTestFunctions(names, **test_functions)

Collection of radial functions used as test functions for reducing differential equations into algebraic form.

SpectralExpansion(fields, bases, coeffs, ...)

Base class for different kinds of spectral expansions

SystemEquations(names, expansion_recipe, ...)

The top-level class for system of equations to be solved The equations are always assumed to be written in the first-order form in time, i.e. LHS = d()/dt.

SystemMatrix(*args, **kwargs)

System matrix