Hong Zhang can give you more correct details but I can get you started.
Yes, you can use Petsc4py for this purpose. If you cannot provide a Jacobian then you should be able to use either a matrix-free solver for the Jacobian system or have PETSc build the Jacobian for you with finite differencing and coloring. Or if the problem is small just have PETSc brute force the Jacobian with finite differencing. > On Jan 20, 2022, at 5:13 PM, Xiong, Jing via petsc-users > <[email protected]> wrote: > > Hi, > > I hope you are well. > I'm very interested in PETSc and want to explore the possibility of whether > it could solve Differential-algebraic equations (DAE) in python. I know there > are great examples in C, but I'm struggling to connect the examples in > python. > > The only example I got right now is for solving ODEs in the paper: PETSc/TS: > A Modern Scalable ODE/DAE Solver Library. > And I got the following questions: > Is petsc4py the right package to use? > Could you give an example for solving DAEs in python? > Is Jacobian must be specified? If not, could your show an example for solving > DAEs without specified Jacobian in python? > > Thank you for your help. > > Best, > Jing
