From nek5000-users at lists.mcs.anl.gov Wed Aug 1 16:52:14 2012 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Wed, 01 Aug 2012 17:52:14 -0400 Subject: [Nek5000-users] Anisotropic conductivity In-Reply-To: References: Message-ID: Hi, Thanks for your hints. I wonder if you could help me extending the case you sent me to 3D. Also, I have difficulty understanding the 2D example. For instance, what quantities does the array kxy represent? And how this procedure can be simplified for constant diffusion coefficients? Best Regards, Alireza Quoting nek5000-users at lists.mcs.anl.gov: > > Hi Alireza, > > There is a paper on my website describing the approach: > > http://www.mcs.anl.gov/~fischer/pubhtml/fischer_sci05.pdf > > Basically, you need to change the geometric factors after > nek has set them. I normally do this in userchk, because > the first call to userchk implies that the code is ready > to start solving the equations and that (most) all of the > requisite variables are set. Therefore, if you change > them, they won't be reset against your wishes. > > (This is trickier if you have ifuservp=.true., > because in that case nek will keep resetting the diffusivity..., > but maybe it will be ok---we can look into that.) > > I can send an example where I've set up anisotropic diffusion > problem... (attached here, in fact, but I've > not tested recently). It's a 2D case. > > Let me know if you need assistance with the 3D case or have > questions with this one -- the only tricky part is figuring out > where the components of the symmetric 3x3 tensor are stored. > > Best regards, > > Paul > > > On Tue, 26 Jun 2012, nek5000-users at lists.mcs.anl.gov wrote: > >> Hi Neks, >> >> I want to solve for a convective heat transfer problem with a >> diagonal conductivity tensor which has different constant values in >> x and y directions. I assume I should use udiff, but I'm not sure >> how to implement it. I wonder if you have any idea. >> >> Regards, >> Alireza >> >> _______________________________________________ >> Nek5000-users mailing list >> Nek5000-users at lists.mcs.anl.gov >> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users From nek5000-users at lists.mcs.anl.gov Tue Aug 14 07:43:24 2012 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Tue, 14 Aug 2012 12:43:24 +0000 Subject: [Nek5000-users] Nek5000 Development and User Group Meting 2012 Message-ID: Dear Nek5000 users, We are pleased to invite you to attend the second nek5000 Development and User Meeting, to be hosted by the Aeorthermochemistry and Combustion Systems Laboratory (LAV) at the Swiss Federal Institute of Technology (ETHZ) in Zurich, Switzerland, on December 7-8, 2012. The objective is to bring developers and users of nek5000 together to promote collaborative activities, exchange information, and share experiences in using nek5000 in areas of common interest. The schedule is under development, but we are planning to have technical sessions on Friday, Dec. 7 and Saturday, Dec. 8, including hands-on sessions in the use of nek5000 and VisIt. One objective of the meeting is to assist users in defining their simulation problems and to address technical issues that they may face. Attendees are invited to contribute short (15 min.) presentations on their applications of nek5000. Contributions should consist of an abstract (1-2 pages) and presentation slides. Registration and up to date information can be found at https://nek5000.mcs.anl.gov/index.php/Usermeeting2012 We look forward to your attendance! Sincerely, Nek5000 Development Team From nek5000-users at lists.mcs.anl.gov Mon Aug 20 15:00:09 2012 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Mon, 20 Aug 2012 20:00:09 +0000 Subject: [Nek5000-users] PhD student and postdoc positions available Message-ID: I am currently looking for 1. a postdoctoral researcher interested in pursuing research in the field of Computational Fluid Dynamics (CFD). The main topic of research will be adaptive discontinuous Galerkin or spectral element methods for direct simulation (incompressible Navier-Stokes equations), and other projects may include control of separated flows, transition, aerodynamics and CFD for blood flow. A PhD degree in CFD or Fluid Dynamics including code development and high performance computing is necessary. The candidate must have already published journal articles. Experience with spectral methods, Nek5000, and VISIT is a plus. The ideal candidate will have excellent computer programming skills, communication skills (written, oral, graphical and with others in the research group), self-motivation and an open mind. The position also requires some training of graduate students. Please send a short email with cv attached by email with 'Nek5000 Postdoc application' in the subject line. Ideally this would be for November-December 2012 timeframe. The position is at University of Ottawa in Ottawa, Canada. 2. a PhD student interested in pursuing a PhD in Mechanical Engineering in the field of Computational Fluid Dynamics (CFD). The topic of research will be adaptive discontinuous Galerkin or spectral element methods for direct simulation (incompressible Navier-Stokes equations). Some work on heavily separated flows may also be done. Previous experience with CFD and a Master's degree with thesis in a related field are necessary. Experience with spectral methods, Nek5000, and VISIT is a plus. The ideal candidate will have excellent computer programming skills, communication skills (written, oral, graphical and with others in the research group), self-motivation and an open mind. French speaking applicants are eligible for larger scholarships at this bilingual (French-English) university. Canadian applicants will be given priority. The deadline for applying for the winter term for international students is Oct 1. Please send a short email with cv attached by email with 'Nek5000 PhD application' in the subject line. Catherine Mavriplis http://www.engineering.uottawa.ca/en/directory/view/mavriplis_catherine -- Prof. Catherine Mavriplis Dept. of Mechanical Engineering / G?nie m?canique University of Ottawa / Universit? d'Ottawa 161 Louis Pasteur Room A331 Ottawa, Ontario CANADA K1N 6N5 -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Fri Aug 24 08:58:09 2012 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Fri, 24 Aug 2012 15:58:09 +0200 Subject: [Nek5000-users] testing suite Message-ID: Hi Neks I have a few questions about test suite in nekton (in nek5_svn/tests/). Nek5000 is a part of CRESTA project and I need simple method for testing new versions of the code on different machines. Tests in nek5_svn/tests/ are perfect, but I've got some problems: 1) genmap work perfect with pgi compiler, but with gnu compilers returns segmentation fault for conj_ht test. It's due to not initialized key array in subroutine spec_bis_conn. It would be good to add -finit-local-zero flag for gfortran in maketools 2) tests in 2d_eigtest work fine for pgi, but fail for gfortran, since the difference in the lambda error is bigger than 10^-6. It happens for N=3 and 4 only; eig1.err: GNU: 2 19 0 5.7831860E+00 2.1065324E-02 1.6329577E-01 lambda 3 34 0 5.7831860E+00 6.8588903E-04 1.3936160E-01 lambda 4 61 0 5.7831860E+00 6.4127192E-07 2.6444060E-02 lambda 5 84 0 5.7831860E+00 4.7561843E-08 3.3011994E-02 lambda 6 121 0 5.7831860E+00 3.2211656E-10 1.1637760E-02 lambda 7 178 0 5.7831860E+00 2.8581582E-12 1.6504072E-03 lambda 8 243 0 5.7831860E+00 5.4534155E-13 4.8188495E-04 lambda 9 314 0 5.7831860E+00 8.6153307E-14 2.9147672E-05 lambda 10 400 0 5.7831860E+00 3.2018832E-12 6.8264261E-06 lambda 11 478 0 5.7831860E+00 7.3994144E-12 4.4899419E-07 lambda 12 614 0 5.7831860E+00 6.7972294E-12 4.0358872E-08 lambda 13 715 0 5.7831860E+00 2.7814195E-11 2.0542709E-09 lambda 14 829 0 5.7831860E+00 1.8316904E-11 1.1108244E-10 lambda 15 883 0 5.7831860E+00 1.1938006E-11 3.0416639E-12 lambda 16 900 0 5.7831860E+00 1.6848745E-12 5.3768924E-12 lambda PGI: 2 19 1 5.7831860E+00 2.1065324E-02 1.6329577E-01 lambda 3 37 1 5.7831860E+00 6.8588903E-04 1.4437432E-01 lambda 4 61 1 5.7831860E+00 6.4127192E-07 2.8477333E-02 lambda 5 89 1 5.7831860E+00 4.7561947E-08 3.3011994E-02 lambda 6 119 1 5.7831860E+00 3.2096015E-10 1.1637760E-02 lambda 7 178 1 5.7831860E+00 2.7320368E-12 1.6504072E-03 lambda 8 235 1 5.7831860E+00 1.0373924E-12 4.8188495E-04 lambda 9 313 1 5.7831860E+00 5.7545080E-12 2.9147672E-05 lambda 10 400 1 5.7831860E+00 1.0382806E-12 6.8264260E-06 lambda 11 477 1 5.7831860E+00 2.2977176E-12 4.4899373E-07 lambda 12 614 1 5.7831860E+00 2.7853275E-12 4.0358850E-08 lambda 13 713 1 5.7831860E+00 1.4867219E-11 2.0542157E-09 lambda 14 826 1 5.7831860E+00 1.4868107E-11 1.1256349E-10 lambda 15 884 1 5.7831860E+00 1.1343815E-11 3.8686936E-12 lambda 16 900 1 5.7831860E+00 5.1991300E-11 1.1914564E-11 lambda Have you got the same result? Should the tolerance in Analysis.py be bigger in this case? Moreover this test was failing for me with [Example 2d_eig/INT2: Serial-iter/err]...I couldn't find all the requested value in the log file... [Example 2d_eig/INT2: Serial-iter/err]... 2 , 3 , 4 , 10 , were not found... Example 2d_eig/INT2: Serial-iter/err : F due to single list value = [[' 2 ',19,2,6], [' 2 ',1.6329577E-01,1e-06,2], [' 3 ',37,2,6], [' 3 ',1.4437432E-01,1e-06,2], [' 4 ',61,2,6], [' 4 ',2.8477333E-02,1e-06,2], [' 10 ',400,2,6], [' 10 ',6.8264260E-06,1e-06,2]] in Analysis.py. To get rid of this I had to divide it to 2 lists value = [[' 2 ',19,2,6], [' 3 ',37,2,6], [' 4 ',61,2,6], [' 10 ',400,2,6]] value = [[' 2 ',1.6329577E-01,1e-06,2], [' 3 ',1.4437432E-01,1e-06,2], [' 4 ',2.8477333E-02,1e-06,2], [' 10 ',6.8264260E-06,1e-06,2]] 3) mhd-gpf (case without fast diagonalization method lfdm=0) fails both for pgi and gnu compilers. It seems pressure does not converge giving nan for gfortran. Cases with lfdm=1 give no errors. 4) I found most of moab tests commented in Analysis.py. Does it mean moab is not fully implemented yet? 5) I found testing scripts tuned for single environment (./ in the PATH, moab and matlab locations hidden in the script), so I've modified them slightly to make them easier to run for others. Is it possible to add my version of scripts to the repository? Regards Adam From nek5000-users at lists.mcs.anl.gov Fri Aug 24 10:29:41 2012 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Fri, 24 Aug 2012 10:29:41 -0500 (CDT) Subject: [Nek5000-users] testing suite In-Reply-To: Message-ID: Hi Adam, Thanks for the detailed email -- I'll discuss it with developers. But let me comment on certain issues you have raised. We are close to finalizing MOAB tests so they will be added shortly. There are some issues with semg MHD cases after revision 780. Additive Shwatrz (p43=1) works fine, and it is good to know that FDM works too. Thanks. Aleks ----- Original Message ----- From: nek5000-users at lists.mcs.anl.gov To: "nekton" Sent: Friday, August 24, 2012 8:58:09 AM Subject: [Nek5000-users] testing suite Hi Neks I have a few questions about test suite in nekton (in nek5_svn/tests/). Nek5000 is a part of CRESTA project and I need simple method for testing new versions of the code on different machines. Tests in nek5_svn/tests/ are perfect, but I've got some problems: 1) genmap work perfect with pgi compiler, but with gnu compilers returns segmentation fault for conj_ht test. It's due to not initialized key array in subroutine spec_bis_conn. It would be good to add -finit-local-zero flag for gfortran in maketools 2) tests in 2d_eigtest work fine for pgi, but fail for gfortran, since the difference in the lambda error is bigger than 10^-6. It happens for N=3 and 4 only; eig1.err: GNU: 2 19 0 5.7831860E+00 2.1065324E-02 1.6329577E-01 lambda 3 34 0 5.7831860E+00 6.8588903E-04 1.3936160E-01 lambda 4 61 0 5.7831860E+00 6.4127192E-07 2.6444060E-02 lambda 5 84 0 5.7831860E+00 4.7561843E-08 3.3011994E-02 lambda 6 121 0 5.7831860E+00 3.2211656E-10 1.1637760E-02 lambda 7 178 0 5.7831860E+00 2.8581582E-12 1.6504072E-03 lambda 8 243 0 5.7831860E+00 5.4534155E-13 4.8188495E-04 lambda 9 314 0 5.7831860E+00 8.6153307E-14 2.9147672E-05 lambda 10 400 0 5.7831860E+00 3.2018832E-12 6.8264261E-06 lambda 11 478 0 5.7831860E+00 7.3994144E-12 4.4899419E-07 lambda 12 614 0 5.7831860E+00 6.7972294E-12 4.0358872E-08 lambda 13 715 0 5.7831860E+00 2.7814195E-11 2.0542709E-09 lambda 14 829 0 5.7831860E+00 1.8316904E-11 1.1108244E-10 lambda 15 883 0 5.7831860E+00 1.1938006E-11 3.0416639E-12 lambda 16 900 0 5.7831860E+00 1.6848745E-12 5.3768924E-12 lambda PGI: 2 19 1 5.7831860E+00 2.1065324E-02 1.6329577E-01 lambda 3 37 1 5.7831860E+00 6.8588903E-04 1.4437432E-01 lambda 4 61 1 5.7831860E+00 6.4127192E-07 2.8477333E-02 lambda 5 89 1 5.7831860E+00 4.7561947E-08 3.3011994E-02 lambda 6 119 1 5.7831860E+00 3.2096015E-10 1.1637760E-02 lambda 7 178 1 5.7831860E+00 2.7320368E-12 1.6504072E-03 lambda 8 235 1 5.7831860E+00 1.0373924E-12 4.8188495E-04 lambda 9 313 1 5.7831860E+00 5.7545080E-12 2.9147672E-05 lambda 10 400 1 5.7831860E+00 1.0382806E-12 6.8264260E-06 lambda 11 477 1 5.7831860E+00 2.2977176E-12 4.4899373E-07 lambda 12 614 1 5.7831860E+00 2.7853275E-12 4.0358850E-08 lambda 13 713 1 5.7831860E+00 1.4867219E-11 2.0542157E-09 lambda 14 826 1 5.7831860E+00 1.4868107E-11 1.1256349E-10 lambda 15 884 1 5.7831860E+00 1.1343815E-11 3.8686936E-12 lambda 16 900 1 5.7831860E+00 5.1991300E-11 1.1914564E-11 lambda Have you got the same result? Should the tolerance in Analysis.py be bigger in this case? Moreover this test was failing for me with [Example 2d_eig/INT2: Serial-iter/err]...I couldn't find all the requested value in the log file... [Example 2d_eig/INT2: Serial-iter/err]... 2 , 3 , 4 , 10 , were not found... Example 2d_eig/INT2: Serial-iter/err : F due to single list value = [[' 2 ',19,2,6], [' 2 ',1.6329577E-01,1e-06,2], [' 3 ',37,2,6], [' 3 ',1.4437432E-01,1e-06,2], [' 4 ',61,2,6], [' 4 ',2.8477333E-02,1e-06,2], [' 10 ',400,2,6], [' 10 ',6.8264260E-06,1e-06,2]] in Analysis.py. To get rid of this I had to divide it to 2 lists value = [[' 2 ',19,2,6], [' 3 ',37,2,6], [' 4 ',61,2,6], [' 10 ',400,2,6]] value = [[' 2 ',1.6329577E-01,1e-06,2], [' 3 ',1.4437432E-01,1e-06,2], [' 4 ',2.8477333E-02,1e-06,2], [' 10 ',6.8264260E-06,1e-06,2]] 3) mhd-gpf (case without fast diagonalization method lfdm=0) fails both for pgi and gnu compilers. It seems pressure does not converge giving nan for gfortran. Cases with lfdm=1 give no errors. 4) I found most of moab tests commented in Analysis.py. Does it mean moab is not fully implemented yet? 5) I found testing scripts tuned for single environment (./ in the PATH, moab and matlab locations hidden in the script), so I've modified them slightly to make them easier to run for others. Is it possible to add my version of scripts to the repository? Regards Adam _______________________________________________ Nek5000-users mailing list Nek5000-users at lists.mcs.anl.gov https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users From nek5000-users at lists.mcs.anl.gov Fri Aug 24 13:03:16 2012 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Fri, 24 Aug 2012 13:03:16 -0500 Subject: [Nek5000-users] testing suite In-Reply-To: References: Message-ID: Hi Adam, Could you let me know what version of the gfortran compiler you are using? On our system here, we aren't seeing the genmap errors. Also, if they are pointing to undeclared arrays, we would probably want to go ahead and declare those arrays too. I am still adjusting the 2d_eig tests in Analysis.py. Thanks for the input and soon that test and the MOAB tests should be fully functional. As Aleks mentioned, we are having an issue with the MHD case and versions after v780. Would you send me your scripts off list (heisey at mcs.anl.gov) with the different path structure? If it makes it easier to test in other environments, I think we would be interested in adding your changes to the repo. Thanks so much! Katie On Fri, Aug 24, 2012 at 10:29 AM, wrote: > Hi Adam, > > Thanks for the detailed email -- I'll discuss it with developers. > > But let me comment on certain issues you have raised. > > We are close to finalizing MOAB tests so they will be added shortly. > > There are some issues with semg MHD cases after revision 780. Additive > Shwatrz (p43=1) works fine, and it is good to know that FDM works too. > > Thanks. > Aleks > > > > > ----- Original Message ----- > From: nek5000-users at lists.mcs.anl.gov > To: "nekton" > Sent: Friday, August 24, 2012 8:58:09 AM > Subject: [Nek5000-users] testing suite > > Hi Neks > > I have a few questions about test suite in nekton (in nek5_svn/tests/). > Nek5000 is a part of CRESTA project and I need simple method for testing > new versions of the code on different machines. Tests in nek5_svn/tests/ > are perfect, but I've got some problems: > > 1) genmap work perfect with pgi compiler, but with gnu compilers returns > segmentation fault for conj_ht test. It's due to not initialized key > array in subroutine spec_bis_conn. It would be good to add > -finit-local-zero flag for gfortran in maketools > > 2) tests in 2d_eigtest work fine for pgi, but fail for gfortran, since > the difference in the lambda error is bigger than 10^-6. It happens for > N=3 and 4 only; eig1.err: > GNU: > 2 19 0 5.7831860E+00 2.1065324E-02 1.6329577E-01 lambda > 3 34 0 5.7831860E+00 6.8588903E-04 1.3936160E-01 lambda > 4 61 0 5.7831860E+00 6.4127192E-07 2.6444060E-02 lambda > 5 84 0 5.7831860E+00 4.7561843E-08 3.3011994E-02 lambda > 6 121 0 5.7831860E+00 3.2211656E-10 1.1637760E-02 lambda > 7 178 0 5.7831860E+00 2.8581582E-12 1.6504072E-03 lambda > 8 243 0 5.7831860E+00 5.4534155E-13 4.8188495E-04 lambda > 9 314 0 5.7831860E+00 8.6153307E-14 2.9147672E-05 lambda > 10 400 0 5.7831860E+00 3.2018832E-12 6.8264261E-06 lambda > 11 478 0 5.7831860E+00 7.3994144E-12 4.4899419E-07 lambda > 12 614 0 5.7831860E+00 6.7972294E-12 4.0358872E-08 lambda > 13 715 0 5.7831860E+00 2.7814195E-11 2.0542709E-09 lambda > 14 829 0 5.7831860E+00 1.8316904E-11 1.1108244E-10 lambda > 15 883 0 5.7831860E+00 1.1938006E-11 3.0416639E-12 lambda > 16 900 0 5.7831860E+00 1.6848745E-12 5.3768924E-12 lambda > PGI: > 2 19 1 5.7831860E+00 2.1065324E-02 1.6329577E-01 lambda > 3 37 1 5.7831860E+00 6.8588903E-04 1.4437432E-01 lambda > 4 61 1 5.7831860E+00 6.4127192E-07 2.8477333E-02 lambda > 5 89 1 5.7831860E+00 4.7561947E-08 3.3011994E-02 lambda > 6 119 1 5.7831860E+00 3.2096015E-10 1.1637760E-02 lambda > 7 178 1 5.7831860E+00 2.7320368E-12 1.6504072E-03 lambda > 8 235 1 5.7831860E+00 1.0373924E-12 4.8188495E-04 lambda > 9 313 1 5.7831860E+00 5.7545080E-12 2.9147672E-05 lambda > 10 400 1 5.7831860E+00 1.0382806E-12 6.8264260E-06 lambda > 11 477 1 5.7831860E+00 2.2977176E-12 4.4899373E-07 lambda > 12 614 1 5.7831860E+00 2.7853275E-12 4.0358850E-08 lambda > 13 713 1 5.7831860E+00 1.4867219E-11 2.0542157E-09 lambda > 14 826 1 5.7831860E+00 1.4868107E-11 1.1256349E-10 lambda > 15 884 1 5.7831860E+00 1.1343815E-11 3.8686936E-12 lambda > 16 900 1 5.7831860E+00 5.1991300E-11 1.1914564E-11 lambda > > Have you got the same result? Should the tolerance in Analysis.py be > bigger in this case? Moreover this test was failing for me with > > [Example 2d_eig/INT2: Serial-iter/err]...I couldn't find all the > requested value in the log file... > [Example 2d_eig/INT2: Serial-iter/err]... 2 , 3 , 4 , 10 , > were not found... > Example 2d_eig/INT2: Serial-iter/err : F > > due to single list > value = [[' 2 ',19,2,6], > [' 2 ',1.6329577E-01,1e-06,2], > [' 3 ',37,2,6], > [' 3 ',1.4437432E-01,1e-06,2], > [' 4 ',61,2,6], > [' 4 ',2.8477333E-02,1e-06,2], > [' 10 ',400,2,6], > [' 10 ',6.8264260E-06,1e-06,2]] > > in Analysis.py. To get rid of this I had to divide it to 2 lists > value = [[' 2 ',19,2,6], > [' 3 ',37,2,6], > [' 4 ',61,2,6], > [' 10 ',400,2,6]] > > value = [[' 2 ',1.6329577E-01,1e-06,2], > [' 3 ',1.4437432E-01,1e-06,2], > [' 4 ',2.8477333E-02,1e-06,2], > [' 10 ',6.8264260E-06,1e-06,2]] > > 3) mhd-gpf (case without fast diagonalization method lfdm=0) fails both > for pgi and gnu compilers. It seems pressure does not converge giving > nan for gfortran. Cases with lfdm=1 give no errors. > > 4) I found most of moab tests commented in Analysis.py. Does it mean > moab is not fully implemented yet? > > 5) I found testing scripts tuned for single environment (./ in the PATH, > moab and matlab locations hidden in the script), so I've modified them > slightly to make them easier to run for others. Is it possible to add my > version of scripts to the repository? > > Regards > > Adam > > > _______________________________________________ > 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: From nek5000-users at lists.mcs.anl.gov Mon Aug 27 17:40:54 2012 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Mon, 27 Aug 2012 22:40:54 +0000 Subject: [Nek5000-users] 2D Axisymmetric in semi-circular annulus Message-ID: Dear Nek users, I have been attempting to set up a 2D axisymmetric problem with an azimuthal velocity, in a semi-circular annulus container (the 2D axisymmetric version of a spherical shell), but have encountered problems with the terms evolving the azimuthal velocity blowing up near to the axis, and wondered if anybody would be able to help with this? I have looked at the vortex2 example, and have copied the relevant aspects to my .usr and .rea files. I have set IFAXIS=T to get the correct viscous operators for cylindrical geometry where (x,y)->(z,R), as well as IFHEAT=T, IFAZIV=T, using temperature as the azimuthal velocity. My test mesh is created using prenek, and contains 4 elements on a polar grid from r=0.5 to 1 and theta=0 to 180. Since elements 2 & 4 have one side touching the R=0 (y=0) axis, I have used "A" boundary conditions, which are applied to side 1 for each of these elements, as is required. The remaining BCs are 'SYM' and 'I' for all of the exterior sides. The .rea file containing the mesh with 4 elements is attached to this email. (In the SIZE file I have set lx1=20,lxd=30,lx2=lx1-2). For a simple test, if I set the initial conditions to be a uniform rotation about the z-axis (setting temp = y), within several time-steps the code blows up, giving NaN's for each quantity (I have tested various initial conditions, which each give the same error). The line of code that appears to cause problems is the line ~240 of hmholtz.f, TERM1 = BM1(I,J,1,IEL)*U(I,J,1,IEL)/YM1(I,J,1,IEL)**2, since, when this term is set to 0, the code does not produce NaN's. (Though the viscous operator for the azimuthal velocity is then incorrect...) When IFHEAT=IFAZIV=F, i.e. when I am not integrating the temperature/azimuthal velocity, the code runs without problem on the same mesh. I am wondering if there is a problem with how I have set up the mesh that causes this problem? And if so, is there a way to fix this? Thanks, Adrian Modifications to .usr file are: c----------------------------------------------------------------------- subroutine userf (ix,iy,iz,eg) include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,f,eg if(y.gt.0) ffy = temp*temp/y return end c----------------------------------------------------------------------- subroutine userq (ix,iy,iz,eg) include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,f,eg if(y.gt.0) then visc = param(2) qvol = -uy*temp/y endif return end c----------------------------------------------------------------------- subroutine useric (ix,iy,iz,ieg) include 'SIZE' include 'TOTAL' include 'NEKUSE' temp = y return end c----------------------------------------------------------------------- My .rea file: ****** PARAMETERS ***** 2.610000 NEKTON VERSION 2 DIMENSIONAL RUN 118 PARAMETERS FOLLOW 1.00000 p001 DENSITY 0.10000E-06 p002 VISCOS 0.00000 p003 1.00000 p004 0.00000 p005 0.00000 p006 1.00000 p007 RHOCP 0.100000E-06 p008 CONDUCT 0.00000 p009 0.00000 p010 FINTIME 0.100000E+08 p011 NSTEPS 0.100000E-03 p012 DT 0.00000 p013 IOCOMM 0.00000 p014 IOTIME 1000.00 p015 IOSTEP 0.00000 p016 PSSOLVER: 0=default 1.00000 p017 0.500000E-01 p018 GRID < 0 --> # cells on screen -1.00000 p019 INTYPE 5.00000 p020 NORDER 0.100000E-06 p021 DIVERGENCE 0.100000E-08 p022 HELMHOLTZ 0.00000 p023 NPSCAL 0.100000E-01 p024 TOLREL 0.100000E-01 p025 TOLABS 0.450000 p026 COURANT/NTAU 3.00000 p027 TORDER 1.00000 p028 TORDER: mesh velocity (0: p28=p27) 0.00000 p029 = magnetic visc if > 0, = -1/Rm if < 0 0.00000 p030 > 0 ==> properties set in uservp() 0.00000 p031 NPERT: #perturbation modes 0.00000 p032 #BCs in re2 file, if > 0 0.00000 p033 0.00000 p034 0.00000 p035 0.00000 p036 0.00000 p037 0.00000 p038 0.00000 p039 0.00000 p040 0.00000 p041 1-->multiplicative SEMG 0.00000 p042 0=gmres/1=pcg 0.00000 p043 0=semg/1=schwarz 0.00000 p044 0=E-based/1=A-based prec. 0.00000 p045 Relaxation factor for DTFS 0.00000 p046 reserved 0.00000 p047 vnu: mesh matieral prop. 0.00000 p048 0.00000 p049 0.00000 p050 0.00000 p051 0.00000 p052 IOHIS 0.00000 p053 0.00000 p054 fixed flow rate dir: |p54|=1,2,3=x,y,z 0.00000 p055 vol.flow rate (p54>0) or Ubar (p54<0) 0.00000 p056 0.00000 p057 0.00000 p058 0.00000 p059 !=0 --> full Jac. eval. for each el. 0.00000 p060 !=0 --> init. velocity to small nonzero 0.00000 p061 0.00000 p062 >0 --> force byte_swap for output 0.00000 p063 =8 --> force 8-byte output 0.00000 p064 =1 --> perturbation restart 0.00000 p065 #iofiles (eg, 0 or 64); <0 --> sep. dirs 0.00000 p066 output : <0=ascii, else binary 0.00000 p067 restart: <0=ascii, else binary 0.00000 p068 iastep: freq for avg_all (0=iostep) 0.00000 p069 0.00000 p070 0.00000 p071 0.00000 p072 0.00000 p073 0.00000 p074 verbose Helmholtz 0.00000 p075 0.00000 p076 0.00000 p077 0.00000 p078 0.00000 p079 0.00000 p080 0.00000 p081 0.00000 p082 0.00000 p083 0.00000 p084 !=0 --> sets initial timestep if p12>0 0.00000 p085 dt ratio if p84 !=0, for timesteps>0 0.00000 p086 reserved 0.00000 p087 0.00000 p088 0.00000 p089 0.00000 p090 0.00000 p091 0.00000 p092 20.0000 p093 Number of previous pressure solns saved 5.00000 p094 start projecting velocity after p94 step 5.00000 p095 start projecting pressure after p95 step 0.00000 p096 0.00000 p097 0.00000 p098 3.00000 p099 dealiasing: <0--> off/3--> old/4--> new 0.00000 p100 0.00000 p101 Number of additional modes to filter 1.00000 p102 Dump out divergence at each time step 0.100000E-01 p103 weight of stabilizing filter (.01) 0.00000 p104 0.00000 p105 0.00000 p106 0.00000 p107 !=0 --> add to h2 array in hlmhotz eqn 0.00000 p108 0.00000 p109 0.00000 p110 0.00000 p111 0.00000 p112 0.00000 p113 0.00000 p114 0.00000 p115 0.00000 p116 !=0: x elements for fast tensor product 0.00000 p117 !=0: y elements for fast tensor product 0.00000 p118 !=0: z elements for fast tensor product 4 Lines of passive scalar data follows2 CONDUCT; 2RHOCP 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 12 LOGICAL SWITCHES FOLLOW T IFFLOW T IFHEAT T IFTRAN T T F F F F F F F F F IFNAV & IFADVC (convection in P.S. fields) F F T T T T T T T T T T IFTMSH (IF mesh for this field is T mesh) T IFAXIS T IFAZIV T IFSTRS F IFMGRID F IFMODEL F IFKEPS F IFCHAR 10.0000 10.0000 -4.00000 -5.50000 XFAC,YFAC,XZERO,YZERO **MESH DATA** 1st line is X of corner 1,2,3,4. 2nd line is Y. 4 2 4 NEL,NDIM,NELV ELEMENT 1 [ 1C] GROUP 0 -0.4371138E-07 -0.2185569E-07 0.3535533 0.7071066 1.000000 0.5000000 0.3535533 0.7071066 ELEMENT 2 [ 1D] GROUP 0 0.5000000 1.000000 0.7071066 0.3535533 0.000000 0.000000 0.7071066 0.3535533 ELEMENT 3 [ 1D] GROUP 0 0.5962440E-08 0.1192488E-07 -0.7071066 -0.3535533 0.5000000 1.000000 0.7071066 0.3535533 ELEMENT 4 [ 1 ] GROUP 0 -1.000000 -0.5000000 -0.3535533 -0.7071066 0.8742278E-07 0.4371139E-07 0.3535533 0.7071066 ***** CURVED SIDE DATA ***** 8 Curved sides follow IEDGE,IEL,CURVE(I),I=1,5, CCURVE 2 1 -0.500000 0.00000 0.00000 0.00000 0.00000 C 4 1 1.00000 0.00000 0.00000 0.00000 0.00000 C 2 2 1.00000 0.00000 0.00000 0.00000 0.00000 C 4 2 -0.500000 0.00000 0.00000 0.00000 0.00000 C 2 3 1.00000 0.00000 0.00000 0.00000 0.00000 C 4 3 -0.500000 0.00000 0.00000 0.00000 0.00000 C 2 4 -0.500000 0.00000 0.00000 0.00000 0.00000 C 4 4 1.00000 0.00000 0.00000 0.00000 0.00000 C ***** BOUNDARY CONDITIONS ***** ***** FLUID BOUNDARY CONDITIONS ***** E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 SYM 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 SYM 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 SYM 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 SYM 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 SYM 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 SYM 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 SYM 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 SYM 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 ***** THERMAL BOUNDARY CONDITIONS ***** E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 I 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 I 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 I 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 I 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 I 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 I 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 I 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 I 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 0 PRESOLVE/RESTART OPTIONS ***** 7 INITIAL CONDITIONS ***** C Default C Default C Default C Default C Default C Default C Default ***** DRIVE FORCE DATA ***** BODY FORCE, FLOW, Q 4 Lines of Drive force data follow C C C C ***** Variable Property Data ***** Overrrides Parameter data. 1 Lines follow. 0 PACKETS OF DATA FOLLOW ***** HISTORY AND INTEGRAL DATA ***** 0 POINTS. Hcode, I,J,H,IEL ***** OUTPUT FIELD SPECIFICATION ***** 6 SPECIFICATIONS FOLLOW T COORDINATES T VELOCITY T PRESSURE T TEMPERATURE F TEMPERATURE GRADIENT 0 PASSIVE SCALARS ***** OBJECT SPECIFICATION ***** 0 Surface Objects 0 Volume Objects 0 Edge Objects 0 Point Objects From nek5000-users at lists.mcs.anl.gov Mon Aug 27 22:05:19 2012 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Mon, 27 Aug 2012 22:05:19 -0500 (CDT) Subject: [Nek5000-users] 2D Axisymmetric in semi-circular annulus In-Reply-To: Message-ID: Hi Adrian, A quick note that BC "A " is used only in a case when domain touches the axis of rotation like in a case of cylinder. But in a case of cylindrical annulus, you should use 'W ' for axial Vx & radial Vr components of velocity (or 'v ' with appropriate values in userbc when ifield=1). In a case of non-trivial azimuthal velocity or swirl (IFAZIV=T), azimuthal velocity component is placed into t(*,*,*,*,1) so one should use 't ' with appropriate values for TEMP in userbc when ifield=2 If in addition to azimuthal velocity (IFAZIV=T), you are also solving for temperature then you temperature array is placed into an array of the first passive scalar, i.e. t(*,*,*,*,2). Then you can set BC & sources using PS1 for it when ifield=3 Let me know if you have questions. Aleks ----- Original Message ----- From: nek5000-users at lists.mcs.anl.gov To: nek5000-users at lists.mcs.anl.gov Sent: Monday, August 27, 2012 5:40:54 PM Subject: [Nek5000-users] 2D Axisymmetric in semi-circular annulus Dear Nek users, I have been attempting to set up a 2D axisymmetric problem with an azimuthal velocity, in a semi-circular annulus container (the 2D axisymmetric version of a spherical shell), but have encountered problems with the terms evolving the azimuthal velocity blowing up near to the axis, and wondered if anybody would be able to help with this? I have looked at the vortex2 example, and have copied the relevant aspects to my .usr and .rea files. I have set IFAXIS=T to get the correct viscous operators for cylindrical geometry where (x,y)->(z,R), as well as IFHEAT=T, IFAZIV=T, using temperature as the azimuthal velocity. My test mesh is created using prenek, and contains 4 elements on a polar grid from r=0.5 to 1 and theta=0 to 180. Since elements 2 & 4 have one side touching the R=0 (y=0) axis, I have used "A" boundary conditions, which are applied to side 1 for each of these elements, as is required. The remaining BCs are 'SYM' and 'I' for all of the exterior sides. The .rea file containing the mesh with 4 elements is attached to this email. (In the SIZE file I have set lx1=20,lxd=30,lx2=lx1-2). For a simple test, if I set the initial conditions to be a uniform rotation about the z-axis (setting temp = y), within several time-steps the code blows up, giving NaN's for each quantity (I have tested various initial conditions, which each give the same error). The line of code that appears to cause problems is the line ~240 of hmholtz.f, TERM1 = BM1(I,J,1,IEL)*U(I,J,1,IEL)/YM1(I,J,1,IEL)**2, since, when this term is set to 0, the code does not produce NaN's. (Though the viscous operator for the azimuthal velocity is then incorrect...) When IFHEAT=IFAZIV=F, i.e. when I am not integrating the temperature/azimuthal velocity, the code runs without problem on the same mesh. I am wondering if there is a problem with how I have set up the mesh that causes this problem? And if so, is there a way to fix this? Thanks, Adrian Modifications to .usr file are: c----------------------------------------------------------------------- subroutine userf (ix,iy,iz,eg) include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,f,eg if(y.gt.0) ffy = temp*temp/y return end c----------------------------------------------------------------------- subroutine userq (ix,iy,iz,eg) include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,f,eg if(y.gt.0) then visc = param(2) qvol = -uy*temp/y endif return end c----------------------------------------------------------------------- subroutine useric (ix,iy,iz,ieg) include 'SIZE' include 'TOTAL' include 'NEKUSE' temp = y return end c----------------------------------------------------------------------- My .rea file: ****** PARAMETERS ***** 2.610000 NEKTON VERSION 2 DIMENSIONAL RUN 118 PARAMETERS FOLLOW 1.00000 p001 DENSITY 0.10000E-06 p002 VISCOS 0.00000 p003 1.00000 p004 0.00000 p005 0.00000 p006 1.00000 p007 RHOCP 0.100000E-06 p008 CONDUCT 0.00000 p009 0.00000 p010 FINTIME 0.100000E+08 p011 NSTEPS 0.100000E-03 p012 DT 0.00000 p013 IOCOMM 0.00000 p014 IOTIME 1000.00 p015 IOSTEP 0.00000 p016 PSSOLVER: 0=default 1.00000 p017 0.500000E-01 p018 GRID < 0 --> # cells on screen -1.00000 p019 INTYPE 5.00000 p020 NORDER 0.100000E-06 p021 DIVERGENCE 0.100000E-08 p022 HELMHOLTZ 0.00000 p023 NPSCAL 0.100000E-01 p024 TOLREL 0.100000E-01 p025 TOLABS 0.450000 p026 COURANT/NTAU 3.00000 p027 TORDER 1.00000 p028 TORDER: mesh velocity (0: p28=p27) 0.00000 p029 = magnetic visc if > 0, = -1/Rm if < 0 0.00000 p030 > 0 ==> properties set in uservp() 0.00000 p031 NPERT: #perturbation modes 0.00000 p032 #BCs in re2 file, if > 0 0.00000 p033 0.00000 p034 0.00000 p035 0.00000 p036 0.00000 p037 0.00000 p038 0.00000 p039 0.00000 p040 0.00000 p041 1-->multiplicative SEMG 0.00000 p042 0=gmres/1=pcg 0.00000 p043 0=semg/1=schwarz 0.00000 p044 0=E-based/1=A-based prec. 0.00000 p045 Relaxation factor for DTFS 0.00000 p046 reserved 0.00000 p047 vnu: mesh matieral prop. 0.00000 p048 0.00000 p049 0.00000 p050 0.00000 p051 0.00000 p052 IOHIS 0.00000 p053 0.00000 p054 fixed flow rate dir: |p54|=1,2,3=x,y,z 0.00000 p055 vol.flow rate (p54>0) or Ubar (p54<0) 0.00000 p056 0.00000 p057 0.00000 p058 0.00000 p059 !=0 --> full Jac. eval. for each el. 0.00000 p060 !=0 --> init. velocity to small nonzero 0.00000 p061 0.00000 p062 >0 --> force byte_swap for output 0.00000 p063 =8 --> force 8-byte output 0.00000 p064 =1 --> perturbation restart 0.00000 p065 #iofiles (eg, 0 or 64); <0 --> sep. dirs 0.00000 p066 output : <0=ascii, else binary 0.00000 p067 restart: <0=ascii, else binary 0.00000 p068 iastep: freq for avg_all (0=iostep) 0.00000 p069 0.00000 p070 0.00000 p071 0.00000 p072 0.00000 p073 0.00000 p074 verbose Helmholtz 0.00000 p075 0.00000 p076 0.00000 p077 0.00000 p078 0.00000 p079 0.00000 p080 0.00000 p081 0.00000 p082 0.00000 p083 0.00000 p084 !=0 --> sets initial timestep if p12>0 0.00000 p085 dt ratio if p84 !=0, for timesteps>0 0.00000 p086 reserved 0.00000 p087 0.00000 p088 0.00000 p089 0.00000 p090 0.00000 p091 0.00000 p092 20.0000 p093 Number of previous pressure solns saved 5.00000 p094 start projecting velocity after p94 step 5.00000 p095 start projecting pressure after p95 step 0.00000 p096 0.00000 p097 0.00000 p098 3.00000 p099 dealiasing: <0--> off/3--> old/4--> new 0.00000 p100 0.00000 p101 Number of additional modes to filter 1.00000 p102 Dump out divergence at each time step 0.100000E-01 p103 weight of stabilizing filter (.01) 0.00000 p104 0.00000 p105 0.00000 p106 0.00000 p107 !=0 --> add to h2 array in hlmhotz eqn 0.00000 p108 0.00000 p109 0.00000 p110 0.00000 p111 0.00000 p112 0.00000 p113 0.00000 p114 0.00000 p115 0.00000 p116 !=0: x elements for fast tensor product 0.00000 p117 !=0: y elements for fast tensor product 0.00000 p118 !=0: z elements for fast tensor product 4 Lines of passive scalar data follows2 CONDUCT; 2RHOCP 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 12 LOGICAL SWITCHES FOLLOW T IFFLOW T IFHEAT T IFTRAN T T F F F F F F F F F IFNAV & IFADVC (convection in P.S. fields) F F T T T T T T T T T T IFTMSH (IF mesh for this field is T mesh) T IFAXIS T IFAZIV T IFSTRS F IFMGRID F IFMODEL F IFKEPS F IFCHAR 10.0000 10.0000 -4.00000 -5.50000 XFAC,YFAC,XZERO,YZERO **MESH DATA** 1st line is X of corner 1,2,3,4. 2nd line is Y. 4 2 4 NEL,NDIM,NELV ELEMENT 1 [ 1C] GROUP 0 -0.4371138E-07 -0.2185569E-07 0.3535533 0.7071066 1.000000 0.5000000 0.3535533 0.7071066 ELEMENT 2 [ 1D] GROUP 0 0.5000000 1.000000 0.7071066 0.3535533 0.000000 0.000000 0.7071066 0.3535533 ELEMENT 3 [ 1D] GROUP 0 0.5962440E-08 0.1192488E-07 -0.7071066 -0.3535533 0.5000000 1.000000 0.7071066 0.3535533 ELEMENT 4 [ 1 ] GROUP 0 -1.000000 -0.5000000 -0.3535533 -0.7071066 0.8742278E-07 0.4371139E-07 0.3535533 0.7071066 ***** CURVED SIDE DATA ***** 8 Curved sides follow IEDGE,IEL,CURVE(I),I=1,5, CCURVE 2 1 -0.500000 0.00000 0.00000 0.00000 0.00000 C 4 1 1.00000 0.00000 0.00000 0.00000 0.00000 C 2 2 1.00000 0.00000 0.00000 0.00000 0.00000 C 4 2 -0.500000 0.00000 0.00000 0.00000 0.00000 C 2 3 1.00000 0.00000 0.00000 0.00000 0.00000 C 4 3 -0.500000 0.00000 0.00000 0.00000 0.00000 C 2 4 -0.500000 0.00000 0.00000 0.00000 0.00000 C 4 4 1.00000 0.00000 0.00000 0.00000 0.00000 C ***** BOUNDARY CONDITIONS ***** ***** FLUID BOUNDARY CONDITIONS ***** E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 SYM 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 SYM 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 SYM 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 SYM 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 SYM 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 SYM 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 SYM 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 SYM 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 ***** THERMAL BOUNDARY CONDITIONS ***** E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 I 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 I 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 I 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 I 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 I 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 I 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 I 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 I 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 0 PRESOLVE/RESTART OPTIONS ***** 7 INITIAL CONDITIONS ***** C Default C Default C Default C Default C Default C Default C Default ***** DRIVE FORCE DATA ***** BODY FORCE, FLOW, Q 4 Lines of Drive force data follow C C C C ***** Variable Property Data ***** Overrrides Parameter data. 1 Lines follow. 0 PACKETS OF DATA FOLLOW ***** HISTORY AND INTEGRAL DATA ***** 0 POINTS. Hcode, I,J,H,IEL ***** OUTPUT FIELD SPECIFICATION ***** 6 SPECIFICATIONS FOLLOW T COORDINATES T VELOCITY T PRESSURE T TEMPERATURE F TEMPERATURE GRADIENT 0 PASSIVE SCALARS ***** OBJECT SPECIFICATION ***** 0 Surface Objects 0 Volume Objects 0 Edge Objects 0 Point Objects _______________________________________________ Nek5000-users mailing list Nek5000-users at lists.mcs.anl.gov https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users From nek5000-users at lists.mcs.anl.gov Tue Aug 28 02:00:01 2012 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Tue, 28 Aug 2012 02:00:01 -0500 (CDT) Subject: [Nek5000-users] 2D Axisymmetric in semi-circular annulus In-Reply-To: References: Message-ID: Hi Adrian, My suspicion is that the issue is somehow related to the SYM bc + curve sides + ifaxis. Generally, SYM on curve sides implies using the stress formulation. At present, I'm not certain of the status of the combination: IFSTRS T IFAXIS T We can look into this as well. Sorry that this has been holding you up. Paul On Mon, 27 Aug 2012, nek5000-users at lists.mcs.anl.gov wrote: > Dear Nek users, > > I have been attempting to set up a 2D axisymmetric problem with an azimuthal > velocity, in a semi-circular annulus container (the 2D axisymmetric version > of a spherical shell), but have encountered problems with the terms evolving > the azimuthal velocity blowing up near to the axis, and wondered if anybody > would be able to help with this? > > I have looked at the vortex2 example, and have copied the relevant aspects to > my .usr and .rea files. I have set IFAXIS=T to get the correct viscous > operators for cylindrical geometry where (x,y)->(z,R), as well as IFHEAT=T, > IFAZIV=T, using temperature as the azimuthal velocity. My test mesh is > created using prenek, and contains 4 elements on a polar grid from r=0.5 to 1 > and theta=0 to 180. Since elements 2 & 4 have one side touching the R=0 (y=0) > axis, I have used "A" boundary conditions, which are applied to side 1 for > each of these elements, as is required. The remaining BCs are 'SYM' and 'I' > for all of the exterior sides. The .rea file containing the mesh with 4 > elements is attached to this email. (In the SIZE file I have set > lx1=20,lxd=30,lx2=lx1-2). > > For a simple test, if I set the initial conditions to be a uniform rotation > about the z-axis (setting temp = y), within several time-steps the code blows > up, giving NaN's for each quantity (I have tested various initial conditions, > which each give the same error). The line of code that appears to cause > problems is the line ~240 of hmholtz.f, TERM1 = > BM1(I,J,1,IEL)*U(I,J,1,IEL)/YM1(I,J,1,IEL)**2, > since, when this term is set to 0, the code does not produce NaN's. (Though > the viscous operator for the azimuthal velocity is then incorrect...) > > When IFHEAT=IFAZIV=F, i.e. when I am not integrating the > temperature/azimuthal velocity, the code runs without problem on the same > mesh. > > I am wondering if there is a problem with how I have set up the mesh that > causes this problem? And if so, is there a way to fix this? > > Thanks, > Adrian > > Modifications to .usr file are: > > c----------------------------------------------------------------------- > subroutine userf (ix,iy,iz,eg) > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > integer e,f,eg > if(y.gt.0) ffy = temp*temp/y > return > end > c----------------------------------------------------------------------- > subroutine userq (ix,iy,iz,eg) > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > integer e,f,eg > if(y.gt.0) then > visc = param(2) > qvol = -uy*temp/y > endif > return > end > c----------------------------------------------------------------------- > subroutine useric (ix,iy,iz,ieg) > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > temp = y > return > end > c----------------------------------------------------------------------- > > My .rea file: > > ****** PARAMETERS ***** > 2.610000 NEKTON VERSION > 2 DIMENSIONAL RUN > 118 PARAMETERS FOLLOW > 1.00000 p001 DENSITY > 0.10000E-06 p002 VISCOS > 0.00000 p003 > 1.00000 p004 > 0.00000 p005 > 0.00000 p006 > 1.00000 p007 RHOCP > 0.100000E-06 p008 CONDUCT > 0.00000 p009 > 0.00000 p010 FINTIME > 0.100000E+08 p011 NSTEPS > 0.100000E-03 p012 DT > 0.00000 p013 IOCOMM > 0.00000 p014 IOTIME > 1000.00 p015 IOSTEP > 0.00000 p016 PSSOLVER: 0=default > 1.00000 p017 > 0.500000E-01 p018 GRID < 0 --> # cells on screen > -1.00000 p019 INTYPE > 5.00000 p020 NORDER > 0.100000E-06 p021 DIVERGENCE > 0.100000E-08 p022 HELMHOLTZ > 0.00000 p023 NPSCAL > 0.100000E-01 p024 TOLREL > 0.100000E-01 p025 TOLABS > 0.450000 p026 COURANT/NTAU > 3.00000 p027 TORDER > 1.00000 p028 TORDER: mesh velocity (0: p28=p27) > 0.00000 p029 = magnetic visc if > 0, = -1/Rm if < 0 > 0.00000 p030 > 0 ==> properties set in uservp() > 0.00000 p031 NPERT: #perturbation modes > 0.00000 p032 #BCs in re2 file, if > 0 > 0.00000 p033 > 0.00000 p034 > 0.00000 p035 > 0.00000 p036 > 0.00000 p037 > 0.00000 p038 > 0.00000 p039 > 0.00000 p040 > 0.00000 p041 1-->multiplicative SEMG > 0.00000 p042 0=gmres/1=pcg > 0.00000 p043 0=semg/1=schwarz > 0.00000 p044 0=E-based/1=A-based prec. > 0.00000 p045 Relaxation factor for DTFS > 0.00000 p046 reserved > 0.00000 p047 vnu: mesh matieral prop. > 0.00000 p048 > 0.00000 p049 > 0.00000 p050 > 0.00000 p051 > 0.00000 p052 IOHIS > 0.00000 p053 > 0.00000 p054 fixed flow rate dir: |p54|=1,2,3=x,y,z > 0.00000 p055 vol.flow rate (p54>0) or Ubar (p54<0) > 0.00000 p056 > 0.00000 p057 > 0.00000 p058 > 0.00000 p059 !=0 --> full Jac. eval. for each el. > 0.00000 p060 !=0 --> init. velocity to small nonzero > 0.00000 p061 > 0.00000 p062 >0 --> force byte_swap for output > 0.00000 p063 =8 --> force 8-byte output > 0.00000 p064 =1 --> perturbation restart > 0.00000 p065 #iofiles (eg, 0 or 64); <0 --> sep. dirs > 0.00000 p066 output : <0=ascii, else binary > 0.00000 p067 restart: <0=ascii, else binary > 0.00000 p068 iastep: freq for avg_all (0=iostep) > 0.00000 p069 > 0.00000 p070 > 0.00000 p071 > 0.00000 p072 > 0.00000 p073 > 0.00000 p074 verbose Helmholtz > 0.00000 p075 > 0.00000 p076 > 0.00000 p077 > 0.00000 p078 > 0.00000 p079 > 0.00000 p080 > 0.00000 p081 > 0.00000 p082 > 0.00000 p083 > 0.00000 p084 !=0 --> sets initial timestep if p12>0 > 0.00000 p085 dt ratio if p84 !=0, for timesteps>0 > 0.00000 p086 reserved > 0.00000 p087 > 0.00000 p088 > 0.00000 p089 > 0.00000 p090 > 0.00000 p091 > 0.00000 p092 > 20.0000 p093 Number of previous pressure solns saved > 5.00000 p094 start projecting velocity after p94 step > 5.00000 p095 start projecting pressure after p95 step > 0.00000 p096 > 0.00000 p097 > 0.00000 p098 > 3.00000 p099 dealiasing: <0--> off/3--> old/4--> new > 0.00000 p100 > 0.00000 p101 Number of additional modes to filter > 1.00000 p102 Dump out divergence at each time step > 0.100000E-01 p103 weight of stabilizing filter (.01) > 0.00000 p104 > 0.00000 p105 > 0.00000 p106 > 0.00000 p107 !=0 --> add to h2 array in hlmhotz eqn > 0.00000 p108 > 0.00000 p109 > 0.00000 p110 > 0.00000 p111 > 0.00000 p112 > 0.00000 p113 > 0.00000 p114 > 0.00000 p115 > 0.00000 p116 !=0: x elements for fast tensor product > 0.00000 p117 !=0: y elements for fast tensor product > 0.00000 p118 !=0: z elements for fast tensor product > 4 Lines of passive scalar data follows2 CONDUCT; 2RHOCP > 0.00000 0.00000 0.00000 0.00000 0.00000 > 0.00000 0.00000 0.00000 0.00000 > 0.00000 0.00000 0.00000 0.00000 0.00000 > 0.00000 0.00000 0.00000 0.00000 > 12 LOGICAL SWITCHES FOLLOW > T IFFLOW > T IFHEAT > T IFTRAN > T T F F F F F F F F F IFNAV & IFADVC (convection in P.S. fields) > F F T T T T T T T T T T IFTMSH (IF mesh for this field is T mesh) > T IFAXIS > T IFAZIV > T IFSTRS > F IFMGRID > F IFMODEL > F IFKEPS > F IFCHAR > 10.0000 10.0000 -4.00000 -5.50000 XFAC,YFAC,XZERO,YZERO > **MESH DATA** 1st line is X of corner 1,2,3,4. 2nd line is Y. > 4 2 4 NEL,NDIM,NELV > ELEMENT 1 [ 1C] GROUP 0 > -0.4371138E-07 -0.2185569E-07 0.3535533 0.7071066 > 1.000000 0.5000000 0.3535533 0.7071066 > ELEMENT 2 [ 1D] GROUP 0 > 0.5000000 1.000000 0.7071066 0.3535533 > 0.000000 0.000000 0.7071066 0.3535533 > ELEMENT 3 [ 1D] GROUP 0 > 0.5962440E-08 0.1192488E-07 -0.7071066 -0.3535533 > 0.5000000 1.000000 0.7071066 0.3535533 > ELEMENT 4 [ 1 ] GROUP 0 > -1.000000 -0.5000000 -0.3535533 -0.7071066 > 0.8742278E-07 0.4371139E-07 0.3535533 0.7071066 > ***** CURVED SIDE DATA ***** > 8 Curved sides follow IEDGE,IEL,CURVE(I),I=1,5, CCURVE > 2 1 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 4 1 1.00000 0.00000 0.00000 0.00000 0.00000 C > 2 2 1.00000 0.00000 0.00000 0.00000 0.00000 C > 4 2 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 2 3 1.00000 0.00000 0.00000 0.00000 0.00000 C > 4 3 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 2 4 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 4 4 1.00000 0.00000 0.00000 0.00000 0.00000 C > ***** BOUNDARY CONDITIONS ***** > ***** FLUID BOUNDARY CONDITIONS ***** > E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 > SYM 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 > SYM 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 > SYM 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 > SYM 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 > SYM 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 > SYM 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 > SYM 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 > SYM 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 > ***** THERMAL BOUNDARY CONDITIONS ***** > E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 > I 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 > I 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 > I 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 > I 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 > I 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 > I 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 > I 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 > I 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 > 0 PRESOLVE/RESTART OPTIONS ***** > 7 INITIAL CONDITIONS ***** > C Default > C Default > C Default > C Default > C Default > C Default > C Default > ***** DRIVE FORCE DATA ***** BODY FORCE, FLOW, Q > 4 Lines of Drive force data follow > C > C > C > C > ***** Variable Property Data ***** Overrrides Parameter data. > 1 Lines follow. > 0 PACKETS OF DATA FOLLOW > ***** HISTORY AND INTEGRAL DATA ***** > 0 POINTS. Hcode, I,J,H,IEL > ***** OUTPUT FIELD SPECIFICATION ***** > 6 SPECIFICATIONS FOLLOW > T COORDINATES > T VELOCITY > T PRESSURE > T TEMPERATURE > F TEMPERATURE GRADIENT > 0 PASSIVE SCALARS > ***** OBJECT SPECIFICATION ***** > 0 Surface Objects > 0 Volume Objects > 0 Edge Objects > 0 Point Objects > _______________________________________________ > Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > From nek5000-users at lists.mcs.anl.gov Tue Aug 28 02:19:00 2012 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Tue, 28 Aug 2012 02:19:00 -0500 (CDT) Subject: [Nek5000-users] 2D Axisymmetric in semi-circular annulus In-Reply-To: References: Message-ID: OK --- that does not appear to be the issue... will dig a bit deeper. Paul On Tue, 28 Aug 2012, nek5000-users at lists.mcs.anl.gov wrote: > > Hi Adrian, > > My suspicion is that the issue is somehow related to the SYM bc + curve sides > + ifaxis. Generally, SYM on > curve sides implies using the stress formulation. > > At present, I'm not certain of the status of the combination: > > IFSTRS T > > IFAXIS T > > We can look into this as well. > > Sorry that this has been holding you up. > > Paul > > > > On Mon, 27 Aug 2012, nek5000-users at lists.mcs.anl.gov wrote: > >> Dear Nek users, >> >> I have been attempting to set up a 2D axisymmetric problem with an >> azimuthal >> velocity, in a semi-circular annulus container (the 2D axisymmetric version >> of a spherical shell), but have encountered problems with the terms >> evolving >> the azimuthal velocity blowing up near to the axis, and wondered if anybody >> would be able to help with this? >> >> I have looked at the vortex2 example, and have copied the relevant aspects >> to >> my .usr and .rea files. I have set IFAXIS=T to get the correct viscous >> operators for cylindrical geometry where (x,y)->(z,R), as well as IFHEAT=T, >> IFAZIV=T, using temperature as the azimuthal velocity. My test mesh is >> created using prenek, and contains 4 elements on a polar grid from r=0.5 to >> 1 >> and theta=0 to 180. Since elements 2 & 4 have one side touching the R=0 >> (y=0) >> axis, I have used "A" boundary conditions, which are applied to side 1 for >> each of these elements, as is required. The remaining BCs are 'SYM' and 'I' >> for all of the exterior sides. The .rea file containing the mesh with 4 >> elements is attached to this email. (In the SIZE file I have set >> lx1=20,lxd=30,lx2=lx1-2). >> >> For a simple test, if I set the initial conditions to be a uniform rotation >> about the z-axis (setting temp = y), within several time-steps the code >> blows >> up, giving NaN's for each quantity (I have tested various initial >> conditions, >> which each give the same error). The line of code that appears to cause >> problems is the line ~240 of hmholtz.f, TERM1 = >> BM1(I,J,1,IEL)*U(I,J,1,IEL)/YM1(I,J,1,IEL)**2, >> since, when this term is set to 0, the code does not produce NaN's. (Though >> the viscous operator for the azimuthal velocity is then incorrect...) >> >> When IFHEAT=IFAZIV=F, i.e. when I am not integrating the >> temperature/azimuthal velocity, the code runs without problem on the same >> mesh. >> >> I am wondering if there is a problem with how I have set up the mesh that >> causes this problem? And if so, is there a way to fix this? >> >> Thanks, >> Adrian >> >> Modifications to .usr file are: >> >> c----------------------------------------------------------------------- >> subroutine userf (ix,iy,iz,eg) >> include 'SIZE' >> include 'TOTAL' >> include 'NEKUSE' >> integer e,f,eg >> if(y.gt.0) ffy = temp*temp/y >> return >> end >> c----------------------------------------------------------------------- >> subroutine userq (ix,iy,iz,eg) >> include 'SIZE' >> include 'TOTAL' >> include 'NEKUSE' >> integer e,f,eg >> if(y.gt.0) then >> visc = param(2) >> qvol = -uy*temp/y >> endif >> return >> end >> c----------------------------------------------------------------------- >> subroutine useric (ix,iy,iz,ieg) >> include 'SIZE' >> include 'TOTAL' >> include 'NEKUSE' >> temp = y >> return >> end >> c----------------------------------------------------------------------- >> >> My .rea file: >> >> ****** PARAMETERS ***** >> 2.610000 NEKTON VERSION >> 2 DIMENSIONAL RUN >> 118 PARAMETERS FOLLOW >> 1.00000 p001 DENSITY >> 0.10000E-06 p002 VISCOS >> 0.00000 p003 >> 1.00000 p004 >> 0.00000 p005 >> 0.00000 p006 >> 1.00000 p007 RHOCP >> 0.100000E-06 p008 CONDUCT >> 0.00000 p009 >> 0.00000 p010 FINTIME >> 0.100000E+08 p011 NSTEPS >> 0.100000E-03 p012 DT >> 0.00000 p013 IOCOMM >> 0.00000 p014 IOTIME >> 1000.00 p015 IOSTEP >> 0.00000 p016 PSSOLVER: 0=default >> 1.00000 p017 >> 0.500000E-01 p018 GRID < 0 --> # cells on screen >> -1.00000 p019 INTYPE >> 5.00000 p020 NORDER >> 0.100000E-06 p021 DIVERGENCE >> 0.100000E-08 p022 HELMHOLTZ >> 0.00000 p023 NPSCAL >> 0.100000E-01 p024 TOLREL >> 0.100000E-01 p025 TOLABS >> 0.450000 p026 COURANT/NTAU >> 3.00000 p027 TORDER >> 1.00000 p028 TORDER: mesh velocity (0: p28=p27) >> 0.00000 p029 = magnetic visc if > 0, = -1/Rm if < 0 >> 0.00000 p030 > 0 ==> properties set in uservp() >> 0.00000 p031 NPERT: #perturbation modes >> 0.00000 p032 #BCs in re2 file, if > 0 >> 0.00000 p033 >> 0.00000 p034 >> 0.00000 p035 >> 0.00000 p036 >> 0.00000 p037 >> 0.00000 p038 >> 0.00000 p039 >> 0.00000 p040 >> 0.00000 p041 1-->multiplicative SEMG >> 0.00000 p042 0=gmres/1=pcg >> 0.00000 p043 0=semg/1=schwarz >> 0.00000 p044 0=E-based/1=A-based prec. >> 0.00000 p045 Relaxation factor for DTFS >> 0.00000 p046 reserved >> 0.00000 p047 vnu: mesh matieral prop. >> 0.00000 p048 >> 0.00000 p049 >> 0.00000 p050 >> 0.00000 p051 >> 0.00000 p052 IOHIS >> 0.00000 p053 >> 0.00000 p054 fixed flow rate dir: |p54|=1,2,3=x,y,z >> 0.00000 p055 vol.flow rate (p54>0) or Ubar (p54<0) >> 0.00000 p056 >> 0.00000 p057 >> 0.00000 p058 >> 0.00000 p059 !=0 --> full Jac. eval. for each el. >> 0.00000 p060 !=0 --> init. velocity to small nonzero >> 0.00000 p061 >> 0.00000 p062 >0 --> force byte_swap for output >> 0.00000 p063 =8 --> force 8-byte output >> 0.00000 p064 =1 --> perturbation restart >> 0.00000 p065 #iofiles (eg, 0 or 64); <0 --> sep. dirs >> 0.00000 p066 output : <0=ascii, else binary >> 0.00000 p067 restart: <0=ascii, else binary >> 0.00000 p068 iastep: freq for avg_all (0=iostep) >> 0.00000 p069 >> 0.00000 p070 >> 0.00000 p071 >> 0.00000 p072 >> 0.00000 p073 >> 0.00000 p074 verbose Helmholtz >> 0.00000 p075 >> 0.00000 p076 >> 0.00000 p077 >> 0.00000 p078 >> 0.00000 p079 >> 0.00000 p080 >> 0.00000 p081 >> 0.00000 p082 >> 0.00000 p083 >> 0.00000 p084 !=0 --> sets initial timestep if p12>0 >> 0.00000 p085 dt ratio if p84 !=0, for timesteps>0 >> 0.00000 p086 reserved >> 0.00000 p087 >> 0.00000 p088 >> 0.00000 p089 >> 0.00000 p090 >> 0.00000 p091 >> 0.00000 p092 >> 20.0000 p093 Number of previous pressure solns saved >> 5.00000 p094 start projecting velocity after p94 step >> 5.00000 p095 start projecting pressure after p95 step >> 0.00000 p096 >> 0.00000 p097 >> 0.00000 p098 >> 3.00000 p099 dealiasing: <0--> off/3--> old/4--> new >> 0.00000 p100 >> 0.00000 p101 Number of additional modes to filter >> 1.00000 p102 Dump out divergence at each time step >> 0.100000E-01 p103 weight of stabilizing filter (.01) >> 0.00000 p104 >> 0.00000 p105 >> 0.00000 p106 >> 0.00000 p107 !=0 --> add to h2 array in hlmhotz eqn >> 0.00000 p108 >> 0.00000 p109 >> 0.00000 p110 >> 0.00000 p111 >> 0.00000 p112 >> 0.00000 p113 >> 0.00000 p114 >> 0.00000 p115 >> 0.00000 p116 !=0: x elements for fast tensor product >> 0.00000 p117 !=0: y elements for fast tensor product >> 0.00000 p118 !=0: z elements for fast tensor product >> 4 Lines of passive scalar data follows2 CONDUCT; 2RHOCP >> 0.00000 0.00000 0.00000 0.00000 0.00000 >> 0.00000 0.00000 0.00000 0.00000 >> 0.00000 0.00000 0.00000 0.00000 0.00000 >> 0.00000 0.00000 0.00000 0.00000 >> 12 LOGICAL SWITCHES FOLLOW >> T IFFLOW >> T IFHEAT >> T IFTRAN >> T T F F F F F F F F F IFNAV & IFADVC (convection in P.S. fields) >> F F T T T T T T T T T T IFTMSH (IF mesh for this field is T mesh) >> T IFAXIS >> T IFAZIV >> T IFSTRS >> F IFMGRID >> F IFMODEL >> F IFKEPS >> F IFCHAR >> 10.0000 10.0000 -4.00000 -5.50000 >> XFAC,YFAC,XZERO,YZERO >> **MESH DATA** 1st line is X of corner 1,2,3,4. 2nd line is Y. >> 4 2 4 NEL,NDIM,NELV >> ELEMENT 1 [ 1C] GROUP 0 >> -0.4371138E-07 -0.2185569E-07 0.3535533 0.7071066 >> 1.000000 0.5000000 0.3535533 0.7071066 >> ELEMENT 2 [ 1D] GROUP 0 >> 0.5000000 1.000000 0.7071066 0.3535533 >> 0.000000 0.000000 0.7071066 0.3535533 >> ELEMENT 3 [ 1D] GROUP 0 >> 0.5962440E-08 0.1192488E-07 -0.7071066 -0.3535533 >> 0.5000000 1.000000 0.7071066 0.3535533 >> ELEMENT 4 [ 1 ] GROUP 0 >> -1.000000 -0.5000000 -0.3535533 -0.7071066 >> 0.8742278E-07 0.4371139E-07 0.3535533 0.7071066 >> ***** CURVED SIDE DATA ***** >> 8 Curved sides follow IEDGE,IEL,CURVE(I),I=1,5, CCURVE >> 2 1 -0.500000 0.00000 0.00000 0.00000 0.00000 >> C >> 4 1 1.00000 0.00000 0.00000 0.00000 0.00000 >> C >> 2 2 1.00000 0.00000 0.00000 0.00000 0.00000 >> C >> 4 2 -0.500000 0.00000 0.00000 0.00000 0.00000 >> C >> 2 3 1.00000 0.00000 0.00000 0.00000 0.00000 >> C >> 4 3 -0.500000 0.00000 0.00000 0.00000 0.00000 >> C >> 2 4 -0.500000 0.00000 0.00000 0.00000 0.00000 >> C >> 4 4 1.00000 0.00000 0.00000 0.00000 0.00000 >> C >> ***** BOUNDARY CONDITIONS ***** >> ***** FLUID BOUNDARY CONDITIONS ***** >> E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 >> SYM 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 >> SYM 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 >> SYM 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 >> SYM 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 >> SYM 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 >> SYM 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 >> SYM 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 >> SYM 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> ***** THERMAL BOUNDARY CONDITIONS ***** >> E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 >> I 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 >> I 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 >> I 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 >> I 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 >> I 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 >> I 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 >> I 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 >> I 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> 0 PRESOLVE/RESTART OPTIONS ***** >> 7 INITIAL CONDITIONS ***** >> C Default >> C Default >> C Default >> C Default >> C Default >> C Default >> C Default >> ***** DRIVE FORCE DATA ***** BODY FORCE, FLOW, Q >> 4 Lines of Drive force data follow >> C >> C >> C >> C >> ***** Variable Property Data ***** Overrrides Parameter data. >> 1 Lines follow. >> 0 PACKETS OF DATA FOLLOW >> ***** HISTORY AND INTEGRAL DATA ***** >> 0 POINTS. Hcode, I,J,H,IEL >> ***** OUTPUT FIELD SPECIFICATION ***** >> 6 SPECIFICATIONS FOLLOW >> T COORDINATES >> T VELOCITY >> T PRESSURE >> T TEMPERATURE >> F TEMPERATURE GRADIENT >> 0 PASSIVE SCALARS >> ***** OBJECT SPECIFICATION ***** >> 0 Surface Objects >> 0 Volume Objects >> 0 Edge Objects >> 0 Point Objects >> _______________________________________________ >> 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 > From nek5000-users at lists.mcs.anl.gov Tue Aug 28 10:48:25 2012 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Tue, 28 Aug 2012 15:48:25 +0000 Subject: [Nek5000-users] 2D Axisymmetric in semi-circular annulus Message-ID: Hi Aleks & Paul, Thanks both for your replies, and for looking into this. In my problem, I've got a semi-circular annulus that represents the (z,R)-plane for R.ge.0. Two of the elements have one side each that lies entirely along the axis of symmetry y=0 (R=0) -- these are elements 2 & 4, which have side 1 along y=0, in the positive & negative x (z) half-plane, respectively. Is an "A " BC not appropriate for this case? I thought that an "A " BC was required for each element that touched the axis of symmetry and that it corresponded with zero radial velocity and zero tangential stress. Have I misunderstood the "A " boundary condition? ("W " will apply a tangential stress at the boundary, which is unwanted in my case, so perhaps I should use "SYM" if "A " is inappropriate). Thanks, Adrian Hi Adrian, A quick note that BC "A " is used only in a case when domain touches the axis of rotation like in a case of cylinder. But in a case of cylindrical annulus, you should use 'W ' for axial Vx & radial Vr components of velocity (or 'v ' with appropriate values in userbc when ifield=1). In a case of non-trivial azimuthal velocity or swirl (IFAZIV=T), azimuthal velocity component is placed into t(*,*,*,*,1) so one should use 't ' with appropriate values for TEMP in userbc when ifield=2 If in addition to azimuthal velocity (IFAZIV=T), you are also solving for temperature then you temperature array is placed into an array of the first passive scalar, i.e. t(*,*,*,*,2). Then you can set BC & sources using PS1 for it when ifield=3 Let me know if you have questions. Aleks ----- Original Message ----- From: nek5000-users at lists.mcs.anl.gov To: nek5000-users at lists.mcs.anl.gov Sent: Monday, August 27, 2012 5:40:54 PM Subject: [Nek5000-users] 2D Axisymmetric in semi-circular annulus Dear Nek users, I have been attempting to set up a 2D axisymmetric problem with an azimuthal velocity, in a semi-circular annulus container (the 2D axisymmetric version of a spherical shell), but have encountered problems with the terms evolving the azimuthal velocity blowing up near to the axis, and wondered if anybody would be able to help with this? I have looked at the vortex2 example, and have copied the relevant aspects to my .usr and .rea files. I have set IFAXIS=T to get the correct viscous operators for cylindrical geometry where (x,y)->(z,R), as well as IFHEAT=T, IFAZIV=T, using temperature as the azimuthal velocity. My test mesh is created using prenek, and contains 4 elements on a polar grid from r=0.5 to 1 and theta=0 to 180. Since elements 2 & 4 have one side touching the R=0 (y=0) axis, I have used "A" boundary conditions, which are applied to side 1 for each of these elements, as is required. The remaining BCs are 'SYM' and 'I' for all of the exterior sides. The .rea file containing the mesh with 4 elements is attached to this email. (In the SIZE file I have set lx1=20,lxd=30,lx2=lx1-2). For a simple test, if I set the initial conditions to be a uniform rotation about the z-axis (setting temp = y), within several time-steps the code blows up, giving NaN's for each quantity (I have tested various initial conditions, which each give the same error). The line of code that appears to cause problems is the line ~240 of hmholtz.f, TERM1 = BM1(I,J,1,IEL)*U(I,J,1,IEL)/YM1(I,J,1,IEL)**2, since, when this term is set to 0, the code does not produce NaN's. (Though the viscous operator for the azimuthal velocity is then incorrect...) When IFHEAT=IFAZIV=F, i.e. when I am not integrating the temperature/azimuthal velocity, the code runs without problem on the same mesh. I am wondering if there is a problem with how I have set up the mesh that causes this problem? And if so, is there a way to fix this? Thanks, Adrian Modifications to .usr file are: c----------------------------------------------------------------------- subroutine userf (ix,iy,iz,eg) include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,f,eg if(y.gt.0) ffy = temp*temp/y return end c----------------------------------------------------------------------- subroutine userq (ix,iy,iz,eg) include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,f,eg if(y.gt.0) then visc = param(2) qvol = -uy*temp/y endif return end c----------------------------------------------------------------------- subroutine useric (ix,iy,iz,ieg) include 'SIZE' include 'TOTAL' include 'NEKUSE' temp = y return end c----------------------------------------------------------------------- My .rea file: ****** PARAMETERS ***** 2.610000 NEKTON VERSION 2 DIMENSIONAL RUN 118 PARAMETERS FOLLOW 1.00000 p001 DENSITY 0.10000E-06 p002 VISCOS 0.00000 p003 1.00000 p004 0.00000 p005 0.00000 p006 1.00000 p007 RHOCP 0.100000E-06 p008 CONDUCT 0.00000 p009 0.00000 p010 FINTIME 0.100000E+08 p011 NSTEPS 0.100000E-03 p012 DT 0.00000 p013 IOCOMM 0.00000 p014 IOTIME 1000.00 p015 IOSTEP 0.00000 p016 PSSOLVER: 0=default 1.00000 p017 0.500000E-01 p018 GRID < 0 --> # cells on screen -1.00000 p019 INTYPE 5.00000 p020 NORDER 0.100000E-06 p021 DIVERGENCE 0.100000E-08 p022 HELMHOLTZ 0.00000 p023 NPSCAL 0.100000E-01 p024 TOLREL 0.100000E-01 p025 TOLABS 0.450000 p026 COURANT/NTAU 3.00000 p027 TORDER 1.00000 p028 TORDER: mesh velocity (0: p28=p27) 0.00000 p029 = magnetic visc if > 0, = -1/Rm if < 0 0.00000 p030 > 0 ==> properties set in uservp() 0.00000 p031 NPERT: #perturbation modes 0.00000 p032 #BCs in re2 file, if > 0 0.00000 p033 0.00000 p034 0.00000 p035 0.00000 p036 0.00000 p037 0.00000 p038 0.00000 p039 0.00000 p040 0.00000 p041 1-->multiplicative SEMG 0.00000 p042 0=gmres/1=pcg 0.00000 p043 0=semg/1=schwarz 0.00000 p044 0=E-based/1=A-based prec. 0.00000 p045 Relaxation factor for DTFS 0.00000 p046 reserved 0.00000 p047 vnu: mesh matieral prop. 0.00000 p048 0.00000 p049 0.00000 p050 0.00000 p051 0.00000 p052 IOHIS 0.00000 p053 0.00000 p054 fixed flow rate dir: |p54|=1,2,3=x,y,z 0.00000 p055 vol.flow rate (p54>0) or Ubar (p54<0) 0.00000 p056 0.00000 p057 0.00000 p058 0.00000 p059 !=0 --> full Jac. eval. for each el. 0.00000 p060 !=0 --> init. velocity to small nonzero 0.00000 p061 0.00000 p062 >0 --> force byte_swap for output 0.00000 p063 =8 --> force 8-byte output 0.00000 p064 =1 --> perturbation restart 0.00000 p065 #iofiles (eg, 0 or 64); <0 --> sep. dirs 0.00000 p066 output : <0=ascii, else binary 0.00000 p067 restart: <0=ascii, else binary 0.00000 p068 iastep: freq for avg_all (0=iostep) 0.00000 p069 0.00000 p070 0.00000 p071 0.00000 p072 0.00000 p073 0.00000 p074 verbose Helmholtz 0.00000 p075 0.00000 p076 0.00000 p077 0.00000 p078 0.00000 p079 0.00000 p080 0.00000 p081 0.00000 p082 0.00000 p083 0.00000 p084 !=0 --> sets initial timestep if p12>0 0.00000 p085 dt ratio if p84 !=0, for timesteps>0 0.00000 p086 reserved 0.00000 p087 0.00000 p088 0.00000 p089 0.00000 p090 0.00000 p091 0.00000 p092 20.0000 p093 Number of previous pressure solns saved 5.00000 p094 start projecting velocity after p94 step 5.00000 p095 start projecting pressure after p95 step 0.00000 p096 0.00000 p097 0.00000 p098 3.00000 p099 dealiasing: <0--> off/3--> old/4--> new 0.00000 p100 0.00000 p101 Number of additional modes to filter 1.00000 p102 Dump out divergence at each time step 0.100000E-01 p103 weight of stabilizing filter (.01) 0.00000 p104 0.00000 p105 0.00000 p106 0.00000 p107 !=0 --> add to h2 array in hlmhotz eqn 0.00000 p108 0.00000 p109 0.00000 p110 0.00000 p111 0.00000 p112 0.00000 p113 0.00000 p114 0.00000 p115 0.00000 p116 !=0: x elements for fast tensor product 0.00000 p117 !=0: y elements for fast tensor product 0.00000 p118 !=0: z elements for fast tensor product 4 Lines of passive scalar data follows2 CONDUCT; 2RHOCP 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 12 LOGICAL SWITCHES FOLLOW T IFFLOW T IFHEAT T IFTRAN T T F F F F F F F F F IFNAV & IFADVC (convection in P.S. fields) F F T T T T T T T T T T IFTMSH (IF mesh for this field is T mesh) T IFAXIS T IFAZIV T IFSTRS F IFMGRID F IFMODEL F IFKEPS F IFCHAR 10.0000 10.0000 -4.00000 -5.50000 XFAC,YFAC,XZERO,YZERO **MESH DATA** 1st line is X of corner 1,2,3,4. 2nd line is Y. 4 2 4 NEL,NDIM,NELV ELEMENT 1 [ 1C] GROUP 0 -0.4371138E-07 -0.2185569E-07 0.3535533 0.7071066 1.000000 0.5000000 0.3535533 0.7071066 ELEMENT 2 [ 1D] GROUP 0 0.5000000 1.000000 0.7071066 0.3535533 0.000000 0.000000 0.7071066 0.3535533 ELEMENT 3 [ 1D] GROUP 0 0.5962440E-08 0.1192488E-07 -0.7071066 -0.3535533 0.5000000 1.000000 0.7071066 0.3535533 ELEMENT 4 [ 1 ] GROUP 0 -1.000000 -0.5000000 -0.3535533 -0.7071066 0.8742278E-07 0.4371139E-07 0.3535533 0.7071066 ***** CURVED SIDE DATA ***** 8 Curved sides follow IEDGE,IEL,CURVE(I),I=1,5, CCURVE 2 1 -0.500000 0.00000 0.00000 0.00000 0.00000 C 4 1 1.00000 0.00000 0.00000 0.00000 0.00000 C 2 2 1.00000 0.00000 0.00000 0.00000 0.00000 C 4 2 -0.500000 0.00000 0.00000 0.00000 0.00000 C 2 3 1.00000 0.00000 0.00000 0.00000 0.00000 C 4 3 -0.500000 0.00000 0.00000 0.00000 0.00000 C 2 4 -0.500000 0.00000 0.00000 0.00000 0.00000 C 4 4 1.00000 0.00000 0.00000 0.00000 0.00000 C ***** BOUNDARY CONDITIONS ***** ***** FLUID BOUNDARY CONDITIONS ***** E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 SYM 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 SYM 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 SYM 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 SYM 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 SYM 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 SYM 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 SYM 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 SYM 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 ***** THERMAL BOUNDARY CONDITIONS ***** E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 I 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 I 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 I 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 I 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 I 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 I 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 I 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 I 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 0 PRESOLVE/RESTART OPTIONS ***** 7 INITIAL CONDITIONS ***** C Default C Default C Default C Default C Default C Default C Default ***** DRIVE FORCE DATA ***** BODY FORCE, FLOW, Q 4 Lines of Drive force data follow C C C C ***** Variable Property Data ***** Overrrides Parameter data. 1 Lines follow. 0 PACKETS OF DATA FOLLOW ***** HISTORY AND INTEGRAL DATA ***** 0 POINTS. Hcode, I,J,H,IEL ***** OUTPUT FIELD SPECIFICATION ***** 6 SPECIFICATIONS FOLLOW T COORDINATES T VELOCITY T PRESSURE T TEMPERATURE F TEMPERATURE GRADIENT 0 PASSIVE SCALARS ***** OBJECT SPECIFICATION ***** 0 Surface Objects 0 Volume Objects 0 Edge Objects 0 Point Objects -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Tue Aug 28 10:56:46 2012 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Tue, 28 Aug 2012 10:56:46 -0500 (CDT) Subject: [Nek5000-users] 2D Axisymmetric in semi-circular annulus In-Reply-To: References: Message-ID: Hi Adrian, Sorry for missing a subtle point of your email -- it looks to me that vortex2 example is not a relevant example for your case. Judging by your .rea file, your geometry is a constant z slice, polar geometry [r,theta] that does not touch the axis of rotation while vortex2 example has a constant theata slice [r,z]... Let me look further and get back to you. Aleks On Tue, 28 Aug 2012, nek5000-users at lists.mcs.anl.gov wrote: > Hi Aleks & Paul, > > Thanks both for your replies, and for looking into this. > > In my problem, I've got a semi-circular annulus that represents the (z,R)-plane for R.ge.0. Two of the elements have one side each that lies entirely along the axis of symmetry y=0 (R=0) -- these are elements 2 & 4, which have side 1 along y=0, in the positive & negative x (z) half-plane, respectively. Is an "A " BC not appropriate for this case? I thought that an "A " BC was required for each element that touched the axis of symmetry and that it corresponded with zero radial velocity and zero tangential stress. Have I misunderstood the "A " boundary condition? ("W " will apply a tangential stress at the boundary, which is unwanted in my case, so perhaps I should use "SYM" if "A " is inappropriate). > > Thanks, > Adrian > > Hi Adrian, > > A quick note that BC "A " is used only in a case when domain touches the axis of rotation like in a case of cylinder. But in a case of cylindrical annulus, you should use 'W ' for axial Vx & radial Vr components of velocity (or 'v ' with appropriate values in userbc when ifield=1). In a case of non-trivial azimuthal velocity or swirl (IFAZIV=T), azimuthal velocity component is placed into t(*,*,*,*,1) so one should use 't ' with appropriate values for TEMP in userbc when ifield=2 > > If in addition to azimuthal velocity (IFAZIV=T), you are also solving for temperature then you temperature array is placed into an array of the first passive scalar, i.e. t(*,*,*,*,2). Then you can set BC & sources using PS1 for it when ifield=3 > > Let me know if you have questions. > Aleks > > > ----- Original Message ----- > From: nek5000-users at lists.mcs.anl.gov > To: nek5000-users at lists.mcs.anl.gov > Sent: Monday, August 27, 2012 5:40:54 PM > Subject: [Nek5000-users] 2D Axisymmetric in semi-circular annulus > > Dear Nek users, > > I have been attempting to set up a 2D axisymmetric problem with an azimuthal velocity, in a semi-circular annulus container (the 2D axisymmetric version of a spherical shell), but have encountered problems with the terms evolving the azimuthal velocity blowing up near to the axis, and wondered if anybody would be able to help with this? > > I have looked at the vortex2 example, and have copied the relevant aspects to my .usr and .rea files. I have set IFAXIS=T to get the correct viscous operators for cylindrical geometry where (x,y)->(z,R), as well as IFHEAT=T, IFAZIV=T, using temperature as the azimuthal velocity. My test mesh is created using prenek, and contains 4 elements on a polar grid from r=0.5 to 1 and theta=0 to 180. Since elements 2 & 4 have one side touching the R=0 (y=0) axis, I have used "A" boundary conditions, which are applied to side 1 for each of these elements, as is required. The remaining BCs are 'SYM' and 'I' for all of the exterior sides. The .rea file containing the mesh with 4 elements is attached to this email. (In the SIZE file I have set lx1=20,lxd=30,lx2=lx1-2). > > For a simple test, if I set the initial conditions to be a uniform rotation about the z-axis (setting temp = y), within several time-steps the code blows up, giving NaN's for each quantity (I have tested various initial conditions, which each give the same error). The line of code that appears to cause problems is the line ~240 of hmholtz.f, > TERM1 = BM1(I,J,1,IEL)*U(I,J,1,IEL)/YM1(I,J,1,IEL)**2, > since, when this term is set to 0, the code does not produce NaN's. (Though the viscous operator for the azimuthal velocity is then incorrect...) > > When IFHEAT=IFAZIV=F, i.e. when I am not integrating the temperature/azimuthal velocity, the code runs without problem on the same mesh. > > I am wondering if there is a problem with how I have set up the mesh that causes this problem? And if so, is there a way to fix this? > > Thanks, > Adrian > > Modifications to .usr file are: > > c----------------------------------------------------------------------- > subroutine userf (ix,iy,iz,eg) > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > integer e,f,eg > if(y.gt.0) ffy = temp*temp/y > return > end > c----------------------------------------------------------------------- > subroutine userq (ix,iy,iz,eg) > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > integer e,f,eg > if(y.gt.0) then > visc = param(2) > qvol = -uy*temp/y > endif > return > end > c----------------------------------------------------------------------- > subroutine useric (ix,iy,iz,ieg) > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > temp = y > return > end > c----------------------------------------------------------------------- > > My .rea file: > > ****** PARAMETERS ***** > 2.610000 NEKTON VERSION > 2 DIMENSIONAL RUN > 118 PARAMETERS FOLLOW > 1.00000 p001 DENSITY > 0.10000E-06 p002 VISCOS > 0.00000 p003 > 1.00000 p004 > 0.00000 p005 > 0.00000 p006 > 1.00000 p007 RHOCP > 0.100000E-06 p008 CONDUCT > 0.00000 p009 > 0.00000 p010 FINTIME > 0.100000E+08 p011 NSTEPS > 0.100000E-03 p012 DT > 0.00000 p013 IOCOMM > 0.00000 p014 IOTIME > 1000.00 p015 IOSTEP > 0.00000 p016 PSSOLVER: 0=default > 1.00000 p017 > 0.500000E-01 p018 GRID < 0 --> # cells on screen > -1.00000 p019 INTYPE > 5.00000 p020 NORDER > 0.100000E-06 p021 DIVERGENCE > 0.100000E-08 p022 HELMHOLTZ > 0.00000 p023 NPSCAL > 0.100000E-01 p024 TOLREL > 0.100000E-01 p025 TOLABS > 0.450000 p026 COURANT/NTAU > 3.00000 p027 TORDER > 1.00000 p028 TORDER: mesh velocity (0: p28=p27) > 0.00000 p029 = magnetic visc if > 0, = -1/Rm if < 0 > 0.00000 p030 > 0 ==> properties set in uservp() > 0.00000 p031 NPERT: #perturbation modes > 0.00000 p032 #BCs in re2 file, if > 0 > 0.00000 p033 > 0.00000 p034 > 0.00000 p035 > 0.00000 p036 > 0.00000 p037 > 0.00000 p038 > 0.00000 p039 > 0.00000 p040 > 0.00000 p041 1-->multiplicative SEMG > 0.00000 p042 0=gmres/1=pcg > 0.00000 p043 0=semg/1=schwarz > 0.00000 p044 0=E-based/1=A-based prec. > 0.00000 p045 Relaxation factor for DTFS > 0.00000 p046 reserved > 0.00000 p047 vnu: mesh matieral prop. > 0.00000 p048 > 0.00000 p049 > 0.00000 p050 > 0.00000 p051 > 0.00000 p052 IOHIS > 0.00000 p053 > 0.00000 p054 fixed flow rate dir: |p54|=1,2,3=x,y,z > 0.00000 p055 vol.flow rate (p54>0) or Ubar (p54<0) > 0.00000 p056 > 0.00000 p057 > 0.00000 p058 > 0.00000 p059 !=0 --> full Jac. eval. for each el. > 0.00000 p060 !=0 --> init. velocity to small nonzero > 0.00000 p061 > 0.00000 p062 >0 --> force byte_swap for output > 0.00000 p063 =8 --> force 8-byte output > 0.00000 p064 =1 --> perturbation restart > 0.00000 p065 #iofiles (eg, 0 or 64); <0 --> sep. dirs > 0.00000 p066 output : <0=ascii, else binary > 0.00000 p067 restart: <0=ascii, else binary > 0.00000 p068 iastep: freq for avg_all (0=iostep) > 0.00000 p069 > 0.00000 p070 > 0.00000 p071 > 0.00000 p072 > 0.00000 p073 > 0.00000 p074 verbose Helmholtz > 0.00000 p075 > 0.00000 p076 > 0.00000 p077 > 0.00000 p078 > 0.00000 p079 > 0.00000 p080 > 0.00000 p081 > 0.00000 p082 > 0.00000 p083 > 0.00000 p084 !=0 --> sets initial timestep if p12>0 > 0.00000 p085 dt ratio if p84 !=0, for timesteps>0 > 0.00000 p086 reserved > 0.00000 p087 > 0.00000 p088 > 0.00000 p089 > 0.00000 p090 > 0.00000 p091 > 0.00000 p092 > 20.0000 p093 Number of previous pressure solns saved > 5.00000 p094 start projecting velocity after p94 step > 5.00000 p095 start projecting pressure after p95 step > 0.00000 p096 > 0.00000 p097 > 0.00000 p098 > 3.00000 p099 dealiasing: <0--> off/3--> old/4--> new > 0.00000 p100 > 0.00000 p101 Number of additional modes to filter > 1.00000 p102 Dump out divergence at each time step > 0.100000E-01 p103 weight of stabilizing filter (.01) > 0.00000 p104 > 0.00000 p105 > 0.00000 p106 > 0.00000 p107 !=0 --> add to h2 array in hlmhotz eqn > 0.00000 p108 > 0.00000 p109 > 0.00000 p110 > 0.00000 p111 > 0.00000 p112 > 0.00000 p113 > 0.00000 p114 > 0.00000 p115 > 0.00000 p116 !=0: x elements for fast tensor product > 0.00000 p117 !=0: y elements for fast tensor product > 0.00000 p118 !=0: z elements for fast tensor product > 4 Lines of passive scalar data follows2 CONDUCT; 2RHOCP > 0.00000 0.00000 0.00000 0.00000 0.00000 > 0.00000 0.00000 0.00000 0.00000 > 0.00000 0.00000 0.00000 0.00000 0.00000 > 0.00000 0.00000 0.00000 0.00000 > 12 LOGICAL SWITCHES FOLLOW > T IFFLOW > T IFHEAT > T IFTRAN > T T F F F F F F F F F IFNAV & IFADVC (convection in P.S. fields) > F F T T T T T T T T T T IFTMSH (IF mesh for this field is T mesh) > T IFAXIS > T IFAZIV > T IFSTRS > F IFMGRID > F IFMODEL > F IFKEPS > F IFCHAR > 10.0000 10.0000 -4.00000 -5.50000 XFAC,YFAC,XZERO,YZERO > **MESH DATA** 1st line is X of corner 1,2,3,4. 2nd line is Y. > 4 2 4 NEL,NDIM,NELV > ELEMENT 1 [ 1C] GROUP 0 > -0.4371138E-07 -0.2185569E-07 0.3535533 0.7071066 > 1.000000 0.5000000 0.3535533 0.7071066 > ELEMENT 2 [ 1D] GROUP 0 > 0.5000000 1.000000 0.7071066 0.3535533 > 0.000000 0.000000 0.7071066 0.3535533 > ELEMENT 3 [ 1D] GROUP 0 > 0.5962440E-08 0.1192488E-07 -0.7071066 -0.3535533 > 0.5000000 1.000000 0.7071066 0.3535533 > ELEMENT 4 [ 1 ] GROUP 0 > -1.000000 -0.5000000 -0.3535533 -0.7071066 > 0.8742278E-07 0.4371139E-07 0.3535533 0.7071066 > ***** CURVED SIDE DATA ***** > 8 Curved sides follow IEDGE,IEL,CURVE(I),I=1,5, CCURVE > 2 1 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 4 1 1.00000 0.00000 0.00000 0.00000 0.00000 C > 2 2 1.00000 0.00000 0.00000 0.00000 0.00000 C > 4 2 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 2 3 1.00000 0.00000 0.00000 0.00000 0.00000 C > 4 3 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 2 4 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 4 4 1.00000 0.00000 0.00000 0.00000 0.00000 C > ***** BOUNDARY CONDITIONS ***** > ***** FLUID BOUNDARY CONDITIONS ***** > E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 > SYM 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 > SYM 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 > SYM 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 > SYM 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 > SYM 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 > SYM 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 > SYM 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 > SYM 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 > ***** THERMAL BOUNDARY CONDITIONS ***** > E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 > I 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 > I 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 > I 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 > I 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 > I 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 > I 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 > I 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 > I 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 > 0 PRESOLVE/RESTART OPTIONS ***** > 7 INITIAL CONDITIONS ***** > C Default > C Default > C Default > C Default > C Default > C Default > C Default > ***** DRIVE FORCE DATA ***** BODY FORCE, FLOW, Q > 4 Lines of Drive force data follow > C > C > C > C > ***** Variable Property Data ***** Overrrides Parameter data. > 1 Lines follow. > 0 PACKETS OF DATA FOLLOW > ***** HISTORY AND INTEGRAL DATA ***** > 0 POINTS. Hcode, I,J,H,IEL > ***** OUTPUT FIELD SPECIFICATION ***** > 6 SPECIFICATIONS FOLLOW > T COORDINATES > T VELOCITY > T PRESSURE > T TEMPERATURE > F TEMPERATURE GRADIENT > 0 PASSIVE SCALARS > ***** OBJECT SPECIFICATION ***** > 0 Surface Objects > 0 Volume Objects > 0 Edge Objects > 0 Point Objects > From nek5000-users at lists.mcs.anl.gov Tue Aug 28 13:35:24 2012 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Tue, 28 Aug 2012 13:35:24 -0500 (CDT) Subject: [Nek5000-users] 2D Axisymmetric in semi-circular annulus In-Reply-To: Message-ID: Hi Adrian, For your geometry, you do not need to use axisymmetric formulation of Nek -- use IFAXI=F, IFAZIV=F and standard userf & userq or take nek5_svn/examples/taylor/taylor.* as a starting point. Note though that you do not need to transform a Cartesian geometry into polar one as userdat2() routine does in taylor.usr since you have already generated one in prenek. Let me know if you have any questions. Best. Aleks ----- Original Message ----- From: nek5000-users at lists.mcs.anl.gov To: nek5000-users at lists.mcs.anl.gov Sent: Tuesday, August 28, 2012 10:56:46 AM Subject: Re: [Nek5000-users] 2D Axisymmetric in semi-circular annulus Hi Adrian, Sorry for missing a subtle point of your email -- it looks to me that vortex2 example is not a relevant example for your case. Judging by your .rea file, your geometry is a constant z slice, polar geometry [r,theta] that does not touch the axis of rotation while vortex2 example has a constant theata slice [r,z]... Let me look further and get back to you. Aleks On Tue, 28 Aug 2012, nek5000-users at lists.mcs.anl.gov wrote: > Hi Aleks & Paul, > > Thanks both for your replies, and for looking into this. > > In my problem, I've got a semi-circular annulus that represents the (z,R)-plane for R.ge.0. Two of the elements have one side each that lies entirely along the axis of symmetry y=0 (R=0) -- these are elements 2 & 4, which have side 1 along y=0, in the positive & negative x (z) half-plane, respectively. Is an "A " BC not appropriate for this case? I thought that an "A " BC was required for each element that touched the axis of symmetry and that it corresponded with zero radial velocity and zero tangential stress. Have I misunderstood the "A " boundary condition? ("W " will apply a tangential stress at the boundary, which is unwanted in my case, so perhaps I should use "SYM" if "A " is inappropriate). > > Thanks, > Adrian > > Hi Adrian, > > A quick note that BC "A " is used only in a case when domain touches the axis of rotation like in a case of cylinder. But in a case of cylindrical annulus, you should use 'W ' for axial Vx & radial Vr components of velocity (or 'v ' with appropriate values in userbc when ifield=1). In a case of non-trivial azimuthal velocity or swirl (IFAZIV=T), azimuthal velocity component is placed into t(*,*,*,*,1) so one should use 't ' with appropriate values for TEMP in userbc when ifield=2 > > If in addition to azimuthal velocity (IFAZIV=T), you are also solving for temperature then you temperature array is placed into an array of the first passive scalar, i.e. t(*,*,*,*,2). Then you can set BC & sources using PS1 for it when ifield=3 > > Let me know if you have questions. > Aleks > > > ----- Original Message ----- > From: nek5000-users at lists.mcs.anl.gov > To: nek5000-users at lists.mcs.anl.gov > Sent: Monday, August 27, 2012 5:40:54 PM > Subject: [Nek5000-users] 2D Axisymmetric in semi-circular annulus > > Dear Nek users, > > I have been attempting to set up a 2D axisymmetric problem with an azimuthal velocity, in a semi-circular annulus container (the 2D axisymmetric version of a spherical shell), but have encountered problems with the terms evolving the azimuthal velocity blowing up near to the axis, and wondered if anybody would be able to help with this? > > I have looked at the vortex2 example, and have copied the relevant aspects to my .usr and .rea files. I have set IFAXIS=T to get the correct viscous operators for cylindrical geometry where (x,y)->(z,R), as well as IFHEAT=T, IFAZIV=T, using temperature as the azimuthal velocity. My test mesh is created using prenek, and contains 4 elements on a polar grid from r=0.5 to 1 and theta=0 to 180. Since elements 2 & 4 have one side touching the R=0 (y=0) axis, I have used "A" boundary conditions, which are applied to side 1 for each of these elements, as is required. The remaining BCs are 'SYM' and 'I' for all of the exterior sides. The .rea file containing the mesh with 4 elements is attached to this email. (In the SIZE file I have set lx1=20,lxd=30,lx2=lx1-2). > > For a simple test, if I set the initial conditions to be a uniform rotation about the z-axis (setting temp = y), within several time-steps the code blows up, giving NaN's for each quantity (I have tested various initial conditions, which each give the same error). The line of code that appears to cause problems is the line ~240 of hmholtz.f, > TERM1 = BM1(I,J,1,IEL)*U(I,J,1,IEL)/YM1(I,J,1,IEL)**2, > since, when this term is set to 0, the code does not produce NaN's. (Though the viscous operator for the azimuthal velocity is then incorrect...) > > When IFHEAT=IFAZIV=F, i.e. when I am not integrating the temperature/azimuthal velocity, the code runs without problem on the same mesh. > > I am wondering if there is a problem with how I have set up the mesh that causes this problem? And if so, is there a way to fix this? > > Thanks, > Adrian > > Modifications to .usr file are: > > c----------------------------------------------------------------------- > subroutine userf (ix,iy,iz,eg) > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > integer e,f,eg > if(y.gt.0) ffy = temp*temp/y > return > end > c----------------------------------------------------------------------- > subroutine userq (ix,iy,iz,eg) > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > integer e,f,eg > if(y.gt.0) then > visc = param(2) > qvol = -uy*temp/y > endif > return > end > c----------------------------------------------------------------------- > subroutine useric (ix,iy,iz,ieg) > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > temp = y > return > end > c----------------------------------------------------------------------- > > My .rea file: > > ****** PARAMETERS ***** > 2.610000 NEKTON VERSION > 2 DIMENSIONAL RUN > 118 PARAMETERS FOLLOW > 1.00000 p001 DENSITY > 0.10000E-06 p002 VISCOS > 0.00000 p003 > 1.00000 p004 > 0.00000 p005 > 0.00000 p006 > 1.00000 p007 RHOCP > 0.100000E-06 p008 CONDUCT > 0.00000 p009 > 0.00000 p010 FINTIME > 0.100000E+08 p011 NSTEPS > 0.100000E-03 p012 DT > 0.00000 p013 IOCOMM > 0.00000 p014 IOTIME > 1000.00 p015 IOSTEP > 0.00000 p016 PSSOLVER: 0=default > 1.00000 p017 > 0.500000E-01 p018 GRID < 0 --> # cells on screen > -1.00000 p019 INTYPE > 5.00000 p020 NORDER > 0.100000E-06 p021 DIVERGENCE > 0.100000E-08 p022 HELMHOLTZ > 0.00000 p023 NPSCAL > 0.100000E-01 p024 TOLREL > 0.100000E-01 p025 TOLABS > 0.450000 p026 COURANT/NTAU > 3.00000 p027 TORDER > 1.00000 p028 TORDER: mesh velocity (0: p28=p27) > 0.00000 p029 = magnetic visc if > 0, = -1/Rm if < 0 > 0.00000 p030 > 0 ==> properties set in uservp() > 0.00000 p031 NPERT: #perturbation modes > 0.00000 p032 #BCs in re2 file, if > 0 > 0.00000 p033 > 0.00000 p034 > 0.00000 p035 > 0.00000 p036 > 0.00000 p037 > 0.00000 p038 > 0.00000 p039 > 0.00000 p040 > 0.00000 p041 1-->multiplicative SEMG > 0.00000 p042 0=gmres/1=pcg > 0.00000 p043 0=semg/1=schwarz > 0.00000 p044 0=E-based/1=A-based prec. > 0.00000 p045 Relaxation factor for DTFS > 0.00000 p046 reserved > 0.00000 p047 vnu: mesh matieral prop. > 0.00000 p048 > 0.00000 p049 > 0.00000 p050 > 0.00000 p051 > 0.00000 p052 IOHIS > 0.00000 p053 > 0.00000 p054 fixed flow rate dir: |p54|=1,2,3=x,y,z > 0.00000 p055 vol.flow rate (p54>0) or Ubar (p54<0) > 0.00000 p056 > 0.00000 p057 > 0.00000 p058 > 0.00000 p059 !=0 --> full Jac. eval. for each el. > 0.00000 p060 !=0 --> init. velocity to small nonzero > 0.00000 p061 > 0.00000 p062 >0 --> force byte_swap for output > 0.00000 p063 =8 --> force 8-byte output > 0.00000 p064 =1 --> perturbation restart > 0.00000 p065 #iofiles (eg, 0 or 64); <0 --> sep. dirs > 0.00000 p066 output : <0=ascii, else binary > 0.00000 p067 restart: <0=ascii, else binary > 0.00000 p068 iastep: freq for avg_all (0=iostep) > 0.00000 p069 > 0.00000 p070 > 0.00000 p071 > 0.00000 p072 > 0.00000 p073 > 0.00000 p074 verbose Helmholtz > 0.00000 p075 > 0.00000 p076 > 0.00000 p077 > 0.00000 p078 > 0.00000 p079 > 0.00000 p080 > 0.00000 p081 > 0.00000 p082 > 0.00000 p083 > 0.00000 p084 !=0 --> sets initial timestep if p12>0 > 0.00000 p085 dt ratio if p84 !=0, for timesteps>0 > 0.00000 p086 reserved > 0.00000 p087 > 0.00000 p088 > 0.00000 p089 > 0.00000 p090 > 0.00000 p091 > 0.00000 p092 > 20.0000 p093 Number of previous pressure solns saved > 5.00000 p094 start projecting velocity after p94 step > 5.00000 p095 start projecting pressure after p95 step > 0.00000 p096 > 0.00000 p097 > 0.00000 p098 > 3.00000 p099 dealiasing: <0--> off/3--> old/4--> new > 0.00000 p100 > 0.00000 p101 Number of additional modes to filter > 1.00000 p102 Dump out divergence at each time step > 0.100000E-01 p103 weight of stabilizing filter (.01) > 0.00000 p104 > 0.00000 p105 > 0.00000 p106 > 0.00000 p107 !=0 --> add to h2 array in hlmhotz eqn > 0.00000 p108 > 0.00000 p109 > 0.00000 p110 > 0.00000 p111 > 0.00000 p112 > 0.00000 p113 > 0.00000 p114 > 0.00000 p115 > 0.00000 p116 !=0: x elements for fast tensor product > 0.00000 p117 !=0: y elements for fast tensor product > 0.00000 p118 !=0: z elements for fast tensor product > 4 Lines of passive scalar data follows2 CONDUCT; 2RHOCP > 0.00000 0.00000 0.00000 0.00000 0.00000 > 0.00000 0.00000 0.00000 0.00000 > 0.00000 0.00000 0.00000 0.00000 0.00000 > 0.00000 0.00000 0.00000 0.00000 > 12 LOGICAL SWITCHES FOLLOW > T IFFLOW > T IFHEAT > T IFTRAN > T T F F F F F F F F F IFNAV & IFADVC (convection in P.S. fields) > F F T T T T T T T T T T IFTMSH (IF mesh for this field is T mesh) > T IFAXIS > T IFAZIV > T IFSTRS > F IFMGRID > F IFMODEL > F IFKEPS > F IFCHAR > 10.0000 10.0000 -4.00000 -5.50000 XFAC,YFAC,XZERO,YZERO > **MESH DATA** 1st line is X of corner 1,2,3,4. 2nd line is Y. > 4 2 4 NEL,NDIM,NELV > ELEMENT 1 [ 1C] GROUP 0 > -0.4371138E-07 -0.2185569E-07 0.3535533 0.7071066 > 1.000000 0.5000000 0.3535533 0.7071066 > ELEMENT 2 [ 1D] GROUP 0 > 0.5000000 1.000000 0.7071066 0.3535533 > 0.000000 0.000000 0.7071066 0.3535533 > ELEMENT 3 [ 1D] GROUP 0 > 0.5962440E-08 0.1192488E-07 -0.7071066 -0.3535533 > 0.5000000 1.000000 0.7071066 0.3535533 > ELEMENT 4 [ 1 ] GROUP 0 > -1.000000 -0.5000000 -0.3535533 -0.7071066 > 0.8742278E-07 0.4371139E-07 0.3535533 0.7071066 > ***** CURVED SIDE DATA ***** > 8 Curved sides follow IEDGE,IEL,CURVE(I),I=1,5, CCURVE > 2 1 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 4 1 1.00000 0.00000 0.00000 0.00000 0.00000 C > 2 2 1.00000 0.00000 0.00000 0.00000 0.00000 C > 4 2 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 2 3 1.00000 0.00000 0.00000 0.00000 0.00000 C > 4 3 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 2 4 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 4 4 1.00000 0.00000 0.00000 0.00000 0.00000 C > ***** BOUNDARY CONDITIONS ***** > ***** FLUID BOUNDARY CONDITIONS ***** > E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 > SYM 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 > SYM 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 > SYM 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 > SYM 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 > SYM 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 > SYM 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 > SYM 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 > SYM 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 > ***** THERMAL BOUNDARY CONDITIONS ***** > E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 > I 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 > I 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 > I 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 > I 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 > I 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 > I 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 > I 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 > I 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 > 0 PRESOLVE/RESTART OPTIONS ***** > 7 INITIAL CONDITIONS ***** > C Default > C Default > C Default > C Default > C Default > C Default > C Default > ***** DRIVE FORCE DATA ***** BODY FORCE, FLOW, Q > 4 Lines of Drive force data follow > C > C > C > C > ***** Variable Property Data ***** Overrrides Parameter data. > 1 Lines follow. > 0 PACKETS OF DATA FOLLOW > ***** HISTORY AND INTEGRAL DATA ***** > 0 POINTS. Hcode, I,J,H,IEL > ***** OUTPUT FIELD SPECIFICATION ***** > 6 SPECIFICATIONS FOLLOW > T COORDINATES > T VELOCITY > T PRESSURE > T TEMPERATURE > F TEMPERATURE GRADIENT > 0 PASSIVE SCALARS > ***** OBJECT SPECIFICATION ***** > 0 Surface Objects > 0 Volume Objects > 0 Edge Objects > 0 Point Objects > _______________________________________________ Nek5000-users mailing list Nek5000-users at lists.mcs.anl.gov https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users From nek5000-users at lists.mcs.anl.gov Tue Aug 28 13:40:49 2012 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Tue, 28 Aug 2012 13:40:49 -0500 (CDT) Subject: [Nek5000-users] 2D Axisymmetric in semi-circular annulus In-Reply-To: Message-ID: P.S. Sorry Adrian -- I misse your point about the spherical shell -- disregard my previous email -- I'll look further. Best. Aleks ----- Original Message ----- From: nek5000-users at lists.mcs.anl.gov To: nek5000-users at lists.mcs.anl.gov Sent: Tuesday, August 28, 2012 1:35:24 PM Subject: Re: [Nek5000-users] 2D Axisymmetric in semi-circular annulus Hi Adrian, For your geometry, you do not need to use axisymmetric formulation of Nek -- use IFAXI=F, IFAZIV=F and standard userf & userq or take nek5_svn/examples/taylor/taylor.* as a starting point. Note though that you do not need to transform a Cartesian geometry into polar one as userdat2() routine does in taylor.usr since you have already generated one in prenek. Let me know if you have any questions. Best. Aleks ----- Original Message ----- From: nek5000-users at lists.mcs.anl.gov To: nek5000-users at lists.mcs.anl.gov Sent: Tuesday, August 28, 2012 10:56:46 AM Subject: Re: [Nek5000-users] 2D Axisymmetric in semi-circular annulus Hi Adrian, Sorry for missing a subtle point of your email -- it looks to me that vortex2 example is not a relevant example for your case. Judging by your .rea file, your geometry is a constant z slice, polar geometry [r,theta] that does not touch the axis of rotation while vortex2 example has a constant theata slice [r,z]... Let me look further and get back to you. Aleks On Tue, 28 Aug 2012, nek5000-users at lists.mcs.anl.gov wrote: > Hi Aleks & Paul, > > Thanks both for your replies, and for looking into this. > > In my problem, I've got a semi-circular annulus that represents the (z,R)-plane for R.ge.0. Two of the elements have one side each that lies entirely along the axis of symmetry y=0 (R=0) -- these are elements 2 & 4, which have side 1 along y=0, in the positive & negative x (z) half-plane, respectively. Is an "A " BC not appropriate for this case? I thought that an "A " BC was required for each element that touched the axis of symmetry and that it corresponded with zero radial velocity and zero tangential stress. Have I misunderstood the "A " boundary condition? ("W " will apply a tangential stress at the boundary, which is unwanted in my case, so perhaps I should use "SYM" if "A " is inappropriate). > > Thanks, > Adrian > > Hi Adrian, > > A quick note that BC "A " is used only in a case when domain touches the axis of rotation like in a case of cylinder. But in a case of cylindrical annulus, you should use 'W ' for axial Vx & radial Vr components of velocity (or 'v ' with appropriate values in userbc when ifield=1). In a case of non-trivial azimuthal velocity or swirl (IFAZIV=T), azimuthal velocity component is placed into t(*,*,*,*,1) so one should use 't ' with appropriate values for TEMP in userbc when ifield=2 > > If in addition to azimuthal velocity (IFAZIV=T), you are also solving for temperature then you temperature array is placed into an array of the first passive scalar, i.e. t(*,*,*,*,2). Then you can set BC & sources using PS1 for it when ifield=3 > > Let me know if you have questions. > Aleks > > > ----- Original Message ----- > From: nek5000-users at lists.mcs.anl.gov > To: nek5000-users at lists.mcs.anl.gov > Sent: Monday, August 27, 2012 5:40:54 PM > Subject: [Nek5000-users] 2D Axisymmetric in semi-circular annulus > > Dear Nek users, > > I have been attempting to set up a 2D axisymmetric problem with an azimuthal velocity, in a semi-circular annulus container (the 2D axisymmetric version of a spherical shell), but have encountered problems with the terms evolving the azimuthal velocity blowing up near to the axis, and wondered if anybody would be able to help with this? > > I have looked at the vortex2 example, and have copied the relevant aspects to my .usr and .rea files. I have set IFAXIS=T to get the correct viscous operators for cylindrical geometry where (x,y)->(z,R), as well as IFHEAT=T, IFAZIV=T, using temperature as the azimuthal velocity. My test mesh is created using prenek, and contains 4 elements on a polar grid from r=0.5 to 1 and theta=0 to 180. Since elements 2 & 4 have one side touching the R=0 (y=0) axis, I have used "A" boundary conditions, which are applied to side 1 for each of these elements, as is required. The remaining BCs are 'SYM' and 'I' for all of the exterior sides. The .rea file containing the mesh with 4 elements is attached to this email. (In the SIZE file I have set lx1=20,lxd=30,lx2=lx1-2). > > For a simple test, if I set the initial conditions to be a uniform rotation about the z-axis (setting temp = y), within several time-steps the code blows up, giving NaN's for each quantity (I have tested various initial conditions, which each give the same error). The line of code that appears to cause problems is the line ~240 of hmholtz.f, > TERM1 = BM1(I,J,1,IEL)*U(I,J,1,IEL)/YM1(I,J,1,IEL)**2, > since, when this term is set to 0, the code does not produce NaN's. (Though the viscous operator for the azimuthal velocity is then incorrect...) > > When IFHEAT=IFAZIV=F, i.e. when I am not integrating the temperature/azimuthal velocity, the code runs without problem on the same mesh. > > I am wondering if there is a problem with how I have set up the mesh that causes this problem? And if so, is there a way to fix this? > > Thanks, > Adrian > > Modifications to .usr file are: > > c----------------------------------------------------------------------- > subroutine userf (ix,iy,iz,eg) > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > integer e,f,eg > if(y.gt.0) ffy = temp*temp/y > return > end > c----------------------------------------------------------------------- > subroutine userq (ix,iy,iz,eg) > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > integer e,f,eg > if(y.gt.0) then > visc = param(2) > qvol = -uy*temp/y > endif > return > end > c----------------------------------------------------------------------- > subroutine useric (ix,iy,iz,ieg) > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > temp = y > return > end > c----------------------------------------------------------------------- > > My .rea file: > > ****** PARAMETERS ***** > 2.610000 NEKTON VERSION > 2 DIMENSIONAL RUN > 118 PARAMETERS FOLLOW > 1.00000 p001 DENSITY > 0.10000E-06 p002 VISCOS > 0.00000 p003 > 1.00000 p004 > 0.00000 p005 > 0.00000 p006 > 1.00000 p007 RHOCP > 0.100000E-06 p008 CONDUCT > 0.00000 p009 > 0.00000 p010 FINTIME > 0.100000E+08 p011 NSTEPS > 0.100000E-03 p012 DT > 0.00000 p013 IOCOMM > 0.00000 p014 IOTIME > 1000.00 p015 IOSTEP > 0.00000 p016 PSSOLVER: 0=default > 1.00000 p017 > 0.500000E-01 p018 GRID < 0 --> # cells on screen > -1.00000 p019 INTYPE > 5.00000 p020 NORDER > 0.100000E-06 p021 DIVERGENCE > 0.100000E-08 p022 HELMHOLTZ > 0.00000 p023 NPSCAL > 0.100000E-01 p024 TOLREL > 0.100000E-01 p025 TOLABS > 0.450000 p026 COURANT/NTAU > 3.00000 p027 TORDER > 1.00000 p028 TORDER: mesh velocity (0: p28=p27) > 0.00000 p029 = magnetic visc if > 0, = -1/Rm if < 0 > 0.00000 p030 > 0 ==> properties set in uservp() > 0.00000 p031 NPERT: #perturbation modes > 0.00000 p032 #BCs in re2 file, if > 0 > 0.00000 p033 > 0.00000 p034 > 0.00000 p035 > 0.00000 p036 > 0.00000 p037 > 0.00000 p038 > 0.00000 p039 > 0.00000 p040 > 0.00000 p041 1-->multiplicative SEMG > 0.00000 p042 0=gmres/1=pcg > 0.00000 p043 0=semg/1=schwarz > 0.00000 p044 0=E-based/1=A-based prec. > 0.00000 p045 Relaxation factor for DTFS > 0.00000 p046 reserved > 0.00000 p047 vnu: mesh matieral prop. > 0.00000 p048 > 0.00000 p049 > 0.00000 p050 > 0.00000 p051 > 0.00000 p052 IOHIS > 0.00000 p053 > 0.00000 p054 fixed flow rate dir: |p54|=1,2,3=x,y,z > 0.00000 p055 vol.flow rate (p54>0) or Ubar (p54<0) > 0.00000 p056 > 0.00000 p057 > 0.00000 p058 > 0.00000 p059 !=0 --> full Jac. eval. for each el. > 0.00000 p060 !=0 --> init. velocity to small nonzero > 0.00000 p061 > 0.00000 p062 >0 --> force byte_swap for output > 0.00000 p063 =8 --> force 8-byte output > 0.00000 p064 =1 --> perturbation restart > 0.00000 p065 #iofiles (eg, 0 or 64); <0 --> sep. dirs > 0.00000 p066 output : <0=ascii, else binary > 0.00000 p067 restart: <0=ascii, else binary > 0.00000 p068 iastep: freq for avg_all (0=iostep) > 0.00000 p069 > 0.00000 p070 > 0.00000 p071 > 0.00000 p072 > 0.00000 p073 > 0.00000 p074 verbose Helmholtz > 0.00000 p075 > 0.00000 p076 > 0.00000 p077 > 0.00000 p078 > 0.00000 p079 > 0.00000 p080 > 0.00000 p081 > 0.00000 p082 > 0.00000 p083 > 0.00000 p084 !=0 --> sets initial timestep if p12>0 > 0.00000 p085 dt ratio if p84 !=0, for timesteps>0 > 0.00000 p086 reserved > 0.00000 p087 > 0.00000 p088 > 0.00000 p089 > 0.00000 p090 > 0.00000 p091 > 0.00000 p092 > 20.0000 p093 Number of previous pressure solns saved > 5.00000 p094 start projecting velocity after p94 step > 5.00000 p095 start projecting pressure after p95 step > 0.00000 p096 > 0.00000 p097 > 0.00000 p098 > 3.00000 p099 dealiasing: <0--> off/3--> old/4--> new > 0.00000 p100 > 0.00000 p101 Number of additional modes to filter > 1.00000 p102 Dump out divergence at each time step > 0.100000E-01 p103 weight of stabilizing filter (.01) > 0.00000 p104 > 0.00000 p105 > 0.00000 p106 > 0.00000 p107 !=0 --> add to h2 array in hlmhotz eqn > 0.00000 p108 > 0.00000 p109 > 0.00000 p110 > 0.00000 p111 > 0.00000 p112 > 0.00000 p113 > 0.00000 p114 > 0.00000 p115 > 0.00000 p116 !=0: x elements for fast tensor product > 0.00000 p117 !=0: y elements for fast tensor product > 0.00000 p118 !=0: z elements for fast tensor product > 4 Lines of passive scalar data follows2 CONDUCT; 2RHOCP > 0.00000 0.00000 0.00000 0.00000 0.00000 > 0.00000 0.00000 0.00000 0.00000 > 0.00000 0.00000 0.00000 0.00000 0.00000 > 0.00000 0.00000 0.00000 0.00000 > 12 LOGICAL SWITCHES FOLLOW > T IFFLOW > T IFHEAT > T IFTRAN > T T F F F F F F F F F IFNAV & IFADVC (convection in P.S. fields) > F F T T T T T T T T T T IFTMSH (IF mesh for this field is T mesh) > T IFAXIS > T IFAZIV > T IFSTRS > F IFMGRID > F IFMODEL > F IFKEPS > F IFCHAR > 10.0000 10.0000 -4.00000 -5.50000 XFAC,YFAC,XZERO,YZERO > **MESH DATA** 1st line is X of corner 1,2,3,4. 2nd line is Y. > 4 2 4 NEL,NDIM,NELV > ELEMENT 1 [ 1C] GROUP 0 > -0.4371138E-07 -0.2185569E-07 0.3535533 0.7071066 > 1.000000 0.5000000 0.3535533 0.7071066 > ELEMENT 2 [ 1D] GROUP 0 > 0.5000000 1.000000 0.7071066 0.3535533 > 0.000000 0.000000 0.7071066 0.3535533 > ELEMENT 3 [ 1D] GROUP 0 > 0.5962440E-08 0.1192488E-07 -0.7071066 -0.3535533 > 0.5000000 1.000000 0.7071066 0.3535533 > ELEMENT 4 [ 1 ] GROUP 0 > -1.000000 -0.5000000 -0.3535533 -0.7071066 > 0.8742278E-07 0.4371139E-07 0.3535533 0.7071066 > ***** CURVED SIDE DATA ***** > 8 Curved sides follow IEDGE,IEL,CURVE(I),I=1,5, CCURVE > 2 1 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 4 1 1.00000 0.00000 0.00000 0.00000 0.00000 C > 2 2 1.00000 0.00000 0.00000 0.00000 0.00000 C > 4 2 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 2 3 1.00000 0.00000 0.00000 0.00000 0.00000 C > 4 3 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 2 4 -0.500000 0.00000 0.00000 0.00000 0.00000 C > 4 4 1.00000 0.00000 0.00000 0.00000 0.00000 C > ***** BOUNDARY CONDITIONS ***** > ***** FLUID BOUNDARY CONDITIONS ***** > E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 > SYM 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 > SYM 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 > SYM 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 > SYM 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 > SYM 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 > SYM 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 > SYM 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 > SYM 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 > ***** THERMAL BOUNDARY CONDITIONS ***** > E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 > I 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 > I 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 > I 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 > I 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 > I 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 > I 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 > A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 > I 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 > E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 > I 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 > 0 PRESOLVE/RESTART OPTIONS ***** > 7 INITIAL CONDITIONS ***** > C Default > C Default > C Default > C Default > C Default > C Default > C Default > ***** DRIVE FORCE DATA ***** BODY FORCE, FLOW, Q > 4 Lines of Drive force data follow > C > C > C > C > ***** Variable Property Data ***** Overrrides Parameter data. > 1 Lines follow. > 0 PACKETS OF DATA FOLLOW > ***** HISTORY AND INTEGRAL DATA ***** > 0 POINTS. Hcode, I,J,H,IEL > ***** OUTPUT FIELD SPECIFICATION ***** > 6 SPECIFICATIONS FOLLOW > T COORDINATES > T VELOCITY > T PRESSURE > T TEMPERATURE > F TEMPERATURE GRADIENT > 0 PASSIVE SCALARS > ***** OBJECT SPECIFICATION ***** > 0 Surface Objects > 0 Volume Objects > 0 Edge Objects > 0 Point Objects > _______________________________________________ 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 From nek5000-users at lists.mcs.anl.gov Fri Aug 31 22:08:56 2012 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Fri, 31 Aug 2012 22:08:56 -0500 (CDT) Subject: [Nek5000-users] 2D Axisymmetric in semi-circular annulus In-Reply-To: Message-ID: Hi Adrian, We have committed fixes that resolves the issues you had earlier (revision 856). Let us now if this works for you. Best. Aleks ----- Original Message ----- From: nek5000-users at lists.mcs.anl.gov To: nek5000-users at lists.mcs.anl.gov Sent: Tuesday, August 28, 2012 2:19:00 AM Subject: Re: [Nek5000-users] 2D Axisymmetric in semi-circular annulus OK --- that does not appear to be the issue... will dig a bit deeper. Paul On Tue, 28 Aug 2012, nek5000-users at lists.mcs.anl.gov wrote: > > Hi Adrian, > > My suspicion is that the issue is somehow related to the SYM bc + curve sides > + ifaxis. Generally, SYM on > curve sides implies using the stress formulation. > > At present, I'm not certain of the status of the combination: > > IFSTRS T > > IFAXIS T > > We can look into this as well. > > Sorry that this has been holding you up. > > Paul > > > > On Mon, 27 Aug 2012, nek5000-users at lists.mcs.anl.gov wrote: > >> Dear Nek users, >> >> I have been attempting to set up a 2D axisymmetric problem with an >> azimuthal >> velocity, in a semi-circular annulus container (the 2D axisymmetric version >> of a spherical shell), but have encountered problems with the terms >> evolving >> the azimuthal velocity blowing up near to the axis, and wondered if anybody >> would be able to help with this? >> >> I have looked at the vortex2 example, and have copied the relevant aspects >> to >> my .usr and .rea files. I have set IFAXIS=T to get the correct viscous >> operators for cylindrical geometry where (x,y)->(z,R), as well as IFHEAT=T, >> IFAZIV=T, using temperature as the azimuthal velocity. My test mesh is >> created using prenek, and contains 4 elements on a polar grid from r=0.5 to >> 1 >> and theta=0 to 180. Since elements 2 & 4 have one side touching the R=0 >> (y=0) >> axis, I have used "A" boundary conditions, which are applied to side 1 for >> each of these elements, as is required. The remaining BCs are 'SYM' and 'I' >> for all of the exterior sides. The .rea file containing the mesh with 4 >> elements is attached to this email. (In the SIZE file I have set >> lx1=20,lxd=30,lx2=lx1-2). >> >> For a simple test, if I set the initial conditions to be a uniform rotation >> about the z-axis (setting temp = y), within several time-steps the code >> blows >> up, giving NaN's for each quantity (I have tested various initial >> conditions, >> which each give the same error). The line of code that appears to cause >> problems is the line ~240 of hmholtz.f, TERM1 = >> BM1(I,J,1,IEL)*U(I,J,1,IEL)/YM1(I,J,1,IEL)**2, >> since, when this term is set to 0, the code does not produce NaN's. (Though >> the viscous operator for the azimuthal velocity is then incorrect...) >> >> When IFHEAT=IFAZIV=F, i.e. when I am not integrating the >> temperature/azimuthal velocity, the code runs without problem on the same >> mesh. >> >> I am wondering if there is a problem with how I have set up the mesh that >> causes this problem? And if so, is there a way to fix this? >> >> Thanks, >> Adrian >> >> Modifications to .usr file are: >> >> c----------------------------------------------------------------------- >> subroutine userf (ix,iy,iz,eg) >> include 'SIZE' >> include 'TOTAL' >> include 'NEKUSE' >> integer e,f,eg >> if(y.gt.0) ffy = temp*temp/y >> return >> end >> c----------------------------------------------------------------------- >> subroutine userq (ix,iy,iz,eg) >> include 'SIZE' >> include 'TOTAL' >> include 'NEKUSE' >> integer e,f,eg >> if(y.gt.0) then >> visc = param(2) >> qvol = -uy*temp/y >> endif >> return >> end >> c----------------------------------------------------------------------- >> subroutine useric (ix,iy,iz,ieg) >> include 'SIZE' >> include 'TOTAL' >> include 'NEKUSE' >> temp = y >> return >> end >> c----------------------------------------------------------------------- >> >> My .rea file: >> >> ****** PARAMETERS ***** >> 2.610000 NEKTON VERSION >> 2 DIMENSIONAL RUN >> 118 PARAMETERS FOLLOW >> 1.00000 p001 DENSITY >> 0.10000E-06 p002 VISCOS >> 0.00000 p003 >> 1.00000 p004 >> 0.00000 p005 >> 0.00000 p006 >> 1.00000 p007 RHOCP >> 0.100000E-06 p008 CONDUCT >> 0.00000 p009 >> 0.00000 p010 FINTIME >> 0.100000E+08 p011 NSTEPS >> 0.100000E-03 p012 DT >> 0.00000 p013 IOCOMM >> 0.00000 p014 IOTIME >> 1000.00 p015 IOSTEP >> 0.00000 p016 PSSOLVER: 0=default >> 1.00000 p017 >> 0.500000E-01 p018 GRID < 0 --> # cells on screen >> -1.00000 p019 INTYPE >> 5.00000 p020 NORDER >> 0.100000E-06 p021 DIVERGENCE >> 0.100000E-08 p022 HELMHOLTZ >> 0.00000 p023 NPSCAL >> 0.100000E-01 p024 TOLREL >> 0.100000E-01 p025 TOLABS >> 0.450000 p026 COURANT/NTAU >> 3.00000 p027 TORDER >> 1.00000 p028 TORDER: mesh velocity (0: p28=p27) >> 0.00000 p029 = magnetic visc if > 0, = -1/Rm if < 0 >> 0.00000 p030 > 0 ==> properties set in uservp() >> 0.00000 p031 NPERT: #perturbation modes >> 0.00000 p032 #BCs in re2 file, if > 0 >> 0.00000 p033 >> 0.00000 p034 >> 0.00000 p035 >> 0.00000 p036 >> 0.00000 p037 >> 0.00000 p038 >> 0.00000 p039 >> 0.00000 p040 >> 0.00000 p041 1-->multiplicative SEMG >> 0.00000 p042 0=gmres/1=pcg >> 0.00000 p043 0=semg/1=schwarz >> 0.00000 p044 0=E-based/1=A-based prec. >> 0.00000 p045 Relaxation factor for DTFS >> 0.00000 p046 reserved >> 0.00000 p047 vnu: mesh matieral prop. >> 0.00000 p048 >> 0.00000 p049 >> 0.00000 p050 >> 0.00000 p051 >> 0.00000 p052 IOHIS >> 0.00000 p053 >> 0.00000 p054 fixed flow rate dir: |p54|=1,2,3=x,y,z >> 0.00000 p055 vol.flow rate (p54>0) or Ubar (p54<0) >> 0.00000 p056 >> 0.00000 p057 >> 0.00000 p058 >> 0.00000 p059 !=0 --> full Jac. eval. for each el. >> 0.00000 p060 !=0 --> init. velocity to small nonzero >> 0.00000 p061 >> 0.00000 p062 >0 --> force byte_swap for output >> 0.00000 p063 =8 --> force 8-byte output >> 0.00000 p064 =1 --> perturbation restart >> 0.00000 p065 #iofiles (eg, 0 or 64); <0 --> sep. dirs >> 0.00000 p066 output : <0=ascii, else binary >> 0.00000 p067 restart: <0=ascii, else binary >> 0.00000 p068 iastep: freq for avg_all (0=iostep) >> 0.00000 p069 >> 0.00000 p070 >> 0.00000 p071 >> 0.00000 p072 >> 0.00000 p073 >> 0.00000 p074 verbose Helmholtz >> 0.00000 p075 >> 0.00000 p076 >> 0.00000 p077 >> 0.00000 p078 >> 0.00000 p079 >> 0.00000 p080 >> 0.00000 p081 >> 0.00000 p082 >> 0.00000 p083 >> 0.00000 p084 !=0 --> sets initial timestep if p12>0 >> 0.00000 p085 dt ratio if p84 !=0, for timesteps>0 >> 0.00000 p086 reserved >> 0.00000 p087 >> 0.00000 p088 >> 0.00000 p089 >> 0.00000 p090 >> 0.00000 p091 >> 0.00000 p092 >> 20.0000 p093 Number of previous pressure solns saved >> 5.00000 p094 start projecting velocity after p94 step >> 5.00000 p095 start projecting pressure after p95 step >> 0.00000 p096 >> 0.00000 p097 >> 0.00000 p098 >> 3.00000 p099 dealiasing: <0--> off/3--> old/4--> new >> 0.00000 p100 >> 0.00000 p101 Number of additional modes to filter >> 1.00000 p102 Dump out divergence at each time step >> 0.100000E-01 p103 weight of stabilizing filter (.01) >> 0.00000 p104 >> 0.00000 p105 >> 0.00000 p106 >> 0.00000 p107 !=0 --> add to h2 array in hlmhotz eqn >> 0.00000 p108 >> 0.00000 p109 >> 0.00000 p110 >> 0.00000 p111 >> 0.00000 p112 >> 0.00000 p113 >> 0.00000 p114 >> 0.00000 p115 >> 0.00000 p116 !=0: x elements for fast tensor product >> 0.00000 p117 !=0: y elements for fast tensor product >> 0.00000 p118 !=0: z elements for fast tensor product >> 4 Lines of passive scalar data follows2 CONDUCT; 2RHOCP >> 0.00000 0.00000 0.00000 0.00000 0.00000 >> 0.00000 0.00000 0.00000 0.00000 >> 0.00000 0.00000 0.00000 0.00000 0.00000 >> 0.00000 0.00000 0.00000 0.00000 >> 12 LOGICAL SWITCHES FOLLOW >> T IFFLOW >> T IFHEAT >> T IFTRAN >> T T F F F F F F F F F IFNAV & IFADVC (convection in P.S. fields) >> F F T T T T T T T T T T IFTMSH (IF mesh for this field is T mesh) >> T IFAXIS >> T IFAZIV >> T IFSTRS >> F IFMGRID >> F IFMODEL >> F IFKEPS >> F IFCHAR >> 10.0000 10.0000 -4.00000 -5.50000 >> XFAC,YFAC,XZERO,YZERO >> **MESH DATA** 1st line is X of corner 1,2,3,4. 2nd line is Y. >> 4 2 4 NEL,NDIM,NELV >> ELEMENT 1 [ 1C] GROUP 0 >> -0.4371138E-07 -0.2185569E-07 0.3535533 0.7071066 >> 1.000000 0.5000000 0.3535533 0.7071066 >> ELEMENT 2 [ 1D] GROUP 0 >> 0.5000000 1.000000 0.7071066 0.3535533 >> 0.000000 0.000000 0.7071066 0.3535533 >> ELEMENT 3 [ 1D] GROUP 0 >> 0.5962440E-08 0.1192488E-07 -0.7071066 -0.3535533 >> 0.5000000 1.000000 0.7071066 0.3535533 >> ELEMENT 4 [ 1 ] GROUP 0 >> -1.000000 -0.5000000 -0.3535533 -0.7071066 >> 0.8742278E-07 0.4371139E-07 0.3535533 0.7071066 >> ***** CURVED SIDE DATA ***** >> 8 Curved sides follow IEDGE,IEL,CURVE(I),I=1,5, CCURVE >> 2 1 -0.500000 0.00000 0.00000 0.00000 0.00000 >> C >> 4 1 1.00000 0.00000 0.00000 0.00000 0.00000 >> C >> 2 2 1.00000 0.00000 0.00000 0.00000 0.00000 >> C >> 4 2 -0.500000 0.00000 0.00000 0.00000 0.00000 >> C >> 2 3 1.00000 0.00000 0.00000 0.00000 0.00000 >> C >> 4 3 -0.500000 0.00000 0.00000 0.00000 0.00000 >> C >> 2 4 -0.500000 0.00000 0.00000 0.00000 0.00000 >> C >> 4 4 1.00000 0.00000 0.00000 0.00000 0.00000 >> C >> ***** BOUNDARY CONDITIONS ***** >> ***** FLUID BOUNDARY CONDITIONS ***** >> E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 >> SYM 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 >> SYM 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 >> SYM 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 >> SYM 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 >> SYM 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 >> SYM 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 >> SYM 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 >> SYM 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> ***** THERMAL BOUNDARY CONDITIONS ***** >> E 1 1 3.00000 1.00000 0.00000 0.00000 0.00000 >> I 1 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 1 3 2.00000 3.00000 0.00000 0.00000 0.00000 >> I 1 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> A 2 1 0.00000 0.00000 0.00000 0.00000 0.00000 >> I 2 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 2 3 1.00000 3.00000 0.00000 0.00000 0.00000 >> I 2 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 3 1 1.00000 1.00000 0.00000 0.00000 0.00000 >> I 3 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 3 3 4.00000 3.00000 0.00000 0.00000 0.00000 >> I 3 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> A 4 1 0.00000 0.00000 0.00000 0.00000 0.00000 >> I 4 2 0.00000 0.00000 0.00000 0.00000 0.00000 >> E 4 3 3.00000 3.00000 0.00000 0.00000 0.00000 >> I 4 4 0.00000 0.00000 0.00000 0.00000 0.00000 >> 0 PRESOLVE/RESTART OPTIONS ***** >> 7 INITIAL CONDITIONS ***** >> C Default >> C Default >> C Default >> C Default >> C Default >> C Default >> C Default >> ***** DRIVE FORCE DATA ***** BODY FORCE, FLOW, Q >> 4 Lines of Drive force data follow >> C >> C >> C >> C >> ***** Variable Property Data ***** Overrrides Parameter data. >> 1 Lines follow. >> 0 PACKETS OF DATA FOLLOW >> ***** HISTORY AND INTEGRAL DATA ***** >> 0 POINTS. Hcode, I,J,H,IEL >> ***** OUTPUT FIELD SPECIFICATION ***** >> 6 SPECIFICATIONS FOLLOW >> T COORDINATES >> T VELOCITY >> T PRESSURE >> T TEMPERATURE >> F TEMPERATURE GRADIENT >> 0 PASSIVE SCALARS >> ***** OBJECT SPECIFICATION ***** >> 0 Surface Objects >> 0 Volume Objects >> 0 Edge Objects >> 0 Point Objects >> _______________________________________________ >> 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