Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-04-16 Thread Wolfgang Bangerth
On 4/15/19 9:51 AM, jane@jandj-ltd.com wrote: > > I can get a table if it would be useful. In the end, *you* need to convince yourself that something works or doesn't work. A table is a useful tool :-) > I see what you mean in terms of convergence. I guess I was looking for the >

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-04-15 Thread jane . lee
Hi Wolfgang, I can get a table if it would be useful. I see what you mean in terms of convergence. I guess I was looking for the accuracy pointwise on a boundary where the Dirichlet condition for the pressure is imposed weakly. In my case, the value of the output on the boundary was

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-04-15 Thread Wolfgang Bangerth
Jane, > I continued to find out why I wasn't getting the correct applied Dirichlet > values on the boundary for a code very similar to step-20, where the > Dirichlet > condition is applied weakly using > > for (unsigned int face_no=0; > face_no::faces_per_cell; > ++face_no) > if

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-04-13 Thread jane . lee
As an update to this thread (please let me know if you think i should start a new one): I continued to find out why I wasn't getting the correct applied Dirichlet values on the boundary for a code very similar to step-20, where the Dirichlet condition is applied weakly using for (unsigned int

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-19 Thread Wolfgang Bangerth
On 3/18/19 4:30 PM, jane@jandj-ltd.com wrote: > > To impose strongly - would you just > useVectorTools::compute_nonzero_tangential_flux_constraints with the > ZeroFunction? > or is there a function similar to compute_no_normal_flux_constraints? Yes, this will compute the constraints that

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-19 Thread jane . lee
Thanks Jean-Paul, I set n_components to dim and it ran. However, no difference whatsoever in the solution to when I was equivalently imposing in the weak form (where the tangential term disappears due to being zero), so I do continue to wonder whether the two are equivalent. Thank you On

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-19 Thread Jean-Paul Pelteret
Dear Jane, > const Functions::ZeroFunction no_tang_bcs; This should be const Functions::ZeroFunction no_tang_bcs(n_components); Best, Jean-Paul -- 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 ---

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-19 Thread jane . lee
In addition to above, I thought I'd try VectorTools::compute_ nonzero_tangential_flux_constraints: I did: std::set no_tang_flux_boundaries; no_tang_flux_boundaries.insert(1); const Functions::ZeroFunction no_tang_bcs; typename FunctionMap::type no_tang_map; no_tang_map[1] = _tang_bcs;

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-18 Thread jane . lee
No that's fair enough. I had thought the way I was doing it would be the equivalent of setting no tangential stresses. I actually also did it this way as I wasn't sure how you impose it strongly. To impose strongly - would you just use

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-18 Thread Wolfgang Bangerth
On 3/18/19 12:37 PM, jane@jandj-ltd.com wrote: > > For the u_t=0 condition, I had been imposing weak. So basically, I have > separated a Neumann boundary condition into: > n.[pI-2e] = (n.[pI-2e]n)n + (n.[pI-2e]t)t > and saying that the second term on the rhs is 0 so disappears, and the first

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-18 Thread jane . lee
Hi Wolfgang, step-20: Yes indeed I do agree that that is what I am doing. I guess I'm trying now to find out what else it could be that is producing: the correct boundary points as in the Dirichlet condition when local_rhs=0 is done again (overwriting), but the wrong boundary points when it

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-18 Thread Wolfgang Bangerth
Jane, > Ok, re the first step-20 bc issue, I'll have another think, but I still am > not > sure why then it isn't giving me the exact figure, whilst my suggestion is (I > understand your point here and I would have said I agreed with you, but my > implementation does work). I've verified

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-16 Thread jane . lee
Hi Wolfang, thanks for your time on this. Ok, re the first step-20 bc issue, I'll have another think, but I still am not sure why then it isn't giving me the exact figure, whilst my suggestion is (I understand your point here and I would have said I agreed with you, but my implementation does

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-16 Thread Wolfgang Bangerth
On 3/16/19 7:16 AM, jane@jandj-ltd.com wrote: > So that's what I meant by having extra contributions. I thought you needed a > local_rhs = 0 after/within: >          for (unsigned int face_n = 0; >               face_n < GeometryInfo::faces_per_cell; >               ++face_n) >            

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-16 Thread jane . lee
So that's what I meant by having extra contributions. I thought you needed a local_rhs = 0 after/within: for (unsigned int face_n = 0; face_n < GeometryInfo::faces_per_cell; ++face_n) if (cell->at_boundary(face_n)) {

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-15 Thread Wolfgang Bangerth
Jane, > 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 for (unsigned int i=0; i local_rhs(i) += -(fe_face_values[velocities].value (i, q) * > fe_face_values.normal_vector >

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-15 Thread jane . lee
>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;

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-14 Thread Wolfgang Bangerth
On 3/14/19 5:02 PM, jane@jandj-ltd.com 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

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-14 Thread Wolfgang Bangerth
Hi Jane, > I would think that it might be useful in the tutorial!! The same applies here: I deal with too much email to be clear about what "it" replies to :-) If you think "it" would be useful, can you make a concrete suggestion? > Please do let me know if you have any suggestions on a

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-14 Thread Wolfgang Bangerth
On 3/14/19 11:42 AM, jane@jandj-ltd.com wrote: > > 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

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-14 Thread jane . lee
Hi Wolfgang, I would think that it might be useful in the tutorial!! Please do let me know if you have any suggestions on a perhaps analogous question for step-22 in my other reply to this thread. I'm making the analogy between the dirichlet boundary condition implementation and the normal

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-14 Thread jane . lee
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

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-14 Thread Wolfgang Bangerth
On 3/14/19 9:13 AM, jane@jandj-ltd.com 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 That seems

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-14 Thread jane . lee
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::faces_per_cell; ++face_no) if

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-03-14 Thread jane . lee
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

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-02-22 Thread Wolfgang Bangerth
On 2/22/19 4:32 AM, jane@jandj-ltd.com 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

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-02-22 Thread jane . lee
Hi Both, Thanks for your replies. Daniel, the weak forms are as in the steps, but with Neumann ocnditions on boundaries other than the top. With the chosen spaces, I believe the problem is well-posed. Wolfgang, so that's exactly what I had done with MMS, and that was verified, so i assumed

Re: [deal.II] Accuracy of Dirichlet condition for p in step-20

2019-02-21 Thread Wolfgang Bangerth
> I am trying to solve a system of equations that do this: > Stokes to solve for v_r and p_r for one fluid (viscous rock), I use these > solutions on the RHS of a Darcy type equation solved like step-20 for the > pressure p_f in the fluid in the domain. Using the 3 solutions, I update >

[deal.II] Accuracy of Dirichlet condition for p in step-20

2019-02-06 Thread jane . lee
Hi all, I am trying to solve a system of equations that do this: Stokes to solve for v_r and p_r for one fluid (viscous rock), I use these solutions on the RHS of a Darcy type equation solved like step-20 for the pressure p_f in the fluid in the domain. Using the 3 solutions, I update another