FixedTemperature

model FixedTemperature "Fixed temperature boundary condition in degRankine"
    parameter Modelica.SIunits.Conversions.NonSIunits.Temperature_degRk T "Fixed Temperature at the port";
    Interfaces.HeatPort_b port annotation (Placement(transformation(extent = {
        {90, -10}, 
        {110, 10}})));
equation
    port.T = Modelica.SIunits.Conversions.from_degRk(T);

    annotation (
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Text(
                    extent = {
                        {-118, 165}, 
                        {122, 105}},
                    textString = "%name",
                    lineColor = {0, 0, 255}), 
                Rectangle(
                    extent = {
                        {-100, 100}, 
                        {100, -100}},
                    pattern = LinePattern.None,
                    fillColor = {159, 159, 223},
                    fillPattern = FillPattern.Backward), 
                Text(
                    extent = {
                        {48, -22}, 
                        {-100, -86}},
                    textString = "degRk"), 
                Polygon(
                    points = {
                        {52, -20}, 
                        {52, 20}, 
                        {90, 0}, 
                        {52, -20}},
                    lineColor = {191, 0, 0},
                    fillColor = {191, 0, 0},
                    fillPattern = FillPattern.Solid), 
                Text(
                    extent = {
                        {-150, -110}, 
                        {150, -150}},
                    textString = "T=%T"), 
                Line(
                    points = {
                        {-42, 0}, 
                        {66, 0}},
                    color = {191, 0, 0},
                    thickness = 0.5)}),
        Documentation(info = "<html>\n<p>\nThis model defines a fixed temperature T at its port in degree Rankine,\n[degRk], i.e., it defines a fixed temperature as a boundary condition.\n</p>\n</html>"),
        Diagram(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Rectangle(
                    extent = {
                        {-100, 100}, 
                        {100, -100}},
                    pattern = LinePattern.None,
                    fillColor = {159, 159, 223},
                    fillPattern = FillPattern.Backward), 
                Line(
                    points = {
                        {-42, 0}, 
                        {66, 0}},
                    color = {191, 0, 0},
                    thickness = 0.5), 
                Text(
                    extent = {
                        {0, 0}, 
                        {-100, -100}},
                    textString = "degRk"), 
                Polygon(
                    points = {
                        {52, -20}, 
                        {52, 20}, 
                        {90, 0}, 
                        {52, -20}},
                    lineColor = {191, 0, 0},
                    fillColor = {191, 0, 0},
                    fillPattern = FillPattern.Solid)}));
end FixedTemperature;