Skip to content

Commit

Permalink
improved documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AIT-CES committed Jan 27, 2014
1 parent 08c17da commit 32661bf
Show file tree
Hide file tree
Showing 39 changed files with 99 additions and 50 deletions.
4 changes: 2 additions & 2 deletions Electrical/Analog/Basic/Capacitor.mo
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
within ADMSL.Electrical.Analog.Basic;
class Capacitor
class Capacitor "AD version of Modelica.Electrical.Analog.Basic.Capacitor"
extends ADMSL.Utilities.GradientInfo;
extends MSL.Electrical.Analog.Basic.Capacitor(
redeclare replaceable class OnePort =
ADMSL.Electrical.Analog.Interfaces.OnePort);

parameter Real g_C[NG] = zeros(NG);
parameter Real g_C[NG] = zeros(NG) "The gradient of capacitance";

equation
g_i[:] = g_C[:] * der(v) + C * der(g_v[:]);
Expand Down
8 changes: 4 additions & 4 deletions Electrical/Analog/Basic/Conductor.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within ADMSL.Electrical.Analog.Basic;
class Conductor
class Conductor "AD version of Modelica.Electrical.Analog.Basic."
extends MSL.Electrical.Analog.Basic.Conductor(
redeclare replaceable class OnePort =
ADMSL.Electrical.Analog.Interfaces.OnePort,
Expand All @@ -8,10 +8,10 @@ class Conductor
extends ADMSL.Utilities.GradientInfo;

parameter Real g_G[NG] = zeros(NG)
"gradient of Conductance at temperature T_ref";
parameter Real g_T_ref[NG] = zeros(NG) "gradient Reference temperature";
"The gradient of Conductance at temperature T_ref";
parameter Real g_T_ref[NG] = zeros(NG) "The gradient Reference temperature";
parameter Real g_alpha[NG] = zeros(NG)
"gradient of Temperature coefficient of conductance ";
"The gradient of Temperature coefficient of conductance ";

Real g_G_actual[NG];

Expand Down
4 changes: 2 additions & 2 deletions Electrical/Analog/Basic/Inductor.mo
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
within ADMSL.Electrical.Analog.Basic;
class Inductor
class Inductor "AD version of Modelica.Electrical.Analog.Basic.Inductor"
extends ADMSL.Utilities.GradientInfo;
extends MSL.Electrical.Analog.Basic.Inductor(
redeclare replaceable class OnePort =
ADMSL.Electrical.Analog.Interfaces.OnePort);

parameter Real g_L[NG] = zeros(NG);
parameter Real g_L[NG] = zeros(NG) "The gradient of inductance";

equation
g_L[1:NG] * der(i) + L * der(g_i[1:NG]) = g_v[1:NG];
Expand Down
10 changes: 6 additions & 4 deletions Electrical/Analog/Basic/Resistor.mo
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
within ADMSL.Electrical.Analog.Basic;
class Resistor
class Resistor "AD version of Modelica.Electrical.Analog.Basic.Resistor"
extends MSL.Electrical.Analog.Basic.Resistor(
redeclare replaceable class OnePort =
ADMSL.Electrical.Analog.Interfaces.OnePort,
redeclare replaceable class ConditionalHeatPort =
ADMSL.Electrical.Analog.Interfaces.ConditionalHeatPort0);
extends ADMSL.Utilities.GradientInfo;

parameter Real g_R[NG] = zeros(NG);
parameter Real g_T_ref[NG] = zeros(NG);
parameter Real g_alpha[NG] = zeros(NG);
parameter Real g_R[NG] = zeros(NG) "The gradient of resistance";
parameter Real g_T_ref[NG] = zeros(NG)
"The gradient of reference temperature";
parameter Real g_alpha[NG] = zeros(NG)
"The gradient of temperature coefficients";

Real g_R_actual[NG];

Expand Down
2 changes: 1 addition & 1 deletion Electrical/Analog/Basic/intermediate/Conductor.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within ADMSL.Electrical.Analog.Basic.intermediate;
class Conductor
class Conductor "AD version of Modelica.Electrical.Analog.Basic.Conductor"
extends MSL.Electrical.Analog.Basic.Conductor(
redeclare replaceable class OnePort =
ADMSL.Electrical.Analog.Interfaces.OnePort,
Expand Down
10 changes: 6 additions & 4 deletions Electrical/Analog/Basic/intermediate/Resistor.mo
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
within ADMSL.Electrical.Analog.Basic.intermediate;
class Resistor
class Resistor "AD version of Modelica.Electrical.Analog.Basic.Resistor"
extends MSL.Electrical.Analog.Basic.Resistor(
redeclare replaceable class OnePort =
ADMSL.Electrical.Analog.Interfaces.OnePort,
redeclare replaceable class ConditionalHeatPort =
ADMSL.Electrical.Analog.Interfaces.ConditionalHeatPort0);
extends ADMSL.Utilities.GradientInfo;

parameter Real g_R[NG] = zeros(NG);
parameter Real g_T_ref[NG] = zeros(NG);
parameter Real g_alpha[NG] = zeros(NG);
parameter Real g_R[NG] = zeros(NG) "The gradient of resistance";
parameter Real g_T_ref[NG] = zeros(NG)
"The gradient of reference temperature";
parameter Real g_alpha[NG] = zeros(NG)
"The gradient of temperature coefficients";

Real g_R_actual[NG];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
within ADMSL.Electrical.Analog.Basic.intermediate;
class ResisterWithHeatPort
class ResistorWithHeatPort
"AD version of Modelica.Electrical.Analog.Basic.ResistorWithHeatPort"
extends Resistor(
redeclare replaceable class ConditionalHeatPort =
ADMSL.Electrical.Analog.Interfaces.ConditionalHeatPort1);
end ResisterWithHeatPort;
end ResistorWithHeatPort;
4 changes: 3 additions & 1 deletion Electrical/Analog/Basic/intermediate/package.mo
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
within ADMSL.Electrical.Analog.Basic;
package intermediate "equivalent preprocessed algorithmically differentiated components"
package intermediate "Preprocessed algorithmically differentiated components"


end intermediate;
2 changes: 1 addition & 1 deletion Electrical/Analog/Basic/intermediate/package.order
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Resistor
ResisterWithHeatPort
ResistorWithHeatPort
Conductor
7 changes: 6 additions & 1 deletion Electrical/Analog/Basic/package.mo
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
within ADMSL.Electrical.Analog;
package Basic
package Basic "The AD version of Modelica.Electrical.Analog.Basic"
extends Modelica.Icons.Package;







annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})));
end Basic;
2 changes: 1 addition & 1 deletion Electrical/Analog/Basic/package.order
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Ground
Conductor
Inductor
Capacitor
Resistor
intermediate
Conductor
4 changes: 3 additions & 1 deletion Electrical/Analog/Examples/package.mo
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
within ADMSL.Electrical.Analog;
package Examples
package Examples "The AD version of Modelica.Electrical.Analog.Examples"
extends Modelica.Icons.ExamplesPackage;


