Computing Blend Time on any Model

This guide will walk through how to setup your M-Star model to add a blend time calculation. We will use a scalar impulse injection in combination with a global variable reduction. We will track the relative standard deviation of an injected scalar in order to calculate blend time.

  • Inject scalar at 10s inside small box

  • Use Global variable to calculate relative standard deviation (RSD) of scalar over entire domain

  • Define custom stop condition on simulation to end simulation when RSD drops below 5.0

Add the Scalar

  1. Add a new Scalar component with a Cuboid primitive child geometry

  2. Select the new Cuboid child geometry object in the model tree

  3. Reduce the size of the cuboid so that is small in comparison to your bounding tank geometry

  4. Move the child cube geometry to a location in the tank far away from the impeller, usually near the top

  5. Select the scalar component created in step (1).

  6. Set the Child Geometry Value to 1

  7. Change Injection Time Span to Impulse

  8. Change Injection Impulse Time to 10.0

  9. Change the scalar name to “dye”

Add the Global variable

  1. Add a new Global Variable and select it in the model tree

  2. Rename it to dyeRSD

  3. Change Data Source to Fluid

  4. Change Reduction to RelStdDev

  5. Change Code to

    value = dye;
    

At this point, you can run the simulation. The current RSD value of the dye will be printed to the screen, as well as output to a statistics csv file. You can observe that at t=10 the scalar is injected, resuling in a large RSD value. As the model becomes well blended, the RSD value will drop.