Skip to content

Commit

Permalink
Refs #9: Renaming the ports from p,n to i,o
Browse files Browse the repository at this point in the history
  • Loading branch information
dietmarw committed Nov 20, 2019
1 parent 79e61b7 commit b08e3fa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
14 changes: 7 additions & 7 deletions OpenHPL/Interfaces/ContactNode.mo
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ partial model ContactNode "Model of two connectors and node pressure"
Modelica.SIunits.MassFlowRate m_dot "Mass flow rate";
extends TwoContact;
equation
p_n = p.p;
p.p = n.p;
//T_n = p.T;
//p.T = n.T;
m_dot = p.m_dot + n.m_dot;
p_n = i.p;
i.p = o.p;
//T_n = i.T;
//i.T = o.T;
m_dot = i.m_dot + o.m_dot;
annotation (
Documentation(info = "<html>
<p>ContactNode is a superclass, which has two Contacts <code>p</code>, <code>n</code> and assumes
that inlet pressure of <code>p</code> is equal to outlet at <code>n</code>.
<p>ContactNode is a superclass, which has two Contacts <code>i</code>, <code>o</code> and assumes
that inlet pressure of <code>i</code> is equal to outlet at <code>o</code>.
This node pressure is determined by <code>p_n</code>.
Also the mass flow rate in this node is <code>m_dot</code>.</p>
</html>"));
Expand Down
10 changes: 5 additions & 5 deletions OpenHPL/Interfaces/ContactPort.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ partial model ContactPort "Model of two connectors with mass flow rate"
Modelica.SIunits.MassFlowRate m_dot "Mass flow rate";
extends TwoContact;
equation
0 = p.m_dot + n.m_dot;
m_dot = p.m_dot;
0 = i.m_dot + o.m_dot;
m_dot = i.m_dot;
annotation (
Documentation(info = "<html>
<p>ContactPort is a superclass, which has two Contacts <code>p</code>, <code>n</code> and
assumes that the inlet mass flow rate of <code>p</code> is identical to the outlet
mass flow rate of <code>n</code>. This mass flow rate is determined as <code>m_dot</code>.</p>
<p>ContactPort is a superclass, which has two Contacts <code>i</code>, <code>o</code> and
assumes that the inlet mass flow rate of <code>i</code> is identical to the outlet
mass flow rate of <code>o</code>. This mass flow rate is determined as <code>m_dot</code>.</p>
</html>"));
end ContactPort;
8 changes: 5 additions & 3 deletions OpenHPL/Interfaces/TwoContact.mo
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
within OpenHPL.Interfaces;
partial model TwoContact "Model of two connectors"
Contact p "Inlet contact" annotation (
Contact i "Inlet contact" annotation (
Placement(transformation(extent={{-110,-10},{-90,10}})));
Contact n "Outlet contact" annotation (
Contact o "Outlet contact" annotation (
Placement(transformation(extent={{90,-10},{110,10}})));
annotation (
Documentation(info = "<html>
<p>TwoContact is a partial model, which consists of two Contacts <i>p </i>and <i>n</i>. Can be used in cases where model is needed inlet and outlet Contacts, but don&apos;t need any specification about mass flow rate and pressures between these Contacts.</p>
<p>TwoContact is a partial model, which consists of two Contacts <i>i</i>and <i>o</i>.
Can be used in cases where model is needed inlet and outlet Contacts, but do not need
any specification about mass flow rate and pressures between these Contacts.</p>
</html>"));
end TwoContact;

0 comments on commit b08e3fa

Please sign in to comment.