end Examples;
3 changes: 2 additions & 1 deletion Electrical/Analog/Interfaces/ConditionalHeatPort0.mo
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
within ADMSL.Electrical.Analog.Interfaces;
partial model ConditionalHeatPort0
"AD version of Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort with useHeatPort=false"
extends MSL.Electrical.Analog.Interfaces.ConditionalHeatPort(
useHeatPort=false);
extends ADMSL.Utilities.GradientInfo;

parameter Real g_T[NG] = zeros(NG);
parameter Real g_T[NG] = zeros(NG) "The gradient of the fixed temperature";

Real g_LossPower[NG];
Real g_T_heatPort[NG];
Expand Down
3 changes: 2 additions & 1 deletion Electrical/Analog/Interfaces/ConditionalHeatPort1.mo
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
within ADMSL.Electrical.Analog.Interfaces;
partial model ConditionalHeatPort1
"AD version of Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort with UseHeatPort=true"
extends MSL.Electrical.Analog.Interfaces.ConditionalHeatPort(
useHeatPort=true,
redeclare ADMSL.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort(T(start=T)=T_heatPort, Q_flow=-LossPower,
g_T = g_T_heatPort, g_Q_flow = g_LossPower));
extends ADMSL.Utilities.GradientInfo;

parameter Real g_T[NG] = zeros(NG);
parameter Real g_T[NG] = zeros(NG) "The gradient of the fixed temperature";

