FCSys.Chemistry.Electrochemistry

Models associated with electrochemical reactions

Information

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

Package Content

NameDescription
FCSys.Chemistry.Electrochemistry.DoubleLayer DoubleLayer Electrolytic double layer
FCSys.Chemistry.Electrochemistry.ElectronTransfer ElectronTransfer Electron transfer

FCSys.Chemistry.Electrochemistry.DoubleLayer FCSys.Chemistry.Electrochemistry.DoubleLayer

Electrolytic double layer FCSys.Chemistry.Electrochemistry.DoubleLayer

Information

The capacitance (C) is calculated from the surface area (A), length of the gap (L), and the permittivity (ε) assuming that the charges are uniformly distributed over (infinite) parallel planes.

If setVelocity is true, then the material exits with the velocity of the inert connector. Typically, that connector should be connected to the stationary solid, in which case heat will be generated if material arrives with a nonzero velocity. That heat is rejected to the same connector.

Extends from FCSys.Icons.Names.Top2.

Parameters

TypeNameDefaultDescription
Integern_trans Number of components of translational momentum
AreaA10*U.m^2Surface area [L2]
LengthL1e-10*U.mLength of the gap [L]
PermittivityepsilonU.epsilon_0Permittivity of the dielectric [N2.T2/(L3.M)]
replaceable package DataCharacteristics.'e-'.GraphiteMaterial properties
Assumptions
BooleansetVelocitytrueMaterial exits at the velocity of the inert connector
BooleaninclVolumetrueInclude the amagat connector to occupy volume

Connectors

TypeNameDescription
replaceable package DataMaterial properties
ChemicalnegativeChemical connector on the 1st side
ChemicalpositiveChemical connector on the 2nd side
InertinertTranslational and thermal interface with the substrate
AmagatamagatConnector for additivity of volume

Modelica definition

model DoubleLayer "Electrolytic double layer"
  extends FCSys.Icons.Names.Top2;

  parameter Integer n_trans(min=1,max=3) 
    "Number of components of translational momentum";
  parameter Q.Area A=10*U.m^2 "Surface area";
  parameter Q.Length L=1e-10*U.m "Length of the gap";
  parameter Q.Permittivity epsilon=U.epsilon_0 "Permittivity of the dielectric";

  final parameter Q.Capacitance C=epsilon*A/L "Capacitance";
  replaceable package Data = Characteristics.'e-'.Graphite constrainedby 
    Characteristics.BaseClasses.Characteristic "Material properties";

  parameter Boolean setVelocity=true 
    "Material exits at the velocity of the inert connector";
  parameter Boolean inclVolume=true 
    "Include the amagat connector to occupy volume";

  // Aliases
  Q.Potential w(
    stateSelect=StateSelect.always,
    start=0,
    fixed=true) "Electrical potential";
  Q.Current I "Material current";

  output Q.Amount Z(stateSelect=StateSelect.never) = C*w if environment.analysis
    "Amount of charge shifted in the positive direction";

  Connectors.Chemical negative(final n_trans=n_trans) 
    "Chemical connector on the 1st side";
  Connectors.Chemical positive(final n_trans=n_trans) 
    "Chemical connector on the 2nd side";
  Connectors.Inert inert(final n_trans=n_trans) 
    "Translational and thermal interface with the substrate";

  Connectors.Amagat amagat(final V=-A*L) if inclVolume 
    "Connector for additivity of volume";

protected 
  outer Conditions.Environment environment "Environmental conditions";

