<div dir="ltr">Can you subcycle with IMEX?<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 8, 2022 at 10:58 AM Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@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"><div dir="ltr">On Sat, Jan 8, 2022 at 3:05 AM Thibault Bridel-Bertomeu <<a href="mailto:thibault.bridelbertomeu@gmail.com" target="_blank">thibault.bridelbertomeu@gmail.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>Le ven. 7 janv. 2022 à 19:45, Thibault Bridel-Bertomeu <<a href="mailto:thibault.bridelbertomeu@gmail.com" target="_blank">thibault.bridelbertomeu@gmail.com</a>> a écrit :<br></div><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>Le ven. 7 janv. 2022 à 19:23, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> a écrit :<br></div><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><div dir="ltr"><div dir="ltr">On Fri, Jan 7, 2022 at 12:58 PM Thibault Bridel-Bertomeu <<a href="mailto:thibault.bridelbertomeu@gmail.com" target="_blank">thibault.bridelbertomeu@gmail.com</a>> wrote:<br></div></div><div dir="ltr"><div class="gmail_quote"></div></div><div dir="ltr"><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><br></div><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 7 janv. 2022 à 14:54, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> a écrit :<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"><div dir="ltr">On Fri, Jan 7, 2022 at 8:52 AM Thibault Bridel-Bertomeu <<a href="mailto:thibault.bridelbertomeu@gmail.com" target="_blank">thibault.bridelbertomeu@gmail.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="auto">Hi Matthew,</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 7 janv. 2022 à 14:44, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> a écrit :<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"><div dir="ltr">On Fri, Jan 7, 2022 at 5:46 AM Thibault Bridel-Bertomeu <<a href="mailto:thibault.bridelbertomeu@gmail.com" target="_blank">thibault.bridelbertomeu@gmail.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>Dear all,</div><div><br></div><div>First of, happy new year everyone !! All the best !</div></div></blockquote><div><br></div><div>Happy New Year!</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>I am starting to draft a new project that will be about fluid-structure interaction: in particular, the idea is to compute the Navier-Stokes (or Euler nevermind) flow around an object and _at the same time_ compute the heat equation inside the object.</div><div>So basically, I am thinking a mesh of the fluid and a mesh of the object, both meshes being linked at the fluid - solid interface.</div></div></blockquote><div><br></div><div>First question: Are these meshes intended to match on the interface? If not, this sounds like overset grids or immersed boundary/interface methods. In this case, more than one mesh makes sense to me. If they are intended to match, then I would advocate a single mesh with multiple problems defined on it. I have experimented with this, for example see SNES ex23 where I have a field in only part of the domain. I have a large project to do exactly this in a rocket engine now.</div></div></div></blockquote><div dir="auto"><br></div><div dir="auto">Yes the way I see it is more of a single mesh with two distinct regions to distinguish between the fluid and the solid. I was talking about two meshes to try and explain my vision but it seems like it was unclear. </div><div dir="auto">Imagine if you wish a rectangular box with a sphere inclusion: the sphere would be tagged as a solid and the rest of the domain as fluid. Using Gmsh volumes for instance. </div><div dir="auto">Ill check out the SNES example ! Thanks !</div><div dir="auto"><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"><div class="gmail_quote"><div dir="auto"></div></div></div></blockquote><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 class="gmail_quote"><div dir="auto"></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>First (Matthew maybe ?) do you think it is something that could be done using two DMPlex's that would somehow be spawned from reading a Gmsh mesh with two volumes ?</div></div></blockquote><div><br></div><div>You can take a mesh and filter out part of it with DMPlexFilter(). That is not used much so I may have to fix it to do what you want, but that should be easy.</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> And on one DMPlex we would have finite volume for the fluid, on the other finite elements for the heat eqn ?</div></div></blockquote><div><br></div><div>I have done this exact thing on a single mesh. It should be no harder on two meshes if you go that route.</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>Second, is it something that anyone in the community has ever imagined doing with PETSc DMPlex's ?</div></div></blockquote><div><br></div><div>Yes, I had a combined FV+FEM simulation of magma dynamics (I should make it an example), and currently we are doing FVM+FEM for simulation of a rocket engine.</div></div></div></blockquote><div dir="auto"><br></div><div dir="auto">Wow so it seems like it’s the exact same thing I would like to achieve as the rocket engine example. </div><div dir="auto">So you have a single mesh and two regions tagged differently, and you use the DmPlexFilter to solve FVM and FEM separately ?</div></div></div></blockquote><div><br></div><div>With a single mesh, you do not even need DMPlexFilter. You just use the labels that Gmsh gives you. I think we should be able to get it going in a straightforward way.</div></div></div></blockquote><div dir="auto"><br></div><div dir="auto">Ok then ! Thanks ! I’ll give it a shot and see what happens ! </div><div dir="auto">Setting up the FVM and FEM discretizations will pass by DMSetField right ? With a single mesh tagged with two different regions, it should show up as two fields, is that correct ? </div></div></div></blockquote><div><br></div></div></div><div dir="ltr"><div class="gmail_quote"><div>Yes, the idea is as follows. Each field also has a label argument that is the support of the field in the domain. Then we create PetscDS objects for each</div><div>separate set of overlapping fields. The current algorithm is not complete I think, so let me know if this step fails.</div></div></div></blockquote><div dir="auto"><br></div></div></div><div><div class="gmail_quote"><div dir="auto">Ok, thanks. </div><div dir="auto">I’ll let you know and share snippets when I have something started !</div><div dir="auto"><br></div><div dir="auto">Talk soon ! Thanks !</div></div></div></blockquote><div dir="auto"><br></div><div dir="auto">Hi Matthew,</div><div dir="auto"><br></div><div dir="auto">I thought about a little something else : what about setting two different TS, one for each field of the DM ? Most probably the fluid part would be solved with an explicit time stepping whereas the solid part with the heat equation would benefit from implicit time stepping. TSSetDM does not allow a field specification, is there a way to hack that so that each field has its own TS ? </div></div></div></blockquote><div><br></div><div>I see at least two options here:</div><div><br></div><div>1. Split the problems:</div><div><br></div><div> You can use DMCreateSubDM() to split off part of a problem and use a solver on that. I have done this for problems with weak coupling.</div><div><br></div><div>2. Use IMEX</div><div><br></div><div> For strong coupling, I have used the IMEX TSes in PETSc. You put the explicit terms in the RHS, and the implicit in the IFunction.</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><div class="gmail_quote"><div dir="auto">Thanks</div><div dir="auto"><br></div><div dir="auto">Thibault</div><div dir="auto"><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><div class="gmail_quote"><div dir="auto"></div></div></div><div><div class="gmail_quote"><div dir="auto"><br></div><div dir="auto">Thibault</div><div dir="auto"><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"><div class="gmail_quote"><div dir="auto"></div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div></div></div><div dir="ltr"><div class="gmail_quote"><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><div class="gmail_quote"><div dir="auto">Thanks,</div><div dir="auto"><br></div><div dir="auto">Thibault</div><div dir="auto"><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"><div class="gmail_quote"><div dir="auto"></div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div></div></div><div dir="ltr"><div class="gmail_quote"><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><div class="gmail_quote"><div dir="auto">Thanks ! </div><div dir="auto"><br></div><div dir="auto">Thibault</div><div dir="auto"><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"><div class="gmail_quote"><div dir="auto"></div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div></div></div><div dir="ltr"><div class="gmail_quote"><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>As I said it is very prospective, I just wanted to have your opinion !!</div><div><br></div><div>Thanks very much in advance everyone !!</div><div><br></div><div>Cheers, <br></div><div>Thibault<br></div><div><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>
</blockquote></div></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><div><div><div><div>Thibault Bridel-Bertomeu<br>—<br></div></div></div></div>Eng, MSc, PhD</div><div>Research Engineer</div><div>CEA/CESTA</div><div>33114 LE BARP</div><div>Tel.: (+33)557046924</div><div>Mob.: (+33)611025322<br></div><div>Mail: <a href="mailto:thibault.bridelbertomeu@gmail.com" target="_blank">thibault.bridelbertomeu@gmail.com</a><br></div></div></div></div></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>
</blockquote></div></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><div><div><div><div>Thibault Bridel-Bertomeu<br>—<br></div></div></div></div>Eng, MSc, PhD</div><div>Research Engineer</div><div>CEA/CESTA</div><div>33114 LE BARP</div><div>Tel.: (+33)557046924</div><div>Mob.: (+33)611025322<br></div><div>Mail: <a href="mailto:thibault.bridelbertomeu@gmail.com" target="_blank">thibault.bridelbertomeu@gmail.com</a><br></div></div></div></div></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>
</blockquote></div></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><div><div><div><div>Thibault Bridel-Bertomeu<br>—<br></div></div></div></div>Eng, MSc, PhD</div><div>Research Engineer</div><div>CEA/CESTA</div><div>33114 LE BARP</div><div>Tel.: (+33)557046924</div><div>Mob.: (+33)611025322<br></div><div>Mail: <a href="mailto:thibault.bridelbertomeu@gmail.com" target="_blank">thibault.bridelbertomeu@gmail.com</a><br></div></div></div></div></div></div>
</blockquote></div></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><div><div><div><div>Thibault Bridel-Bertomeu<br>—<br></div></div></div></div>Eng, MSc, PhD</div><div>Research Engineer</div><div>CEA/CESTA</div><div>33114 LE BARP</div><div>Tel.: (+33)557046924</div><div>Mob.: (+33)611025322<br></div><div>Mail: <a href="mailto:thibault.bridelbertomeu@gmail.com" target="_blank">thibault.bridelbertomeu@gmail.com</a><br></div></div></div></div></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>
</blockquote></div>