Real g_LossPower[NG];
Real g_T_heatPort[NG];
Expand Down
1 change: 1 addition & 0 deletions Electrical/Analog/Interfaces/NegativePin.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
within ADMSL.Electrical.Analog.Interfaces;
connector NegativePin
"AD version of Modelica.Electrical.Analog.Interfaces.NegativePin"
extends Modelica.Electrical.Analog.Interfaces.NegativePin;
extends ADMSL.Utilities.GradientInfo;
Real g_v[NG] "gradient of the voltage";
Expand Down
1 change: 1 addition & 0 deletions Electrical/Analog/Interfaces/OnePort.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
within ADMSL.Electrical.Analog.Interfaces;
partial model OnePort
"AD version of Modelica.Electrical.Analog.Interfaces.OnePort"
extends MSL.Electrical.Analog.Interfaces.OnePort(
redeclare PositivePin p,
redeclare NegativePin n);
Expand Down
6 changes: 3 additions & 3 deletions Electrical/Analog/Interfaces/Pin.mo
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
within ADMSL.Electrical.Analog.Interfaces;
connector Pin
connector Pin "AD version of Modelica.Electrical.Analog.Interfaces.Pin"
extends Modelica.Electrical.Analog.Interfaces.Pin;
extends ADMSL.Utilities.GradientInfo;
Real g_v[NG] "gradient of the voltage";
flow Real g_i[NG] "gradient of the current";
Real g_v[NG] "The gradient of the voltage";
flow Real g_i[NG] "The gradient of the current";
annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})));
end Pin;
1 change: 1 addition & 0 deletions Electrical/Analog/Interfaces/PositivePin.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
within ADMSL.Electrical.Analog.Interfaces;
connector PositivePin
"AD version of Modelica.Electrical.Analog.Interfaces.PositivePin"
extends Modelica.Electrical.Analog.Interfaces.PositivePin;
extends ADMSL.Utilities.GradientInfo;
Real g_v[NG] "gradient of the voltage";
Expand Down
1 change: 1 addition & 0 deletions Electrical/Analog/Interfaces/TwoPin.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
within ADMSL.Electrical.Analog.Interfaces;
partial model TwoPin
"AD version of Modelica.Electrical.Analog.Interfaces.TwoPin"
extends MSL.Electrical.Analog.Interfaces.TwoPin(
redeclare PositivePin p,
redeclare NegativePin n);
Expand Down
6 changes: 5 additions & 1 deletion Electrical/Analog/Interfaces/package.mo
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
within ADMSL.Electrical.Analog;
package Interfaces
package Interfaces "The AD version of Modelica.Electrical.Analog.Interfaces"
extends Modelica.Icons.InterfacesPackage;







end Interfaces;
4 changes: 3 additions & 1 deletion Electrical/Analog/package.mo
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
within ADMSL.Electrical;
package Analog
package Analog "The AD version of Modelica.Electrical.Analog"
extends Modelica.Icons.Package;




annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})));
end Analog;
2 changes: 1 addition & 1 deletion Electrical/package.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within ADMSL;
package Electrical
package Electrical "The AD version of Modelica.Electrical"
extends Modelica.Icons.Package;


Expand Down
6 changes: 5 additions & 1 deletion MSL/Electrical/Analog/Basic/package.mo
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
within ADMSL.MSL.Electrical.Analog;
package Basic
package Basic "Slightly modified version of some components with Modelica.Electrical.Analog.Basic"
extends Modelica.Icons.BasesPackage;




end Basic;
2 changes: 1 addition & 1 deletion MSL/Electrical/Analog/Examples/Utilities/package.mo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
within ADMSL.MSL.Electrical.Analog.Examples;
package Utilities
package Utilities "Slightly modified version of some components with Modelica.Electrical.Analog.Examples.Utilities"
extends Modelica.Icons.BasesPackage;
end Utilities;
4 changes: 3 additions & 1 deletion MSL/Electrical/Analog/Examples/package.mo
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
within ADMSL.MSL.Electrical.Analog;
package Examples
package Examples "Slightly modified version of some components with Modelica.Electrical.Analog.Examples"
extends Modelica.Icons.ExamplesPackage;


end Examples;
5 changes: 4 additions & 1 deletion MSL/Electrical/Analog/Interfaces/package.mo
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
within ADMSL.MSL.Electrical.Analog;
package Interfaces
package Interfaces "Slightly modified version of some components with Modelica.Electrical.Analog.Interfaces"
extends Modelica.Icons.InterfacesPackage;



end Interfaces;
4 changes: 3 additions & 1 deletion MSL/Electrical/Analog/package.mo
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
within ADMSL.MSL.Electrical;
package Analog
package Analog "Slightly modified version of some components with Modelica.Electrical.Analog"
extends Modelica.Icons.BasesPackage;


end Analog;
2 changes: 1 addition & 1 deletion MSL/Electrical/package.mo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
within ADMSL.MSL;
package Electrical
package Electrical "Slightly modified version of some components with Modelica.Electrical"
extends Modelica.Icons.BasesPackage;
end Electrical;
1 change: 1 addition & 0 deletions Thermal/HeatTransfer/Interfaces/HeatPort.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
within ADMSL.Thermal.HeatTransfer.Interfaces;
partial connector HeatPort
"AD version of Modelica.Thermal.HeatTransfer.Interfaces.HeatPort"
extends Modelica.Thermal.HeatTransfer.Interfaces.HeatPort;
extends ADMSL.Utilities.GradientInfo;

