modelSubstance
Extends from Icons.Substance, Interfaces.PartialSubstanceInSolutionWithAdditionalPorts (Substance properties for components, where the substance is connected with the solution).
Information
n = x · n(solution) = ∫ MolarFlow
where n is amount of the substance and x is mole fraction.
The main class from “Chemical” package is called "Substance". It has one chemical connector, where chemical potential and molar flow is presented. An amount of solute "n" is accumulated by molar flow inside an instance of this class. In the default setting the amount of solution "n(solution)" is set to 55.6 as amount of water in one liter, so in this setting the concentration of very diluted solution in pure water at “mol/L” has the same value as the amount of substance at “mol”. But in the advanced settings the default amount of solution can be changed by parameter or using solution port to connect with solution. The molar flow at the port can be also negative, which means that the solute leaves the Substance instance.
The recalculation between mole fraction, molarity and molality can be written as follows:
x = n/n(solution) = b * m(solvent)/n(solution) = c * V(solution)/n(solution)
where m(solvent) is mass of solvent, V(solution) is volume of solution, b=n/m(solvent) is molality of the substance, c=n/V(solution) is molarity of the substance.
If the amount of solution is selected to the number of total solution moles per one kilogram of solvent then the values of x will be the same as molality.
If the amount of solution is selected to the number of total solution moles in one liter of solution then the values of x will be the same as molarity.
Definition of electro-chemical potential:
u = u° + R*T*ln(gamma*x) + z*F*v
u° = DfG = DfH - T * DfS
where
x .. mole fraction of the substance in the solution
T .. temperature in Kelvins
v .. relative eletric potential of the solution
z .. elementary charge of the substance (like -1 for electron, +2 for Ca^2+)
R .. gas constant
F .. Faraday constant
gamma .. activity coefficient
u° .. chemical potential of pure substance
DfG .. free Gibbs energy of formation of the substance
DfH .. free enthalpy of formation of the substance
DfS .. free entropy of formation of the substance
Be carefull, DfS is not the same as absolute entropy of the substance S° from III. thermodinamic law! It must be calculated from tabulated value of DfG(298.15 K) and DfH as DfS=(DfH - DfG)/298.15.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| stateOfMatter.SubstanceData | substanceData (from PartialSubstance) | Definition of the substance | |
| Initialization | |||
| Boolean | use_mass_start | true | use mass_start, otherwise amountOfSubstance_start |
| Modelica.Units.SI.Mass | mass_start | 1 | Initial mass of the substance |
| Modelica.Units.SI.AmountOfSubstance | amountOfSubstance_start | 1 | Initial amount of substance base molecules |
| Clustering | |||
| Boolean | calculateClusteringHeat | true | Only for self clustering substances |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| SolutionPort | solution (from PartialSubstanceInSolution) | To connect substance with solution, where is pressented | |
| SubstancePort_a | port_a (from PartialSubstance) | The substance | |
| SubstanceMassPort_a | port_m (from PartialSubstanceInSolutionWithAdditionalPorts) | Substance mass fraction port | |
| SubstanceMolarityPort_a | port_c (from PartialSubstanceInSolutionWithAdditionalPorts) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Concentration | c | Molar concentration of particles | |
| Modelica.Fluid.System | system (from PartialSubstance) | System wide properties | |
| Modelica.Units.SI.MoleFraction | x (from PartialSubstance) | Mole fraction of the substance | |
| Modelica.Units.SI.ActivityOfSolute | a (from PartialSubstance) | Activity of the substance (mole-fraction based) | |
| Modelica.Units.SI.MolarFlowRate | q (from PartialSubstanceInSolutionWithAdditionalPorts) | Molar flow rate of the substance into the component | |
| Modelica.Units.SI.Mass | mass | amountOfBaseMolecules*molarMassOfBaseMolecule | Mass |
Revisions
2009-2015 by Marek Matejak, Charles University, Prague, Czech Republic