{"id":127,"date":"2017-09-13T10:20:05","date_gmt":"2017-09-13T13:20:05","guid":{"rendered":"http:\/\/www.professores.uff.br\/diomarcesarlobao\/?page_id=127"},"modified":"2017-09-13T10:20:05","modified_gmt":"2017-09-13T13:20:05","slug":"inter3-f","status":"publish","type":"page","link":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/inter3-f\/","title":{"rendered":"inter3.f"},"content":{"rendered":"<pre>c &lt;html&gt;\r\nc &lt;head&gt;&lt;title&gt;&lt;\/title&gt;&lt;\/head&gt;\r\nc &lt;body&gt;\r\nc &lt;pre&gt;\r\nc\r\n      program interpolate\r\n      implicit none\r\nc\r\nc     Demonstation of 2 simple interpolation methods for\r\nc     smoothly joining results from 2 disjoint regions\r\nc\r\nc     John Mahaffy 2\/3\/96\r\nc\r\nc    Open up two files in your current directory to receive results\r\nc\r\n      open(10,file='nuwlin')\r\n      open(11,file='nuwcube')\r\nc\r\nc   First a linear weighted transition\r\nc\r\n      call nuwlin\r\nc\r\nc   Next a cubic weighted transition\r\nc\r\n      call nuwcube\r\nc\r\nc   If you are in Hammond Lab, change this subroutine to plot results\r\nc\r\n      call plotit\r\nc\r\n      stop\r\n      end\r\nc\r\n      subroutine nuwlin\r\n      implicit none\r\n      real Nulam,Nuturb,Pr,Re,w,Nu\r\n      real Re1,Re2,rwfac\r\nc\r\nc   Demonstration of linearly weighted transition region\r\nc   Calculation of Nusselt Number  with weighted transition\r\nc   in Re1&lt;Re&lt;Re2\r\nc\r\nc\r\nc     John Mahaffy 2\/3\/96\r\nc\r\nc   Nu   -  Nusselt Number\r\nc   Nulam - laminar Nusselt Number\r\nc   Nuturb - Turbulent Nusselt Number\r\nc   Re  -  Reynolds number\r\nc   w   -  weighting function in transition zone\r\nc &lt;a name=\"para\"&gt;&lt;font color=\"FF0000\"&gt;\r\n      parameter (Pr=1.0,Nulam=4.0,Re1=640,Re2=2000.,rwfac=1.\/(Re2-Re1))\r\nc &lt;\/font&gt;&lt;\/a&gt;\r\nc\r\n      Re=0.0\r\nc\r\nc    Evaluate the Nusselt number over the range 0.&lt;=Re&lt;=3000.\r\nc\r\n      do 100 while (Re.le.3000.)\r\n        if(Re.lt.Re1) then\r\n           Nu = Nulam\r\n        else if (Re.gt.Re2)  then\r\n           Nu=Nuturb(Re,Pr)\r\n        else\r\n           w = (Re - Re1)*rwfac\r\n           Nu = (1.-w)*Nulam + w*Nuturb(Re,Pr)\r\n        endif\r\n        write(10,*)Re,Nu\r\n        Re=Re+10.\r\n  100 continue\r\n      return\r\n      end\r\n      subroutine nuwcube\r\n      implicit none\r\n      real Nuturb,Nulam,Pr,Re,w,SRe,Re1,Re2, Nu\r\nc\r\nc   Demonstration of cubic weighting in transition zone\r\nc   Calculation of Nusselt Number  with weighted transition\r\nc   in Re1&lt;Re&lt;Re2\r\nc\r\nc\r\nc\r\nc     John Mahaffy 2\/3\/96\r\nc\r\nc   Nu   -  Nusselt Number\r\nc   Nulam - laminar Nusselt Number\r\nc   Nuturb - Turbulent Nusselt Number\r\nc   Re  -  Reynolds number\r\nc   SRe -  Scaled Reynolds number, ranges from 0 to 1 over interpolation range\r\nc   w   -  weighting function in transition zone\r\nc\r\n      parameter (Pr=1.0,Nulam=4.0,Re1=640,Re2=2000.)\r\nc\r\nc    Evaluate the Nusselt number over the range 0.&lt;=Re&lt;=3000.\r\nc\r\n      Re=0.\r\n      do 200 while (Re.le.3000.)\r\n        if(Re.lt.Re1) then\r\n           Nu=Nulam\r\n        else if (Re.gt.Re2) then\r\n           Nu=Nuturb(Re,Pr)\r\n        else\r\n           SRe=(Re-Re1)\/(Re2-Re1)\r\n           w= (3. - 2.*SRe)*SRe**2\r\n           Nu= (1.-w)*Nulam + w*Nuturb(Re,Pr)\r\n        endif\r\n        write(11,*)Re,Nu\r\n        Re=Re+10.\r\n  200 continue\r\n      return\r\n      end\r\n      function Nuturb(Re,Pr)\r\nc\r\nc    Calculate a Turbulent heat transfer coefficient\r\nc    obtained from a Dittus-Boelter correlation\r\nc\r\nc     John Mahaffy   2\/2\/96\r\nc\r\n      implicit none\r\n      real Re,Pr,Nuturb\r\nc\r\nc   Nuturb - Turbulent Nusselt number (Dittus-Boelter correlation)\r\nc   Re  -  Reynolds number\r\nc   Pr  -  Prandl number\r\nc\r\nc     Nuturb=0.023*Re**.8*Pr**0.4\r\nc\r\n      Nuturb=0.023*exp(log(Re)*0.8+log(Pr)*0.4)\r\n      return\r\n      end\r\n      subroutine plotit\r\nc\r\nc    This subroutine is for those of you who are getting bored.  At this\r\nc    stage of the class you will not be held responsible new material here.\r\n       logical fexist\r\n\r\nc      fexist -  flag indicating whether or not the gnuin file exists\r\n\r\nc   First check to see if a file containing commands to the graphic program\r\nc   exists in your local directory\r\nc\r\n      inquire (file='gp-int3',exist=fexist)\r\nc\r\nc   If it doesn't then issue a unix command to copy it from my directory\r\nc   the subroutine \"system\" is not a standard part of Fortran, but is\r\nc   provided by some Unix systems to give a crude form of what is called\r\nc   a \"system call\".  Any computer will supply an equivalent command, and\r\nc   other functions or subroutines that give more direct access to system\r\nc   support.\r\nc\r\n      if (.not.fexist) then\r\n         call system('cp ~jhm\/201\/gp-int3 .')\r\n         print *, ' Graphics input file copied'\r\n      endif\r\nc\r\nc   Close the data files so they are ready for reading by gnuplot\r\nc\r\n      close ( 11 )\r\n      close ( 10 )\r\nc\r\nc   If you are sitting at a Hammond lab work station remove the \"c\" in\r\nc   column 1 of the following \"call system\" to plot your results.  If you\r\nc   are running from NCSA\/BYU Telnet on a Mac, you can see plots by\r\nc   making the same change, and by following instructions in \"gp-int3\"\r\nc   to change that file for Tektronics emulation in gnuplot.\r\nc\r\nc      call system ('gnuplot gp-int3')\r\nc\r\n      return\r\n      end\r\nc &lt;\/pre&gt;\r\nc &lt;\/body&gt;\r\nc &lt;\/html&gt;\r\nc<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>c &lt;html&gt; c &lt;head&gt;&lt;title&gt;&lt;\/title&gt;&lt;\/head&gt; c &lt;body&gt; c &lt;pre&gt; c program interpolate implicit none c c Demonstation of 2 simple interpolation methods for c smoothly joining results from 2 disjoint regions c c John Mahaffy 2\/3\/96 c c Open up two files in your current directory to receive results c open(10,file=&#8217;nuwlin&#8217;) open(11,file=&#8217;nuwcube&#8217;) c c First a [&hellip;]<\/p>\n","protected":false},"author":22,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[],"tags":[],"class_list":["post-127","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/comments?post=127"}],"version-history":[{"count":1,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/127\/revisions"}],"predecessor-version":[{"id":128,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/127\/revisions\/128"}],"wp:attachment":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/media?parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/categories?post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/tags?post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}