# Divergence¶

The divergence operator calculates the divergence $r$ of a source vector $\mathbf{s}$.

$\mathbf{r} = \nabla \cdot \mathbf{s}$

Therefore the derivative is performed on radial basis functions (see Radial Basis Funtions). The theoretical background of the implemented RBF interpolation scheme is published in 1. When using the conservative filters please provide a citation in you publication:

Schoder, Stefan, et al. "Aeroacoustic source term computation based on radial basis functions." International Journal for Numerical Methods in Engineering (2020).

The filter is defined as following in the CFSdat xml input:

<differentiation type="SpaceDifferentiation_Divergence" inputFilterIds="input" id="divergence">
<RBF_Settings epsilonScaling="..." betaScaling="..." kScaling="..." logEps="..."/>
<targetMesh>
<hdf5 fileName="targetMesh.h5"/>
</targetMesh>
<singleResult>
<inputQuantity resultName="..."/>
<outputQuantity resultName="..."/>
</singleResult>
<regions>
<sourceRegions>
<region name="..." />
</sourceRegions>
<targetRegions>
<region name="..."/>
</targetRegions>
</regions>
</differentiation>


In RBF_Settings, the following (optional and mandatory) attributes may be adjusted:

• epsilonScaling (mandatory): Controls the "smoothness" of the basis function. The smoother the Gauss-like surface is, the better the results will be BUT only until a certain number, when the matrix becomes so ill-conditioned, which will either result in an exception or very bad results. Typical values ~0.1

• betaScaling: Slope of the linear term that was added to the radial basic functions

• kScaling: constant term that was added to the radial basic functions

• logEps: Console output of [minimal distance, maximal distance, optimized epsilon]. NOTE: Should only be used for investigating the quality of the derivative, because it produces a LOT of console output.

## Acknowledgement¶

Please provide an acknowledgement at the end of your publication using this software part for simulations

The computational results presented have been achieved [in part] using the software openCFS [Divergence].

1. Stefan Schoder, Klaus Roppert, Michael Weitz, Clemens Junger, and Manfred Kaltenbacher. Aeroacoustic source term computation based on radial basis functions. International Journal for Numerical Methods in Engineering, 121(9):2051–2067, 2020.