<div dir="ltr">If you search for (-i) "boundary" in ts/ex11.c you will see several examples of setting BCs with ghost cells in FV.<div><br></div><div>Don't worry about hyperbolic per se. The PETSc interface is very abstract: G(x,xdot,t) = F(x,t), or something like that. You can decide which side of the equation to put each of your terms.</div><div><br></div><div>I'm not sure what you mean by derivatives of the context variables, but I see that FV does not seem to have the auxiliary variable support that FE has, where we take spatial derivatives of anything that you want.</div><div><br></div><div>If you want to have context variables in your cells so that you can take derivatives in your Riemann solver then you could add dummy variables to your system like Identity*q = Q. Then q would be in the L/R state variables.</div><div><br></div><div>Hope this helps,</div><div>Mark</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 20, 2020 at 5:28 AM Thibault Bridel-Bertomeu <<a href="mailto:thibault.bridelbertomeu@gmail.com">thibault.bridelbertomeu@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">Dear all,<div><br></div><div>I have been studying ex11.c from ts/tutorials to understand how to solve an hyperbolic system of equations using PETSCFV. I first worked on the Euler equations for inviscid fluids and based on what ex11.c presents, I was able to add the right PETSc instructions in an already existing in-house code with different gas models  to solve the problems in parallel (MPI) and with the AMR capabilities offered by P4EST.</div><div><br></div><div>Now my goal is to move to Navier-Stokes equations. Theoretically the system is not completely hyperbolic and can be seen as one with an hyperbolic part (identical to the Euler equations) and a parabolic part coming from the RHS diffusion terms.</div><div>I have been looking into the manual and also the sources of PETSc around the DM, DMPlex, DS and FV classes but I could not find anything that speaks to me as "adding a RHS to an hyperbolic system of equations" or "adding a source term to an hyperbolic system of equations". What's more, that source term depends on the derivatives of the context variables ... </div><div><br></div><div>I wanted to know if anyone maybe had a suggestion regarding this issue ?</div><div><br></div><div>Thank you very much in advance, </div><div><br clear="all"><div><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></div></div></div>
</blockquote></div>