Just some news on my research, i have finally found out how to impose the field of boundary condition using a loop.
I have attached my test file.