[Nek5000-users] Integrate velocity field along a line

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Wed Oct 26 10:18:14 CDT 2016


Thank you for your answer it works wonders!

Best wishes,

Arnold

Le 10/10/2016 15:41, nek5000-users at lists.mcs.anl.gov a écrit :
> Hi Arnold,
>
> You have to decide which faces of elements belong to the boundary --- but here
> is a code that would integrate over all surfaces with "v  " boundary conditions
> that you could us as an example.
>
> Paul
>
>
>
>        common /mystuff/ v2(lx1*ly1*lz1*lelt)
>        integer e,f
>
>        n = nx1*ny1*nz1*nelt
>
>        do i=1,n
>           v2(i)=vx(i,1,1,1)**2+vy(i,1,1,1)**2+vz(i,1,1,1)**2
>        enddo
>
>        v2surf = 0
>        do e=1,nelv    ! Integrate over all surfaces with cbc='v  '
>        do f=1,2*ndim
>           if (cbc(f,e,1).eq.'v  ') v2surf=v2surf+facint_v(v,area,f,e)
>        enddo
>        enddo
>
>        v2surf = glsum(v2surf,1) ! Sum across all processors
>
> Note that "area" is passed in the TOTAL common block, which I assume
> you are including in the routine.
>
>
> ________________________________________
> From: nek5000-users-bounces at lists.mcs.anl.gov [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of nek5000-users at lists.mcs.anl.gov [nek5000-users at lists.mcs.anl.gov]
> Sent: Monday, October 10, 2016 3:20 AM
> To: nek5000-users at lists.mcs.anl.gov
> Subject: [Nek5000-users] Integrate velocity field along a line
>
> Good morning Neks!
>
> I was wondering if it possible to integrate a function over the boundary
> in the userchk. Let me develop :
> The domain is a box, I want to integrate the boundary velocity field
> (prescribed in userbc)  at the wall (bottom boundary) :
>
> In latex it would be int_{bottom boundary } u_{bound}^2 + v_{bound}^2 +
> w_{bound}^2v dx_{bound}
>
> Is there a function like glsc3() that would allow me to do so?
>
> Thank you for your time,
>
> Best wishes,
>
> Arnold
> _______________________________________________
> Nek5000-users mailing list
> 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
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users



More information about the Nek5000-users mailing list