## FCSys.Conditions.Adapters.MSL

Adapters to the Modelica Standard Library

### Information

Extends from Modelica.Icons.Package (Icon for standard packages).

### Package Content

Name | Description
--- | ---
Anode | Adapter between Modelica and the boundary connector of a Cell, Region, or Subregion
Cathode | Adapter between Modelica and the boundary connector of a Cell, Region, or Subregion
Conductor | Adapter for electrical and thermal conduction between Modelica and FCSys
Electronic | Adapter for e- between Modelica and FCSys
Phases | Adapters for material phases
Domains | Adapters for physical domains
Junctions | Modelica junctions between pure substances and their mixtures
Media | Modelica.Media models to interface with the cell

## FCSys.Conditions.Adapters.MSL.Anode

Adapter between Modelica and the boundary connector of a Cell, Region, or Subregion

### Information

Extends from FCSys.Icons.Names.Top4.

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Material properties
replaceable package GasMedium | Media.AnodeGas | Medium model for the gas
replaceable package LiquidMedium | Modelica.Media.Water.Constan… | Medium model for the liquid

### Connectors

Type | Name | Description
--- | --- | ---
BoundaryBus | boundary | Multi-species connector for translational momentum and heat
FluidPort_b | gasPort | Modelica fluid port for the gas
NegativePin | pin | Modelica electrical pin
HeatPort_b | heatPort | Modelica heat port
FluidPort_b | liquidPort | Modelica fluid port for the liquid
Material properties
replaceable package GasMedium | Medium model for the gas
replaceable package LiquidMedium | Medium model for the liquid

### Modelica definition

    model Anode
      "Adapter between Modelica and the boundary connector of a Cell, Region, or Subregion"
      extends FCSys.Icons.Names.Top4;

      replaceable package GasMedium = Media.AnodeGas constrainedby
        Modelica.Media.Interfaces.PartialMedium "Medium model for the gas";
      replaceable package LiquidMedium = Modelica.Media.Water.ConstantPropertyLiquidWater
        constrainedby Modelica.Media.Interfaces.PartialMedium
        "Medium model for the liquid";

      Connectors.BoundaryBus boundary
        "Multi-species connector for translational momentum and heat";
      Modelica.Fluid.Interfaces.FluidPort_b gasPort(redeclare final package Medium
          = GasMedium) "Modelica fluid port for the gas";
      Modelica.Electrical.Analog.Interfaces.NegativePin pin
        "Modelica electrical pin";
      Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b heatPort
        "Modelica heat port";
      Modelica.Fluid.Interfaces.FluidPort_b liquidPort(redeclare final package
          Medium = LiquidMedium) "Modelica fluid port for the liquid";
      Phases.AnodeGas gas(redeclare final package Medium = GasMedium)
        "Gas subadapter";
      Phases.Graphite graphite('inclC+'=true, 'incle-'=true) "Graphite subadapter";

      Phases.Liquid liquid(redeclare final package Medium = LiquidMedium)
        "Liquid subadapter";

    equation
      connect(gas.boundary, boundary.gas);
      connect(gasPort, gas.fluidPort);
      connect(gas.heatPort, heatPort);

      connect(graphite.boundary, boundary.graphite);

      connect(graphite.pin, pin);
      connect(graphite.heatPort, heatPort);
      connect(liquid.boundary, boundary.liquid);
      connect(liquidPort, liquid.fluidPort);
      connect(liquid.heatPort, heatPort);

    end Anode;

## FCSys.Conditions.Adapters.MSL.Cathode

Adapter between Modelica and the boundary connector of a Cell, Region, or Subregion

### Information

Extends from FCSys.Icons.Names.Top4.

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Material properties
replaceable package GasMedium | Media.CathodeGas | Medium model for the gas
replaceable package LiquidMedium | Modelica.Media.Water.Constan… | Medium model for the liquid

### Connectors

Type | Name | Description
--- | --- | ---
BoundaryBus | boundary | Multi-species connector for translational momentum and heat
FluidPort_b | gasPort | Modelica fluid port for the gas
NegativePin | pin | Modelica electrical pin
HeatPort_b | heatPort | Modelica heat port
FluidPort_b | liquidPort | Modelica fluid port for the liquid
Material properties
replaceable package GasMedium | Medium model for the gas
replaceable package LiquidMedium | Medium model for the liquid

