I'm aiming to simulate a tracer pulse injection, I'm seeking if such boundary condition is already built into OpenFOAM or one needs to code it on his own.
Are you looking for a Gaussian distribution over time for the scalar value at the inlet? You can do that with the uniformFixedValue boundary condition. If it's something else please share more details.
I'm looking for a pulse Gaussian distribution of a scalar at the inlet for the first 2 s and not over all the simulation time. I went for a transient solver where a turbulence model and the averaged transport equation are used to simulate the flow. However, I'm not sure how to define the BC of the scalar at the inlet to simulate a normal injection. Eventually, calculate the RTD.
Taha Zier, if you have the function that represents your Gaussian distribution pulse you can implement that using uniformFixedValue BC. There's a usage example for a step function in the documentation:
Hope the above helps. If you can provide with the function you want to reproduce for the 0-2 seconds I would be happy to share a reproducible example. Please see the discussion below in case it is relevant: