Collection of validation models
Information
This package contains validation models for the classes in
Buildings.Fluid.BaseClasses.
Note that most validation models contain simple input data
which may not be realistic, but for which the correct
output can be obtained through an analytic solution.
The examples plot various outputs, which have been verified against these
solutions. These model outputs are stored as reference data and
used for continuous validation whenever models in the library change.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name |
Description |
ActuatorFilter
|
Validation model for the actuator filter |
MassFlowRateMultiplier
|
Example use of MassFlowRateMultiplier |
Validation model for the actuator filter
Information
This example validates
Buildings.Fluid.BaseClasses.ActuatorFilter.
The validation is done for different settings of u_nominal
and for
different start values of the filter output.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
Time | riseTime | 10 | Cut-off frequency of filter [s] |
Modelica definition
model ActuatorFilter
extends Modelica.Icons.Example;
parameter Modelica.Units.SI.Time riseTime=10 ;
final parameter Modelica.Units.SI.Frequency fCut=5/(2*Modelica.Constants.pi*
riseTime) ;
Buildings.Fluid.BaseClasses.ActuatorFilter act_1(f=fCut, initType=Modelica.Blocks.Types.Init.InitialState)
;
Buildings.Fluid.BaseClasses.ActuatorFilter act_2(f=fCut, initType=Modelica.Blocks.Types.Init.InitialState)
;
Modelica.Blocks.Math.Gain gain(k=100) ;
Modelica.Blocks.Sources.Step step(startTime=0);
Buildings.Fluid.BaseClasses.ActuatorFilter act_y_start05(
f=fCut,
initType=Modelica.Blocks.Types.Init.InitialOutput,
y_start=0.5) ;
Buildings.Fluid.BaseClasses.ActuatorFilter act_y_start1(
f=fCut,
initType=Modelica.Blocks.Types.Init.InitialOutput,
y_start=1) ;
equation
connect(act_2.u, gain.y);
connect(step.y, act_1.u);
connect(step.y, gain.u);
connect(act_y_start05.u, step.y);
connect(act_y_start1.u, step.y);
end ActuatorFilter;
Example use of MassFlowRateMultiplier
Information
This example demonstrates the use of
Buildings.Fluid.BaseClasses.MassFlowRateMultiplier,
using either a parameter to specify the multiplier factor
(see the instance massFlowRateMultiplier
) or
an input signal (see the instance massFlowRateMultiplier1
).
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model MassFlowRateMultiplier
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Water;
Buildings.Fluid.BaseClasses.MassFlowRateMultiplier
massFlowRateMultiplier(
redeclare package Medium = Medium,
k=5)
;
Modelica.Blocks.Sources.Ramp ram_m_flow(
height=10,
duration=10,
offset=0) ;
Buildings.Fluid.Sources.MassFlowSource_T sou(
redeclare package Medium = Medium,
use_m_flow_in=true,
nPorts=1) ;
Buildings.Fluid.Sources.Boundary_pT sin(
redeclare package Medium = Medium,
nPorts=2)
;
Buildings.Fluid.BaseClasses.MassFlowRateMultiplier
massFlowRateMultiplier1(
redeclare package Medium = Medium,
use_input=true,
k=5)
;
Modelica.Blocks.Sources.Ramp gaiMasFlo(
height=4.9,
duration=10,
offset=0.1) ;
Buildings.Fluid.Sources.MassFlowSource_T sou1(
redeclare package Medium = Medium,
use_m_flow_in=true,
nPorts=1) ;
equation
connect(ram_m_flow.y, sou.m_flow_in);
connect(sou.ports[1], massFlowRateMultiplier.port_a);
connect(massFlowRateMultiplier.port_b, sin.ports[1]);
connect(sou1.ports[1], massFlowRateMultiplier1.port_a);
connect(massFlowRateMultiplier1.port_b, sin.ports[2]);
connect(gaiMasFlo.y, massFlowRateMultiplier1.u);
connect(ram_m_flow.y, sou1.m_flow_in);
end MassFlowRateMultiplier;