[Nek5000-users] Energy source term
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Fri Nov 24 03:20:49 CST 2017
Hi,
The lines appear fine, however I would not use a force that goes from
zero to the final value within on grid point; this might lead to
oscillations in the solution. Perhaps a smoothing might be a better
solution.
Philipp
On 2017-11-24 05:07, nek5000-users at lists.mcs.anl.gov wrote:
> 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.
>
>
> _______________________________________________
> 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