Adaptive Filtering Methods¶
The original filter implementation performed a 5 point fixed weighted averaged to each flow variable over the entire domain. The main motivation for new methods was the sensitivity to user input eps_filt. Effectively, the adaptive filtering scheme will adjust this parameter in space and time with the intention of performing minimal filtering to control the oscillatory instability of the numerical method.
Spatial Detection and Limitations¶
A similar weighted averaged is applied as a high-pass filter to the solution array. This high frequency information is then used to determine a two delta mode correlation. Three and four delta correlations where tested and determined to be insignificant compared to two-delta oscillations.
Time Variation¶
The filter statistic outputted to the user (see below) are an indication of the time variation of the scheme. It should be expected that the maximum filter weights will increase at the onset of simulation due to the initial conditions and solution values close to zero. A Proportional-Integral_Derivative (PID) controller is implemented to adjust the filter weights according to the following equation:
Where e(t) is the expected correction and constants are user inputs filt_gain, t_integ, and t_deriv.
Monitoring the Adaptive Scheme¶
With the addition of the adaptive filtering performed during runtime, a new output file has been added to deliver statistics to the user filt.dat. This file contain binary data for the time variation, volume statistics of the filter operator. To view the data in a formatted fashion, an accompanying program is included for post-processing convert_filt.
convert_filt [-a] [-r n_start n_end] [-s n_skip]
Recommended:
convert_filt -s 10
The command line arguments allow users to select all(--all/-a) statistics, a time range(--range/-r) and a skip factor(--skip/-s). Note that the arguments are in terms of time steps. It is generally recommended that a skip factor is applied. If no arguments are provided, the user will be prompted.
Three separate filter statistics are outputted for each direction.
filt_wt: | Maximum filter weights |
---|---|
filt_ex: | Fraction of the domain exceeding filt_wt |
filt_xs: | Average excess over target oscillation value (osc_max) |
Additional Control¶
Additional possible inputs (SEE User Input Variables) for filter control are listed below:
osc_max: | Maximum relative oscillation amplitude allowed. (DEFAULT: 0.02) |
---|---|
filt0: | Initial filter weight (DEFAULT: 0.01) |
filt_gain: | Filter proportional time constant (DEFAULT: 0.10) |
t_integ: | Filter integral time constant (DEFAULT OFF: 0.0) |
t_deriv: | Filter derivative time constant (DEFAULT OFF: 0.0) |
Restarting From OLD Outputs¶
The new implementation does not allow restarting with an old header file! The dynamic filter weights are a mandatory section of the header file. Filter weights are named (filt_wt_[x/y/z][1-8]) or more simply use an old version of the code!
git checkout 382281d50dde
make clean
make cgcam