<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ks_c_5601-1987">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top: 0px; margin-bottom: 0px;"></p>
<div>Dear <span class="highlight" id="0.018810087967045086" name="searchHitInReadingPane">
PETSc</span>-user</div>
<p></p>
<p><br>
</p>
<p><span>I am Seungjin Seo, researcher of Korean Advanced Institute of Science and Technology, South Korea.</span></p>
<p><br>
</p>
<p>I am tring to understand the ex12.c in SNES examples, and I have a problem...</p>
<p>Could you give me some advise? Is there any good description or materials for PetscFE and DMPlex?
</p>
<p> </p>
<p>I will make a code with unstructured grid with PetscFE and SNES. My geometry is a rectangle mesh (the size is not fixed so I think this is unstructured grid).</p>
<p>The equation is </p>
<p>I will set boundry conditions as follow;</p>
<p> 1. (Top-side boundary) Neumann boundary </p>
<p> 2. (Bottom-side boundary) Neumann boundary</p>
<p> 3. (Left-side boundary) Dirichlet boundary</p>
<p> 4. (Right-side boundary) Dirichlet boundary</p>
<p><br>
</p>
<p>In example ex12.c in SNES, load vector f is defiend as f_0, and neumann boundary condition is defined as f_bd_0. f_1 means the test function gradient term. The example set general type of neumann boundary condition on f_bd_0, but I want to set each boundary
condition individually. Could you give me some advise? </p>
<p><br>
</p>
<p>Thansk for reading my email.</p>
<p><br>
</p>
<p>Best regard,</p>
<p>Seungjin Seo</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>º¸³½ »ç¶÷:</b> Smith, Barry F. <bsmith@mcs.anl.gov><br>
<b>º¸³½ ³¯Â¥:</b> 2017³â 12¿ù 21ÀÏ ¸ñ¿äÀÏ ¿ÀÈÄ 3:46:42<br>
<b>¹Þ´Â »ç¶÷:</b> ¼½ÂÁø (±â°èÇ×°ø¹×¿øÀڷ°øÇкÎ)<br>
<b>ÂüÁ¶:</b> petsc-users@mcs.anl.gov<br>
<b>Á¦¸ñ:</b> Re: [petsc-users] I have a question for PETSc example</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"><br>
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.<br>
<br>
Barry<br>
<br>
<br>
> On Dec 21, 2017, at 12:27 AM, ¼½ÂÁø (±â°èÇ×°ø¹×¿øÀڷ°øÇкÎ) <mistloin@unist.ac.kr> wrote:<br>
> <br>
> Dear PETSc-user<br>
> <br>
> <br>
> I am Seungjin Seo, researcher of Korean Advanced Institute of Science and Technology, South Korea.<br>
> <br>
> <br>
> <br>
> I am trying to solve thermal and fluid equations within a porous structure.<br>
> The thermal equation includes a non-linear term of pressure and the fluid equation has a boundary condition using temperature gradient.<br>
> 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?<br>
> Many examples solve only one PDF instead of coupling several physics.<br>
> Please recommend me which solver is appropriate for my case?<br>
> <br>
> Best regards,<br>
> Seungjin Seo<br>
<br>
</div>
</span></font></div>
</body>
</html>