Description: "Package with base class models"

- Home > Modelica

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses

Package with base class models

### Information

This package contains base classes used by the models that are part of the package Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

### Package Content

Name | Description
--- | ---
BaseUnbalancedPV | Partial model for an unbalanced PV source
BaseUnbalancedWindTurbine | Partial model for an unbalanced wind power source
PartialSource | Partial model for a three-phase AC unbalanced voltage source without neutral cable
PartialSource_N | Partial model for a three-phase AC unbalanced voltage source with neutral cable
UnbalancedPV | Base model for an unbalanced PV source without neutral cable
UnbalancedPV_N | Base model for an unbalanced PV source with neutral cable
UnbalancedWindTurbine | Base model for an unbalanced wind power source without neutral cable
UnbalancedWindTurbine_N | Base model for an unbalanced wind power source with neutral cable

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.BaseUnbalancedPV

Partial model for an unbalanced PV source

### Information

This model is a partial class extended by three-phase unbalanced PV power sources.

The model has boolean parameters `plugPhase1`, `plugPhase2`, and `plugPhase3` that can be used to connect the PV in an unbalanced configuration.

The model has an array `areaFraction[3]` that is used to determine how to partition the power of the PVs on the three-phase. By default it is assumed a uniform partition `areaFraction[3] = {1/3, 1/3, 1/3}`.

Extends from Buildings.Electrical.Interfaces.PartialPluggableUnbalanced (Partial interface for unbalanced loads), Buildings.Electrical.Interfaces.PartialPvBase (Partial model with basic parameters for PVs), Buildings.Electrical.Interfaces.PartialAcDcParameters (Partial model that contains basic parameters for a DC/AC conversion system).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Boolean | plugPhase1 | true | If true, phase 1 is connected
Boolean | plugPhase2 | true | If true, phase 2 is connected
Boolean | plugPhase3 | true | If true, phase 3 is connected
Area | A |  | Net surface area [m2]
Real | fAct | 0.9 | Fraction of surface area with active solar cells [1]
Real | eta | 0.12 | Module conversion efficiency [1]
Real | areaFraction[3] | ones(3)/3 | Fraction of area occupied by the PVs of each phase
PVSimple | pv_phase2 | redeclare OnePhase.Sources.P... | PV phase 2
PVSimple | pv_phase3 | redeclare OnePhase.Sources.P... | PV phase 3
PVSimple | pv_phase1 | redeclare OnePhase.Sources.P... | PV phase 1
AC-Conversion
Real | pf | 0.9 | Power factor
Real | eta_DCAC | 0.9 | Efficiency of DC/AC conversion
Nominal conditions
Voltage | V_nominal |  | Nominal voltage (V_nominal >= 0) [V]

### Connectors

Type | Name | Description
--- | --- | ---
output RealOutput | P | Generated power [W]

### Modelica definition

partial model BaseUnbalancedPV "Partial model for an unbalanced PV source" extends Buildings.Electrical.Interfaces.PartialPluggableUnbalanced; extends Buildings.Electrical.Interfaces.PartialPvBase; extends Buildings.Electrical.Interfaces.PartialAcDcParameters; parameter Modelica.SIunits.Voltage V_nominal(min=0, start=480) "Nominal voltage (V_nominal >= 0)"; parameter Real areaFraction[3](each min=0, each max=1.0) = ones(3)/3 "Fraction of area occupied by the PVs of each phase"; replaceable OnePhase.Sources.PVSimple pv_phase2( pf=pf, eta_DCAC=eta_DCAC, A=A*areaFraction[2], fAct=fAct, eta=eta, V_nominal=V_nominal/sqrt(3)) if plugPhase2 "PV phase 2"; replaceable OnePhase.Sources.PVSimple pv_phase3( pf=pf, eta_DCAC=eta_DCAC, A=A*areaFraction[3], fAct=fAct, eta=eta, V_nominal=V_nominal/sqrt(3)) if plugPhase3 "PV phase 3"; replaceable OnePhase.Sources.PVSimple pv_phase1( pf=pf, eta_DCAC=eta_DCAC, A=A*areaFraction[1], fAct=fAct, eta=eta, V_nominal=V_nominal/sqrt(3)) if plugPhase1 "PV phase 1"; Modelica.Blocks.Math.Add3 sumBlock "Sum of the generated power on each phase"; protected Modelica.Blocks.Interfaces.RealOutput G_int "Total solar irradiation per unit area"; equation assert(abs(sum(areaFraction)-1) < Modelica.Constants.eps, "Model that extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.BaseUnbalancedPV, has an invalid value for the vector areaFraction[:]. The sum of the elements has to be equal to 1.0.", level=AssertionLevel.error); if plugPhase1 then connect(pv_phase1.G, G_int); end if; if plugPhase2 then connect(G_int, pv_phase2.G); end if; if plugPhase3 then connect(G_int, pv_phase3.G); end if; if plugPhase1 then connect(pv_phase1.P, sumBlock.u1); else sumBlock.u1 = 0; end if; if plugPhase2 then connect(pv_phase2.P, sumBlock.u2); else sumBlock.u2 = 0; end if; if plugPhase3 then connect(pv_phase3.P, sumBlock.u3); else sumBlock.u3 = 0; end if; connect(sumBlock.y, P); end BaseUnbalancedPV;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.BaseUnbalancedWindTurbine

