modelBaseGrid

Base class for grid module

Extends from dhcSim.Fluid.Interfaces.LumpedMultiVolumeDeclarations (Declarations for multiple lumped volumes).

Parameters

TypeNameDefaultDescription
IntegernLev (from LumpedMultiVolumeDeclarations)2Number of grid levels
Medium.SpecificEnthalpyh_start (from LumpedMultiVolumeDeclarations)Medium.specificEnthalpy(state = Medium.setState_pTX(p = p_start, T = T_start, X = X_start))
IntegernMixNumber of mixing connection points
IntegernPipNumber of pipes
Modelica.SIunits.PressurepAbsp_start[1]Absolute pressure level of grid in pressure point
IntegernSegfill(1, nPip)Number of volume segments
Modelica.SIunits.Lengthdiameterfill(0.1, nPip, nLev)Pipe diameter
Modelica.SIunits.Lengthlengthfill(10, nPip)Length of the pipe
Modelica.SIunits.Velocityv_nominal_pipfill(2, nPip, nLev)Velocity at m_flow_nominal (used to compute default diameter)
Modelica.SIunits.PressureDifferencedp_fixed_nominal_pipzeros(nPip, nLev)Additional nominal pressure drop of pipes
Modelica.SIunits.Lengthroughness2.5e-5Absolute roughness of pipe, with a default for a smooth steel pipe (dummy if use_roughness = false)
Modelica.SIunits.PressureDifferencedp_nominal_pipfill(10, nPip, nLev)Pressure difference
Modelica.SIunits.MassFlowRatem_flow_nominal_pipfill(1, nPip, nLev)Pressure difference
Integer[nMix]MixNPrtones(nMix)Number of connection ports for each mixing volume
Modelica.SIunits.MassFlowRatem_flow_nominal_conPoi1Nominal mass flow rate for connection points
Modelica.SIunits.Timetau10Time constant at nominal flow for dynamic energy and momentum balance
Dynamics › Equations
Modelica.Fluid.Types.DynamicsenergyDynamics (from LumpedMultiVolumeDeclarations)Modelica.Fluid.Types.Dynamics.DynamicFreeInitialType of energy balance: dynamic (3 initialization options) or steady state
Modelica.Fluid.Types.DynamicsmassDynamics (from LumpedMultiVolumeDeclarations)energyDynamicsType of mass balance: dynamic (3 initialization options) or steady state
Modelica.Fluid.Types.DynamicssubstanceDynamics (from LumpedMultiVolumeDeclarations)energyDynamicsType of independent mass fraction balance: dynamic (3 initialization options) or steady state
Modelica.Fluid.Types.DynamicstraceDynamics (from LumpedMultiVolumeDeclarations)energyDynamicsType of trace substance balance: dynamic (3 initialization options) or steady state
Initialization
Modelica.SIunits.AbsolutePressurep_start (from LumpedMultiVolumeDeclarations)fill(Medium.p_default, nLev)Start value of pressure
Modelica.SIunits.TemperatureT_start (from LumpedMultiVolumeDeclarations)fill(Medium.T_default, nLev)Start value of temperature
Medium.MassFractionX_start (from LumpedMultiVolumeDeclarations)fill(Medium.X_default, nLev)Start value of mass fractions m_i/m
Medium.ExtraPropertyC_start (from LumpedMultiVolumeDeclarations)fill(0, nLev, Medium.nC)Start value of trace substances
Medium.ExtraPropertyC_nominal (from LumpedMultiVolumeDeclarations)fill(1E-2, nLev, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Dynamics
RealmSenFac (from LumpedMultiVolumeDeclarations)1Factor for scaling the sensible thermal mass of the volume
Pressure drop
dhcSim.DHC.Submodules.TwoPortModules.Pipe.Types.dpTypesdpTypedhcSim.DHC.Submodules.TwoPortModules.Pipe.Types.dpTypes.dp_nominalDefine pressure drop calculation
Assumptions
BooleanallowFlowReversaltrue= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Advanced
Medium.MassFlowRatem_flow_small_pip1E-4.*abs(m_flow_nominal_pip)Small mass flow rate for regularization of zero flow
Advanced › Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Flow resistance
RealReC4000Reynolds number where transition to turbulent starts
Booleanfrom_dpfalse= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistancefalse= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM0.1Fraction of nominal flow rate where flow transitions to laminar
Heat losses
Modelica.SIunits.LengthdisPip10Fictive pipe distance, used to calculate fictive Resistance
Modelica.SIunits.LengthuniWidth1Universal width
Initialization › Heat losses
Modelica.SIunits.TemperatureT_surf_a_start293.15Initial temperature at surf_a, used if steadyStateInitial = false
Modelica.SIunits.TemperatureT_surf_b_start283.15Initial temperature at surf_b, used if steadyStateInitial = false

Components

TypeNameDefaultDescription
Buildings.Fluid.Storage.ExpansionVesselexpansionVessel
dhcSim.Fluid.Delays.MultipleDelaysmix
dhcSim.DHC.Submodules.MultiPortModules.Pipe.AdiabatePipepipe