Package with example models
Information
This package contains examples for the use of models that can be found in
Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name |
Description |
FixedVoltageSource
|
This example illustrates how using a fixed voltage source |
PVPanels
|
This example illustrates how to use PV panel models |
PVPanels_N
|
This example illustrates how to use PV panel models with neutral cable |
WindTurbine
|
Example for the WindTurbine AC model |
WindTurbine_N
|
Example for the WindTurbine AC model with neutral cable |
This example illustrates how using a fixed voltage source
Information
This example shows how to use a fixed voltage generator model.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model FixedVoltageSource
extends Modelica.Icons.Example;
FixedVoltage grid(
f=60,
V=480,
definiteReference=true,
phiSou=0.17453292519943) ;
Sensors.ProbeWye sen(V_nominal=480) ;
Loads.Inductive loa(P_nominal=-2000, V_nominal=480) ;
FixedVoltage_N grid_N(
f=60,
V=480,
definiteReference=true,
phiSou=0.17453292519943) ;
Sensors.ProbeWye_N sen_N(V_nominal=480) ;
Loads.Inductive_N loa_N(P_nominal=-2000, V_nominal=480) ;
equation
connect(grid.terminal, loa.terminal);
connect(grid.terminal, sen.term);
connect(grid_N.terminal, loa_N.terminal);
connect(grid_N.terminal, sen_N.term);
end FixedVoltageSource;
This example illustrates how to use PV panel models
Information
This example shows how to use a simple PV model without orientation
as well as a PV model with orientation. The power produced by the PV is
partially consumed by the load, and the remaining part is fed into
the grid.
The PV produces different amounts of power on each phase according to the fractions
specified by the vector areaFraction={0.5,0.3,0.2}
. In this example, 50%
of the power generation is on phase 1, 30% on phase 2 and 20% on phase 3.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model PVPanels
extends Modelica.Icons.Example;
ThreePhasesUnbalanced.Loads.Inductive RL(
mode=Types.Load.VariableZ_y_input,
P_nominal=-2000,
V_nominal=480,
plugPhase3=false) ;
ThreePhasesUnbalanced.Sources.Grid grid(f=60, V=480) ;
Modelica.Blocks.Sources.Constant load(k=0.5) ;
BoundaryConditions.SolarIrradiation.DiffusePerez HDifTil(
til=0.34906585039887,
lat=0.65798912800186,
azi=-0.78539816339745) ;
BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil(
til=0.34906585039887,
lat=0.65798912800186,
azi=-0.78539816339745) ;
BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
computeWetBulbTemperature=false,
filNam="modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos");
Modelica.Blocks.Math.Add G ;
PVsimple pvSimple( V_nominal=480,
A=100,
areaFraction={0.5,0.3,0.2}) ;
PVsimpleOriented pvOriented(
V_nominal=480,
A=100,
til=0.34906585039887,
lat=0.65798912800186,
azi=-0.78539816339745,
areaFraction={0.5,0.3,0.2}) ;
equation
connect(weaDat.weaBus,HDifTil. weaBus);
connect(weaDat.weaBus,HDirTil. weaBus);
connect(HDifTil.H,G. u1);
connect(HDirTil.H,G. u2);
connect(G.y,pvSimple. G);
connect(weaDat.weaBus, pvOriented.weaBus);
connect(load.y, RL.y2);
connect(load.y, RL.y1);
connect(grid.terminal, RL.terminal);
connect(grid.terminal, pvOriented.terminal);
connect(grid.terminal, pvSimple.terminal);
end PVPanels;
This example illustrates how to use PV panel models with neutral cable
Information
This example shows how to use a simple PV model with neutral cable connection and without orientation
as well as a PV model with orientation. The power produced by the PV is
partially consumed by the load, and the remaining part is fed into
the grid.
The PV produces different amounts of power on each phase according to the fractions
specified by the vector areaFraction={0.4,0.0,0.6}
. In this example, 40%
of the power generation is on phase 1, 0% on phase 2 (disconnected) and 60% on phase 3.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model PVPanels_N
extends Modelica.Icons.Example;
ThreePhasesUnbalanced.Loads.Inductive_N RL(
mode=Types.Load.VariableZ_y_input,
P_nominal=-2000,
V_nominal=480,
plugPhase3=false) ;
ThreePhasesUnbalanced.Sources.Grid_N grid(f=60, V=480) ;
Modelica.Blocks.Sources.Constant load(k=0.5) ;
BoundaryConditions.SolarIrradiation.DiffusePerez HDifTil(
til=0.34906585039887,
lat=0.65798912800186,
azi=-0.78539816339745) ;
BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil(
til=0.34906585039887,
lat=0.65798912800186,
azi=-0.78539816339745) ;
BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
computeWetBulbTemperature=false,
filNam="modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos");
Modelica.Blocks.Math.Add G ;
PVsimple_N pvSimple( V_nominal=480,
A=100,
plugPhase2=false,
areaFraction={0.4,0.0,0.6}) ;
PVsimpleOriented_N pvOriented(
V_nominal=480,
A=100,
plugPhase2=false,
til=0.34906585039887,
lat=0.65798912800186,
azi=-0.78539816339745,
areaFraction={0.4,0.0,0.6}) ;
equation
connect(weaDat.weaBus,HDifTil. weaBus);
connect(weaDat.weaBus,HDirTil. weaBus);
connect(HDifTil.H,G. u1);
connect(HDirTil.H,G. u2);
connect(G.y,pvSimple. G);
connect(weaDat.weaBus, pvOriented.weaBus);
connect(load.y, RL.y2);
connect(load.y, RL.y1);
connect(grid.terminal, RL.terminal);
connect(grid.terminal, pvOriented.terminal);
connect(grid.terminal, pvSimple.terminal);
end PVPanels_N;
Example for the WindTurbine AC model
Information
This model illustrates the use of the wind turbine model,
which is connected to a AC voltage source and a resistive load.
This voltage source can represent the grid to which the
circuit is connected.
Wind data for San Francisco, CA, are used.
The turbine cut-in wind speed is 3.5 m/s,
and hence it is off in the first day when the wind speed is low.
The wind turbines produce different amounts of power on each phase according to the fractions
specified by the vector scaleFraction={0.5,0.25,0.25}
. In this example, 50%
of the power generation is on phase 1, 30% on phase 2 and 20% on phase 3.
As expected the phase with the higher power production has the higher voltage deviation
from the nominal condition.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Connectors
Type | Name | Description |
Bus | weaBus | Weather bus |
Modelica definition
model WindTurbine
extends Modelica.Icons.Example;
Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.WindTurbine tur(
table=[3.5, 0;
5.5, 100;
12, 900;
14, 1000;
25, 1000], h=10,
scale=10,
V_nominal=480,
scaleFraction={0.5,0.25,0.25}) ;
Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
computeWetBulbTemperature=false,
filNam="modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos") ;
Buildings.BoundaryConditions.WeatherData.Bus weaBus ;
Loads.Resistive res(P_nominal=-500, V_nominal=480) ;
Grid sou(f=60, V=480) ;
Sensors.GeneralizedSensor sen ;
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Line line(
l=200,
P_nominal=5000,
V_nominal=480);
equation
connect(weaDat.weaBus,weaBus);
connect(weaBus.winSpe,tur. vWin);
connect(sou.terminal, res.terminal);
connect(sen.terminal_p, tur.terminal);
connect(sou.terminal, line.terminal_n);
connect(line.terminal_p, sen.terminal_n);
end WindTurbine;
Example for the WindTurbine AC model with neutral cable
Information
This model illustrates the use of the wind turbine model with neutral cable,
which is connected to a AC voltage source and a resistive load.
This voltage source can represent the grid to which the
circuit is connected.
Wind data for San Francisco, CA, are used.
The turbine cut-in wind speed is 3.5 m/s,
and hence it is off in the first day when the wind speed is low.
The wind turbines produce different amounts of power on each phase according to the fractions
specified by the vector scaleFraction={0.4,0.0,0.6}
. In this example, 40%
of the power generation is on phase 1, 0% on phase 2 (disconnected) and 60% on phase 3.
As expected the phase with the higher power production has the higher voltage deviation
from the nominal condition.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Connectors
Type | Name | Description |
Bus | weaBus | Weather bus |
Modelica definition
model WindTurbine_N
extends Modelica.Icons.Example;
Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.WindTurbine_N tur(
table=[3.5, 0;
5.5, 100;
12, 900;
14, 1000;
25, 1000], h=10,
scale=10,
V_nominal=480,
plugPhase2=false,
scaleFraction={0.4,0.0,0.6}) ;
Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
computeWetBulbTemperature=false,
filNam="modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos") ;
Buildings.BoundaryConditions.WeatherData.Bus weaBus ;
Loads.Resistive_N res(P_nominal=-500, V_nominal=480) ;
Grid_N sou(f=60, V=480) ;
Sensors.GeneralizedSensor_N sen ;
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Line_N line(
l=200,
P_nominal=5000,
V_nominal=480);
equation
connect(weaDat.weaBus,weaBus);
connect(weaBus.winSpe,tur. vWin);
connect(tur.terminal, sen.terminal_p);
connect(sen.terminal_n, line.terminal_p);
connect(line.terminal_n, sou.terminal);
connect(res.terminal, sou.terminal);
end WindTurbine_N;
http://simulationresearch.lbl.gov/modelica