Partial model for an unbalanced wind power source

### Information

This model is a partial class extended by three-phase unbalanced wind turbine power sources.

The model has boolean parameters `plugPhase1`, `plugPhase2`, and `plugPhase3` that can be used to connect the wind turbines in an unbalanced configuration.

The model has an array `scaleFraction[3]` that is used to determine how to partition the power of the wind turbines on the three-phase. By default it is assumed a uniform partition `scaleFraction[3] = {1/3, 1/3, 1/3}`.

Extends from Buildings.Electrical.Interfaces.PartialPluggableUnbalanced (Partial interface for unbalanced loads), Buildings.Electrical.Interfaces.PartialAcDcParameters (Partial model that contains basic parameters for a DC/AC conversion system), Buildings.Electrical.Interfaces.PartialWindTurbineBase (Base class for turbine model that contains basic parameters).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Boolean | plugPhase1 | true | If true, phase 1 is connected
Boolean | plugPhase2 | true | If true, phase 2 is connected
Boolean | plugPhase3 | true | If true, phase 3 is connected
Real | scale | 1 | Scaling factor, used to allow adjusting the power output without changing the table
Boolean | tableOnFile | false | true, if table is defined on file or in function usertab
Real | table[:, 2] | [3.5, 0; 5.5, 0.1; 12, 0.9; ... | Table of generated power (first column is wind speed, second column is power)
String | tableName | "NoName" | Table name on file or in function usertab (see documentation)
String | fileName | "NoName" | File where matrix is stored
Real | scaleFraction[3] | ones(3)/3 | Fraction of power allocated to the wind turbines of each phase
WindTurbine | wt_phase2 | redeclare OnePhase.Sources.W... | Wind turbine phase 2
WindTurbine | wt_phase3 | redeclare OnePhase.Sources.W... | Wind turbine phase 3
WindTurbine | wt_phase1 | redeclare OnePhase.Sources.W... | Wind turbine phase 1
AC-Conversion
Real | pf | 0.9 | Power factor
Real | eta_DCAC | 0.9 | Efficiency of DC/AC conversion
Wind correction
Real | h |  | Height over ground
Height | hRef | 10 | Reference height for wind measurement [m]
Real | nWin | 0.4 | Height exponent for wind profile calculation

### Connectors

Type | Name | Description
--- | --- | ---
input RealInput | vWin | Steady wind speed [m/s]
output RealOutput | P | Generated power [W]

### Modelica definition

partial model BaseUnbalancedWindTurbine "Partial model for an unbalanced wind power source" extends Buildings.Electrical.Interfaces.PartialPluggableUnbalanced; extends Buildings.Electrical.Interfaces.PartialAcDcParameters; extends Buildings.Electrical.Interfaces.PartialWindTurbineBase(V_nominal(start = 480)); parameter Real scaleFraction[3](each min=0, each max=1.0) = ones(3)/3 "Fraction of power allocated to the wind turbines of each phase"; replaceable OnePhase.Sources.WindTurbine wt_phase2( pf=pf, eta_DCAC=eta_DCAC, scale=scale*scaleFraction[2], h=h, hRef=hRef, nWin=nWin, tableOnFile=tableOnFile, table=table, tableName=tableName, fileName=fileName, V_nominal=V_nominal/sqrt(3)) if plugPhase2 "Wind turbine phase 2"; replaceable OnePhase.Sources.WindTurbine wt_phase3( pf=pf, eta_DCAC=eta_DCAC, scale=scale*scaleFraction[3], h=h, hRef=hRef, nWin=nWin, tableOnFile=tableOnFile, table=table, tableName=tableName, fileName=fileName, V_nominal=V_nominal/sqrt(3)) if plugPhase3 "Wind turbine phase 3"; replaceable OnePhase.Sources.WindTurbine wt_phase1( pf=pf, eta_DCAC=eta_DCAC, scale=scale*scaleFraction[1], h=h, hRef=hRef, nWin=nWin, tableOnFile=tableOnFile, table=table, tableName=tableName, fileName=fileName, V_nominal=V_nominal/sqrt(3)) if plugPhase1 "Wind turbine phase 1"; Modelica.Blocks.Math.Add3 sumBlock "Sum of th epower generated on each phase"; equation assert(abs(sum(scaleFraction)-1) < Modelica.Constants.eps, "Model that extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.BaseUnbalancedWindTurbine, has an invalid value for the vector scaleFraction[:]. The sum of the elements has to be equal to 1.0.", level=AssertionLevel.error); if plugPhase1 then connect(wt_phase1.P, sumBlock.u1); else sumBlock.u1 = 0; end if; if plugPhase2 then connect(wt_phase2.P, sumBlock.u2); else sumBlock.u2 = 0; end if; if plugPhase3 then connect(wt_phase3.P, sumBlock.u3); else sumBlock.u3 = 0; end if; connect(sumBlock.y, P); connect(vWin, wt_phase1.vWin); connect(vWin, wt_phase2.vWin); connect(vWin, wt_phase3.vWin); end BaseUnbalancedWindTurbine;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.PartialSource

Partial model for a three-phase AC unbalanced voltage source without neutral cable

### Information

This model is a partial class extended by three-phase unbalanced voltage sources without neutral cable connection.

### Connectors

Type | Name | Description
--- | --- | ---
Terminal_p | terminal | Connector for three-phase unbalanced systems

### Modelica definition

partial model PartialSource "Partial model for a three-phase AC unbalanced voltage source without neutral cable" Interfaces.Connection3to4_p connection3to4 "Connection between three to four AC connectors"; OnePhase.Basics.Ground ground "Ground reference"; Interfaces.Terminal_p terminal "Connector for three-phase unbalanced systems"; equation connect(connection3to4.terminal3,terminal); connect(ground.terminal,connection3to4. terminal4.phase[4]); end PartialSource;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.PartialSource_N

Partial model for a three-phase AC unbalanced voltage source with neutral cable

### Information

This model is a partial class extended by three-phase unbalanced voltage sources that have a neutral cable.

The neutral cable is connected to the ground reference.

### Connectors

Type | Name | Description
--- | --- | ---
Terminal4_p | terminal | Connector for three-phase unbalanced systems with neutral cable

### Modelica definition

partial model PartialSource_N "Partial model for a three-phase AC unbalanced voltage source with neutral cable" OnePhase.Basics.Ground ground "Ground reference"; Interfaces.Terminal4_p terminal "Connector for three-phase unbalanced systems with neutral cable"; equation connect(ground.terminal, terminal.phase[4]); end PartialSource_N;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.UnbalancedPV

Base model for an unbalanced PV source without neutral cable

### Information

This model is a class extended by three-phase unbalanced PV power sources without neutral cable.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.BaseUnbalancedPV (Partial model for an unbalanced PV source), Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.PartialSource (Partial model for a three-phase AC unbalanced voltage source without neutral cable).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Boolean | plugPhase1 | true | If true, phase 1 is connected
Boolean | plugPhase2 | true | If true, phase 2 is connected
Boolean | plugPhase3 | true | If true, phase 3 is connected
Area | A |  | Net surface area [m2]
Real | fAct | 0.9 | Fraction of surface area with active solar cells [1]
Real | eta | 0.12 | Module conversion efficiency [1]
Real | areaFraction[3] | ones(3)/3 | Fraction of area occupied by the PVs of each phase
PVSimple | pv_phase2 | redeclare OnePhase.Sources.P... | PV phase 2
PVSimple | pv_phase3 | redeclare OnePhase.Sources.P... | PV phase 3
PVSimple | pv_phase1 | redeclare OnePhase.Sources.P... | PV phase 1
AC-Conversion
Real | pf | 0.9 | Power factor
Real | eta_DCAC | 0.9 | Efficiency of DC/AC conversion
Nominal conditions
Voltage | V_nominal |  | Nominal voltage (V_nominal >= 0) [V]

### Connectors

Type | Name | Description
--- | --- | ---
output RealOutput | P | Generated power [W]
Terminal_p | terminal | Connector for three-phase unbalanced systems

### Modelica definition

model UnbalancedPV "Base model for an unbalanced PV source without neutral cable" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.BaseUnbalancedPV; extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.PartialSource; equation if plugPhase1 then connect(connection3to4.terminal4.phase[1], pv_phase1.terminal); end if; if plugPhase2 then connect(connection3to4.terminal4.phase[2], pv_phase2.terminal); end if; if plugPhase3 then connect(connection3to4.terminal4.phase[3], pv_phase3.terminal); end if; end UnbalancedPV;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.UnbalancedPV_N

Base model for an unbalanced PV source with neutral cable

### Information

This model is a class extended by three-phase unbalanced PV power sources with neutral cable connection.

The neutral cable is connected to the ground reference.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.BaseUnbalancedPV (Partial model for an unbalanced PV source).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Boolean | plugPhase1 | true | If true, phase 1 is connected
Boolean | plugPhase2 | true | If true, phase 2 is connected
Boolean | plugPhase3 | true | If true, phase 3 is connected
Area | A |  | Net surface area [m2]
Real | fAct | 0.9 | Fraction of surface area with active solar cells [1]
Real | eta | 0.12 | Module conversion efficiency [1]
Real | areaFraction[3] | ones(3)/3 | Fraction of area occupied by the PVs of each phase
PVSimple | pv_phase2 | redeclare OnePhase.Sources.P... | PV phase 2
PVSimple | pv_phase3 | redeclare OnePhase.Sources.P... | PV phase 3
PVSimple | pv_phase1 | redeclare OnePhase.Sources.P... | PV phase 1
AC-Conversion
Real | pf | 0.9 | Power factor
Real | eta_DCAC | 0.9 | Efficiency of DC/AC conversion
Nominal conditions
Voltage | V_nominal |  | Nominal voltage (V_nominal >= 0) [V]

### Connectors

Type | Name | Description
--- | --- | ---
output RealOutput | P | Generated power [W]
Terminal4_p | terminal | Connector for three-phase unbalanced systems with neutral cable

### Modelica definition

model UnbalancedPV_N "Base model for an unbalanced PV source with neutral cable" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.BaseUnbalancedPV; Interfaces.Terminal4_p terminal "Connector for three-phase unbalanced systems with neutral cable"; Interfaces.Connection3to4_p conn3to4 "Connection between 3 to 4 wire"; equation if plugPhase1 then connect(pv_phase1.terminal,conn3to4.terminal3.phase[1]); end if; if plugPhase2 then connect(pv_phase2.terminal,conn3to4.terminal3.phase[2]); end if; if plugPhase3 then connect(pv_phase3.terminal,conn3to4.terminal3.phase[3]); end if; connect(conn3to4.terminal4, terminal); end UnbalancedPV_N;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.UnbalancedWindTurbine

Base model for an unbalanced wind power source without neutral cable

### Information

This model is a class extended by three-phase unbalanced wind turbine power sources without neutral cable.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.BaseUnbalancedWindTurbine (Partial model for an unbalanced wind power source), Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.PartialSource (Partial model for a three-phase AC unbalanced voltage source without neutral cable).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Boolean | plugPhase1 | true | If true, phase 1 is connected
Boolean | plugPhase2 | true | If true, phase 2 is connected
Boolean | plugPhase3 | true | If true, phase 3 is connected
Real | scale | 1 | Scaling factor, used to allow adjusting the power output without changing the table
Boolean | tableOnFile | false | true, if table is defined on file or in function usertab
Real | table[:, 2] | [3.5, 0; 5.5, 0.1; 12, 0.9; ... | Table of generated power (first column is wind speed, second column is power)
String | tableName | "NoName" | Table name on file or in function usertab (see documentation)
String | fileName | "NoName" | File where matrix is stored
Real | scaleFraction[3] | ones(3)/3 | Fraction of power allocated to the wind turbines of each phase
WindTurbine | wt_phase2 | redeclare OnePhase.Sources.W... | Wind turbine phase 2
WindTurbine | wt_phase3 | redeclare OnePhase.Sources.W... | Wind turbine phase 3
WindTurbine | wt_phase1 | redeclare OnePhase.Sources.W... | Wind turbine phase 1
AC-Conversion
Real | pf | 0.9 | Power factor
Real | eta_DCAC | 0.9 | Efficiency of DC/AC conversion
Wind correction
Real | h |  | Height over ground
Height | hRef | 10 | Reference height for wind measurement [m]
Real | nWin | 0.4 | Height exponent for wind profile calculation
Nominal conditions
Voltage | V_nominal | V_nominal(start=480) | Nominal voltage (V_nominal >= 0) [V]

### Connectors

Type | Name | Description
--- | --- | ---
input RealInput | vWin | Steady wind speed [m/s]
output RealOutput | P | Generated power [W]
Terminal_p | terminal | Connector for three-phase unbalanced systems

### Modelica definition

model UnbalancedWindTurbine "Base model for an unbalanced wind power source without neutral cable" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.BaseUnbalancedWindTurbine; extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.PartialSource; equation if plugPhase1 then connect(connection3to4.terminal4.phase[1],wt_phase1.terminal); end if; if plugPhase2 then connect(connection3to4.terminal4.phase[2],wt_phase2.terminal); end if; if plugPhase3 then connect(connection3to4.terminal4.phase[3],wt_phase3.terminal); end if; end UnbalancedWindTurbine;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.UnbalancedWindTurbine_N

Base model for an unbalanced wind power source with neutral cable

### Information

This model is a class extended by three-phase unbalanced wind turbine power sources with neutral cable connection.

The neutral cable is connected to the ground reference.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.BaseUnbalancedWindTurbine (Partial model for an unbalanced wind power source).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Boolean | plugPhase1 | true | If true, phase 1 is connected
Boolean | plugPhase2 | true | If true, phase 2 is connected
Boolean | plugPhase3 | true | If true, phase 3 is connected
Real | scale | 1 | Scaling factor, used to allow adjusting the power output without changing the table
Boolean | tableOnFile | false | true, if table is defined on file or in function usertab
Real | table[:, 2] | [3.5, 0; 5.5, 0.1; 12, 0.9; ... | Table of generated power (first column is wind speed, second column is power)
String | tableName | "NoName" | Table name on file or in function usertab (see documentation)
String | fileName | "NoName" | File where matrix is stored
Real | scaleFraction[3] | ones(3)/3 | Fraction of power allocated to the wind turbines of each phase
WindTurbine | wt_phase2 | redeclare OnePhase.Sources.W... | Wind turbine phase 2
WindTurbine | wt_phase3 | redeclare OnePhase.Sources.W... | Wind turbine phase 3
WindTurbine | wt_phase1 | redeclare OnePhase.Sources.W... | Wind turbine phase 1
AC-Conversion
Real | pf | 0.9 | Power factor
Real | eta_DCAC | 0.9 | Efficiency of DC/AC conversion
Wind correction
Real | h |  | Height over ground
Height | hRef | 10 | Reference height for wind measurement [m]
Real | nWin | 0.4 | Height exponent for wind profile calculation
Nominal conditions
Voltage | V_nominal | V_nominal(start=480) | Nominal voltage (V_nominal >= 0) [V]

### Connectors

Type | Name | Description
--- | --- | ---
input RealInput | vWin | Steady wind speed [m/s]
output RealOutput | P | Generated power [W]
Terminal4_p | terminal | Connector for three-phase unbalanced systems with neutral cable

### Modelica definition

model UnbalancedWindTurbine_N "Base model for an unbalanced wind power source with neutral cable" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.BaseUnbalancedWindTurbine; Interfaces.Terminal4_p terminal "Connector for three-phase unbalanced systems with neutral cable"; Interfaces.Connection3to4_p conn3to4 "Connection between 3 to 4 wire"; equation if plugPhase1 then connect(wt_phase1.terminal,conn3to4.terminal3.phase[1]); end if; if plugPhase2 then connect(wt_phase2.terminal,conn3to4.terminal3.phase[2]); end if; if plugPhase3 then connect(wt_phase3.terminal,conn3to4.terminal3.phase[3]); end if; connect(conn3to4.terminal4, terminal); end UnbalancedWindTurbine_N;