Description: "Collection of models that illustrate model use and test models"

- Home > Modelica

## Buildings.Electrical.DC.Sensors.Examples

Collection of models that illustrate model use and test models

### Information

This package contains examples for the use of models that can be found in Buildings.Electrical.DC.Sensors.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

### Package Content

Name | Description
--- | ---
GeneralizedSensor | Example model for generalized sensor

## Buildings.Electrical.DC.Sensors.Examples.GeneralizedSensor

Example model for generalized sensor

### Information

This example illustrates the use of the generalized sensor.

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

### Modelica definition

model GeneralizedSensor "Example model for generalized sensor" extends Modelica.Icons.Example; Buildings.Electrical.DC.Sensors.GeneralizedSensor sen "Power sensor"; Buildings.Electrical.DC.Loads.Conductor loa(V_nominal=120, P_nominal=120) "Constant load"; Buildings.Electrical.DC.Sources.ConstantVoltage sou(V=120) "Voltage source"; Modelica.Electrical.Analog.Basic.Ground ground; equation connect(sen.terminal_p, loa.terminal); connect(sen.terminal_n, sou.terminal); connect(sou.n, ground.p); end GeneralizedSensor;