Skip to content
LIBRARY
Pipes.BaseClasses.HeatTransfer.PartialFlowHeatTransfer.md

Pipes.BaseClasses.HeatTransfer.PartialFlowHeatTransfer ​

Base class for heat-transfer correlations along a distributed fluid-flow path.

The extending correlation receives the local thermodynamic states, velocities, and flow geometry and supplies the segment heat-transfer closure.

This component extends from FluidComponents.Interfaces.PartialHeatTransfer

Usage ​

FluidComponents.Pipes.BaseClasses.HeatTransfer.PartialFlowHeatTransfer(k, T_ambient, nParallel)

Parameters: ​

NameDescriptionUnitsDefault value
medium_data–
n–
use_k–false
kW/(m2.K)
T_ambientK
nParallel–

Connectors ​

  • heatPorts - This connector represents a thermal port with temperature and heat flow as the potential and flow variables, respectively. (HeatPort)

Variables ​

NameDescriptionUnits
surfaceAreasm2
Q_flowsW
TsK
vsm/s
lengthsm
dimensionsm
roughnessesm

Source ​

dyad
"""
Base class for heat-transfer correlations along a distributed fluid-flow path.

The extending correlation receives the local thermodynamic states, velocities,
and flow geometry and supplies the segment heat-transfer closure.
"""
partial component PartialFlowHeatTransfer
  extends FluidComponents.Interfaces.PartialHeatTransfer()
  # Mean fluid velocity in each segment [m/s]
  variable vs::Velocity[n]
  # Number of identical parallel flow devices [-]
  parameter nParallel::Real
  # Length of each flow segment [m]
  variable lengths::Length[n]
  # Characteristic flow dimension of each segment [m]
  variable dimensions::Length[n]
  # Average surface roughness of each segment [m]
  variable roughnesses::FluidComponents.Types.Roughness[n]
relations
end
Flattened Source
dyad
"""
Base class for heat-transfer correlations along a distributed fluid-flow path.

The extending correlation receives the local thermodynamic states, velocities,
and flow geometry and supplies the segment heat-transfer closure.
"""
partial component PartialFlowHeatTransfer
  # Immutable medium definition selected at model construction [-]
  structural parameter medium_data::MediaComponents.Interfaces.AbstractPartialMediumData
  # Number of heat-transfer segments [-]
  structural parameter n::Integer
  "Thermodynamic states of the fluid segments."
  states = [MediaComponents.Interfaces.ThermodynamicState(medium_data = medium_data) for i in 1:n]
  # Heat-transfer area of each segment [m2]
  variable surfaceAreas::Area[n]
  # Heat-flow rate into each fluid segment [W]
  variable Q_flows::HeatFlowRate[n]
  # Whether thermal loss to ambient is included [-]
  structural parameter use_k::Boolean = false
  # Heat-transfer coefficient to ambient [W/(m2.K)]
  parameter k::CoefficientOfHeatTransfer
  # Ambient temperature [K]
  parameter T_ambient::Temperature
  "Thermal boundary of each fluid segment."
  heatPorts = [HeatPort() for i in 1:n]
  # Fluid temperature in each segment [K]
  variable Ts::Temperature[n]
  # Mean fluid velocity in each segment [m/s]
  variable vs::Velocity[n]
  # Number of identical parallel flow devices [-]
  parameter nParallel::Real
  # Length of each flow segment [m]
  variable lengths::Length[n]
  # Characteristic flow dimension of each segment [m]
  variable dimensions::Length[n]
  # Average surface roughness of each segment [m]
  variable roughnesses::FluidComponents.Types.Roughness[n]
relations
  for i in 1:n
    Ts[i] = MediaComponents.Interfaces.temperature_state(medium_data, states[i].p, states[i].T, states[i].d, states[i].h, states[i].X)
  end
  if use_k
    for i in 1:n
      Q_flows[i] = heatPorts[i].Q_flow + k * surfaceAreas[i] * (T_ambient - heatPorts[i].T)
    end
  else
    for i in 1:n
      Q_flows[i] = heatPorts[i].Q_flow
    end
  end
metadata {}
end


Test Cases ​

No test cases defined.

  • Examples

  • Experiments

  • Analyses