fix addforce/steadystate command

Warning

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

Syntax

fix ID group-ID addforce/steadystate euler_custom_keywords euler_custom_values state_0 ID-state_0
  • ID, group-ID are documented in fix command

  • addforce/steadystate = style name of this fix command

  • euler_custom_keywords and euler_custom_values are documented in the fix ave/euler/custom command

  • state_0 = obligatory keyword

  • ID-state_0 = ID of a fix ave/euler/custom/temporal/steadystate that defines the field values for the steady state

  • zero or more force keyword/value pairs may be appended

  • keyword = force_vel_factor or random_walk or force_boundary_vf

force_vel_factor values = fvf
  fvf ... = under-relaxation factor for integration (dimensionless value between 0 and 1)
random_walk values = yes or no
  yes / no = do or do not apply random walk to particle trajectories
force_boundary_vf values = no
  no = do not apply boundary force to keep particles within steady state area
force_boundary_vf values = yes limit limit_val  factor factor_val
  yes = do apply boundary force to keep particles within steady state area
  limit = obligatory
  limit_val = volume fraction limit where boundary force kicks in (dimensionless value between 0 and 1)
  factor = obligatory
  factor_val = force factor for boundary force (acceleration units)

Examples

fix steadystateforce all addforce/steadystate nevery 5000 cell_size_relative 1 parallel no &
                properties 1 vf state_0 statistics &
                force_vel_factor 0.9 random_walk no &
                force_boundary_vf yes limit 0.05 factor 20.

Description

As a minor feature, this fix calculates cell_based spatial and temporal averages as described in fix ave/euler/custom .

The key component of this fix is to add forces to the particles in the fix group and in the defined region (if the region keyword is used) so as to mimic the motion of the bulk in the steady state which is stored in by a fix ave/euler/custom/temporal/steadystate as defined by the state_0 keyword. The force exerted by this fix is calculated as

f = fvf*(v_steadystate-v_particle)*mass_particle/dt

where v_particle and mass_particle is the current particle velocity and mass, dt the timestep size, v_steadystate is the averaged velocity from the steady-state, and fvf is an under-relaxation factor between 0 and 1, which is defined via the force_vel_factor keyword.

Optionally, a “boundary volume fractionforce” can be added via the force_boundary_vf keyword to prevent the particles from exiting the area where statistics are available/stored in state_0, i.e. regions where the volume fraction stored in state_0 tends towards zero. This force is calculated if the temporally averaged value of volume fraction stored in state_0 at the estimated particle position a the next time-step (using Euler forward integration) is smaller than the threshold defined via force_boundary_vf limit. If this is the case, the particle loops over neighboring cells and every neighboring cell which shows a steady-state volume fraction > force_boundary_vf limit adds a force on the particle which is defined as

f_boundary = factor*e_cell_particle/norm*mass_particle/dt

where factor is recommended in the order of 1-5 gravity constants. e_cell_particle is a normalized vector pointing from the particle center to the center of the cell.

If the optional random_walk keyword is used, an additional fluctuation term is applied to the steady-state velocity v_steadystate for each particle. The fluctuation term is calculated component-wise in the x/y/z directions as

vel_stdev = sqrt(vel_msq-vel_steadystate^2)
vel_steadystate_fluctuation = rand_gauss*vel_stdev

where vel_msq is the mean-square values also stored in the averaging of state_0, and radn_gauss is a gaussian random number.

Warning

Care must be taken that usage of the random_walk feature may lead to incorrect extrapolation of sampled values over a too long time scale. A better approach (currently not implemented) might be to calculate the the statistical moment applicable for the physical law in question, and apply that statistical moment directly to the physical law.

The following requirements must be fulfilled:

  • This fix and the fix defined via state_0 must use the same underlying mesh

  • The fix defined via*state_0* must average both vf (volume fraction) and vel

Restart, fix_modify, output, run start/stop

This is writing information to binary restart files. To be able to resume a simulation run. None of the fix_modify options are relevant to this fix.

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.

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.

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

Restrictions

none

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

none