equation 
  // Aliases
  Data.z*w = positive.g - negative.g;
  I = positive.Ndot;

  // Streams
  if setVelocity then
    negative.phi = inert.phi;
    positive.phi = inert.phi;
  else
    negative.phi = inStream(positive.phi);
    positive.phi = inStream(negative.phi);
  end if;
  negative.sT = inStream(positive.sT);
  positive.sT = inStream(negative.sT);

  // Conservation
  0 = negative.Ndot + positive.Ndot "Material (no storage)";
  zeros(n_trans) = Data.m*(actualStream(negative.phi) - actualStream(positive.phi))
    *I + inert.mPhidot "Translational momentum (no storage)";
  der(C*w)/U.s = Data.z*I 
    "Electrical energy (reversible; simplified using material conservation and divided by potential)";
  0 = inert.Qdot + (actualStream(negative.phi)*actualStream(negative.phi) - 
    actualStream(positive.phi)*actualStream(positive.phi))*I*Data.m/2 + inert.phi
    *inert.mPhidot "Mechanical and thermal energy (no storage)";

end DoubleLayer;

FCSys.Chemistry.Electrochemistry.ElectronTransfer FCSys.Chemistry.Electrochemistry.ElectronTransfer

Electron transfer FCSys.Chemistry.Electrochemistry.ElectronTransfer

Information

fromI may help to eliminate nonlinear systems of equations if the double layer capacitance is not included.

Extends from FCSys.Icons.Names.Top2.

Parameters

TypeNameDefaultDescription
Integern_trans Number of components of translational momentum
Integerz-1Charge number
CurrentI0U.AExchange current @ 300 K [N/T]
Chemical parameters
PotentialE_A0Activation energy [L2.M/(N.T2)]
NumberAbsolutealpha0.5Charge transfer coefficient [1]
Advanced
BooleanfromItrueInvert the Butler-Volmer equation, if α=½

Connectors

TypeNameDescription
ChemicalnegativeChemical connector on the 1st side
ChemicalpositiveChemical connector on the 2nd side
InertinertTranslational and thermal interface with the substrate

Modelica definition

model ElectronTransfer "Electron transfer"
  import Modelica.Math.asinh;
  extends FCSys.Icons.Names.Top2;

  parameter Integer n_trans(min=1,max=3) 
    "Number of components of translational momentum";

  parameter Integer z=-1 "Charge number";
  parameter Q.Potential E_A=0 "Activation energy";
  parameter Q.NumberAbsolute alpha(max=1) = 0.5 "Charge transfer coefficient";
  parameter Q.Current I0=U.A "Exchange current @ 300 K";
  parameter Boolean fromI=true 
    "Invert the Butler-Volmer equation, if α=½";

  Connectors.Chemical negative(final n_trans=n_trans) 
    "Chemical connector on the 1st side";
  Connectors.Chemical positive(final n_trans=n_trans) 
    "Chemical connector on the 2nd side";

  // Aliases
  Q.TemperatureAbsolute T(start=300*U.K) "Reaction rate";
  Q.Current I(start=0) "Reaction rate";
  Q.Potential Deltag(start=0) "Potential difference";

  Connectors.Inert inert(final n_trans=n_trans) 
    "Translational and thermal interface with the substrate";

equation 
  // Aliases
  I = positive.Ndot;
  Deltag = positive.g - negative.g;
  T = inert.T;

  // Streams
  negative.phi = inStream(positive.phi);
  positive.phi = inStream(negative.phi);
  negative.sT = inStream(positive.sT);
  positive.sT = inStream(negative.sT);

  // Reaction rate
  if abs(alpha - 0.5) < Modelica.Constants.eps and fromI then
    Deltag = 2*T*asinh(0.5*exp(E_A*(1/T - 1/(300*U.K)))*I/I0);
  else
    I*exp(E_A*(1/T - 1/(300*U.K))) = I0*(exp((1 - alpha)*Deltag/T) - exp(-alpha*
      Deltag/T));
  end if;

  // Conservation (without storage)
  0 = negative.Ndot + positive.Ndot "Material";
  zeros(n_trans) = inert.mPhidot "Translational momentum";
  0 = Deltag*I + inert.Qdot "Energy";
  // Note:  Energy and momentum cancel among the stream terms.

end ElectronTransfer;