# setting an applied shear stress at one boundary

4 messages
Open this post in threaded view
|

## setting an applied shear stress at one boundary

 Hi, I would like to investigate the 2D incompressible Navier-Stokes in a rectangular domain, driven by an applied shear stress (function of x) at one of its boundary. This is similar to the classical lid-driven cavity flow, except that here I would like to impose a prescribed shear stress (velocity derivative) instead of a velocity. I cannot see how to set this in the boundary dialog box of the App. Is it feasible? or programmatically? Thanks for your help, Frederic Moisy
Open this post in threaded view
|

## Re: setting an applied shear stress at one boundary

 Administrator Although, the stresses (Neumann) conditions aren't exposed in the Gui you can manually set them before solving on the Matlab command line. The boundary struct format and syntax is described in the corresponding section of the FEATool user's guide. For example, to set the x-stress for the driven cavity example to one can add the following lines before calling the solver (line 169 in ex_navierstokes2.m)Clear Dirichlet boundary conditions for u and v (components 1 and 2) on the top boundary (number 3):  fea.bdr.d{1}{3} = []; fea.bdr.d{2}{3} = []; Set resulting u and v Neumann boundary/shear stress conditions (nx*p+miu*(-2*nx*ux-ny*(uy+vx)) and ny*p+miu*(-nx*(vx+uy)-2*ny*vy)) for top boundary (number 3):  fea.bdr.n{1}{3} = 1e-3; fea.bdr.n{2}{3} = 0; 
 Administrator Frederic Moisy wrote Thank you very much, it works perfectly! It would be nice to also have this possibility directly from the dialog box. It is planned to eventually include a GUI feature to be able modify the resulting finite element forms which would enable this. Frederic Moisy wrote By the way, I realized a suspicious thing in your driven cavity example file: there is a unphysical velocity maximum in the lower left corner of the cavity. Since the driven cavity example does not include an outflow boundary, the pressure will only be known and uniquely defined up to a constant. This leads to a ill defined problem for the static lienar solver so to overcome this the pressure is fixed (to zero) at a single point if no outflow conditions are detected. This can also lead to an unphysical velocity at this point. Alternatively, one can also define the mean pressure which is done in the driven cavity m-file example with the imeanp flag  [fea,out] = ex_navierstokes2( 'imeanp', 1 ); this might lead to a more physical velocity at the cost of coupling all pressure nodes (which can lead to a more denser system matrix and expensive solution process).