<div dir="ltr">Dear PETSc developers            <div>Hi,            </div><div>Recently, I am using PETSc to write a one-dimensional hydrodynamics solver. At present, I use SNES object to complete the development of steady-state (excluding time term) program, and the result is very good. I want to continue with the dynamic solver, but have some problems. As shown in the attachment, I solve three conservation equations (partial differential equations), and use finite difference to separate one-dimensional meshes. The three main variables I solved are velocity V, pressure P, and energy E. therefore, I have the following question when writing transient programs using TS objects:            </div><div><br></div><div>1. Three equations correspond to three variables. I used <b>TSSetIfunction</b> to set the residual equation. In theory, I can use <b>Vec u_t</b> (time derivative of state vector) to set the time term. But the time term in <b>Eq1</b> is the time partial derivative of density <b>\ rho</b>. The density <b>\rho</b> is a function of energy E and pressure P. How to set this time term which is not a main variable, but an intermediate variable (<b>\rho (E, P)</b>))  which is composed of two main variables?</div><div>(In the equations, the direction of the mesh is z. g represents the acceleration of gravity. f_vis for resistance pressure drop, Q for heat source)            </div><div><br></div><div>I need some advices, if there are examples better.<br></div><div><br></div><div>Thanks,</div><div>Yingjie</div></div>