modelSubstance
Extends from Icons.Substance, Interfaces.ConditionalVolume (Chemical processes can be modeled with or without(normalized to 1 liter) variable solution volume), SteadyStates.Interfaces.SteadyState (Abstract class for any dynamic state calculation (for any derivation), which is driven by SimulationType option.).
Information
Solute = Concentration · Volume = ∫ MolarFlow
The main class from “Chemical” package is called "Substance". It has one chemical connector, where molar concentration and molar flow is presented as usually. An amount of a substance ("solute") is accumulated by molar flow inside an instance of this class. In the default setting the volume is set to one liter, so in this setting the concentration at “mol/L” has the same value as the variable solute at “mol”. But in the advanced settings the default volume can be changed with external input. The molar flow at the port can be also negative, which means that the solute leaves the Substance instance.
Having defined amount of all particles in solution as n(solution) and mass of solvent as m(solvent). It can be expressed mole fraction x and molality b as follows:
x = Solute / n(solution) = Concentration · Volume /n(solution)
b = Solute / m(solvent) = Concentration · Volume /m(solvent)
The activity (mole fraction based) can be expressed using mole-fraction-based activity coefficient gamma as:
a = gamma * x
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Types.Volume | NormalVolume (from ConditionalVolume) | 0.001 | 1 liter |
| External inputs/outputs | |||
| Boolean | useNormalizedVolume (from ConditionalVolume) | true | Normalized volume of solution is 1 liter |
| Equilibrium › Simulation | |||
| Types.SimulationType | Simulation (from SteadyState) | Types.SimulationType.NormalInit | Dynamic with Initialization or Steady State |
| Boolean | isDependent (from SteadyState) | false | =true, If zero flow is propagated in eqiulibrium through resistors, impedances, reactions, etc. |
| IO › Initialization | |||
| Real | state_start (from SteadyState) | State start or init value | |
| IO › Value I/O | |||
| String | dirName (from SteadyState) | "io" | Directory name to save and load values |
| String | storeUnit (from SteadyState) | "" | Unit in Utilities input/output function |
| String | stateName (from SteadyState) | getInstanceName() | Name in Utilities input/output function |
| Boolean | LOAD_STARTS (from SteadyState) | false | Load start value of state |
| Boolean | SAVE_RESULTS (from SteadyState) | false | Save final state values |
| Boolean | SAVE_COMPARISON (from SteadyState) | false | Compare final state values with original values |
| Initialization | |||
| Types.AmountOfSubstance | solute_start | 1e-8 | Initial solute amount in compartment |
| Solver › Numerical support of very small concentrations | |||
| Types.AmountOfSubstance | NominalSolute | 0.001 | Numerical scale. Default is from mmol to mol, but for some substances such as hormones, hydronium or hydroxide ions can be much smaller. |
| Energies | |||
| Types.MolarEnergy | dH | 0 | Standard Enthalpy Change |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Types.RealIO.VolumeInput | solutionVolume (from ConditionalVolume) | volume | Volume of solution |
| Types.RealIO.AmountOfSubstanceOutput | solute | Current amount of solute | |
| Interfaces.ChemicalPort_b | q_out | Concentration and molar flow from/to compartment | |
| Types.RealIO.EnergyOutput | internalHeat | Internal heat energy = enthalpy*amountOfSubstance |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Types.Volume | volume (from ConditionalVolume) | Solution volume | |
| Real | state (from SteadyState) | This state must be connected in inherited class definition | |
| Real | change (from SteadyState) | Dynamic change of state value per minute |
Revisions
2009-2015 by Marek Matejak, Charles University, Prague, Czech Republic