Auxiliary Dependent Variables and Residence Time
Auxiliary dependent variables are additional degrees of freedom that can be defined on each particle and used to solve additional first-order ordinary differential equations along each particle trajectory. They can be used to help keep track of things like residence time, particle trajectory length, integrated shear rate, and so forth. When an Auxiliary Dependent Variable feature is added to the physics interface an additional ordinary differential equation is solved for each particle.
To compute the residence time of particles:
1
From the Physics toolbar, Global menu, select Auxiliary Dependent Variable.
2
In the Settings window for Auxiliary Dependent Variable, Auxiliary Dependent Variable section, enter 1 in the R field.
For each particle, the differential equation
is solved, and so the variable rp represents the residence time.
To compute the length of the particle trajectories:
3
In the Auxiliary Dependent Variable section, from the Integrate list, select Along particle trajectory.
The following differential equation is now solved for each particle:
and so the variable rp is now the total length of the particle trajectory. The initial values for the auxiliary dependent variables are set in the release features included in the model.
By defining an appropriate source term, it is possible to evaluate the time integral or path integral of any quantity that is known at the particle’s position. It is also possible to change the value of an auxiliary dependent variable discontinuously when a particle interacts with a boundary by entering an expression for the new value in the New Value of Auxiliary Dependent Variables section of the settings window for the Wall node. The new value of an auxiliary dependent variable may be defined recursively, for example, to count collisions of a particle with the surrounding walls. In addition, the value of an auxiliary dependent variable can be changed when the Velocity reinitialization condition specified in a Velocity Reinitialization feature is satisfied, enabling the variable to be reinitialized at any location within a domain.
Several built-in features are available for creating auxiliary dependent variables for quantities that are frequently used. For example, the Compute particle mass and Compute particle temperature check boxes in the settings window for The Particle Tracing for Fluid Flow Interface create auxiliary dependent variables for the particle mass and temperature, respectively. Several built-in features are available for applying heat sources to the particles when the particle temperature is computed.
The residence time can also be computed in a different way by selecting the Store particle status data check box. This creates variables for the particle release time and the particle stop time (the time when a particle freezes or sticks to a boundary, or leaves the modeling domain altogether). The residence time is then simply the difference between the two.
It is also possible to integrate a quantity over time by using the timeint() operator. The expression timeint(t1,t2,expr) evaluates the integral of the expression expr from initial time t1 to final time t2. The accuracy of the integral depends on the total number of time steps taken by the solver. The timeint() operator offers a convenient way to evaluate the integrals of many different quantities without recomputing the solution.
timeint and timeavg in the COMSOL Multiphysics Reference Manual