Expand Down
1 change: 1 addition & 0 deletions Thermal/HeatTransfer/Interfaces/HeatPort_a.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
within ADMSL.Thermal.HeatTransfer.Interfaces;
connector HeatPort_a
"AD version of Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a"
extends HeatPort;
annotation (Icon(graphics={ Rectangle(
extent={{-118,58},{4,-50}},
Expand Down
3 changes: 2 additions & 1 deletion Thermal/HeatTransfer/Interfaces/package.mo
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
within ADMSL.Thermal.HeatTransfer;
package Interfaces
package Interfaces "The AD version of Modelica.Electrical.HeatTransfer.Interfaces"
extends Modelica.Icons.InterfacesPackage;

end Interfaces;
2 changes: 1 addition & 1 deletion Thermal/HeatTransfer/package.mo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
within ADMSL.Thermal;
package HeatTransfer
package HeatTransfer "The AD version of Modelica.Thermal.HeatTransfer"
end HeatTransfer;
2 changes: 1 addition & 1 deletion Thermal/package.mo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
within ADMSL;
package Thermal
package Thermal "The AD version of Modelica.Thermal"
end Thermal;
2 changes: 1 addition & 1 deletion UnitTests/package.mo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
within ADMSL;
package UnitTests
package UnitTests "Unit tests for inserted and modified components"
end UnitTests;
2 changes: 1 addition & 1 deletion UserGuide/Overview.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within ADMSL.UserGuide;
model Overview "The main contents of the library"
model Overview "The main contents and the usage of the library"
extends Modelica.Icons.Information;
annotation (Documentation(info="<html>
<p><h4><font color=\"#008000\">About</font></h4></p>
Expand Down
2 changes: 1 addition & 1 deletion UserGuide/ReleaseNotes.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within ADMSL.UserGuide;
model ReleaseNotes
model ReleaseNotes "Release notes"
extends Modelica.Icons.Information;
annotation (Documentation(info="<html>
<p><h4><font color=\"#008000\">current release </font></h4></p>
Expand Down
4 changes: 0 additions & 4 deletions UserGuide/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,5 @@ package UserGuide "User's guide"
extends Modelica.Icons.Information;






annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})));
end UserGuide;
3 changes: 2 additions & 1 deletion Utilities/package.mo
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
within ADMSL;
package Utilities "useful utilities functions etc."
package Utilities "useful utilities functions and interfaces used across the library"
extends Modelica.Icons.Package;

end Utilities;
14 changes: 13 additions & 1 deletion package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,17 @@ package ADMSL
extends Modelica.Icons.Package;


annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), uses(Modelica(version = "3.2")));
annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), uses(Modelica(version = "3.2")),
Documentation(info="<html>
<p><br/>ADMSL is the Algorithmically Differentiated (AD) version of a part of the Modelica standard package <a href=\"Modelica.Electrical.Analog.Basic\">Modelica.Electrical.Analog.Basic</a>. The underlying promising goal is to become the AD version of the Modelica Standard Library. This is where the name ADMSL comes from (Algorithmically differentiated Modelica Standard Library). </p>
<p>This library serves as a guide for illustrating equation-based algorithmic differentation techniques for Modelica libraries. An algorithmically differentiated Modelica library contains every thing the original version has together with parameter sensitivities. The same models relying on that library can evaluates parameter sensitivities with few minimal efforts and slight changes. However these models preserve the same interface and outlook. It represents a testing platform for algoirhtmic differerntiation of Modelica libraries w.r.t.</p>
<p><ul>
<li>algorithmic methodologies </li>
<li>identifying current limitations towards AD of Modelica models </li>
<li>suggesting / recommending further potential language improvements towards AD of Modelica models </li>
</ul></p>
<p><br/>Licensed under the Modelica License 2</p>
<p><br/>Copyright &copy; &LT;2013&GT;-&LT;2014&GT;, &LT;Atiyah Elsheikh&GT;. </p>
<p><i>This Modelica package is <u>free</u> software and the use is completely at <u>your own risk</u>; it can be redistributed and/or modified under the terms of the Modelica License 2. For license conditions (including the disclaimer of warranty) see <a href=\"modelica://Modelica.UsersGuide.ModelicaLicense2\">Modelica.UsersGuide.ModelicaLicense2</a> or visit <a href=\"http://www.modelica.org/licenses/ModelicaLicense2\">http://www.modelica.org/licenses/ModelicaLicense2</a>.</i> </p>
</html>"));
end ADMSL;

0 comments on commit 32661bf

Please sign in to comment.