IdealOpAmp3Pin

model IdealOpAmp3Pin "Ideal operational amplifier (norator-nullator pair), but 3 pins"
    Interfaces.PositivePin in_p "Positive pin of the input port"
        annotation (Placement(
            transformation(extent = {
                {-110, -70}, 
                {-90, -50}}),
            iconTransformation(extent = {
                {-110, -70}, 
                {-90, -50}})));
    Interfaces.NegativePin in_n "Negative pin of the input port"
        annotation (Placement(
            transformation(extent = {
                {-110, 50}, 
                {-90, 70}}),
            iconTransformation(extent = {
                {-110, 50}, 
                {-90, 70}})));
    Interfaces.PositivePin out "Output pin"
        annotation (Placement(
            transformation(extent = {
                {90, -10}, 
                {110, 10}}),
            iconTransformation(extent = {
                {90, -10}, 
                {110, 10}})));
equation
    in_n.i = 0;
    in_p.i = 0;
    in_p.v = in_n.v;

    annotation (
        defaultComponentName = "opAmp",
        Documentation(
            info = "<html>\n<p>\nThe ideal OpAmp with three pins is of exactly the same behaviour as the ideal\nOpAmp with four pins. Only the negative output pin is left out.\nBoth the input voltage and current are fixed to zero (nullator).\nAt the output pin both any voltage <em>v2</em> and any current <em>i2</em>\nare possible.\n</p>\n</html>",
            revisions = "<html>\n<ul>\n<li><em> 2002   </em>\n       by Christoph Clauss<br> initially implemented<br>\n       </li>\n</ul>\n</html>"),
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Line(
                    points = {
                        {60, 0}, 
                        {90, 0}},
                    color = {0, 0, 255}), 
                Text(
                    extent = {
                        {-150, 130}, 
                        {150, 90}},
                    textString = "%name",
                    lineColor = {0, 0, 255}), 
                Polygon(
                    points = {
                        {70, 0}, 
                        {-70, 80}, 
                        {-70, -80}, 
                        {70, 0}},
                    fillColor = {255, 255, 255},
                    fillPattern = FillPattern.Solid,
                    lineColor = {0, 0, 255}), 
                Line(
                    points = {
                        {-100, 60}, 
                        {-70, 60}},
                    color = {0, 0, 255}), 
                Line(
                    points = {
                        {-100, -60}, 
                        {-70, -60}},
                    color = {0, 0, 255}), 
                Line(
                    points = {
                        {70, 0}, 
                        {100, 0}},
                    color = {0, 0, 255}), 
                Line(
                    points = {
                        {-60, 50}, 
                        {-40, 50}},
                    color = {0, 0, 255}), 
                Line(
                    points = {
                        {-60, -50}, 
                        {-40, -50}},
                    color = {0, 0, 255}), 
                Line(
                    points = {
                        {-50, -40}, 
                        {-50, -60}},
                    color = {0, 0, 255})}));
end IdealOpAmp3Pin;