[Nek5000-users] Questions in AXHELM and WLAPLACIAN

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Fri May 30 10:57:57 CDT 2014


Hi Paul,

Thank you for your answer, this is more clear now.

Actually, as an exercice, I would like to try to replace in the routine wlaplacian the line
call axhelm(wrk,a,diff,h2,imesh,1)

by something which will looks like
call gradm1(grad_ax,grad_ay,grad_az,a)
call add4(sum_grad,grad_ax,grad_ay,grad_az,n)
call col3(diff_grad_a,vdiff,sum_grad,n)
call gradm1(lapac_x,laplac_y,laplac_z, diff_grad_a)
call add4(laplacian, lapac_x, laplac_y, laplac_z,n)

Does it makes sense or I’m going into a wrong direction?


Best regards,
Emmanuel



On 30 May 2014, at 10:25, nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov> wrote:


Hi Emmanuel,

Strictly speaking, our functions are only once differentiable -- they are C0, not C1.

The test functions are also in H1 (i.e., are C0) and therefor the standard Galerkin
approach is to transfer one derivative to the test functions via integration by parts
and thus avoid twice differentiating a function.

If you just want the gradient of something, you would use gradm1 (gradient for
a quantity on mesh 1).

Paul


________________________________
From: nek5000-users-bounces at lists.mcs.anl.gov<mailto:nek5000-users-bounces at lists.mcs.anl.gov> [nek5000-users-bounces at lists.mcs.anl.gov<mailto:nek5000-users-bounces at lists.mcs.anl.gov>] on behalf of nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov> [nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>]
Sent: Thursday, May 29, 2014 7:47 PM
To: nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>
Subject: Re: [Nek5000-users] Questions in AXHELM and WLAPLACIAN

Hi Paul,

Thank you for your quick answer, this is really helpful.

I still have a question concerning the computation of a gradient.

Why did you construct the diffusion operator with the helmholtz routine? Why not using directly the routines gradm1 ?


By the way I am not sure to understand the differences between gradm1 (navier5.f), wgradm1 (navier1.f) , gradm11 (navier2.f) and gradm11ts (navier2.f).
I guess that the w letter refers to the weak formulation, but I don’t understand in which cases we need to choose a formulation instead of others.

In summary, if I want to modify the temperature/passive scalar equations to add a term that contains a gradient of the solved temperature/PS variable, for example, which “gradm” routine do I need to use?

Thank you for your help !


Best regards,
Emmanuel



On 29 May 2014, at 20:20, nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov> wrote:



Hi Emmanuel,

axhelm effects the weak Laplacian plus the mass matrix.

Specifically, if you wanted to solve:

(1)   -nabla . [ h1 * nabla ] u + h2 * u   =  f

with h1, h2, and f all functions of X=(x,y,z),
the discrete form would be:


(2)         A(h1) u + B(h2) u = B f

or

(3)         H u = B f

where A is the (h1-dependent stiffness matrix and
B(h2) is the h2-dependent mass matrix.

For the SEM, B is diagonal, so B(h2) = h2*B, where
we view h2 as a diagonal matrix.

In Nek5000, a matrix-vector product  w = Hu is effected via

     call axhelm (w,u,h1,h2,imesh,isd)

with w,u,h1,h2 being arrarys.   Here, imesh indicates
if you are on the fluid mesh or thermal mesh.  The fluid
mesh is a subset of the thermal mesh in the case of conjugate heat transfer between a fluid and a solid.
isd indicates which spatial direction is considered
in axisymmetric applications where u is a component
of a vector field.

Notice the sign of the Laplacian in Eq. (1) -- that may
help resolve your second question?  (There is a sign
change that ariss from the standard integration-by-parts
stepin the weak form.)

Paul


On Thu, 29 May 2014, nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov> wrote:

Dear nek5000 team,

Could you help me with the 2 questions below? Thank you very much !

1) Concerning the routine “axhelm” in hmholtz.f. If I am right, one
possibility of this routine can be the discretisation of the diffusion
operator. However it is not clear to me if axhelm performs:

a) vdiff  x   Laplacian(phi)

or

b) grad ( vdiff x grad (phi) )

phi being the variable solved for (T or PS for example).

So, is it actually a) or b) ?


2) In the routine wlaplacian in navier1.f, I am not sure to understand the
consequence of the line:

call sub2 (out,wrk,ntot)

after the lines:

call bcneusc(out,1) call axhelm(wrk,a,diff,h2,imesh,1)

If I am right, this will change the sign in front of the diffusion operator,
right?  Because in makeq.f, I am not sure that the line call
add2(bq(1,1,1,1,ifield-1),w1,ntot)

will actually assemble the RHS of the transport equation :  - (vtrans) x  U
grad (phi)  +  grad ( vdiff x grad (phi) )


Thank you for your help !

Best regards, Emmanuel

_______________________________________________
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

_______________________________________________
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/20140530/476f16fd/attachment-0001.html>


More information about the Nek5000-users mailing list