modelHeaterFanPressureDriven

Heater and fan in series, model configured to allow flow reversal and pressure driven flow rate

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

This example demonstrates how to configure a model with a heater and a fan that causes a pressure rise in the air stream. The fan increases the pressure of the medium, and it also computes how much power is needed for this pressure rise, which is an input to the fan model.

The component invBloCon at the bottom of the model sets up an equality constraint on the pressure between the sink and the source. It also outputs a signal for the mass flow rate. Hence, this component is used to declare how to break the algebraic loop in this signal flow diagram. For a model with prescribed mass flow rate, see Buildings.Fluid.FMI.Validation.HeaterFan.

For this example, the models are not exported as FMUs. However, the thermofluid flow models are wrapped using input/output blocks.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.MassFlowRatem_flow_nominalQ_flow_nominal/1000/10Nominal mass flow rate
Modelica.Units.SI.PressureDifferencedp_nominal2000Pressure
Modelica.Units.SI.HeatFlowRateQ_flow_nominal1000Heat flow rate at u=1, positive for heating
Booleanuse_p_intrueSet to true, as this model computes the mass flow rate based on the pressure drop

Components

TypeNameDefaultDescription
ExportContainers.Examples.FMUs.FanfloMacFlow machine with pressure raise as an input
ExportContainers.Examples.FMUs.HeaterCooler_uheaHeater
Modelica.Blocks.Sources.ConstantdpPressure raise of fan
Modelica.Blocks.Sources.ConstantuHeaControl signal for heater
Source_TsouSource for mass flow rate and pressure
Sink_TsinSink for flow rate, and source for backflow properties
Modelica.Blocks.Sources.Constantm_flowMass flow rate
Modelica.Blocks.Sources.ConstantpInInlet pressure
Modelica.Blocks.Sources.ConstantTInInlet temperature
Modelica.Blocks.Sources.ConstantX_w_inInlet mass fraction
Modelica.Blocks.Sources.ConstantTBacTemperature of backward flow
Modelica.Blocks.Sources.ConstantX_w_bacMoisture mass fraction for back flow
Modelica.Blocks.Sources.Constant[Medium.nC]CBacTrace substances for back flow
Modelica.Blocks.Sources.Constant[Medium.nC]CTrace substances for forward flow
Modelica.Blocks.Math.InverseBlockConstraintsinvBloConBlock to set up residual function for nonlinear system of equation for pressure drop and mass flow rate

Contents

NameDescription
MediumMedium model

Revisions

  • January 22, 2016, by Michael Wetter:
    Corrected type declaration of pressure difference. This is for #404.
  • November 8, 2014, by Michael Wetter:
    First implementation.