[petsc-users] Problem in using TS objects

Yingjie Wu yjwu16 at gmail.com
Mon Jan 27 06:01:45 CST 2020


Dear PETSc developers
Hi,
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:

1. Three equations correspond to three variables. I used *TSSetIfunction*
to set the residual equation. In theory, I can use *Vec u_t* (time
derivative of state vector) to set the time term. But the time term in *Eq1*
is the time partial derivative of density *\ rho*. The density *\rho* 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 (*\rho (E, P)*))  which is
composed of two main variables?
(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)

I need some advices, if there are examples better.

Thanks,
Yingjie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200127/23e70cb8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Equation.pdf
Type: application/pdf
Size: 25984 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200127/23e70cb8/attachment-0001.pdf>


More information about the petsc-users mailing list