modelMoistureMixingConservationDynamicBalance

This test checks if mass and energy is conserved when mixing fluid streams using dynamic balances

Extends from Buildings.Fluid.MixingVolumes.Validation.BaseClasses.MoistureMixingConservation (Partial for checking conservation of mass for independent mass fraction).

Information

This model verifies if mass and energy are conserved, using a dynamic balance. Two air streams with different mass flow rate are humidified by a mixing volume with two different vapor mass flow rates. These flows are then mixed. Boundary integrals are used to verify if air mass, vapour mass and internal energy are conserved.

Note, however, that there is some approximation error because in its default configuration, the conservation balance models simplify the treatment of the water that is added to the fluid. See Buildings.Fluid.Interfaces.StaticTwoPortConservationEquation and Buildings.Fluid.Interfaces.StaticTwoPortConservationEquation for a discussion.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.Massm_startInitial mass of the mixing volumes
Modelica.Units.SI.InternalEnergyU_startInitial energy of the mixing volumes

Components

TypeNameDefaultDescription
Buildings.Fluid.Sources.MassFlowSource_hsou1 (from MoistureMixingConservation)Air source
Buildings.Fluid.Sources.MassFlowSource_hsou2 (from MoistureMixingConservation)Air source
Buildings.Fluid.MixingVolumes.MixingVolumeMoistAirvol (from MoistureMixingConservation)Mixing volume for adding water
Buildings.Fluid.MixingVolumes.MixingVolumeMoistAirvol1 (from MoistureMixingConservation)Mixing volume for adding water
Buildings.Fluid.Sources.Boundary_pTsin (from MoistureMixingConservation)Air sink
Buildings.Fluid.MixingVolumes.MixingVolumeMoistAirvol2 (from MoistureMixingConservation)Mixing volume for removing water
Modelica.Blocks.Sources.ConstantmWatFlo1 (from MoistureMixingConservation)Water mass flow rate 1
Modelica.Blocks.Sources.ConstantmWatFlo3 (from MoistureMixingConservation)Withdrawn water rate
Modelica.Blocks.Sources.ConstantmWatFlo2 (from MoistureMixingConservation)Water mass flow rate 2
Modelica.Blocks.Math.AddcheMasFra (from MoistureMixingConservation)Check for water conservation
Buildings.Fluid.Sensors.MassFractionTwoPortsenMasFra (from MoistureMixingConservation)Sensor for measuring water content
Modelica.Blocks.Sources.ConstantmWatFloSol (from MoistureMixingConservation)Solution mass fraction water
Buildings.Fluid.Sensors.MassFlowRatesenMasFlo (from MoistureMixingConservation)Mass flow rate sensor
Modelica.Blocks.Math.AddcheMasFlo (from MoistureMixingConservation)Check for conservation of mass
Modelica.Blocks.Sources.ConstantmFloSol (from MoistureMixingConservation)Solution mass flow rate
Sensors.EnthalpyFlowRatesenSpeEnt (from MoistureMixingConservation)Specific enthalpy flow rate sensor
Modelica.Blocks.Math.AddcheSpeEnt (from MoistureMixingConservation)Check for conservation of energy
Modelica.Blocks.Sources.ConstanthSol (from MoistureMixingConservation)Solution mass flow rate
Modelica.Blocks.Continuous.IntegratorintMasFloVapInIntegral of added vapour
Modelica.Blocks.Math.Add3addAdder for injected water
Modelica.Blocks.Sources.RealExpressionmasVapVolVapour mass stored in mixing volumes
Modelica.Blocks.Math.Add3add3VapSum of vapour mass should be conserved
Modelica.Blocks.Sources.RealExpressionmasVolMass stored in mixing volumes
Modelica.Blocks.Continuous.IntegratorintMasFloOutIntegral of leaving mass
Modelica.Blocks.Math.Add3add3MassAdding 3 mass streams
Modelica.Blocks.Continuous.IntegratorintMasFloInIntegral of added mass
Modelica.Blocks.Sources.ConstantmasFloInAdded air mass flow rate
Modelica.Blocks.Continuous.IntegratorintEntOutIntegral of leaving enthalpy
Modelica.Blocks.Continuous.IntegratorintEntInIntegral of added enthalpy
Modelica.Blocks.Sources.RealExpressionentVolEnergy stored in mixing volumes
Modelica.Blocks.Math.Add3add3EntAdding 3 enthalpy streams
Modelica.Blocks.Sources.ConstantentInAdded enthalpy
Modelica.Blocks.Math.ProductproWater vapor flow rate
Modelica.Blocks.Continuous.IntegratorintMasVapOutIntegral of leaving vapor mass

Revisions

  • April 24, 2017, by Michael Wetter:
    Removed enthalpy of liquid from entIn.
    This is for Buildings, #704.
  • November 2, 2016, by Michael Wetter:
    Changed assertions to blocks that compute the difference, and added the difference to the regression results.
    This is for issue 564.
  • May 22 2015 by Filip Jorissen:
    First implementation.