Hi, your case is simillar to this post How to set the inlet gas velocity increasing linearly with time
In this post, there is a usr1.f file that is a user-defined function that you can modify and you must save it in the same location as your .mfx file. Para usarla debe tener activa la opción call_usr = .True. en tu archivo .mfx
I see that your file does not have input or output flows in the BC, first you must set it and change in line 52: BC_V_g (1) by index and the type of flow of the BC that appears in your .mfx
You can upgrade your UDF with IF, DO, WHILE, or whatever you want of Fortran.
Best Regards