Hi, I have made a two-phase flow code which computes motion of two phases in one dimension, where the phases are allowed to intermix. This code relies on a finite difference Jacobian computed using the standard coloring I get from the DMDA object:
da = PETSc.DMDA().create( dim=(N_vertical,), dof=3, stencil_width=1, ) I now want to add a variable for the interphase height L_z in addition to a velocity u_v, giving the velocity of the vapor flowing in to the interface. The interface will move throughout the grid, meaning that these two variables will not be coupled to a fixed set of grid cells, but will be coupled to different sets of three grid cells throughout the simulation. Questions: 1. Is it possible to create a custom coloring to efficiently compute the finite difference Jacobian including the interphase height and vapor velocity? 2. How do I revert to computing the full finite difference Jacobian with the purpose of testing if the interphase model works? Best regards, Eirik Jaccheri Høydalsvik Sintef ER and NTNU EPT