Re: [firedrake] RT/BDM works but not TH/VMS
Hi Justin, What is the form you are using for the VMS formulation? all the best --cjc On 13 November 2015 at 19:21, Justin Chang <jychang48@gmail.com> wrote:
Hi all,
So given this Darcy problem:
a = (dot(v, w) - p*div(w) - div(v)*q)*dx L = f*q*dx
where f = "12*pi*pi*sin(pi*x[0]*2)*sin(pi*x[1]*2)*sin(2*pi*x[2])" and with these solver options:
'ksp_type': 'gmres', #'ksp_monitor_true_residual': True, 'pc_type': 'fieldsplit', 'pc_fieldsplit_type': 'schur', 'pc_fieldsplit_schur_fact_type': 'upper', 'pc_fieldsplit_schur_precondition': 'selfp', 'fieldsplit_0_ksp_type': 'preonly', 'fieldsplit_0_pc_type': 'bjacobi', 'fieldsplit_0_sub_pc_type': 'ilu', 'fieldsplit_1_ksp_type': 'preonly', 'fieldsplit_1_pc_type': 'hypre', 'fieldsplit_1_pc_hypre_type': 'boomerang'
And without specifying any boundaries (my forcing function f is chosen so that the pressure is homogeneous on the boundary), RT0 and BDM works beautifully.
However, with Taylor-Hood elements and VMS (which is equal order CG1 plus a least squares stabilization), the velocity works but the pressure solution is screwed up.
Why is that?
Thanks, Justin
-- http://www.imperial.ac.uk/people/colin.cotter www.cambridge.org/9781107663916
V = VectorFunctionSpace(mesh,"CG",1) Q = FunctionSpace(mesh,"CG",1) W = V*Q v,p = TrialFunctions(W) w,q = TestFunctions(W) ... a = (dot(v, w) - p*div(w) - div(v)*q)*dx + 0.5*dot(v+grad(p),w+grad(q))*dx L = f*q*dx if that's what you're asking On Fri, Nov 13, 2015 at 1:48 PM, Colin Cotter <colin.cotter@imperial.ac.uk> wrote:
Hi Justin, What is the form you are using for the VMS formulation?
all the best --cjc
On 13 November 2015 at 19:21, Justin Chang <jychang48@gmail.com> wrote:
Hi all,
So given this Darcy problem:
a = (dot(v, w) - p*div(w) - div(v)*q)*dx L = f*q*dx
where f = "12*pi*pi*sin(pi*x[0]*2)*sin(pi*x[1]*2)*sin(2*pi*x[2])" and with these solver options:
'ksp_type': 'gmres', #'ksp_monitor_true_residual': True, 'pc_type': 'fieldsplit', 'pc_fieldsplit_type': 'schur', 'pc_fieldsplit_schur_fact_type': 'upper', 'pc_fieldsplit_schur_precondition': 'selfp', 'fieldsplit_0_ksp_type': 'preonly', 'fieldsplit_0_pc_type': 'bjacobi', 'fieldsplit_0_sub_pc_type': 'ilu', 'fieldsplit_1_ksp_type': 'preonly', 'fieldsplit_1_pc_type': 'hypre', 'fieldsplit_1_pc_hypre_type': 'boomerang'
And without specifying any boundaries (my forcing function f is chosen so that the pressure is homogeneous on the boundary), RT0 and BDM works beautifully.
However, with Taylor-Hood elements and VMS (which is equal order CG1 plus a least squares stabilization), the velocity works but the pressure solution is screwed up.
Why is that?
Thanks, Justin
-- http://www.imperial.ac.uk/people/colin.cotter
www.cambridge.org/9781107663916
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
On 13 Nov 2015, at 20:34, Justin Chang <jychang48@gmail.com> wrote:
V = VectorFunctionSpace(mesh,"CG",1) Q = FunctionSpace(mesh,"CG",1) W = V*Q v,p = TrialFunctions(W) w,q = TestFunctions(W) ... a = (dot(v, w) - p*div(w) - div(v)*q)*dx + 0.5*dot(v+grad(p),w+grad(q))*dx L = f*q*dx
if that's what you're asking
Taylor hood is unstable for darcy, no? In which case it's not surprising it breaks. For you VMS formulation do you not also have to incorporate a piece in the RHS? Also, the formulations I have seen have opposite signs on the velocity trial and test functions in the stabilisation term. But I'm only passingly familiar, so take these comments with a pinch of salt. Lawrence
On 13 Nov 2015, at 20:34, Justin Chang <jychang48@gmail.com> wrote:
V = VectorFunctionSpace(mesh,"CG",1) Q = FunctionSpace(mesh,"CG",1) W = V*Q v,p = TrialFunctions(W) w,q = TestFunctions(W) ... a = (dot(v, w) - p*div(w) - div(v)*q)*dx + 0.5*dot(v+grad(p),w+grad(q))*dx L = f*q*dx
if that's what you're asking
Plausibly also your boundary conditions are not applied correctly. In the hdiv-L2 formulation I would apply the pressure bcs weakly. But they're homogeneous, so those surface integral a vanish. Because the spaces match correctly this is enough. In the TH or VMS formulation to you have to explicitly apply the bcs strongly to the pressure variable? Lawrence
Silly me For VMS and TH I had to apply the homogeneous boundary conditions strongly. TH is stable, at least from my experience (although not preferred since it is not mass conservative). And yes I wrote the VMS formulation incorrectly, there is a minus sign indeed. Thanks, Justin On Fri, Nov 13, 2015 at 3:07 PM, Lawrence Mitchell < lawrence.mitchell@imperial.ac.uk> wrote:
On 13 Nov 2015, at 20:34, Justin Chang <jychang48@gmail.com> wrote:
V = VectorFunctionSpace(mesh,"CG",1) Q = FunctionSpace(mesh,"CG",1) W = V*Q v,p = TrialFunctions(W) w,q = TestFunctions(W) ... a = (dot(v, w) - p*div(w) - div(v)*q)*dx + 0.5*dot(v+grad(p),w+grad(q))*dx L = f*q*dx
if that's what you're asking
Plausibly also your boundary conditions are not applied correctly.
In the hdiv-L2 formulation I would apply the pressure bcs weakly. But they're homogeneous, so those surface integral a vanish. Because the spaces match correctly this is enough. In the TH or VMS formulation to you have to explicitly apply the bcs strongly to the pressure variable?
Lawrence
_______________________________________________ firedrake mailing list firedrake@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/firedrake
participants (3)
-
Colin Cotter
-
Justin Chang
-
Lawrence Mitchell