>What line of the code would that be? Do you think it would be wrong to 
just 
>*always* set local_rhs=0? 

Always setting local_rhs = 0 immediately before the below implementation 
would take into account all cases so that would be the best:

for (unsigned int q=0; q<n_face_q_points; ++q)
for (unsigned int i=0; i<dofs_per_cell; ++i)
local_rhs(i) += -(fe_face_values[velocities].value (i, q) *
fe_face_values.normal_vector 
<https://www.dealii.org/current/doxygen/deal.II/classFEValuesBase.html#a130eea0fa89263d93b20521addc830c7>(q)
 
*
boundary_values[q] *
fe_face_values.JxW 
<https://www.dealii.org/current/doxygen/deal.II/classFEValuesBase.html#ad097580a2f71878695096cc73b271b9d>
(q));

As for the Stokes case, I am making the analogy for the INHOMOGENEOUS 
normal component of normal stress boundary condition. \
You are right in that the no tangential stress condition requires nothing, 
but then i have a nonzero value of the normal component of the normal 
stress which needs to be in the weak form. 
I can't quite figure out if this is a "dirichlet' condition so I also set 
local_rhs = 0 before the boundary implementation, or whether it is just an 
extra addition for the cells on that boundary. 

On Friday, March 15, 2019 at 5:00:01 AM UTC, Wolfgang Bangerth wrote:
>
> On 3/14/19 5:02 PM, jane...@jandj-ltd.com <javascript:> wrote: 
> > 
> > I think just a comment in the bit on how to implement the dirichlet bc 
> in the 
> > weak form would be sufficient - something to say 'In the case of an 
> > inhomogeneous boundary condition, you would need to set local_rhs = 0 
> before 
> > adding the cell contributions for the boundary condition'. 
>
> What line of the code would that be? Do you think it would be wrong to 
> just 
> *always* set local_rhs=0? 
>
>
> > I'm still unsure about the step-22 condition, for the normal component 
> for the 
> > normal stress. Is this equivalent to a dirichlet condition on the 
> pressure 
> > only? I'm a little confused on this one and any thoughts would be 
> helpful. 
>
> The normal stress shows up in the weak form after integrating by parts 
> both 
> the div(2*eta*eps(u)) and the grad p terms. The term is going to be 
> something like 
>    (v, (2*eta*eps(u) - pI).n)_{Gamma} 
>
> So if you prescribe 
> * no normal flux 
> * no tangential stress 
> (i.e., "free slip"), then you will have: 
> * the normal component of v is zero 
> * the tangential component of (2*eta*eps(u) - pI).n is zero 
> As a consequence, the entire boundary term disappears, as you can see if 
> you 
> write the product of test function and normal stress as 
>    (v, s.n) = (v_n, (s.n).n) + (v_t, (s.n) x n) 
> (normal component plus tangential component of vectors), where the first 
> of 
> the two terms on the right disappears because v_n=0 and the second because 
> (s.n) x n = 0. 
>
> Best 
>   W. 
>
> -- 
> ------------------------------------------------------------------------ 
> Wolfgang Bangerth          email:                 bang...@colostate.edu 
> <javascript:> 
>                             www: http://www.math.colostate.edu/~bangerth/ 
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to