[petsc-users] I have a question for PETSc example
Smith, Barry F.
bsmith at mcs.anl.gov
Thu Dec 21 00:46:42 CST 2017
In deed you can, yes many PETSc examples only feature a single field for simplicity, but multiple fields are fine. You simple provide your FormFunction and FormJacobian to handle both degrees of freedom per cell/node at the same time. You use SNES or TS depending on if your problem is time dependent and then use -pc_type lu to start. Once you have the physics correct come back and ask us about optimizing the linear solver with preconditioners; but until you have the physics correct it is absurd to waste time worrying about making the linear solver efficient. What you want to do, many people do and is not a big deal.
Barry
> On Dec 21, 2017, at 12:27 AM, 서승진 (기계항공및원자력공학부) <mistloin at unist.ac.kr> wrote:
>
> Dear PETSc-user
>
>
> I am Seungjin Seo, researcher of Korean Advanced Institute of Science and Technology, South Korea.
>
>
>
> I am trying to solve thermal and fluid equations within a porous structure.
> The thermal equation includes a non-linear term of pressure and the fluid equation has a boundary condition using temperature gradient.
> Is there any way I can solve these two equations at the same time, instead of solving temperature first with previous pressure distribution and then pressure and update temperature?
> Many examples solve only one PDF instead of coupling several physics.
> Please recommend me which solver is appropriate for my case?
>
> Best regards,
> Seungjin Seo
More information about the petsc-users
mailing list