[Nek5000-users] Passive Scalar Initialization

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Sun Jul 15 12:28:09 CDT 2012


Hi Alireza,

userchk() is the correct place to intervene.

It is called after the end of each timestep, including "Step 0",
which constitutes the initialization.

Hence, on step 0, you have the chance to reset any variable prior
to the start of Step 1, without worry of it being overwritten by
some other initialization phase.

So, I would do the following in userchk, for the particular
instance of when you want to do your initialization.


       n=nx1*ny1*nz1*nelt

       if (istep.eq.0) then
          do i=1,n
             x=xm1(i,1,1,1)
             y=ym1(i,1,1,1)
             z=zm1(i,1,1,1)
             t(i,1,1,1,1) = x*x + y-z  (or whatever...)
          enddo
       endif

If you instead would wish to read a result in from a .fld file,
this can also be done.  You simply modify your .rea file to
read 2 files instead of one.  The first can have the velocity
and the second the passive scalar, say.

Cheers,

Paul


On Sun, 15 Jul 2012, nek5000-users at lists.mcs.anl.gov wrote:

> Hi,
>
> Thanks for your hint. So, how can I reinitialize the PS after some time? 
> Should I call useric at userchk? And as I have two passive scalars, how can I 
> make sure that just one of them is initialized and the other one and the flow 
> field are read from the restarting fld file?
>
> Thanks again.
>
> Regards,
> Alireza
>
>
>
>
>
> Quoting nek5000-users at lists.mcs.anl.gov:
>
>> 
>> Hi Alireza,
>> 
>> You can alway reinitialize any field, so either start with or without,
>> whichever is easiest.  If it's a long and expensive run (esp. from
>> a passive scalar standpoint, for example if you have very low Pr), then
>> you might choose to not carry the PS along till you get to your desired
>> background flow state.  Otherwise, PS typically costs much less than the
>> hydro, so carrying PS along is not an excessive burden and the setup
>> and logistics overhead is sometimes easier just to deal with it at
>> the outset.
>> 
>> I hope this helps.
>> 
>> Cheers,
>> 
>> Paul
>> 
>> 
>> On Sun, 15 Jul 2012, nek5000-users at lists.mcs.anl.gov wrote:
>> 
>>> Hi,
>>> 
>>> I want to start solving the passive scalar equation after the background 
>>> flow field has reached certain characteristics. Is it possible to defer 
>>> the solution of the passive scalar and then initialize it at sometime t>0? 
>>> In this case, should I include the passive scalar boundary condition data 
>>> in the rea and usr files from the beginning?
>>> 
>>> Thanks for your help.
>>> 
>>> Regards,
>>> Alireza
>>> 
>>> _______________________________________________
>>> 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



More information about the Nek5000-users mailing list