## ModelicaAdditions.HeatFlow1D.Examples

Demonstration examples of the components of this package

## ModelicaAdditions.HeatFlow1D.Examples.HeatedRod

Heating of a rod with different discretization grids

### Information

    A completely isolated rod is heated via a temperature source.
    The precision of the discretization grid is checked by
    providing a solution for n=3 and for n=15 grid elements.

    Simulate for 5.0e4 seconds and compare

      rod3.T[1:3]  with  rod15.T[{3,8,12}]

### Modelica definition

    encapsulated model HeatedRod
      "Heating of a rod with different discretization grids"
      import Modelica.Icons;
      import Modelica.Blocks.Sources;
      import ModelicaAdditions.HeatFlow1D;

      extends Icons.Example;

      HeatFlow1D.HeatedRod rod3(
        L=1,
        A=0.0004,
        rho=7.5*1000,
        lambda=74,
        c=450,
        n=3);
      HeatFlow1D.HeatedRod rod15(
        L=1,
        A=0.0004,
        rho=7.5*1000,
        lambda=74,
        c=450,
        n=15);
      HeatFlow1D.TemperatureSource_C Tsource;
      Sources.Constant const(k={200});
    equation
      connect(const.outPort, Tsource.inPort);
      connect(Tsource.surface_b, rod3.surface_a);
      connect(Tsource.surface_b, rod15.surface_a);
    end HeatedRod;