FCSys.Conditions.ByConnector.Chemical

Conditions for an Chemical connector

Information

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

Package Content

NameDescription
FCSys.Conditions.ByConnector.Chemical.Potential Potential Specify chemical potential (measure current)
FCSys.Conditions.ByConnector.Chemical.Current Current Specify current (measure chemical potential)
FCSys.Conditions.ByConnector.Chemical.Partial Partial Base model for a material condition

FCSys.Conditions.ByConnector.Chemical.Potential FCSys.Conditions.ByConnector.Chemical.Potential

Specify chemical potential (measure current) FCSys.Conditions.ByConnector.Chemical.Potential

Information

Extends from Partial (Base model for a material condition).

Parameters

TypeNameDefaultDescription
Specification of material condition
BooleaninternaltrueUse internal specification
RealExpressionsetredeclare Modelica.Blocks.So…Source of internal specification
Properties upon outflow
Velocityphi[Axis]{0,0,0}Velocity [L/T]
PotentialAbsolutesT3000*U.KProduct of specific entropy and temperature [L2.M/(N.T2)]
Assumptions
Included transport axes
BooleaninclTransXtrueX
BooleaninclTransYtrueY
BooleaninclTransZtrueZ
Measurement
RealOutputychemical.NdotMeasurement expression

Connectors

TypeNameDescription
input RealInputuValue of specified condition
ChemicalchemicalConnector for a species of a chemical reaction
Measurement
output RealOutputyMeasurement expression

Modelica definition

model Potential "Specify chemical potential (measure current)"
  extends Partial(final y=chemical.Ndot);

equation 
  chemical.g = u_final;

end Potential;

FCSys.Conditions.ByConnector.Chemical.Current FCSys.Conditions.ByConnector.Chemical.Current

Specify current (measure chemical potential) FCSys.Conditions.ByConnector.Chemical.Current

Information

Extends from Partial (Base model for a material condition).

Parameters

TypeNameDefaultDescription
Specification of material condition
BooleaninternaltrueUse internal specification
RealExpressionsetredeclare Modelica.Blocks.So…Source of internal specification
Properties upon outflow
Velocityphi[Axis]{0,0,0}Velocity [L/T]
PotentialAbsolutesT3000*U.KProduct of specific entropy and temperature [L2.M/(N.T2)]
Assumptions
Included transport axes
BooleaninclTransXtrueX
BooleaninclTransYtrueY
BooleaninclTransZtrueZ
Measurement
RealOutputychemical.gMeasurement expression

Connectors

TypeNameDescription
input RealInputuValue of specified condition
ChemicalchemicalConnector for a species of a chemical reaction
Measurement
output RealOutputyMeasurement expression

Modelica definition

model Current "Specify current (measure chemical potential)"
  extends Partial(final y=chemical.g);

equation 
  chemical.Ndot = u_final;

end Current;

FCSys.Conditions.ByConnector.Chemical.Partial FCSys.Conditions.ByConnector.Chemical.Partial

Base model for a material condition FCSys.Conditions.ByConnector.Chemical.Partial

Information

Extends from FCSys.Icons.Conditions.SingleShort (Short icon for a single-connector boundary condition).

Parameters

TypeNameDefaultDescription
Specification of material condition
BooleaninternaltrueUse internal specification
RealExpressionsetredeclare Modelica.Blocks.So…Source of internal specification
Properties upon outflow
Velocityphi[Axis]{0,0,0}Velocity [L/T]
PotentialAbsolutesT3000*U.KProduct of specific entropy and temperature [L2.M/(N.T2)]
Assumptions
Included transport axes
BooleaninclTransXtrueX
BooleaninclTransYtrueY
BooleaninclTransZtrueZ
Measurement
RealOutputy Measurement expression

Connectors

TypeNameDescription
input RealInputuValue of specified condition
ChemicalchemicalConnector for a species of a chemical reaction
Measurement
output RealOutputyMeasurement expression

Modelica definition

partial model Partial "Base model for a material condition"
  import Modelica.Math.BooleanVectors.countTrue;
  import Modelica.Math.BooleanVectors.index;
  extends FCSys.Icons.Conditions.SingleShort;

  parameter Boolean internal=true "Use internal specification";

  replaceable Modelica.Blocks.Sources.RealExpression set if internal 
    constrainedby Modelica.Blocks.Interfaces.SO 
    "Source of internal specification";

  // Properties upon outflow
  parameter Q.Velocity phi[Axis]={0,0,0} "Velocity";
  parameter Q.PotentialAbsolute sT=3000*U.K 
    "Product of specific entropy and temperature";

  // Included components of translational momentum
  parameter Boolean inclTransX=true "X";
  parameter Boolean inclTransY=true "Y";
  parameter Boolean inclTransZ=true "Z";

  Connectors.RealInput u if not internal "Value of specified condition";

  Connectors.RealOutput y "Measurement expression";
  output Q.Velocity phi_actual[n_trans]=actualStream(chemical.phi) 
    "Velocity of the actual stream";
  output Q.Potential sT_actual=actualStream(chemical.sT) 
    "Specific entropy-temperature product of the actual stream";
  Connectors.Chemical chemical(n_trans=n_trans) 
    "Connector for a species of a chemical reaction";

protected 
  final parameter Integer n_trans=countTrue({inclTransX,inclTransY,inclTransZ})
    "Number of components of translational momentum";
  final parameter Integer cartTrans[n_trans]=index({inclTransX,inclTransY,
      inclTransZ}) 
    "Cartesian-axis indices of the components of translational momentum";
  Connectors.RealOutputInternal u_final "Final value of specified condition";

equation 
  chemical.phi = phi[cartTrans];
  chemical.sT = sT;

  connect(set.y, u_final);

  connect(u, u_final);
end Partial;