[Nek5000-users] perturbing interior variables
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Tue May 11 05:30:58 CDT 2010
Thanks for the replies, Aleks and Stefan. I am still not clear on one
point though. Are changes made to temperature or velocity on boundaries
in "userchk" at each time step irrelevant since they are overwritten by
calls to "userbc"?
Cheers,
Frank
On Mon, 2010-05-10 at 18:15 +0200, nek5000-users at lists.mcs.anl.gov
wrote:
> The heat solver calls BCDIRSC which will apply Dirichlet bcs. All 't ' boundary points call userbc so you have the full control over the values at the boundary.
>
> Stefan
>
>
>
>
> On May 10, 2010, at 6:00 PM, nek5000-users at lists.mcs.anl.gov wrote:
>
> > Hi Frank,
> >
> >
> > I assume that you refer to t(i,j,k,iel) as temperature -- to be safe it should be t(i,j,k,iel,1)...
> >
> >
> > In timestepping loop, subroutine userchk is called last by one -- right before the last one -- prepost which dumps field files .f or .fld -- see nek5_svn/trunk/nek/drive1.f:
> >
> > DO ISTEP=1,NSTEPS
> > call nek_advance
> > call userchk
> > call prepost (.false.,'his')
> > if (lastep .eq. 1) goto 1001B
> > ENDDO
> >
> > while, as I can see, userbc for a passive scalar is called from a chain of subroutines nek_advance > heat > cdscal > BCNEUSC/BCDIRSC
> >
> > This means that perturbation of temperature at the boundary won't be overwritten in userbc.
> >
> >
> > One way to apply perturbation everywhere including the element faces that are not on the boundary of your domain is simply to multiply your perturbation factor by a function that goes to zero on the boundaries, e.g.:
> >
> > t(i,j,k,iel,1)=.99*t(i,j,k,iel,1)*(xm1(i,j,k,iel)**2.-1.)
> >
> > in case the boundary surface plane is at x=1 & x=-1
> >
> > Best,
> > Aleks
> >
> >
> >
> >
> >
> >
> > On Mon, 10 May 2010, nek5000-users at lists.mcs.anl.gov wrote:
> >
> >> Hello all,
> >
> > I am trying to perturb the temperature in a small part of the flow.
> > However, I only wish to perturb in the interior and not on a boundary.
> > I have the following in "userchk". If I instead looped from "k=1,nz1"
> > instead of "k=2,nz1-1", would this change the BC's? The general
> > question would be, does changing uvw & T in "userchk" change BC's or
> > does "userbc" override what is done in "userchk"?
> >
> > Cheers,
> > Frank
> >
> > do 100 iel=1,nelv
> > do 100 k=2,nz1-1
> > do 100 j=2,ny1-1
> > do 100 i=2,nx1-1
> > if(((xm1(i,j,k,iel)-1.1)**2
> > & + (ym1(i,j,k,iel)-1.1)**2
> > & + (zm1(i,j,k,iel)-.45)**2)**.5.le..25)then
> > t(i,j,k,iel)=.99*t(i,j,k,iel)
> > endif
> > enddo !n
> > 100 continue
> >
> >
> >
> >
> > --
> > Frank Herbert Muldoon, Ph.D. Mechanical Engineering
> > Technische Universität Wien (Technical University of Vienna)
> > Inst. f. Strömungsmechanik und Wärmeübertragung (Institute of Fluid
> > Mechanics and Heat Transfer)
> > Resselgasse 3
> > 1040 Wien
> > Tel: +4315880132232
> > Fax: +4315880132299 Cell:+436765203470
> > fmuldoo (skype)
> > http://tetra.fluid.tuwien.ac.at/fmuldoo/public_html/webpage/frank-muldoon.html
> >
> > _______________________________________________
> > 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
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
--
Frank Herbert Muldoon, Ph.D. Mechanical Engineering
Technische Universität Wien (Technical University of Vienna)
Inst. f. Strömungsmechanik und Wärmeübertragung (Institute of Fluid
Mechanics and Heat Transfer)
Resselgasse 3
1040 Wien
Tel: +4315880132232
Fax: +4315880132299
Cell:+436765203470
fmuldoo (skype)
http://tetra.fluid.tuwien.ac.at/fmuldoo/public_html/webpage/frank-muldoon.html
More information about the Nek5000-users
mailing list