Cosh

block Cosh "Output the hyperbolic cosine of the input"
    extends Interfaces.SISO;
equation
    y = Modelica.Math.cosh(u);

    annotation (
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Polygon(
                    points = {
                        {0, 90}, 
                        {-8, 68}, 
                        {8, 68}, 
                        {0, 90}},
                    lineColor = {192, 192, 192},
                    fillColor = {192, 192, 192},
                    fillPattern = FillPattern.Solid), 
                Line(
                    points = {
                        {0, -80}, 
                        {0, 68}},
                    color = {192, 192, 192}), 
                Text(
                    extent = {
                        {4, 66}, 
                        {66, 20}},
                    lineColor = {192, 192, 192},
                    textString = "cosh"), 
                Line(
                    points = {
                        {-80, 80}, 
                        {-77.6, 61.1}, 
                        {-74.4, 39.3}, 
                        {-71.2, 20.7}, 
                        {-67.1, 1.29}, 
                        {-63.1, -14.6}, 
                        {-58.3, -29.8}, 
                        {-52.7, -43.5}, 
                        {-46.2, -55.1}, 
                        {-39, -64.3}, 
                        {-30.2, -71.7}, 
                        {-18.9, -77.1}, 
                        {-4.42, -79.9}, 
                        {10.9, -79.1}, 
                        {23.7, -75.2}, 
                        {34.2, -68.7}, 
                        {42.2, -60.6}, 
                        {48.6, -51.2}, 
                        {54.3, -40}, 
                        {59.1, -27.5}, 
                        {63.1, -14.6}, 
                        {67.1, 1.29}, 
                        {71.2, 20.7}, 
                        {74.4, 39.3}, 
                        {77.6, 61.1}, 
                        {80, 80}},
                    smooth = Smooth.Bezier), 
                Line(
                    points = {
                        {-90, -86.083}, 
                        {68, -86.083}},
                    color = {192, 192, 192}), 
                Polygon(
                    points = {
                        {90, -86.083}, 
                        {68, -78.083}, 
                        {68, -94.083}, 
                        {90, -86.083}},
                    lineColor = {192, 192, 192},
                    fillColor = {192, 192, 192},
                    fillPattern = FillPattern.Solid)}),
        Diagram(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Line(
                    points = {
                        {0, 80}, 
                        {-8, 80}},
                    color = {192, 192, 192}), 
                Line(
                    points = {
                        {0, -80}, 
                        {-8, -80}},
                    color = {192, 192, 192}), 
                Line(
                    points = {
                        {0, -90}, 
                        {0, 84}},
                    color = {192, 192, 192}), 
                Text(
                    extent = {
                        {11, 98}, 
                        {38, 78}},
                    lineColor = {160, 160, 164},
                    textString = "y"), 
                Polygon(
                    points = {
                        {0, 100}, 
                        {-6, 84}, 
                        {6, 84}, 
                        {0, 100}},
                    lineColor = {192, 192, 192},
                    fillColor = {192, 192, 192},
                    fillPattern = FillPattern.Solid), 
                Line(
                    points = {
                        {-100, -86.083}, 
                        {84, -86.083}},
                    color = {192, 192, 192}), 
                Polygon(
                    points = {
                        {100, -86.083}, 
                        {84, -80.083}, 
                        {84, -92.083}, 
                        {100, -86.083}},
                    lineColor = {192, 192, 192},
                    fillColor = {192, 192, 192},
                    fillPattern = FillPattern.Solid), 
                Line(points = {
                    {-80, 80}, 
                    {-77.6, 61.1}, 
                    {-74.4, 39.3}, 
                    {-71.2, 20.7}, 
                    {-67.1, 1.29}, 
                    {-63.1, -14.6}, 
                    {-58.3, -29.8}, 
                    {-52.7, -43.5}, 
                    {-46.2, -55.1}, 
                    {-39, -64.3}, 
                    {-30.2, -71.7}, 
                    {-18.9, -77.1}, 
                    {-4.42, -79.9}, 
                    {10.9, -79.1}, 
                    {23.7, -75.2}, 
                    {34.2, -68.7}, 
                    {42.2, -60.6}, 
                    {48.6, -51.2}, 
                    {54.3, -40}, 
                    {59.1, -27.5}, 
                    {63.1, -14.6}, 
                    {67.1, 1.29}, 
                    {71.2, 20.7}, 
                    {74.4, 39.3}, 
                    {77.6, 61.1}, 
                    {80, 80}}), 
                Text(
                    extent = {
                        {-31, 72}, 
                        {-11, 88}},
                    textString = "27",
                    lineColor = {0, 0, 255}), 
                Text(
                    extent = {
                        {62, -67}, 
                        {82, -87}},
                    textString = "4",
                    lineColor = {0, 0, 255}), 
                Text(
                    extent = {
                        {-104, -63}, 
                        {-84, -83}},
                    textString = "-4",
                    lineColor = {0, 0, 255}), 
                Text(
                    extent = {
                        {78, -54}, 
                        {100, -74}},
                    lineColor = {160, 160, 164},
                    textString = "u")}),
        Documentation(info = "<html>\n<p>\nThis blocks computes the output <strong>y</strong> as the\n<em>hyperbolic cosine</em> of the input <strong>u</strong>:\n</p>\n<pre>\n    y = <strong>cosh</strong>( u );\n</pre>\n\n<p>\n<img src=\"modelica://Modelica/Resources/Images/Math/cosh.png\"\n     alt=\"cosh.png\">\n</p>\n\n</html>"));
end Cosh;