5.2.1.1. Advective Bar Example

An advective bar is a 1D fluid solve that accounts for changes in fluid temperature along the bar and can be used to provide a spatially varying convective environment.

5.2.1.1.1. Problem Files

The files required for this example can be downloaded here, or found at $TESTS/aria_rtest/example/training/advectivebar (where TESTS=/projects/sierra/tests in a CEE environment, or your Sierra test distribution otherwise).

This problem uses a simple pipe geometry with a bar down the center of the pipe.

Advective bar geometry

5.2.1.1.2. Input Deck Modification

To add an advective bar to an Aria problem, you need to make the following changes:

  1. Add a block of 1D bar elements to the mesh file with a nodeset on the “entrance node”. For example, the commands to add a bar in Cubit are:

# Create the bar (a line)
create curve location 0 0 -0.25 direction 0 0 1 length 0.5

# Mesh the bar
curve 7 interval 100
curve 7 scheme equal
mesh curve 7

# Create a nodeset on the entrance vertex
nodeset 1000 add vertex in curve 7 with z_coord > 0.0
nodeset 1000 name "bar_inlet"

# Create a block for the bar elements
block 2 add curve 7
block 2 element type bar2
block 2 name "bar"
  1. Define functions for the bar geometry and bar fluid density

begin definition for function bar_area
    scale by 1.0
    type = piecewise linear
    begin values
      -1.   {PI/4*D^2}
        1.   {PI/4*D^2}
    end values
end

begin definition for function bar_hydraulic_diameter
    scale by 1.0
    type = piecewise linear
    begin values
      -1.   {D}
        1.   {D}
    end values
end

begin definition for function air_density
    type = piecewise linear
    begin values
{NOECHO} { _T = 200}
{loop(12)}
{NOECHO}      { _T = _T + 25}
{ECHO}        {_T}  {101325*28/(8314*_T)}
{endloop}
    end values
end definition for function air_density
  1. Define a material to use for the fluid in the bar

BEGIN Aria MATERIAL Air
  Viscosity            = constant value = 1e-5
  density              = user_function name = air_density   X = temperature
  specific heat        = constant value = 1000
  thermal conductivity = constant value = 0.04
  bar area             = user_function name = bar_area X = bar_coordinate
  heat conduction = basic
  Advection Velocity = bar
END Aria MATERIAL Air

And assign it to the advective bar block in the finite element model section

begin finite element model fem
  # ...
  use material Air for bar
end finite element model fem
  1. Add an advective bar block in the Aria region and define an energy equation on it

Begin Advective Bar Network airBar
   add volume bar
   initial temperature = 300
   MASS FLOW RATE AT bar_inlet = 0.1 # kg/s

   coordinate reference = bar_inlet component z
   fluid density function = air_density
   hydraulic diameter function = bar_hydraulic_diameter
   flow cross sectional area function = bar_area
end

EQ ENERGY for TEMPERATURE on bar using Q1P0 with Diff Lumped_mass Adv SUPG
BC Dirichlet for temperature on bar_inlet = constant value = 500
IC for temperature on bar = constant value = 500
  1. Add a convective boundary condition coupling the solid domain with the bar

BC Bar_Flux for energy on inner_surface = generalized_nat_conv bar=airBar h=500.0

As with the bulk node - the convection coefficient can be defined using an inline string function or using a correlation (specified with the hcorr argument).