{"action":"created","issue":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/496","repository_url":"https://api.github.com/repos/tbeu/Modelica","labels_url":"https://api.github.com/repos/tbeu/Modelica/issues/496/labels{/name}","comments_url":"https://api.github.com/repos/tbeu/Modelica/issues/496/comments","events_url":"https://api.github.com/repos/tbeu/Modelica/issues/496/events","html_url":"https://github.com/tbeu/Modelica/issues/496","id":195157499,"number":496,"title":"Inconsistent partial model naming [in Modelica.Magnetic]","user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"labels":[{"id":499441887,"url":"https://api.github.com/repos/tbeu/Modelica/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":499453872,"url":"https://api.github.com/repos/tbeu/Modelica/labels/P:%20normal","name":"P: normal","color":"aa8888","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-13T04:21:07Z","updated_at":"2016-12-13T04:21:46Z","closed_at":null,"body":"**Reported by christiankral on 4 Feb 2011 14:18 UTC**\nThe partial models \r\n * ```Interfaces.PartialTwoPortsElementary``` and \r\n * ```Interfaces.PartialTwoPorts``` \r\nare implemented differently in the packages \r\n * ```Modelica.Magnetic.FluxTubes``` and \r\n * ```Modelica.Magnetic.FundamentalWave```.\r\n\r\n = Current Implementation =\r\n == ```FluxTubes.Interfaces.PartialTwoPortsElementary``` ==\r\n\r\n```\r\npartial model PartialTwoPortsElementary \r\n  PositiveMagneticPort port_p;\r\n  NegativeMagneticPort port_n;\r\nend PartialTwoPortsElementary;\r\n\r\n```\r\n\r\n == ```FluxTubes.Interfaces.PartialTwoPorts``` ==\r\n\r\n```\r\npartial model PartialTwoPorts \r\n  extends FluxTubes.Interfaces.PartialTwoPortsElementary;\r\n  SI.MagneticPotentialDifference V_m;\r\n  SI.MagneticFlux Phi;\r\n\r\nequation \r\n  V_m = port_p.V_m - port_n.V_m;\r\n  Phi = port_p.Phi;\r\n  0 = port_p.Phi + port_n.Phi;\r\nend PartialTwoPorts;\r\n```\r\n\r\n == ```FundamentalWave.Interfaces.PartialTwoPort``` == \r\n```\r\npartial model PartialTwoPort \r\n  PositiveMagneticPort port_p;\r\n  NegativeMagneticPort port_n;\r\nend PartialTwoPort;\r\n```\r\n\r\n == ```FundamentalWave.Interfaces.PartialTwoPortElementary``` ==\r\n```\r\npartial model PartialTwoPortElementary\r\n  extends FundamentalWave.Interfaces.PartialTwoPort;\r\n  Modelica.SIunits.ComplexMagneticPotentialDifference V_m;\r\n  Modelica.SIunits.ComplexMagneticFlux Phi;\r\n\r\nequation \r\n  V_m = port_p.V_m - port_n.V_m;\r\n  port_p.Phi = Phi;\r\n  port_p.Phi + port_n.Phi = Complex(0,0);\r\nend PartialTwoPortElementary;\r\n```\r\n\r\nThe naming of the partial models in the fundamental wave library is simply a bug. \r\n\r\n = Additional Issues = \r\n\r\nThe term ```port``` used in the magnetic and thermal domain refers to a connector and it represents two pins or plugs in the electrical domains. We should come up with some clarification here. We should also unify whether or not we should used the term ```Partial``` in the class name. We have various different implementations in the MSL. \r\n\r\nThe implementation of partial models is even entirely different throughout the package ```Modelica.Electrical```: \r\n\r\n * ```Analog.Interfaces.TwoPin``` is a partial model containing \r\n   * definition of voltage drop ```v``` across pins  \r\n * ```MultiPhase.Interfaces.TwoPlug``` is a partial model containing\r\n   * definition of voltage drop ```v``` across plugs\r\n   * definition of current ```i``` into positive plug\r\n * ```Analog.Interfaces.OnePort``` and ```MultiPhase.Interfaces.OnePort``` are partial models with two pins or plugs, respectively [problem here is that we are using the term ```port``` as an abstraction for two pins and plugs, respectively, whereas this term is used differently, e.g, in the magnetic domain](the); these partial models contain \r\n   * definition of voltage drop ```v``` across pins and plugs, respectively \r\n   * definition of current ```i``` into positive pin and plug, respectively\r\n   * current balance of positive and negative pin (or plug)\r\n * ```Analog.Interfaces.TwoPort``` and ```MultiPhase.Interfaces.TwoPort``` are partial models with four pins or plugs, respectively; these partial models contain \r\n   * definition of voltage drop ```v``` across pins and plugs, respectively \r\n   * definition of current ```i``` into positive pin (or plug)\r\n   * current balance of positive and negative pin (or plug)\r\n * ```MultiPhase.Interfaces.FourPlug``` contains\r\n   * definition of voltage drop ```v``` across paris of plugs, respectively \r\n   * definition of current ```i``` into positive plugs\r\n\r\nHowever, a unification of namings and implementations is highly desirable since all the differences are confusing to experienced and news users. I understand that we do need a conversion script for renaming partial models; so we do have wait for Modelica 4, I suppose.\r\n\r\n = Proposal =\r\n\r\nSo here we have lot very different namings with different implementations. On my opinion we need three different partial model types:\r\n * ```TwoPinGeneric```, ```TwoPlugGeneric```, etc., which contains only the connectors; these are the most generic components; they are also used for sources and sensors since it may be undesired in these cases to have a pre defined variable for either the potential difference or the flow variable\r\n * ```TwoPinElementary```, ```TwoPlugElementary```, etc., which contains the connectors and the definitions of the potential difference, e.g., ```v```, and the flow variable into the positive connector, e.g., ```i```; these models are mostly used for graphical programming  \r\n * ```TwoPin```, ```TwoPlug```, or ```TwoPinBalanced```, ```TwoPlugBalanced```, etc., containing the flow balances in addition to the ```Elemenary``` named partial models; these models are used for textual programming\r\n\r\nNaming may be discussed.\r\n\n\nMigrated-From: https://trac.modelica.org/Modelica/ticket/496"},"comment":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/comments/266637025","html_url":"https://github.com/tbeu/Modelica/issues/496#issuecomment-266637025","issue_url":"https://api.github.com/repos/tbeu/Modelica/issues/496","id":266637025,"user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T04:21:46Z","updated_at":"2016-12-13T04:21:46Z","body":"**Comment by dietmarw on 1 Aug 2015 21:36 UTC**\nMilestone renamed"}}
{"actor":{"display_login":"modelica-trac-importer"}}