## [Libmesh-users] Stress-free outflow boundary condition in Navier-Stokes

 [Libmesh-users] Stress-free outflow boundary condition in Navier-Stokes From: David Knezevic - 2008-01-22 22:53:32 I'd like to implement the following boundary condition for the outflow of a channel: du/dn - n*p = 0, where n is the outward normal and p is the pressure. It seems to me that this BC would result in an extra boundary term $-\int_{\partial\Omega} n p \ds$ being added to the momentum equations? In my case the outward normal on the outflow boundary is n = (1,0). I tried to implement this BC using the following code in side_constraint: if (boundary_id == outflow_id) Fu(i) -= JxW_side[qp] * p * phi_side[i][qp]; if (boundary_id != outflow_id) Fv(i) += JxW_side[qp] * penalty * (v - v_value) * phi_side[i][qp]; if (boundary_id != outflow_id) Kuu(i,j) += JxW_side[qp] * penalty * phi_side[i][qp] * phi_side[j][qp]; if (boundary_id != outflow_id) Kvv(i,j) += JxW_side[qp] * penalty * phi_side[i][qp] * phi_side[j][qp]; where p = side_value(p_var, qp), plus there are other BCs not shown here for inflow and no-slip. This doesn't appear to work; the Newton convergence fails with these BCs. If anyone can point out how to properly implement this BC, I'd be most appreciative :) Cheers, David 

 [Libmesh-users] Stress-free outflow boundary condition in Navier-Stokes From: David Knezevic - 2008-01-22 22:53:32 I'd like to implement the following boundary condition for the outflow of a channel: du/dn - n*p = 0, where n is the outward normal and p is the pressure. It seems to me that this BC would result in an extra boundary term $-\int_{\partial\Omega} n p \ds$ being added to the momentum equations? In my case the outward normal on the outflow boundary is n = (1,0). I tried to implement this BC using the following code in side_constraint: if (boundary_id == outflow_id) Fu(i) -= JxW_side[qp] * p * phi_side[i][qp]; if (boundary_id != outflow_id) Fv(i) += JxW_side[qp] * penalty * (v - v_value) * phi_side[i][qp]; if (boundary_id != outflow_id) Kuu(i,j) += JxW_side[qp] * penalty * phi_side[i][qp] * phi_side[j][qp]; if (boundary_id != outflow_id) Kvv(i,j) += JxW_side[qp] * penalty * phi_side[i][qp] * phi_side[j][qp]; where p = side_value(p_var, qp), plus there are other BCs not shown here for inflow and no-slip. This doesn't appear to work; the Newton convergence fails with these BCs. If anyone can point out how to properly implement this BC, I'd be most appreciative :) Cheers, David 
 Re: [Libmesh-users] Stress-free outflow boundary condition in Navier-Stokes From: David Knezevic - 2008-01-22 23:02:16 > It seems to me that this BC would result in an extra boundary term $-\int_{\partial\Omega} n > p \ds$ being added to the momentum equations? > oops, I meant $-\int_{\partial\Omega} n p \phi \ds$ - David 
 Re: [Libmesh-users] Stress-free outflow boundary condition in Navier-Stokes From: Roy Stogner - 2008-01-22 23:02:58 On Tue, 22 Jan 2008, David Knezevic wrote: > I'd like to implement the following boundary condition for the outflow > of a channel: > du/dn - n*p = 0, > where n is the outward normal and p is the pressure. It seems to me that > this BC would result in an extra boundary term $-\int_{\partial\Omega} n > p \ds$ being added to the momentum equations? That seems right. > In my case the outward normal on the outflow boundary is n = (1,0). I > tried to implement this BC using the following code in side_constraint: > > if (boundary_id == outflow_id) > Fu(i) -= JxW_side[qp] * p * phi_side[i][qp]; > > if (boundary_id != outflow_id) > Fv(i) += JxW_side[qp] * penalty * > (v - v_value) * phi_side[i][qp]; > > if (boundary_id != outflow_id) > Kuu(i,j) += JxW_side[qp] * penalty * > phi_side[i][qp] * phi_side[j][qp]; > if (boundary_id != outflow_id) > Kvv(i,j) += JxW_side[qp] * penalty * > phi_side[i][qp] * phi_side[j][qp]; > > where p = side_value(p_var, qp), plus there are other BCs not shown > here for inflow and no-slip. This doesn't appear to work; the Newton > convergence fails with these BCs. If anyone can point out how to > properly implement this BC, I'd be most appreciative :) For the new Fu term, you'll need a corresponding Jacobian term. Try: if (boundary_id == outflow_id) Kup(i,j) -= JxW_side[qp] * psi_side[j][qp] * phi_side[i][qp]; --- Roy 
 [Libmesh-users] Stress-free outflow boundary condition in Navier-Stokes From: John Peterson - 2008-01-22 23:14:17 David Knezevic writes: > I'd like to implement the following boundary condition for the outflow > of a channel: > du/dn - n*p = 0, > where n is the outward normal and p is the pressure. It seems to me that > this BC would result in an extra boundary term $-\int_{\partial\Omega} n > p \ds$ being added to the momentum equations? Isn't this the natural boundary condition, assuming you integrated by parts on the pressure term? In that case I don't think you get any extra terms. -J > In my case the outward normal on the outflow boundary is n = (1,0). I > tried to implement this BC using the following code in side_constraint: > > if (boundary_id == outflow_id) > Fu(i) -= JxW_side[qp] * p * phi_side[i][qp]; > > if (boundary_id != outflow_id) > Fv(i) += JxW_side[qp] * penalty * > (v - v_value) * phi_side[i][qp]; > > if (boundary_id != outflow_id) > Kuu(i,j) += JxW_side[qp] * penalty * > phi_side[i][qp] * phi_side[j][qp]; > if (boundary_id != outflow_id) > Kvv(i,j) += JxW_side[qp] * penalty * > phi_side[i][qp] * phi_side[j][qp]; > > where p = side_value(p_var, qp), plus there are other BCs not shown > here for inflow and no-slip. This doesn't appear to work; the Newton > convergence fails with these BCs. If anyone can point out how to > properly implement this BC, I'd be most appreciative :) > > Cheers, > David 
 Re: [Libmesh-users] Stress-free outflow boundary condition in Navier-Stokes From: David Knezevic - 2008-01-23 13:10:52 > Isn't this the natural boundary condition, assuming you integrated by > parts on the pressure term? In that case I don't think you get any extra > terms. > Ah yes, you're right! I forgot about the integration-by-parts on the pressure term. It works now, thanks! - Dave