Is it possible to have a patch react to the value of another patch, but only after a certain delay?
For example see the geometry depicted in de picture attached.
From the bottom of a mixing tank, fluid with a certain amount of contamination is (continuously) taken. This fluid is then processed, such that the contamination level changes. After about 30 seconds the fluid is be fed back into the tank.
---- additional_information ----
see discussion here: http://www.cfd-online.com/Forums/openfoam-solving/104408-delayed-response-limit-groovybcs-capabilities.html
Doable. Main thing to worry about would be efficient appending and recalling of time-data
Idea for the user interface would be that in variables it could be used like this (on patch inlet):
"Cout{outlet}=average(C*area()/(sum(area));"
"Cin=0.3*Cout;"
The variable would have to be declared as delayed similar to storedVariables
delayedVariable (
{
name Cout;
startupValue 0; // for the time when no data exists
delay 30;
}
);
Points of importance:
- make sure that the variable is not declared as a stored variable as well
- check what is easier: implement it for all data types or just scalars
Note: delay could be an expression, but this would be a source of user mistakes (negative delays). So is it necessary