# Inlet boundary conditions

**URL:** <https://community.freefem.org/t/inlet-boundary-conditions/613>\
**Category:** General Discussion\
**Created:** [October 12, 2020, 1:57pm UTC](https://community.freefem.org/t/inlet-boundary-conditions/613 "2020-10-12T13:57:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgkkr](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@sgkkr](https://community.freefem.org/u/sgkkr)\
**Post date:** [October 12, 2020, 1:57pm UTC](https://community.freefem.org/t/inlet-boundary-conditions/613/1 "2020-10-12T13:57:28Z")

</div>

I have a sparse values of the velocity field at the inlet of channel. I would like to interpolate the velocity field at the inlet over the fine grid mesh. I am using the interpolate command from FreeFem++ to use the information at a particular value of x (=0 at Inlet) and different values of y and interpolate that onto the fine grid defined on Wh space.

real[int] xx=[0., 0., 0., 0., 0., 0.,0.];  
real[int] yy=[0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4];  
matrix Ixx = interpolate(Wh,xx,yy,op=0,composante=0);

And then use for velocity, u[]=Ixx\*usp; where usp is of size 7 representing the sparse velocity values. So for the inlet velocity conditions I use on 1, ux=u, where 1 represents label for inlet. Is this the right way of implementing the boundary condition or there is an easy way of doing this?
