# Function Series

This function uses a convolution of functional series (functional expansion or FX) to create a 1D, 2D, or 3D function

## Description

This Function is the workhorse of the Functional Expansion Tools module. It bridges the gap between the functional series and the associated coefficients. For example, it provides access to the orthonormalized function series that the UserObject classes need to evaluate a functional expansion. It also provides the standard function series that are required to couple FXs to the solvers (AuxKernels, BCs, etc...). As such, it is configured with correlation parameters. These includes physical boundaries, series types, and series' orders.

The coefficients are provided through implementing MutableCoefficientsFunctionInterface, and the function series are provided by composition (member variable) via CompositeSeriesBasisInterface.

note:Series normalization

There are generation_type and expansion_type parameters provided by FunctionSeries that are passed on to the single series (Zernike, Legendre, ...). The aforementioned parameters are MooseEnums with (at the time of writing) possible values of orthonormal, standard, and sqrt_mu. If the user does not make any specification in the input file, then generation_type defaults to orthonormal and expansion_type defaults to standard. Note that the combination of generation and expansion must together apply the square of the orthonormalization coefficient (see the work of David Griesheimer for more detail). sqrt_mu series generation/expansion applies the orthonormalization constant. orthonormal series generation/expansion applies the square of the orthonormalization constant. standard series generation/expansion does not apply any factor. Consequently, valid combinations include: 1) orthonormal for generation and standard for expansion (the default), 2) sqrt_mu for both generation and expansion, and 3) standard for generation and orthonormal for expansion. We suggest that users stick with the defaults unless coupling with external codes that require different normalizations.

## Example Input File Syntax

Listing 1: Example use of 1D Cartesian FunctionSeries

[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0  10.0'
x = Legendre
[../]
[]

(modules/functional_expansion_tools/examples/1D_volumetric_Cartesian/main.i)

Listing 2: Example use of 3D Cartesian FunctionSeries

[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3   4   5'
physical_bounds = '0.0  10.0    1.0 11.0    2.0 12.0'
x = Legendre
y = Legendre
z = Legendre
[../]
[]

(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian/main.i)

Listing 3: Example use of 3D cylindrical FunctionSeries

[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = CylindricalDuo
orders = '5   3' # Axial first, then (r, t) FX
physical_bounds = '-2.5 2.5   0 0 1' # z_min z_max   x_center y_center radius
z = Legendre # Axial in z
disc = Zernike # (r, t) default to unit disc in x-y plane
[../]
[]

(modules/functional_expansion_tools/examples/3D_volumetric_cylindrical/main.i)

Listing 4: Example of specifying custom normalization

[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0  10.0'
x = Legendre
generation_type = 'sqrt_mu'
expansion_type = 'sqrt_mu'
[../]
[]

(modules/functional_expansion_tools/test/tests/standard_use/volume_coupling_custom_norm.i)

## Input Parameters

• series_typeThe type of function series to construct.

C++ Type:MooseEnum

Options:Cartesian CylindricalDuo

Description:The type of function series to construct.

• ordersThe order of each series. These must be defined as "x y z" for Cartesian, and "z disc" for CylindricalDuo.

C++ Type:std::vector

Options:

Description:The order of each series. These must be defined as "x y z" for Cartesian, and "z disc" for CylindricalDuo.

### Required Parameters

• expansion_typestandardThe normalization used for expansion of the basis functions

Default:standard

C++ Type:MooseEnum

Options:orthonormal sqrt_mu standard

Description:The normalization used for expansion of the basis functions

• respect_timeFalseEnable to clear the cache at each new time step.

Default:False

C++ Type:bool

Options:

Description:Enable to clear the cache at each new time step.

• print_when_setFalsePrint the array of coefficients when set

Default:False

C++ Type:bool

Options:

Description:Print the array of coefficients when set

• physical_boundsThe physical bounds of the function series. These must be defined as "x_min x_max y_min y_max z_min z_max" for Cartesian, and "axial_min axial_max disc_center1 disc_center2 radius" for CylindricalDuo

C++ Type:std::vector

Options:

Description:The physical bounds of the function series. These must be defined as "x_min x_max y_min y_max z_min z_max" for Cartesian, and "axial_min axial_max disc_center1 disc_center2 radius" for CylindricalDuo

• enable_cacheFalseEnables cached function evaluations. Recommended only if this function is used directly in a BC or Kernel. This will be enabled automatically if any of the FX-based BCs are used.

Default:False

C++ Type:bool

Options:

Description:Enables cached function evaluations. Recommended only if this function is used directly in a BC or Kernel. This will be enabled automatically if any of the FX-based BCs are used.

• discThe series to use for the disc. Its direction is determined by orthogonality to the declared direction of the axis.

C++ Type:MooseEnum

Options:Zernike

Description:The series to use for the disc. Its direction is determined by orthogonality to the declared direction of the axis.

• coefficientsCoefficients required by the function.

C++ Type:std::vector

Options:

Description:Coefficients required by the function.

• yThe series to use for the y-direction.

C++ Type:MooseEnum

Options:Legendre

Description:The series to use for the y-direction.

• xThe series to use for the x-direction.

C++ Type:MooseEnum

Options:Legendre

Description:The series to use for the x-direction.

• zThe series to use for the z-direction.

C++ Type:MooseEnum

Options:Legendre

Description:The series to use for the z-direction.

• generation_typeorthonormalThe normalization used for generation of the basis function coefficients

Default:orthonormal

C++ Type:MooseEnum

Options:orthonormal sqrt_mu standard

Description:The normalization used for generation of the basis function coefficients

### Optional Parameters

• control_tagsAdds user-defined labels for accessing object parameters via control logic.

C++ Type:std::vector

Options:

Description:Adds user-defined labels for accessing object parameters via control logic.

• enableTrueSet the enabled status of the MooseObject.

Default:True

C++ Type:bool

Options:

Description:Set the enabled status of the MooseObject.