fix ave/euler/custom/temporal/steadystate command

fix ave/euler/custom/steadystate command (deprecated)

Warning

GPU support for this command has not been tested and may not work as expected.

Syntax

fix ID group-ID ave/euler/custom/temporal/steadystate euler_custom_temporal_keywords euler_custom_temporal_values keyword value
  • ID, group-ID are documented in fix command

  • ave/euler/custom/temporal/steadystate = style name of this fix command

  • euler_custom_temporal_keywords and euler_custom_temporal_values are documented in the fix ave/euler/custom/temporal command

  • zero or more keyword/value pairs may be appended

  • keyword = convergence_ratios_properties or convergence_ratios_variables or nconverged or variances_properties or variances_variables or window_size

convergence_ratios_properties values = b1 b2 ...
  b1 b2 ... = criteria for check of convergence for each property (same order)
convergence_ratios_variables values = b1 b2 ...
  b1 b2 ... = criteria for check of convergence for each variable (same order)
nconverged values = nconv
  nconv = number of successive, successful check
variances_properties values = v1 v2 ...
  v1 v2 ... = multiples of standard deviation that is counted as success for each property (same order)
variances_variables values = v1 v2 ...
  v1 v2 ... = multiples of standard deviation that is counted as success for each variable (same order)
window_size values = ws
  ws = size of window over which the convergence is estimated
display_proposed_values values = 'yes' or 'no'
  'yes' = Displays values for the choice of convergence ratios and variances
  'no' = Does not display values

Examples

fix 1 all ave/euler/custom/temporal/steadystate nevery 100 cell_size_relative 4.5 parallel no properties 1 vel variables 1 v_myVar mass weighting_factor 0.01 convergence_ratios_properties 0.9 convergence_ratios_variables 0.94 nconverged 10 variances_properties 2.0 variances_variables 1.5 window_size 20
fix 1 all ave/euler/custom/temporal/steadystate nevery 100 cell_size_relative 4.5 parallel no properties 2 vel vf enable_favre vector yes no convergence_ratios_properties 0.9 0.95 variances_properties 3.0 2.0 nconverged 1 window_size 30

Description

Calculates time and cell_based averages as described in fix ave/euler/custom/temporal .

_images/fastDEM_entire_simulation.png

The window_size property determines how many evaluations of this fix are used for the automatic steady state detection (Kelly and Hedengren) . At the beginning of a simulation window_size evaluations (= window_size * nevery timesteps) are run to determine an initial mean and standard deviation. In the next window_size evaluations each property k is checked if the current value fulfills |property[k] - mean[k]| < variances[k]*standard_deviation[k] with respect to the current grid cell values. Thus, the variances property defines the per-property limits for the variation in terms of multiples of the standard deviation. If the check above succeeds a per-cell success counter is incremented.

_images/fastDEM_window.png

At the end of window_size evaluations the convergence is estimated for each grid-cell and each parameter k according to three checks:

1.) |new_mean[k] - old_mean[k]| < variances[k]/2 * old_standard_deviation[k]

This check requires that the mean at the beginning and the end of a window vary from each other by at most a multiple of the standard deviation.

2.) new_standard_deviation[k] < (1 + variances[k]/4) * old_standard_deviation[k]

This check requires that the standard deviation at the end of a window is at most a certain multiple of the standard deviation at the beginning of a window.

3.) success counter[k] / window_size > convergence_ratios[k]

This check requires that the ratio of successful convergence tests over all tests is greater than the specified limit.

_images/fastDEM_checks.png

As can be seen criteria 1 and 2 also have parameters that are based on the variances parameter. This allows the convergence of quantities that are heavily oscillating.

_images/fastDEM_decision.png

Only if all three checks are successful for more than 98% of grid-cells (that have a particle volume fraction > 1e-5) and all parameters, a simulation is marked as successful. The property convergence_ratios as used in Check 1 is used to determine the percentage of the signal within the desired variance range in order to mark a cell as converged.

Finally the fix marks the simulation as converged if nconverged successive simulation checks are marked as successful.

Choosing the input values:

Several values are required to obtain convergence using this fix. In the following sensible default values are presented. This will be followed by showing how Aspherix® can help you choose appropriate parameters.

1.) nconverged: It is generally advisable to have at least two successive windows that exhibit convergence, thus a default value of 2 is sensible.

2.) nevery: The number of time steps that are used between averaging steps should be indicative of a typical (small) time scale of the flow.

3.) window_size: In case of a time-periodic simulation window_size * nevery should be equal to one (or better two) times the period of the system. In case of non-periodic simulations this value should be approximately 20 such that sufficient averaging can be performed inside a window.

4.) convergence_ratios_properties and convergence_ratios_variables: In general these numbers should be around 0.8 or higher. Higher values ensure better validity of the convergence. They are given for properties and variables, respectively and in the following generalized to convergence_ratios. For further details see below.

