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¶
Add a new Scalar component with a Cuboid primitive child geometry
Select the new Cuboid child geometry object in the model tree
Reduce the size of the cuboid so that is small in comparison to your bounding tank geometry
Move the child cube geometry to a location in the tank far away from the impeller, usually near the top
Select the scalar component created in step (1).
Set the Child Geometry Value to 1
Change Injection Time Span to Impulse
Change Injection Impulse Time to 10.0
Change the scalar name to “dye”
Add the Global variable¶
Add a new Global Variable and select it in the model tree
Rename it to dyeRSD
Change Data Source to Fluid
Change Reduction to RelStdDev
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.