[Nek5000-users] Solving the Poisson equation in Nek5000

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Thu Dec 6 23:46:31 CST 2018


Dear Paul,

Thanks so much for your kind reply. Actually I have tried this approach before, where I used the passive scalar solver. The PS solver requires two parameters, namely the ‘density’ and ‘diffusivity’, then I set the ‘density’ to zero and ‘diffusivity’ to one, finally only the diffusive term and source term would be remained in the equation for this scalar, which seems very like a Poisson equation.

But in my case, I really need to solve such a Poisson-like equation in the ‘userchk’ subroutine during to the synchronization problem. From the former archive of mailing list in Nek5000, I noticed that some people have used the subroutine ‘hmholtz’ to obtain the stream function from vorticity. This subroutine has the following form ‘hmholtz(‘psi’, psi, rhs, h1, h2, tmask, tmult, imsh, tol, 200, 1)’, I understand that this solver need iteration to obtain ‘psi’, but I am confused about some other input parameters.

  1.  The first one is about ‘rhs’. I heard it must be multiplied by the ‘bm1’. For example, I want to solve ‘\nabla^2 psi = 1’, so I must set ‘call rone(rhs, n)’ and ‘call col2(rhs, bm1, n)’, right?
  2.  The second is about ‘psi’. In my case, this ‘psi’ has its own boundary conditions, including both Dirichlet and Neumann. To achieve this goal, I created an extra mesh for ‘psi’ in the box file, namely t(1,1,1,1,1) denoting ‘psi’, so the boundary conditions can be included. In my understanding, ‘tmask(1,1,1,1,ifield-1)’ denotes the boundary information for T-mesh ‘ifield-1’.
  3.  The third one is about ‘tmult’. What is the function of this parameter?
Thanks very much for your time.

Best regards,
Zhe

From: Nek5000-users <nek5000-users-bounces at lists.mcs.anl.gov> On Behalf Of nek5000-users--- via Nek5000-users
Sent: Friday, 7 December 2018 9:03 AM
To: nek5000-users at lists.mcs.anl.gov
Subject: Re: [Nek5000-users] Solving the Poisson equation in Nek5000


Dear Zhe,

You can solved the steady conduction (heat transfer problem).

So, you would just run heat, no fluid..

Paul Fischer


On Thu, Dec 6, 2018 at 7:00 PM nek5000-users--- via Nek5000-users <nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>> wrote:

Hi all,



I am trying to solve an equation similar with the Poisson equation (\nabla^2 \phi = A) in Nek5000, but I do not know which subroutine can do this work properly.



The variable \phi in computational domain has Dirichlet boundary conditions (e.g. A = 0). I think maybe the subroutine "hmholtz" can help solve this problem, but I have no idea how to set the commands, including setting of the boundary. Is there anyone having some idea? Any suggestion is welcomed. Thanks for your time.



Best regards,

Zhe
_______________________________________________
Nek5000-users mailing list
Nek5000-users at lists.mcs.anl.gov<mailto:Nek5000-users at lists.mcs.anl.gov>
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20181207/47c4a22a/attachment-0001.html>


More information about the Nek5000-users mailing list