## Buildings.Electrical.PhaseSystems.PartialPhaseSystem

Base package of all phase systems

### Information

This package declares the functions that are used to implement the different phase systems.

Extends from Modelica.Icons.Package (Icon for standard packages).

### Package Content

Name Description
phaseSystemName="UnspecifiedPhaseSystem" Name of the phase system represented by the package
n Number of independent voltage and current components
m Number of reference angles
Current Current for connector
Voltage Voltage for connector
ReferenceAngle Reference angle for connector
j Return vector rotated by 90 degrees
jj Vectorized version of j
rotate Rotate a vector of an angle Theta (anti-counterclock)
product Multiply two vectors
divide Divide two vectors
thetaRel Return absolute angle of rotating system as offset to thetaRef
thetaRef Return absolute angle of rotating reference system
phase Return phase
phaseVoltages Return phase to neutral voltages
phaseCurrents Return phase currents
phasePowers Return phase powers
phasePowers_vi Return phase powers
systemVoltage Return system voltage as function of phase voltages
systemCurrent Return system current as function of phase currents

### Types and constants

```  constant String phaseSystemName = "UnspecifiedPhaseSystem"
"Name of the phase system represented by the package";```
`  constant Integer n "Number of independent voltage and current components";`
`  constant Integer m "Number of reference angles";`
```  type Current = Real(unit = "A", quantity = "Current." + phaseSystemName)
"Current for connector";```
```  type Voltage = Real(unit = "V", quantity = "Voltage." + phaseSystemName)
"Voltage for connector";```
```  type ReferenceAngle "Reference angle for connector"
extends SI.Angle;

function equalityConstraint "Assert that angles are equal"
extends Modelica.Icons.Function;
input ReferenceAngle theta1[:];
input ReferenceAngle theta2[:];
output Real residue[0];
algorithm
for i in 1:size(theta1, 1) loop
assert(abs(theta1[i] - theta2[i]) < Modelica.Constants.eps,
"Angles theta1 and theta2 are not equal over the connection.");
end for;
end equalityConstraint;
end ReferenceAngle;```

## Buildings.Electrical.PhaseSystems.PartialPhaseSystem.j

Return vector rotated by 90 degrees

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

TypeNameDefaultDescription
Realx[n]

### Outputs

TypeNameDescription
Realy[n]

### Modelica definition

replaceable partial function j "Return vector rotated by 90 degrees" extends Modelica.Icons.Function; input Real x[n]; output Real y[n]; end j;

## Buildings.Electrical.PhaseSystems.PartialPhaseSystem.jj

Vectorized version of j

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

TypeNameDefaultDescription
Realxx[:, :] array of voltage or current vectors

### Outputs

TypeNameDescription
Realyy[size(xx, 1), size(xx, 2)]array of rotated vectors

### Modelica definition

replaceable partial function jj "Vectorized version of j" extends Modelica.Icons.Function; input Real[:,:] xx "array of voltage or current vectors"; output Real[size(xx,1),size(xx,2)] yy "array of rotated vectors"; algorithm //yy := {j(xx[:,k]) for k in 1:size(xx,2)}; // Note: Dymola 2013 fails to expand for k in 1:size(xx,2) loop yy[:,k] := j(xx[:,k]); end for; end jj;

## Buildings.Electrical.PhaseSystems.PartialPhaseSystem.rotate

Rotate a vector of an angle Theta (anti-counterclock)

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

TypeNameDefaultDescription
Realx[n]

### Outputs

TypeNameDescription
Realy[n]

### Modelica definition

replaceable partial function rotate "Rotate a vector of an angle Theta (anti-counterclock)" extends Modelica.Icons.Function; input Real x[n]; input Modelica.SIunits.Angle theta; output Real y[n]; end rotate;

## Buildings.Electrical.PhaseSystems.PartialPhaseSystem.product

Multiply two vectors

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

TypeNameDefaultDescription
Realx[n]
Realy[n]

### Outputs

TypeNameDescription
Realz[n]

### Modelica definition

replaceable partial function product "Multiply two vectors" extends Modelica.Icons.Function; input Real x[n]; input Real y[n]; output Real z[n]; end product;

## Buildings.Electrical.PhaseSystems.PartialPhaseSystem.divide

Divide two vectors

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

TypeNameDefaultDescription
Realx[n]
Realy[n]

### Outputs

TypeNameDescription
Realz[n]

### Modelica definition

replaceable partial function divide "Divide two vectors" extends Modelica.Icons.Function; input Real x[n]; input Real y[n]; output Real z[n]; end divide;

## Buildings.Electrical.PhaseSystems.PartialPhaseSystem.thetaRel

Return absolute angle of rotating system as offset to thetaRef

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

TypeNameDefaultDescription

### Outputs

TypeNameDescription

