<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 30, 2024 at 1:49 PM Amneet Bhalla <<a href="mailto:mail2amneet@gmail.com">mail2amneet@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I think the nullspace for the velocity operator is of the form <div><br></div><div><span><span style="font-style:italic">v<sub><span style="font-size:92%">null</span></sub> = U + ω × r</span></span></div><div>in which <span><span style="font-style:italic">U</span></span> is a rigid body velocity and <span><span style="font-style:italic">ω</span></span> is the rigid body rotational velocity, and <span><span style="font-style:italic">r</span></span> is the radius vector from the center of mass. I believe I need to construct 6 nullspace vectors in 3D and 3 nullspace vectors in 2D. Sounds correct? </div></div></blockquote><div><br></div><div>yes</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Also does the center of mass coordinates matter when defining <span><span style="font-style:italic">r</span></span>? </div></div></blockquote><div><br></div><div>no, but this would be good for conditioning, which I've never seen being an issue.</div><div>You can just coordinate as r. That is the origin is your "center of mass".</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 30, 2024 at 7:53 AM Amneet Bhalla <<a href="mailto:mail2amneet@gmail.com" target="_blank">mail2amneet@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">@Mark: Is there some document/paper that I can follow to check the algebra of these zero eigenvectors/null space modes? <div><br></div><div>@Jed : We use a projection method preconditioner to solve the coupled velocity pressure system as described here (<a href="https://urldefense.us/v3/__https://www.sciencedirect.com/science/article/pii/S0021999123004205__;!!G_uCfscf7eWS!dQPSeiutdub0FrPQ-gswdIQg7lOPRtrx-WocvHMu2ULBMuYLTKOxD_tE709brtLs8GY5uJVTOApLX6lrX3ZWoA8$" target="_blank">https://www.sciencedirect.com/science/article/pii/S0021999123004205</a>). It is an approximation of the Schur complement. As a part of projection preconditioner, we need to solve just the momentum equation separately without considering the pressure part. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 29, 2024 at 8:03 PM Jed Brown <<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">And to be clear, we recommend using fieldsplit Schur to separate the pressure and velocity part (there are many examples). Applying AMG directly to the saddle point problem will not be a good solver because the heuristics assume positivity and do not preserve inf-sup stability (nor do standard smoothers).<br>
<br>
Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> writes:<br>
<br>
> This is linear elasticity and there are 6 "null" vectors (if you removed<br>
> Dirichlet boundary conditions these are eigenvectors with zero eigenvalue):<br>
> 3 translations, x, y, z, and three rotatiions xx, yy ,zz.<br>
> x = (1,0,0,1,0,0,1,0 ...)<br>
> and xx is something like (0, z_1, -y_1, 0, z_2, -y_2, ...) where z_1 is the<br>
> z coordinate of the first vertex, etc.<br>
><br>
> Mark<br>
><br>
> On Tue, Oct 29, 2024 at 3:47 PM Amneet Bhalla <<a href="mailto:mail2amneet@gmail.com" target="_blank">mail2amneet@gmail.com</a>> wrote:<br>
><br>
>> Hi Mark,<br>
>><br>
>> Thanks! I am not sure how to construct null space and zero energy modes<br>
>> manually for this operator. Is there some theory or documentation I can<br>
>> follow to figure out what the null space and zero energy modes look like<br>
>> for this operator? Once I know what these are in symbolic form, I think I<br>
>> should be able to construct them manually.<br>
>><br>
>> Best,<br>
>> --Amneet<br>
>><br>
>> On Tue, Oct 29, 2024 at 7:35 AM Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> wrote:<br>
>><br>
>>> Oh my mistake. You are using staggered grids. So you don't have a block<br>
>>> size that hypre would use for the "nodal" methods.<br>
>>> I'm not sure what you are doing exactly, but try hypre and you could<br>
>>> create the null space, zero energy modes, manually, attach to the matrix<br>
>>> and try GAMG.<br>
>>> You can run with '-info :pc' and grep on GAMG to see if GAMG is picking<br>
>>> the null space up (send this output if you can't figure it out).<br>
>>><br>
>>> Thanks,<br>
>>> Mark<br>
>>><br>
>>> On Tue, Oct 29, 2024 at 9:28 AM Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> wrote:<br>
>>><br>
>>>> This coordinate interface is just a shortcut for vertex based<br>
>>>> discretizations with 3 dof per vertex, etc. (maybe works in 2D).<br>
>>>> You will need to construct the null space vectors manually and attach it<br>
>>>> to the matrix. Used by GAMG.<br>
>>>><br>
>>>> Note, for hypre you want to use the "nodal" options and it does not use<br>
>>>> these null space vectors. That is probably the way you want to go.<br>
>>>> eg: -pc_hypre_boomeramg_nodal_coarsen<br>
>>>><br>
>>>> I would run with hypre boomerang and -help and grep on nodal to see all<br>
>>>> the "nodal" options and use them.<br>
>>>><br>
>>>> Thanks,<br>
>>>> Mark<br>
>>>><br>
>>>><br>
>>>> On Mon, Oct 28, 2024 at 8:06 PM Amneet Bhalla <<a href="mailto:mail2amneet@gmail.com" target="_blank">mail2amneet@gmail.com</a>><br>
>>>> wrote:<br>
>>>><br>
>>>>> Hi Folks,<br>
>>>>><br>
>>>>> I am trying to solve the momentum equation in a projection<br>
>>>>> preconditioner using GAMG or Hypre solver. The equation looks like for<br>
>>>>> velocity variable *v* looks like:<br>
>>>>><br>
>>>>><br>
>>>>> [image: Screenshot 2024-10-28 at 4.15.17 PM.png]<br>
>>>>><br>
>>>>> Here, μ is spatially varying dynamic viscosity and λ is spatially<br>
>>>>> varying bulk viscosity. I understand that I need to specify rigid body<br>
>>>>> nullspace modes to the multigrid solver in order to accelerate its<br>
>>>>> convergence. Looking into this routine MatNullSpaceCreateRigidBody() (<br>
>>>>> <a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Mat/MatNullSpaceCreateRigidBody/__;!!G_uCfscf7eWS!bVR6duCoDqPhZrWS-sm1c5qxsFPjZMhdT86AqLpPzWgVy5qoRhd4_Jue2LJOIS6LRrtV2cHGrqger1Yvb-Y5f-0$" rel="noreferrer" target="_blank">https://urldefense.us/v3/__https://petsc.org/release/manualpages/Mat/MatNullSpaceCreateRigidBody/__;!!G_uCfscf7eWS!bVR6duCoDqPhZrWS-sm1c5qxsFPjZMhdT86AqLpPzWgVy5qoRhd4_Jue2LJOIS6LRrtV2cHGrqger1Yvb-Y5f-0$</a> <br>
>>>>> <<a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/Mat/MatNullSpaceCreateRigidBody/__;!!G_uCfscf7eWS!eKqgIJjCdMzIU76f7X65AmGxrU_-lC7W02BMWafJ77DNf_IuQk6O1X3qU1x9Ez8NJ20vZEL-mF6T1yNmDnwv0eWa2w$" rel="noreferrer" target="_blank">https://urldefense.us/v3/__https://petsc.org/release/manualpages/Mat/MatNullSpaceCreateRigidBody/__;!!G_uCfscf7eWS!eKqgIJjCdMzIU76f7X65AmGxrU_-lC7W02BMWafJ77DNf_IuQk6O1X3qU1x9Ez8NJ20vZEL-mF6T1yNmDnwv0eWa2w$</a>>),<br>
>>>>> I see that I need to provide the coordinates of each node. I am using<br>
>>>>> staggered grid discretization. Do I need to provide coordinates of<br>
>>>>> staggered grid locations?<br>
>>>>><br>
>>>>> Thanks,<br>
>>>>> --<br>
>>>>> --Amneet<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>><br>
>><br>
>> --<br>
>> --Amneet<br>
>><br>
>><br>
>><br>
>><br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>--Amneet <br><br></div><div><br></div><div><br></div></div></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>--Amneet <br><br></div><div><br></div><div><br></div></div></div>
</blockquote></div></div>