Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nek5000
giraffe
Commits
17eb21cf
Commit
17eb21cf
authored
Jul 13, 2017
by
April Novak
Browse files
added surface area calculation to nek_expansion. Refs #8
parent
5bb28980
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/integration_example/integration_example.usr
View file @
17eb21cf
...
@@ -20,14 +20,16 @@ c-----------------------------------------------------------------------
...
@@ -20,14 +20,16 @@ c-----------------------------------------------------------------------
return
return
end
end
c-----------------------------------------------------------------------
c-----------------------------------------------------------------------
! Sets the force term in the momentum equation. Use this to set body
! forces such as gravity. Note that ffx, ffy, and ffz will later be
! multiplied by the density.
subroutine userf (ix,iy,iz,eg)
subroutine userf (ix,iy,iz,eg)
include 'SIZE'
include 'SIZE'
include 'TOTAL'
include 'TOTAL'
include 'NEKUSE'
include 'NEKUSE'
integer e,f,eg
ffx=0.0
ffx=0.0
ffy=0.0
ffy=0.0
ffz=0.0
ffz=0.0
return
return
end
end
c-----------------------------------------------------------------------
c-----------------------------------------------------------------------
...
@@ -305,42 +307,45 @@ C=======================================================================
...
@@ -305,42 +307,45 @@ C=======================================================================
parameter (nf_max=100)
parameter (nf_max=100)
include 'SIZE'
include 'SIZE'
include 'TOTAL'
include 'TOTAL'
common/expansion_tdata/n_legendre, m_fourier
common/expansion_tdata/n_legendre, m_fourier
common/expansion_tcoef/coeff_tij(nl_max,nf_max)
common/expansion_tcoef/coeff_tij(nl_max,nf_max)
integer e,f
integer e,f
real*8 fmode(lx1,ly1,lz1,lelt), cache(lx1,ly1,lz1,lelt)
real*8 fmode(lx1,ly1,lz1,lelt), cache(lx1,ly1,lz1,lelt)
real*8 sint, sint1
real*8 sint, sint1, sarea, sarea1
real*8 pi
pi=4.0*atan(1.0)
ntot=nx1*ny1*nz1*nelt
ntot=nx1*ny1*nz1*nelt
zmin=glmin(zm1,ntot)
zmax=glmax(zm1,ntot)
call rzero(fmode,ntot)
call rzero(fmode,ntot)
do i0=1,n_legendre
do i0=1,n_legendre
do j0=1,m_fourier
do j0=1,m_fourier
call nek_mode(fmode,i0,j0)
call nek_mode(fmode,i0,j0)
sint1=0.0
sarea1=0.0
do e=1,nelt
sint1= 0.0
do f=1,6
do e=1,nelt
sint=0.0
do f=1,6
if (cbc(f,e,1).eq.'W ') then
sint=0.0
call col3(cache,fmode,t,ntot)
sarea=0.0
call surface_int(sint,sarea,cache,e,f)
if (cbc(f,e,1).eq.'W ') then
sint1=sint1+sint
call col3(cache,fmode,t,ntot)
endif
call surface_int(sint,sarea,cache,e,f)
enddo
sint1=sint1+sint
enddo
sarea1=sarea1+sarea
endif
enddo
enddo
call gop(sint1,wtmp,'+ ',1)
call gop(sint1,wtmp,'+ ',1)
!
call gop(sarea1,wtmp,'+ ',1)
coeff_tij(i0,j0)=sint1*2.0/(0.5*(zmax-zmin))
!
! Note that R=0.5 here!!!!
coeff_tij(i0,j0)=sint1*4.0*pi/sarea1
enddo
!
enddo
enddo
enddo
c For Testing
c For Testing
call nek_testp()
call nek_testp()
return
return
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment