Package with example models
Information
This package contains examples for the use of models that can be found in
Buildings.Electrical.AC.OnePhase.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 |
VariablePowerSource
|
This example illustrates how using a variable power source |
WindTurbine
|
Example for the WindTurbine AC model |
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
This example illustrates how to use PV panel models
Information
This example shows how to use a simple PV model without orientation
as well a PV model with orientation. The power produced by the PV is
partially consumed by the load while the remaining part is fed into
the grid.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model PVPanels
extends Modelica.Icons.Example;
Buildings.Electrical.AC.OnePhase.Loads.Inductive RL(mode=Types.Load.VariableZ_y_input,
P_nominal=-2000,
V_nominal=120) ;
Buildings.Electrical.AC.OnePhase.Sources.Grid grid(f=60, V=120) ;
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(A=10, V_nominal=120) ;
PVSimpleOriented pvOriented(
A=10,
til=0.34906585039887,
lat=0.65798912800186,
azi=-0.78539816339745,
V_nominal=120) ;
equation
connect(grid.terminal, RL.terminal);
connect(load.y, RL.y);
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(pvSimple.terminal, RL.terminal);
connect(weaDat.weaBus, pvOriented.weaBus);
connect(pvOriented.terminal, RL.terminal);
end PVPanels;
This example illustrates how using a variable power source
Information
This example shows how to use a variable generator model. The model has to be used
together with a voltage source generator.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica definition
model VariablePowerSource
extends Modelica.Icons.Example;
Buildings.Electrical.AC.OnePhase.Sources.Generator generator(phiGen(displayUnit="deg") = 0.26179938779915, f=60) ;
Modelica.Blocks.Sources.Sine generation(
offset=200,
startTime=1,
amplitude=100,
freqHz=0.05) ;
Buildings.Electrical.AC.OnePhase.Loads.Inductive RL(mode=Types.Load.VariableZ_y_input,
P_nominal=-300,
V_nominal=120) ;
Buildings.Electrical.AC.OnePhase.Sources.Grid grid(f=60, V=120) ;
Modelica.Blocks.Sources.Trapezoid load(
rising=2,
width=3,
falling=3,
period=10,
startTime=1,
amplitude=0.8,
offset=0.2) ;
equation
connect(generation.y, generator.P);
connect(generator.terminal, RL.terminal);
connect(grid.terminal, RL.terminal);
connect(load.y, RL.y);
end VariablePowerSource;
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 resistance.
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.
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.OnePhase.Sources.WindTurbine tur(
table=[3.5, 0;
5.5, 100;
12, 900;
14, 1000;
25, 1000], h=10,
scale=10,
V_nominal=120) ;
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 ;
Buildings.Electrical.AC.OnePhase.Loads.Resistive
res(P_nominal=-500, V_nominal=120) ;
Buildings.Electrical.AC.OnePhase.Sources.Grid sou(f=60, V=120) ;
Buildings.Electrical.AC.OnePhase.Lines.TwoPortResistance
lin(R=0.1) ;
Buildings.Electrical.AC.OnePhase.Sensors.GeneralizedSensor
sen ;
equation
connect(weaDat.weaBus,weaBus);
connect(weaBus.winSpe,tur. vWin);
connect(sou.terminal, lin.terminal_n);
connect(sou.terminal, res.terminal);
connect(lin.terminal_p, sen.terminal_n);
connect(sen.terminal_p, tur.terminal);
end WindTurbine;
http://simulationresearch.lbl.gov/modelica