### Modelica definition

    model Cathode
      "Adapter between Modelica and the boundary connector of a Cell, Region, or Subregion"
      extends FCSys.Icons.Names.Top4;

      replaceable package GasMedium = Media.CathodeGas constrainedby
        Modelica.Media.Interfaces.PartialMedium "Medium model for the gas";
      replaceable package LiquidMedium = Modelica.Media.Water.ConstantPropertyLiquidWater
        constrainedby Modelica.Media.Interfaces.PartialMedium
        "Medium model for the liquid";

      Connectors.BoundaryBus boundary
        "Multi-species connector for translational momentum and heat";
      Modelica.Fluid.Interfaces.FluidPort_b gasPort(redeclare final package Medium
          = GasMedium) "Modelica fluid port for the gas";
      Modelica.Electrical.Analog.Interfaces.NegativePin pin
        "Modelica electrical pin";
      Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b heatPort
        "Modelica heat port";
      Modelica.Fluid.Interfaces.FluidPort_b liquidPort(redeclare final package
          Medium = LiquidMedium) "Modelica fluid port for the liquid";

      Phases.CathodeGas gas(redeclare final package Medium = GasMedium)
        "Gas subadapter";
      Phases.Graphite graphite('inclC+'=true, 'incle-'=true) "Graphite subadapter";
      Phases.Liquid liquid(redeclare final package Medium = LiquidMedium)
        "Liquid subadapter";

    equation
      connect(gas.boundary, boundary.gas);
      connect(gasPort, gas.fluidPort);
      connect(gas.heatPort, heatPort);
      connect(graphite.boundary, boundary.graphite);

      connect(graphite.pin, pin);
      connect(graphite.heatPort, heatPort);
      connect(liquid.boundary, boundary.liquid);
      connect(liquidPort, liquid.fluidPort);
      connect(liquid.heatPort, heatPort);

    end Cathode;

## FCSys.Conditions.Adapters.MSL.Conductor

Adapter for electrical and thermal conduction between Modelica and FCSys

### Information

Extends from FCSys.Icons.Names.Top2.

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Species
Boolean | 'inclC+' | false | Include C+
Boolean | 'incle-' | false | Include e-

### Connectors

Type | Name | Description
--- | --- | ---
BoundaryBus | boundary | Multi-species connector
NegativePin | pin | Modelica electrical pin
HeatPort_b | heatPort | Modelica heat port

### Modelica definition

    model Conductor
      "Adapter for electrical and thermal conduction between Modelica and FCSys"
      extends FCSys.Icons.Names.Top2;

      parameter Boolean 'inclC+'=false "Include C+";
      parameter Boolean 'incle-'=false "Include e-";

      Connectors.BoundaryBus boundary "Multi-species connector";
      Modelica.Electrical.Analog.Interfaces.NegativePin pin if 'incle-'
        "Modelica electrical pin";
      Phases.Graphite graphite(final 'inclC+'='inclC+', final 'incle-'='incle-')
        "Graphite subadapter";

      Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b heatPort if 'inclC+'
        "Modelica heat port";
    equation
      connect(graphite.boundary, boundary.graphite);

      connect(graphite.pin, pin);

      connect(graphite.heatPort, heatPort);
    end Conductor;

## FCSys.Conditions.Adapters.MSL.Electronic

Adapter for e- between Modelica and FCSys

### Information

Extends from FCSys.Icons.Names.Top1.

### Connectors

Type | Name | Description
--- | --- | ---
BoundaryBus | boundary | Multi-species connector
NegativePin | pin | Modelica electrical pin

### Modelica definition

    model Electronic
      "Adapter for e- between Modelica and FCSys"
      extends FCSys.Icons.Names.Top1;

      Connectors.BoundaryBus boundary "Multi-species connector";
      Modelica.Electrical.Analog.Interfaces.NegativePin pin
        "Modelica electrical pin";
      Phases.Graphite graphite(final 'incle-'=true, final 'inclC+'=false)
        "Graphite subadapter";

    equation
      connect(graphite.boundary, boundary.graphite);

      connect(graphite.pin, pin);

    end Electronic;