Hi all,

as an addition to this post, For Dirichlet condition that are in the weak 
form, would this have to be done?

And for example, for an inhomogeneous normal component of the normal stress 
condition in step-22 for Stokes (1st of the partial bc discussion in the 
tutorial), do you also have to initialise local_rhs? I have a similar 
condition for the top boundary with the Stokes equation but can't quite 
figure out if the pressure should equal the normal component of the normal 
stress or not (if the stress tensor/velocity is non-zero, then it shouldn't 
equal the inhomogeneous condition input?)

Thanks


On Thursday, March 14, 2019 at 3:13:59 PM UTC, [email protected] wrote:
>
> Note that I think this was the issue. 
>
> You would need to put local_rhs = 0 within the part below to apply the 
> Dirichlet condition. Please do let me know if you think this is wrong but I 
> am getting the correct output. Thanks
>
> for (unsigned int face_no=0;
> face_no<GeometryInfo<dim>::faces_per_cell;
> ++face_no)
> if (cell->face(face_no)->at_boundary()
> &&
> (cell->face(face_no)->boundary_id() == 1)) // top has boundary id 1 
> On Thursday, March 14, 2019 at 2:24:55 PM UTC, [email protected] 
> wrote:
>>
>> Hi Wolfgang, Sorry for the reply - for some reason i didn't get the 
>> notification. 
>>
>> What i mean by correct is that I do have two uncoupled equations, but 
>> that it is correct in that I had already verified it using what you 
>> suggested (by using exact solutions - MMS).
>>
>> By it fails, I mean that the top pf value output is not equal to pr as it 
>> should be, which I set in the weak form as in my first message in my 
>> thread: 
>>
>> local_rhs(i) += -( fe_face_values_pf[velocities].value (i, q) *
>> fe_face_values_pf.normal_vector(q) *
>> pr_boundary_values[q] *
>> fe_face_values_pf.JxW(q));
>>
>>  this is in the same way as step-20.
>>
>> I have now done further tests by just letting pr_boundary_values[q] to 
>> 1.0 in the blurb copied here - I do not get 1.0 as my value for the 
>> solution for pf  on boundary with id 1, which I believe I should get. (i 
>> get something close but not 1.0. eg 0.96......)
>>
>> I am now wondering whether I am doubling up on the local_rhs in the 
>> assembling of cells on the boundary. To clarify, in step-20, f = 0 so that 
>> in the rhs_values, there is nothing added to the cells on the boundary 
>> other than that which is put in the boundary condition. for my problem, f 
>> is not equal to zero, so I am wondering whether I have extra contributions 
>> to the cells on the boundary and that's where the difference comes from. 
>>
>> Thank you for your help.
>>
>>
>>
>>
>>
>>
>>
>>
>> On Friday, February 22, 2019 at 10:51:11 PM UTC, Wolfgang Bangerth wrote:
>>>
>>> On 2/22/19 4:32 AM, [email protected] wrote: 
>>> > 
>>> > Wolfgang, so that's exactly what I had done with MMS, and that was 
>>> > verified, so i assumed the way i was imposing it was correct. 
>>>
>>> When you say "correct", you mean that you have two uncoupled equations? 
>>>
>>>
>>> > It then 
>>> > fails to get the correct value at the top. Initially, it's correct up 
>>> to 
>>> > about 4 decimal places, then to 2, then to the unit value. 
>>>
>>> Try to be precise. When you say "It then fails...", what has changed? 
>>> Above you say that things are correct, and now they are no longer. What 
>>> changes have you made in between? And what is "then to 4,... then to 2" 
>>> -- you are suggesting that something changes form one step to the next, 
>>> but what is it? 
>>>
>>> Best 
>>>   W. 
>>>
>>> -- 
>>> ------------------------------------------------------------------------ 
>>> Wolfgang Bangerth          email:                 [email protected] 
>>>                             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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to