<div dir="ltr"><div dir="ltr">On Tue, Feb 14, 2023 at 9:25 AM Miguel Angel Salazar de Troya <<a href="mailto:miguel.salazar@corintis.com" target="_blank">miguel.salazar@corintis.com</a>> wrote:<br></div><div class="gmail_quote"><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>Hello,</div><div><br></div><div>I am solving the Navier-Stokes equation and an advection-diffusion equation to model the temperature. They are fully coupled because the viscosity is temperature dependent. I plan to solve the fully-coupled problem with a segregated approach: I first solve the Navier-Stokes equation for a fixed temperature and feed the velocity to the thermal equation, then use that temperature back in the Navier-Stokes equation to solve for the velocity again until I reach convergence. If I assemble the residual and jacobian for the fully coupled system with the proper fields section for the fieldsplit preconditioner (I am using Firedrake), is there a way to tell PETSc to solve the problem with a segregated approach?</div></div></blockquote><div><br></div><div>For a linear problem, this is easy using PCFIELDSPLIT. Thus you could use this to solve the Newton system for your problem. Doing this for a nonlinear problem is still harder because the top-level PETSc interface does not have a way to assemble subsets of the nonlinear problem. If you use a DMPlex to express the problem _and_ its callbacks to express the physics, then we can split the nonlinear problem into pieces. I am working with the Firedrake folks to develop a general interface for this. Hopefully we finish this year.</div><div><br></div><div>Right now, I think the easiest way to do the nonlinear thing is to write separate UFL for the two problems and control the loop yourself, or to just use the linear variation.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</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>Thanks,</div><div>Miguel<br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>