modelSubstance

Substance accumulation in solution

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

TypeNameDefaultDescription
Types.VolumeNormalVolume (from ConditionalVolume)0.0011 liter
External inputs/outputs
BooleanuseNormalizedVolume (from ConditionalVolume)trueNormalized volume of solution is 1 liter
Equilibrium › Simulation
Types.SimulationTypeSimulation (from SteadyState)Types.SimulationType.NormalInitDynamic with Initialization or Steady State
BooleanisDependent (from SteadyState)false=true, If zero flow is propagated in eqiulibrium through resistors, impedances, reactions, etc.
IO › Initialization
Realstate_start (from SteadyState)State start or init value
IO › Value I/O
StringdirName (from SteadyState)"io"Directory name to save and load values
StringstoreUnit (from SteadyState)""Unit in Utilities input/output function
StringstateName (from SteadyState)getInstanceName()Name in Utilities input/output function
BooleanLOAD_STARTS (from SteadyState)falseLoad start value of state
BooleanSAVE_RESULTS (from SteadyState)falseSave final state values
BooleanSAVE_COMPARISON (from SteadyState)falseCompare final state values with original values
Initialization
Types.AmountOfSubstancesolute_start1e-8Initial solute amount in compartment
Solver › Numerical support of very small concentrations
Types.AmountOfSubstanceNominalSolute0.001Numerical scale. Default is from mmol to mol, but for some substances such as hormones, hydronium or hydroxide ions can be much smaller.
Energies
Types.MolarEnergydH0Standard Enthalpy Change

Connectors

TypeNameDefaultDescription
Types.RealIO.VolumeInputsolutionVolume (from ConditionalVolume)volumeVolume of solution
Types.RealIO.AmountOfSubstanceOutputsoluteCurrent amount of solute
Interfaces.ChemicalPort_bq_outConcentration and molar flow from/to compartment
Types.RealIO.EnergyOutputinternalHeatInternal heat energy = enthalpy*amountOfSubstance

Components

TypeNameDefaultDescription
Types.Volumevolume (from ConditionalVolume)Solution volume
Realstate (from SteadyState)This state must be connected in inherited class definition
Realchange (from SteadyState)Dynamic change of state value per minute

Revisions

2009-2015 by Marek Matejak, Charles University, Prague, Czech Republic