5.) variances_properties and variances_variables: Sensible values should be between 2 and 10 for this parameter. To increase validity of the convergence, choose these values as low as possible. They are given for properties and variables, respectively and in the following generalized to variances. For further details see below.

To simplify the choosing of the input values the display_proposed_values option was introduced to this fix. If it is set to ‘yes’ then after each time a window is completed a status message is shown which will help the user to choose appropriate values for both convergence_ratios and variances. An example for such a status message can be seen below:

Window end information: convergence not reached (convergence counter: 0 / 2)
Required values to reach convergence:
Field: vel (converged: no) | Convergence ratio: < 0.8000 (in: 0.9500) | Variance: > 2.000  (in: 2.000 )
Field: vf (converged: yes) | Convergence ratio: < 0.7500 (in: 0.7500) | Variance: > 4.000  (in: 4.000 )

The first line indicates that convergence has not been reached at this window, i.e. at least one field failed to converge. The convergence counter demonstrates how many successive windows have converged currently out of the nconverged ones requested by the respective parameter.

Field: vel (converged: no) | Convergence ratio: < 0.8000 (in: 0.9500) | Variance: > 2.000  (in: 2.000 )

This line indicates that the vel (velocity) component has not yet converged. The values in the brackets preceded by ‘in:’ are the values from the input script. The value ‘< 0.8000’ for the convergence ratio indicates that in order to reach convergence the convergence ratio for the velocity would need to be chosen less than 0.8, which is lower than 0.95 as specified in the input script. The variance on the other hand shows the same value as the one from the input. This implies that no modification is required to reach convergence.

Field: vf (converged: yes) | Convergence ratio: < 0.7500 (in: 0.7500) | Variance: > 4.000  (in: 4.000 )

This line indicates that vf (volume fraction) has already converged. As both values for convergence ratio and variance are equal to their input values no modification is required for them to reach convergence of this field.

Note

The proposed variance is computed by taking into account checks 1 and 2 but not check 3 which implicitly depends on this parameter as well. Changing the variances will also change the proposed convergence ratio.

Note

The proposed values might not make physical sense. Thus, the user should be aware of the range of sensible values for all properties as outlined above.

Restart, fix_modify, output, run start/stop

This fix writes all its relevant information into the restart file and thus, when restarted, will continue from its previous state.

This fix supports fix_modify with option average = ‘start’, ‘stop’ or ‘reset’ to start, stop or reset the averaging in between two runs. The option to reset the averaging is particularly useful when an initialization phase is occurring.

This fix computes the above-mentioned quantities for output via a dump euler/vtk/custom command. The values can only be accessed on timesteps that are multiples of nevery since that is when calculations are performed. The output of such a dump contains all cells of the grid with their respective value, mean and squared mean of each field. Additionally, the cell specific value and mean of the normalization variables count (particle count), mass and volume are dumped. Finally, for each field (e.g. v for velocity) a count_converged_*_ave field (e.g. count_converged_v_ave) is dumped, positive values of this parameter indicates the number of successive convergence of this field. Negative values on the other hand indicate why this field failed to converge. A value of -1 indicates failure with respect to the mean value check (see above), -2 indicates failure w.r.t. the variance check and -4 indicates failure w.r.t. the success counter check. Note that if a cell fails due to multiple reasons, these are added up (e.g. -3 indicates failure due to mean and variance).

This fix calculates a global scalar that returns 1 if nconverged checks were successful. It can be used for if and loop constructions to determine a converged state.

This fix additionally calculates a global vector with the following components:

1 : 0 / 1 indicated if convergence criteria satisfied for this time-step
2 : # of successive time-steps where convergence criteria have been met
3 : for first field: ratio of converged cells / number of cells (i.e. percentage of those that pass all checks)
4 : for first field: most frequent failure of convergence check as enumerated above (1 = mean, 2 = variance, 3 = success counter)
5 and further : (3) and (4) is repeated for any further field that is defined

No parameter of this fix can be used with the start/stop keywords of the run command.

Restrictions

Volume fractions and stresses are calculated based on the assumption of a structured (equidistant regular) grid, so volume fractions and stresses near walls that are not aligned with the grid will be incorrect.

Coarse-graining information:

Using coarsegraining in combination with this command might lead to different dynamics or system state and thus to inconsistencies. However, the influence of this model on the global dynamics or system state might be small so in some cases the results may be valid. This has to be reviewed by a specialist on a case-by-case basis.

Default

convergence_ratios_properties = 0.9, convergence_ratios_variables = 0.9, nconverged = 10, variances_properties = 3.0, variances_variables = 3.0, window_size = 10

References:

(Kelly) Kelly, Hedengren; A steady-state detection (SSD) algorithm to detect non-stationary drifts in processes (2013)