[Nek5000-users] Energy source term
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Thu Nov 23 22:07:14 CST 2017
Hi all,
If I need to add an oscillating source term in the energy equation for a
small region in a 2D domain would it be fine to do it this way, with these
variables: ?
c =============================
subroutine userq (ix,iy,iz,ieg)
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
real pii,frec,ampli
pii=4.0*atan(1.0)
frec=0.005
ampli=1.0
if (x .ge. 0 .and. x .le. 0.02 .and.
$ y .ge. 0 .and. y .le. 0.02) then
qvol = ampli*sin(2.0*pii*frec*time)
else
qvol = 0.0
end if
source = 0.0
return
end
c ==================================
Thanks in advance,
JP.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20171124/64c9a296/attachment.html>
More information about the Nek5000-users
mailing list