[Nek5000-users] How to identify boundary faces ?

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Wed Jan 30 17:04:49 CST 2013



Hi Rich,

Try, in usrdat2():

       param(67)=0  ! Set read format


(66 is for write format)

Let me know if this works.

Cheers,

Paul



On Wed, 30 Jan 2013, nek5000-users at lists.mcs.anl.gov wrote:

> Dear Nek heads,
> I am having trouble getting Nek5000 to read my restart file. The file is an
> ASCII file that was written from a previous run. I set parameter p67 to -1
> to read in an ascii restart file. Here is the error message in the .o file:
>
> set initial conditions
> Checking restart options:
> sqduct.fld06
>
> nekuic (1) for ifld            1
> Reading checkpoint data
>     WARNING:  No data read in for file
> sqduct.fld06
>
>     Failed on  element   2,  point    0.
>     Last read dump:
>   0.000000      0.2641195E-02   0.000000       0.000000       0.000000
>     Last read dump:
>   0.000000       0.000000     -0.6859594E-02  0.2343750E-01 -0.2600098E-01
>     Last read dump:
>  0.2600098E-01 -0.1855469E-01
>           0 call exitt 1702a           1
>
>
> Here is the restart call in the .rea file:
>
>  ***** NO THERMAL BOUNDARY CONDITIONS *****
>            1 RESTART OPTIONS FOLLOW
> sqduct.fld06
>            1 INITIAL CONDITIONS *****
> C Default
>
>
> Here is the first few lines of the restart file sqduct.fld06:
>
>
> ****   8   8   8 8.0000000E+01 1500 X Y Z U P
> NELT,NX,NY,N
>  0.000      0.000      0.000      0.000      0.000      0.000
>  0.000      0.000      0.000      0.000      0.000      0.000
>  0.000      0.000      0.000      0.000      0.000      0.000
>  0.000      0.000      0.000      0.000      0.000      0.000
>  0.000      0.000      0.000      0.000      0.000      0.000
>  0.000      0.000      0.000      0.000      0.000      0.000
>
>
> Note that the problem is a square duct with 24 x 24 x 32 elements, which
> equal 18432 total elements. Since this is a 5 digit number, I suppose that
> is why it is not shown in the first line in the field file.  However, I
> tried changing the four *'s to 18432, along with a few other variations,
> and no luck, same error. Also, the numbers in the dump after the error
> message above don't seem to appear in the restart file. Also, I don't have
> any trouble withe a restart file that has only 6 x 6 x 8 = 288 elements in
> it. Finally, I am using a version of Nek500 that I downloaded about 11
> months ago.
>
> Help is appreciated.
>
> Rich Johnson
>
>
>
>
>
> On Tue, Jan 29, 2013 at 10:27 PM, <nek5000-users at lists.mcs.anl.gov> wrote:
>
>>
>> On Wed, Jan 30, 2013 at 10:13 AM, <nek5000-users at lists.mcs.anl.gov> wrote:
>>
>>> Hello
>>> I want to identify boundary faces to set their boundary condition type.
>>> Following some of the examples, I created the following function. To find
>>> the location of the face, I need to know the coordinates (xf,yf) of the
>>> face center using which I can figure out where the face lies. Is this
>>> possible to find ?
>>>
>>> Thanks
>>> praveen
>>>
>>
>> Hello
>>
>> By looking at this
>>
>> http://nek5000.mcs.anl.gov/index.php/Element_Definition
>>
>> I made the following code. This is a 2d problem and in blue part below I
>> am getting face midpoint coordinates. I am not sure I have got the
>> numbering of the faces correct.
>>
>> Thanks
>> praveen
>>
>> C=======================================================================
>>       subroutine usrdat2
>>
>>       include 'SIZE'
>>       include 'TOTAL'
>>
>>       parameter(XTOL=1e-10)
>>       character*3 cbv
>>       integer e, f
>>       real xmin, xmax, ymax, xf(4), yf(4)
>>
>>       xmin = -5.0
>>       xmax = +10.0
>>       ymax =  3.0
>>
>> c set boundary conditions
>>       do e = 1,nelv
>>          xf(3) = 0.5*(xm1(1,  1,  1,e) + xm1(nx1,1,  1,e))
>>          xf(2) = 0.5*(xm1(nx1,1,  1,e) + xm1(nx1,ny1,1,e))
>>          xf(4) = 0.5*(xm1(1,  ny1,1,e) + xm1(nx1,ny1,1,e))
>>          xf(1) = 0.5*(xm1(1,  ny1,1,e) + xm1(1,  1,  1,e))
>>          yf(3) = 0.5*(ym1(1,  1,  1,e) + ym1(nx1,1,  1,e))
>>          yf(2) = 0.5*(ym1(nx1,1,  1,e) + ym1(nx1,ny1,1,e))
>>          yf(4) = 0.5*(ym1(1,  ny1,1,e) + ym1(nx1,ny1,1,e))
>>          yf(1) = 0.5*(ym1(1,  ny1,1,e) + ym1(1,  1,  1,e))
>>          do f = 1,2*ndim
>>             cbv = cbc(f,e,1)
>>             if (cbv.ne.'E  ') then       ! This is boundary edge
>>                if(abs(xf(f)-xmin).lt.XTOL)then
>>                    cbc(f,e,1) = 'v  '   ! inlet
>>                else if(abs(xf(f)-xmax).lt.XTOL)then
>>                    cbc(f,e,1) = 'O  '   ! outlet
>>                else if(abs(yf(f)-ymax).lt.XTOL)then
>>                    cbc(f,e,1) = 'SYM'   ! top wall
>>                else
>>                    cbc(f,e,1) = 'W  '   ! bottom wall
>>                endif
>>             endif
>>          enddo
>>       enddo
>>
>>       return
>>       end
>>
>>
>> _______________________________________________
>> 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