### Modelica definition

replaceable partial function thetaRel "Return absolute angle of rotating system as offset to thetaRef" extends Modelica.Icons.Function; input SI.Angle theta[m]; output SI.Angle thetaRel; end thetaRel;

## Buildings.Electrical.PhaseSystems.PartialPhaseSystem.thetaRef

Return absolute angle of rotating reference system

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

TypeNameDefaultDescription

### Outputs

TypeNameDescription

### Modelica definition

replaceable partial function thetaRef "Return absolute angle of rotating reference system" extends Modelica.Icons.Function; input SI.Angle theta[m]; output SI.Angle thetaRef; end thetaRef;

## Buildings.Electrical.PhaseSystems.PartialPhaseSystem.phase

Return phase

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

TypeNameDefaultDescription
Realx[n]

### Outputs

TypeNameDescription

### Modelica definition

replaceable partial function phase "Return phase" extends Modelica.Icons.Function; input Real x[n]; output SI.Angle phase; end phase;

## Buildings.Electrical.PhaseSystems.PartialPhaseSystem.phaseVoltages

Return phase to neutral voltages

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

TypeNameDefaultDescription
VoltageV system voltage [V]

### Outputs

TypeNameDescription
Voltagev[n]phase to neutral voltages [V]

### Modelica definition

replaceable partial function phaseVoltages "Return phase to neutral voltages" extends Modelica.Icons.Function; input SI.Voltage V "system voltage"; input SI.Angle phi = 0 "phase angle"; output SI.Voltage v[n] "phase to neutral voltages"; end phaseVoltages;

## Buildings.Electrical.PhaseSystems.PartialPhaseSystem.phaseCurrents

Return phase currents

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

TypeNameDefaultDescription
CurrentI system current [A]

### Outputs

TypeNameDescription
Currenti[n]phase currents [A]

### Modelica definition

replaceable partial function phaseCurrents "Return phase currents" extends Modelica.Icons.Function; input SI.Current I "system current"; input SI.Angle phi = 0 "phase angle"; output SI.Current i[n] "phase currents"; end phaseCurrents;

## Buildings.Electrical.PhaseSystems.PartialPhaseSystem.phasePowers

Return phase powers

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

TypeNameDefaultDescription
ActivePowerP active system power [W]

### Outputs

TypeNameDescription
Powerp[n]phase powers [W]

### Modelica definition

replaceable partial function phasePowers "Return phase powers" extends Modelica.Icons.Function; input SI.ActivePower P "active system power"; input SI.Angle phi = 0 "phase angle"; output SI.Power p[n] "phase powers"; end phasePowers;

## Buildings.Electrical.PhaseSystems.PartialPhaseSystem.phasePowers_vi

Return phase powers

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

TypeNameDefaultDescription
Voltagev[n] phase voltages [V]
Currenti[n] phase currents [A]

### Outputs

TypeNameDescription
Powerp[n]phase powers [W]

### Modelica definition

replaceable partial function phasePowers_vi "Return phase powers" extends Modelica.Icons.Function; input SI.Voltage v[n] "phase voltages"; input SI.Current i[n] "phase currents"; output SI.Power p[n] "phase powers"; end phasePowers_vi;

## Buildings.Electrical.PhaseSystems.PartialPhaseSystem.systemVoltage

Return system voltage as function of phase voltages

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

TypeNameDefaultDescription
Voltagev[n] [V]

### Outputs

TypeNameDescription
VoltageV[V]

### Modelica definition

replaceable partial function systemVoltage "Return system voltage as function of phase voltages" extends Modelica.Icons.Function; input SI.Voltage v[n]; output SI.Voltage V; end systemVoltage;

## Buildings.Electrical.PhaseSystems.PartialPhaseSystem.systemCurrent

Return system current as function of phase currents

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

TypeNameDefaultDescription
Currenti[n] [A]

### Outputs

TypeNameDescription
CurrentI[A]

### Modelica definition

replaceable partial function systemCurrent "Return system current as function of phase currents" extends Modelica.Icons.Function; input SI.Current i[n]; output SI.Current I; end systemCurrent;

## Buildings.Electrical.PhaseSystems.PartialPhaseSystem.activePower

### Information

Extends from Modelica.Icons.Function (Icon for functions).

### Inputs

TypeNameDefaultDescription
Voltagev[n] phase voltages [V]
Currenti[n] phase currents [A]

### Outputs

TypeNameDescription
ActivePowerPactive system power [W]

### Modelica definition

replaceable partial function activePower "Return total power as function of phase powers" extends Modelica.Icons.Function; input SI.Voltage v[n] "phase voltages"; input SI.Current i[n] "phase currents"; output SI.ActivePower P "active system power"; end activePower;

Automatically generated Mon May 4 10:19:58 2015.