modelling of a changing BC from wall to stagnation properties

hello
can the software do a changing in boundary conditions?
I want to model a tube that is closed in 3 edges but one edge have a wall that moves down at a constant velocity and gradually opens to a environment with stagnation pressure and stagnation temperature.how this BC can be performed? please guide me about openfoam too.
thank you very much.