Heat Flow in a Curved Pipe

This example shows a steady-state coupled case of heat flow in a curved pipe. Inside the pipe, the fluid flow and heat flow equations must be solved, while for the solid pipe only the heat flow equations need to be solved.

We have an iron pipe curved by 135 degrees, with an inner diameter of 1 cm and an outer diameter of 1.2 cm. It is bent through an angle of 135 degrees with a radius of 2 cm. The computation includes a 3 cm section of pipe beyond the bend. Water with an initial temperature of 350 K (76.85 °C) flows through the pipe. The flowing water is cooled by the outer temperature of the iron pipe, which is 300 K (26.85 °C). The water is injected with a parabolic profile at a maximum velocity of 1 cm/s. Purely to simplify the computation, we assume laminar flow and a steady state.

  1. Open a terminal window and run:

    $ single
    Job XXXX is submitted to default queue - interactive.
    Waiting for dispatch ...
    Starting on cnXX
    $ module load elmergui
      Loading qwt/6.0.2
      Loading vtk/5.10.1
      Loading ftgl/2.1.3-rc5
      Loading qt/4.8.4
      Loading paraview/3.98
      Loading opencascade/6.5.5
      Loading openmpi/1.8.1
      Loading elmer/7.0
      Loading elmergui/7.0
    $ ElmerGUI
    
  2. In the ElmerGUI menu select:

    File -> Open
    curved_pipe.grd
    
    • After the file is opened, the object geometry is shown in a new window and finite element mesh generation starts. Progress messages of the generation are shown in the terminal window. When generation is finished, the ElmerGUI window shows the object geometry with the generated finite element mesh.

    • Maximise the ElmerGUI window to full screen

    • Moving the object:

      • Rotating the mouse wheel (forward/back) zooms the object (in/out)

      • Holding the left mouse button while moving the mouse (up/down) rotates the object about the horizontal axis.

      • Holding the left mouse button while moving the mouse (left/right) rotates the object about the vertical axis

  3. Once we have the mesh, we start defining the model. To do so, we follow the entries in the ‘Model’ drop-down menu in order (from top to bottom). The steps for our example are given below:

  4. Define the general settings:

    Model -> Setup
    Coordinate sytem = Cartesian
    Simulation Type = Steady state
    Steady state max. Iter =1
    Apply
    
  5. Defining the equations:
    Select the relevant equations and parameters. In our case we use two solvers (called Equations in Elmer). For the fluid we use the fluid flow solver and the heat flow solver, while for the iron pipe we use only the heat flow solver.
    Since we know the mesh and know that the fluid is Body 1 and the pipe is Body 2, we will assign the solvers (Equation) and materials to this geometry already when defining them.

    Model -> Equation 
    Add
       Name = Heat and Flow (Change the name ‘Equation 1’ to ‘Heat and Flow’) 
       Apply to Bodies = 1 
       Select the 'Heat Equation' tab and define: 
          Active = on (i.e. tick the checkbox) 
          Convection = Computed 
       Select the ‘Navier-Stokes’ tab and define:   
          Active = on   
          Priority = 1   
          Edit Solver Setings (click the button) ​ 
              Select the ‘Linear System’ tab   
              Preconditiong = ILU1 
    Add 
    OK
    

    Assign only the heat flow solver to the iron pipe:

    Model -> Equation 
    Add
       Name = Heat (Change the name ‘Equation 2’ to ‘Heat’) 
       Apply to Bodies = 2 
       Select the 'Heat Equation' tab and define: 
          Active = on (i.e. tick the checkbox) 
          Convection = None 
    Add 
    OK
    
  6. Define the materials. To define the material properties we use the built-in library. For the fluid we choose water at room temperature (Watter – room temperature), and for the pipe iron (Iron generic). As we know, the fluid is Body1 and the pipe is Body2.

    Model -> Material 
    Add 
       Material library 
          Watter – room temperature (select from the menu) 
          Apply to bodies = Body 1 (tick the checkbox)
       Add
    New
       Material library 
          Iron generic  (select from the menu) 
          Apply to bodies = Body 2 (tick the checkbox)
       Add
    OK
    OK
    
  7. Define the boundary conditions:
    We have four different boundary conditions: the hot inflow (HotInFlow), the outflow (OutFlow), the inner no-slip surface (NoSlip) and the constant outer room temperature of the pipe (Troom).

  8. Model -> Boundary condition
    Add
       Name = HotInFlow
       Heat Equation
         Temperature = 350.0
       Navier-Stokes
         Velocity 1 = 0.0
         Velocity 2 = 0.0
         Velocity 3 = Variable Coordinate; Real MATC "100.0*(1.0e-4-tx(0)^2-tx(1)^2)"
       Add
    New
       Name = Outflow
         NaviewStokes
            Use normal-tangential coordinate system = on
            Velocity 2 = 0.0
            Velocity 3 = 0.0
         Add
    New
         Name = NoSlip
            Navier-Stokes
              NoSlip Wall BC = on
          Add
    New
         Name = Troom
         Heat Equation
             Temperatute = 300.0
         Add
    OK
    OK
    OK
    OK
    
  9. To help identify the inlet face, activate the compass:

    View -> Compas = on (tick the option in the View menu)
    

    The inlet face should be the one whose normal points parallel to the axis.:

  10. To set the boundary conditions using the graphical interface, select:

    Model -> Set boundary properties (select, i.e. tick the option)
    
  11. Double-click on the inlet face (the inlet face should be the one whose normal points parallel to the axis); a window for selecting boundary conditions opens. Under ‘Boundary condition’ select ‘HotInflow’.
    Double-click on the outlet face; a window for selecting boundary conditions opens. Under ‘Boundary condition’ select ‘Outflow’.
    Double-click on the outer surface of the pipe; a window for selecting boundary conditions opens. Under ‘Boundary condition’ select ‘Troom’.

  12. To set the fourth boundary condition we need to ‘see inside’. We therefore have to make the pipe invisible. Select the outer surface of the pipe and in the menu select

    View  ->  Hide/show (select, i.e. tick the option)
    
  13. Again, in the menu set:

    Model -> Set boundary properties (select, i.e. tick the option)
    
  14. Using the graphical interface, double-click to select the inner part of the pipe and in the menu that appears set the boundary condition to ‘NoSlip’.

  15. Generate the input file for ‘ElmerSolver’:

    Sif -> Generate
    

    The resulting file can be viewed by selecting from the menu:

    Sif -> Edit
    

    The file can then be edited, or closed with ‘File->Quit’.

  16. Save the project (project data can be saved at any stage of input):

    File -> Save Project
    To save the project, choose any directory (e.g. the subdirectory 'ProjectFiles').
    

    Project data are restored with: File -> LoadProject, selecting the directory where the data were saved.

  17. Compute the case:

    Run -> Start solver
    

    .

  18. To view the results, run the postprocessor:

    Run -> postprocesor
    
  19. In the postprocessor, view the results for the computed temperatures, velocities and pressure (pipe cross-sections are shown at y=0):

    .

    .
    .
    .
    .

