How to add transport of N solutes to icoFoam
From OpenFOAMWiki
Revision as of 18:45, 16 September 2012 by Rudolf.hellmuth (Talk | contribs)
Before reading this tutorial, you should first understand how to add temperature to icoFoam. The idea here is the analogous, but in the case of solutions one can have an indefinite number of solutes dissolved in a solvent. The dissolution of different phases is not modelled here, therefore solute concentrations may not increase above solubility saturation (under saturation hypothesis).
1 Container class solute
The solute list containing Fick's Law diffusion coefficients is defined in
case/constant/solutionProperties
Check the example below
sugar { diffusionModel constant; D D [0 2 -1 0 0 0 0] 5.2e-10; } ethanol { diffusionModel constant; D D [0 2 -1 0 0 0 0] 1.6e-9; } N2 { diffusionModel constant; D D [0 2 -1 0 0 0 0] 3.6e-9; }
Let's work a bit with class inheritance to create a container class for each solute
2 Files
Source files and example case: File:TransportIcoFoamN.tar.gz