[Nek5000-users] Temperature Perturbation Zone

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Thu May 17 11:18:52 CDT 2018


Hi Paul,

That was exactly what I was looking for, although it didn't work the way I
was expecting, so I defined the perturbation as a forced value instead.

t(i,1,1,1,1) = perturb

Thanks for your help.

*Nicolás Andrés Órdenes Leiva*

Estudiante de Ingeniería Civil Mecánica
Universidad Técnica Federico Santa María
Tel: +56 9 7619 2857

2018-05-14 22:07 GMT-04:00 <nek5000-users at lists.mcs.anl.gov>:

>
> Hi Nicolas,
>
>
> OK.  You probably don't want to do that every time step (I'm just
> guessing...), but in any case, you would do it as written below.
>
>
> Best, Paul
>
>
>   do i=1,n
>           x=xm1(i,1,1,1)
>           y=ym1(i,1,1,1)
>           z=zm1(i,1,1,1)
>
>           if(x.ge.px1.and.x.le.px2)then
>           if(z.ge.pz1.and.z.le.pz2)then
>                t(i,1,1,1,1) = t(i,1,1,1,1) + perturb
>           endif
>           endif
>       end do
> ------------------------------
> *From:* Nek5000-users <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, May 14, 2018 8:21:28 PM
> *To:* nek5000-users at lists.mcs.anl.gov
> *Subject:* Re: [Nek5000-users] Temperature Perturbation Zone
>
> Hi Paul,
>
> It's not the boundary temperature what I'm trying to modify but a
> arbitrary zone inside the fluid domain. Boundary condition are 6 walls, 4
> isolated and 2 with constant temperature, but that is already settled up.
>
> After reading some entries on the mailing list I tried this
>
> -----------------------------------------------------------------
>       subroutine userchk()
>
>       include 'SIZE'
>       include 'TOTAL'
>
>       real period,amplitude,perturb
>       real px1,px2,py1,py2
>       integer n
>
>       amplitude = 1.2
>       period = 0.75
>       perturb = amplitude * sin( (2.0*pi/period)*time )
>
>       px1 = 0.25/2.0-0.05
>       px2 = 0.25/2.0+0.05
>       pz1 = 0.5-0.1
>       pz2 = 0.5+0.1
>
>       n = lx1*ly1*lz1*nelt
>
>       do i=1,n
>           x=xm1(i,1,1,1)
>           y=ym1(i,1,1,1)
>           z=zm1(i,1,1,1)
>
>           if(x.ge.px1.and.x.le.px2)then
>           if(z.ge.pz1.and.z.le.pz2)then
> (1)              temp = temp + perturb      ! Nothing happens
> (2)              t = t + perturb                   ! WARNING: DIV(V)-QTL
> too large!
>           endif
>           endif
>       end do
>
>       return
>       end
> -----------------------------------------------------------------
>
> After running the simulations, with (1) I get the same results that
> without it; with (2) the solver indicates "WARNING: DIV(V)-QTL too large!"
> in every timestep, makes some really small timesteps (1e-5 sec. vs 1e-2)
> and doesn't seem to converge.
>
> I guess that the addition of the perturbation is bad defined.
>
>
>
> Nicolás
>
> *Nicolás Andrés Órdenes Leiva*
>
> Estudiante de Ingeniería Civil Mecánica
> Universidad Técnica Federico Santa María
> Tel: +56 9 7619 2857
>
> 2018-05-14 19:15 GMT-04:00 <nek5000-users at lists.mcs.anl.gov>:
>
> Dear Nicolas,
>
>
> For time-dependent boundary conditions, you could
>
> use something like the expression you have in your email.
>
>
> You would need "t  " ( "tee" space space) for the thermal
>
> boundary conditions in your .rea or .box file.
>
>
> Please let me know if this solves your problem.
>
>
> Paul
>
>
> ------------------------------
> *From:* Nek5000-users <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, May 14, 2018 5:26:23 PM
> *To:* nek5000-users at lists.mcs.anl.gov
> *Subject:* [Nek5000-users] Temperature Perturbation Zone
>
> Hi,
>
> I'm setting a 3D box to perform natural convection problems in a closed
> cavity. After trying several method i can't manage to define a zone with a
> variable temperature perturbation in the usrchk() routine.
>
> Let's say, that temp = temp + A*sin(w*time) in a square of boundaries
> [x_min, x_max] x [y_min, y_max] x [z_min, z_max] for x, y, z.
>
> Any advice for implementing this?
>
> Regards,
>
> *Nicolás Andrés Órdenes Leiva*
>
> Estudiante de Ingeniería Civil Mecánica
> Universidad Técnica Federico Santa María
> Tel: +56 9 7619 2857
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20180517/2a51b289/attachment.html>


More information about the Nek5000-users mailing list