Attachment

Size

curved_pipe.grd file

919 bytes

Toplotni tok v ukrivljeni cevi

Naloga prikazuje stacionaren vezan primer toplotnega toka v ukrivljeni cevi. Znotraj cevi se morajo reševati enačbe pretoka tekočine in pretoka toplote medtem, ko moramo za trdno cev reševati le enačbe pretoka toplote.

Imamo za 135 satopinj ukrivljeno železno cev notranjega premera 1 cm in zunanjega 1.2 cm. Zakrivljena je za kot 135 stopinj z radijem 2 cm.  V izračunu upoštevamo 3 cm odsek cevi od zavoja. V cevi se pretaka voda z začetno temperaturo 350 st K (76.85 st C). Pretekajočo vodo hladi zunanja temperatura železne cevi, ki je 300 st K (26.85 st C). Voda se vbrizgava z maksimalno hitrostjo 1 cm/s paraboličnega profia.  Le za potrebe enostavnejšega izračuna predpostavimo  laminarni tok in stacionaren primer.

  1. Odpremo terminalsko okno in zaženemo:

    $ single
    Job XXXX is submitted to default queue - interactive.
    Waiting for dispatch ...
    Starting on cnXX
    $ module load elmergui
      Loading qwt/6.0.2
      Loading vtk/5.10.1
      Loading ftgl/2.1.3-rc5
      Loading qt/4.8.4
      Loading paraview/3.98
      Loading opencascade/6.5.5
      Loading openmpi/1.8.1
      Loading elmer/7.0
      Loading elmergui/7.0
    $ ElmerGUI
    
  2. V meniju programa ElmerGUI izberemo:

    File -> Open
    curved_pipe.grd
    
    • Po odprtju datoteke se nam v novem oknu prikaže geometrija objekta in prične generiranje mreže končnih elementov. Kontrolni izpisi generiranja se prikazujejo v terminalskem oknu. Ko je generiranje končano se nam v ElmerGUI oknu prikaže geometrija objekta z generirano mrežo končnih elementov.

    • Povečamo ElmerGUI okno preko celega ekrana

    • Premikanje objekta:

      • Z vrtenjem koleščka (naprej/nazaj) miške zumiramo objekt (prinližujemo/oddaljujemo)

      • Z pritiskom leve miškine tipke in istočasnim premikom miške (gor/dol) rotiramo objekt okoli horizontalne osi.

      • Z pritiskom leve miškine tipke in istočasnim premikom miške (levo/desno) rotiramo objekt okoli vertkalne osi

  3. Ko imamo mrežo, začnemo z definicijo modela. Pri tem po vrsti (od vrha proti dnu) sledimo navedbam v padajočem meniju ‘Model’. V nadaljevanju podajamo korake našega priemra:

  4. Definiramo splošne nastavitve:

    Model -> Setup
    Coordinate sytem = Cartesian
    Simulation Type = Steady state
    Steady state max. Iter =1
    Apply
    
  5. Definicija enačb:
    Izveremo relevantne enačbe in parametre. V našem primeru uporabimo dva solverja (v Elmerju imenovana Equations). Za tekočino uporabimo solver za pretk tekočine in solver za pretok toplote, za železno cev pa le solver za pretok toplote.
    Ker poznamo mrežo in vemo, da tekočino predstavlja Body 1, cev pa Body 2 bomo tej geomertiji dodelili solverje (Equation) in materialu že ob njihovi definiciji.

    Model -> Equation 
    Add
       Name = Heat and Flow (Korigiramo ime ‘Equation 1’ na ‘Heat and Flow’) 
       Apply to Bodies = 1 
       Izberemo jeziček 'Heat Equation' in definiramo: 
          Active = on (tj postavimo kljukico) 
          Convection = Computed 
       Izberemo jeziček ‘Navier-Stokes’ in definiramo:   
          Active = on   
          Priority = 1   
          Edit Solver Setings (kliknemo na gumb) ​ 
              Izberemo jeziček ‘Linear System’   
              Preconditiong = ILU1 
    Add 
    OK (V redu)
    

    Železni cevi  dodelimo le solver za pretok toplote:

    Model -> Equation 
    Add
       Name = Heat (Korigiramo ime ‘Equation 2’ na ‘Heat’) 
       Apply to Bodies = 2 
       Izberemo jeziček 'Heat Equation' in definiramo: 
          Active = on (tj postavimo kljukico) 
          Convection = None 
    Add 
    OK (V redu)
    
  6. Definiramo materiala. Za definicijo materilanih lastnosti uporabimo vgrajeno knjižnico.  Za tekočino izberemo vodo sobne temperature (Watter – room temperature) za cev pa železo (Iron generic). Kot vemo tekočino predstavlja Body1, cev pa Body2.

    Model -> Material 
    Add 
       Material library 
          Watter – room temperature (izberemo iz menija) 
          Apply to bodies = Body 1 (postavimo kljukico)
       Add
    New
       Material library 
          Iron generic  (izberemo iz menija) 
          Apply to bodies = Body 2 (postavimo kljukico)
       Add
    OK
    OK
    
  7. Definiramo robne pogoje:
    Imamo štiri različne robne pogoje: vhodni tok toplote (HotInFlow), izhodni tik (OutFlow), notranjo brezzdrsno površino (NoSlip) in konstantno zunanjo sobno temperaturo cevi (Troom).

  8. Model -> Boundary condition
    Add
       Name = HotInFlow
       Heat Equation
         Temperature = 350.0
       Navier-Stokes
         Velocity 1 = 0.0
         Velocity 2 = 0.0
         Velocity 3 = Variable Coordinate; Real MATC "100.0*(1.0e-4-tx(0)^2-tx(1)^2)"
       Add
    New
       Name = Outflow
         NaviewStokes
            Use normal-tangential coordinate system = on
            Velocity 2 = 0.0
            Velocity 3 = 0.0
         Add
    New
         Name = NoSlip
            Navier-Stokes
              NoSlip Wall BC = on
          Add
    New
         Name = Troom
         Heat Equation
             Temperatute = 300.0
         Add
    OK
    OK
    OK
    OK (V redu)
    
  9. Za pomoč pri določivi vhodne ploskve aktiviramo kompas:

    View -> Compas = on (odkljukamo opcijo v meniju View)
    

    Vhodna ploskev naj bo tista, katere normala kaže vzporedno z osi.:

  10. Za določitev robnih pogjev s pomočjo grafičnega vmesnika izberemo:

    Model -> Set boundary properties (izberemo oz odkljukamo opcijo)
    
  11. Dvokiknemo na površino vhodne ploskve (vhodna ploskev naj bo tista, katere normala kaže vzporedno z osi),  odpre se nam okno za izbiro robnih pogojev. Pod ‘Boundary condition’ izberemo ‘HotInflow’.
    Dvokiknemo na površino izhodne ploskve,  odpre se nam okno za izbiro robnih pogojev. Pod ‘Boundary condition’ izberemo ‘Outflow’.
    Dvokliknemo na zunanjo površino cevi, odpre se nam okno za izbiro robnih pogoje. Pod ‘Boundary condition’ izberemo ‘Troom’.

  12. Za določitev četrtega robnega pogoja moramo ‘videti v notranjos’. Zato moramo cev narediti nevidno. Izberemo zunanji obod cevi in v meniju izberemo

    View  ->  Hide/show (izberemo oz odkljukamo opcijo)
    
  13. Ponovno v meniju določimo :

    Model -> Set boundary properties (izberemo oz odkljukamo opcijo)
    
  14. S pomočjo grafičnega vmesnika z dvoklikom izberemo notranji del cevi in v prikazanem meniju nastavimo robne pogoje ‘NoSlip’.

  15. Generiramo vhodno datoteko za program ‘ElmerSolver’:

    Sif -> Generate
    

    Nastalo datoteko si lahko ogledamo z izbiro iz menija:

    Sif -> Edit
    

    Datoteko lahko nato uredimo, ali zapustimo z ukazom ‘File->Quit’.

  16. Shranimo projekt (Podatke projekta lahko shranimo v poljubni vazi vnosa):

    File -> Save Project
    Za shranjevanje projekta izberemo poljuben direktorij (npr. poddirektorij 'ProjectFiles').
    

    Podatke projekta prikličemo z: File -> LoadProject in izberemo dorektorij, kamor smo podatke shranili.

  17. Izračunamo primer:

    Run -> Start solver
    

    .

  18. Za ogled rezultatov poženemo postprocesor:

    Run -> postprocesor
    
  19. V podprocesoju si ogledamo rezultate izračunanih temperatur, hitrosti in pritiska (prereze cevi prikazujemo pri y=0):

    .

    .
    .
    .
    .

Priponka

Velikost

curved_pipe.grd datoteka

919 bytov