<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.wiki.mohid.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Carina</id>
		<title>MohidWiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://www.wiki.mohid.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Carina"/>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Special:Contributions/Carina"/>
		<updated>2026-04-04T17:02:42Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.28.0</generator>

	<entry>
		<id>http://www.wiki.mohid.com/index.php?title=Module_PorousMedia&amp;diff=5641</id>
		<title>Module PorousMedia</title>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Module_PorousMedia&amp;diff=5641"/>
				<updated>2012-01-17T18:32:31Z</updated>
		
		<summary type="html">&lt;p&gt;Carina: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
Module Porous Media is responsible for handling all water fluxes in soil. In particular the infiltration flow is obtained from the potential water column available for this process. The potential water column is given by the [[Module Basin]] (the module that handles interface between modules) as reported below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PIC=TF+IWC&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
| ''PIC'' || is the Potential Infiltration column (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''TF'' || Throughfall is the percentage of the rain that reaches the soil  (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''IWC'' || is the Initial Water column  (m) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The infiltration flux is calculated by the Buckingham-Darcy equation using head gradient between surface runoff and first soil layer (Jury et al,1991).&lt;br /&gt;
&lt;br /&gt;
==Main Processes==&lt;br /&gt;
&lt;br /&gt;
===Porous Media Geometry===&lt;br /&gt;
Porous Media is a 3D domain delimited in its upper limit by topography and lower limit by soil bottom (defined by user).&lt;br /&gt;
In terms of soil definition it can be defined vertical horizons to link correspond to real soil horizons with different hydraulic carachteristics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;htm&amp;gt;&amp;lt;a href=&amp;quot;http://content.screencast.com/users/jovem/folders/Jing/media/b9ef6c79-c1d1-46ea-94f7-623471c15883/MohidLandSoilProfile.png&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://content.screencast.com/users/jovem/folders/Jing/media/b9ef6c79-c1d1-46ea-94f7-623471c15883/MohidLandSoilProfile.png&amp;quot; width=&amp;quot;650&amp;quot; height=&amp;quot;436&amp;quot;  border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/htm&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Water Flow===&lt;br /&gt;
Soil contains a large distribution of pore sizes and channels through which water may flow. In general the water flow determination is based on the mass conservation and momentum equation. In the case of soil it is assumed that the forces of inertia are almost zero; therefore the balance is reduced to the forces of pressure, gravity and viscous. The equation that describes the flow through soil is the Buckingham Darcy equation (Jury et al,1991). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v=-K\left ( \theta  \right )\left ( \frac{\partial H}{\partial z}  \right )=-K\left ( \theta  \right )\left ( \frac{\partial h}{\partial z} + 1 \right )\,\,\,\,(1.1)\\ &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|''v'' || is the water velocity at the cell interface (m/s)&lt;br /&gt;
|-&lt;br /&gt;
| ''H'' ||  is the hydraulic head (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''θ'' || is the water content (m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''K''|| is the hydraulic conductivity (m/s)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The hydraulic head is given by the formula:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H=h+p+z\,\,\,\,(1.2)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|-&lt;br /&gt;
| ''h'' ||  is the hydraulic head (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''p'' || is hydrostatic pressure (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''z''|| is the topography  (m)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When in saturated conditions, hydraulic head is zero and hydrostatic pressure may occur (if water is at rest or decelerating). In unsaturated conditions hydrostatic pressure is zero and hydarulic head exists.&lt;br /&gt;
&lt;br /&gt;
The soil is a very complex system, made up of a heterogeneous mixture of solid, liquid, and gaseous material. The liquid phase consists of soil water, which fills part or all of the open spaces between the soil particles. Therefore it is possible to divided the soil in two layers:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Saturated soil  &amp;lt;math&amp;gt;\Longrightarrow&amp;lt;/math&amp;gt;   The soil pores are filled by water&lt;br /&gt;
&lt;br /&gt;
*Unsaturated one &amp;lt;math&amp;gt;\Longrightarrow&amp;lt;/math&amp;gt;   The soil pores are filled by water and air&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the first case the equation of Buckingham Darcy is simplified to the Darcy law and the parameter associated for its resolution are connected with the saturated layer. On the other hand for the resolution of the equation (1.1) a description of the characteristics of the the unsaturated layer is needed.&lt;br /&gt;
&lt;br /&gt;
==Vadose Zone==&lt;br /&gt;
&lt;br /&gt;
Many vadose flow and transport studies require description of unsaturated soil hydraulic proprieties over a wide range of pressure head. The hydraulic proprieties are described using the porous size distribution model of Maulem (1976) for hydraulic conductivity in combination with a water retention function introduced by Van Genuchten (1980). &lt;br /&gt;
&lt;br /&gt;
===Water content===&lt;br /&gt;
&lt;br /&gt;
Water content is the quantity of water contained in the soil (called '''soil moisture'''). It is given as a volumetric basis and it is defined mathematically as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta = \frac{V_w}{V_T}\hspace{5cm}(1.3) &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V_T = V_s + V_v = V_s + V_w + V_a\hspace{1.6cm}(1.4)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;'' || is water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;V_w&amp;lt;/math&amp;gt; '' || is the volume of water (m s&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;V_T&amp;lt;/math&amp;gt;'' || is the total volume (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;V_s&amp;lt;/math&amp;gt;'' || is the soil volume (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;V_a&amp;lt;/math&amp;gt;'' || is the air space (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Initial Condition====&lt;br /&gt;
The user may define a water content initialization or choose the model to compute in the unsaturated area heads so that soil water is at [[Field Capacity]].&lt;br /&gt;
The below explains the latter.&lt;br /&gt;
&lt;br /&gt;
Once determined the aquifer level ('''water table''') the water content is associated at each cells by the following criteria:&lt;br /&gt;
:{|&lt;br /&gt;
*If the cell is located above the water table &amp;lt;math&amp;gt;\theta=\theta_{s}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
*If the cell is located over the water table &amp;lt;math&amp;gt;\theta=\theta_{ns}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta=\theta_{s}&amp;lt;/math&amp;gt;'' || is the water content in the saturated soil  (m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta=\theta_{ns}&amp;lt;/math&amp;gt;'' || is the water content in the non saturated soil   (m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to calculate field capacity by the equation (1.7) the evaluation of the suction head is needed :&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
:&amp;lt;math&amp;gt; h=-DWZ\cdot 0.5\hspace{2cm}for\,\, the\,\, cells\,\, immediately\,\, above\,\, the\,\, water\,\, table \hspace{5cm} (1.5)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;h=-(-DZZ-h)\hspace{1.5cm}for\,\, the\,\, other\,\, cells\hspace{9.75cm} (1.6) &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Figure05.jpg|thumb|center|300px|Figure 1: Suction Head Calculation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As shown in the picture the suction head is calculated in order to maintain the same total head (H = z + p + h) in the cells in agreement with the field capacity definition.&lt;br /&gt;
&lt;br /&gt;
===Water retention===&lt;br /&gt;
The model use for characterizing the shape of water retention curves is the van Genuchten model:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta(h) = \theta_r + \frac{\theta_s - \theta_r}{\left[ 1+(\alpha |h|)^n \right]^{1-1/n}}\hspace{0.5cm}\Longrightarrow\hspace{0.5cm}h(\theta)=\left |\frac{(S_{E}^{-1/n}-1)^{1/n}}{\alpha}  \right |\hspace{3cm}(1.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;S_{E}=\frac{\theta-\theta_{r}}{\theta_{s}-\theta_{r}}\hspace{11cm}(1.8)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|''&amp;lt;math&amp;gt;\theta(h)&amp;lt;/math&amp;gt;'' || is the the water retention curve (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta_s&amp;lt;/math&amp;gt;'' || is the saturated water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta_r&amp;lt;/math&amp;gt;'' || is the residual water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''h''|| is the suction head (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt;'' || is related to the inverse of the air entry (m &amp;lt;sub&amp;gt;-1&amp;lt;/sub&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''n''|| is a measure of the pore-size distribution n&amp;gt;1 (dimensionless)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;S_{E}&amp;lt;/math&amp;gt;''|| is the effective saturation (dimensionless)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Saturated and Unsaturated Conductivity===&lt;br /&gt;
&lt;br /&gt;
The saturated conductivity is given depending on the type of soil; instead the unsaturated conductivity is obtained from the suction head by the Maulem model:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;K(\theta)=K_{s}\cdot Se^{L}\cdot (1-(1-Se^{1/m})^{m})^{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|''&amp;lt;math&amp;gt;K(\theta)&amp;lt;/math&amp;gt;'' || is the unsaturated conductivity (m/s)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;K_{s}&amp;lt;/math&amp;gt;'' || is the saturated conductivity(m/s)&lt;br /&gt;
|-&lt;br /&gt;
| ''L'' || empirical pore-connectivity (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''m''|| m=1-1/n(dimensionless)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Evapotranspiration==&lt;br /&gt;
&lt;br /&gt;
Some water may be extracted from the soil because of the evaporation and transpiration processes, which become a sink in soil water profile. These two processes are currently named Evapotranspiration. &lt;br /&gt;
&lt;br /&gt;
Potential Evapotranspiration may be modeled using the Penmann Monteith equation. &lt;br /&gt;
Also, if vegetation exists, a differentiation between Potential Transpiration and Potential Evaporation is done using LAI.&lt;br /&gt;
These computation are made in [[Module Basin]] since this is the module that handles water fluxes in the interface betwen modules.&lt;br /&gt;
&lt;br /&gt;
However, not all of the potential water that can be evaporated or transpired will be in fact removed from the soil. The water that will really leave the soil through these processes is calculated: i) if vegetation exists, effective transpiration is computed in module Vegetation; ii) effective evaporation is computed in the Porous Media module.&lt;br /&gt;
In Figure below it can be seen that the actual transpiration and evaporation are then used in Porous Media module to compute the new water content. &lt;br /&gt;
The actual evaporation, which happens only at the soil surface, is calculated based on: i) a pressure head limit or ii) a soil conductivity limit, chosen by the user. It allows the model not to evaporate any surface water, even if it is available, when the soil head gets below the assigned value (i) or limits evaporation velocity to layer unsaturated conductivity (ii).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:evapotranspiration fluxogram.jpg|thumb|center|400px|Evapotranspiration fluxogram in Mohid Land model]]&lt;br /&gt;
Remind that Feddes is one option for computing effective transpiration in plants in [[module Vegetation]].&lt;br /&gt;
&lt;br /&gt;
==Iteration Process==&lt;br /&gt;
&lt;br /&gt;
Once obtained the water fluxes a balance on the water volume of each cell is apply in order to obtain the new water content &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. The balance applied is the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Horizontal Direction X'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}+(FluxU_{(i,j,k)}\cdot ComputeFace_{(i,j,k)}-Flux_{(i,j+1,k)}\cdot  ComputeFace_{(i,j+1,k)}\cdot \Delta t) V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Horizontal Direction Y'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}+(FluxV_{(i,j,k)}\cdot  ComputeFace_{(i,j,k)}-FluxV_{(i+1,j,k)}\cdot  ComputeFace_{(i+1,j,k)})\cdot \Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Vertical Direction W'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}+(FluxW_{(i,j,k)}\cdot  ComputeFace_{(i,j,k})-FluxW_{(i,j,k+1)}\cdot  ComputeFace_{(i,j,k+1}))\cdot \Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Transpiration Flux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}-(TranspFlux_{(i,j,k)}\Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Evaporation Flux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}-(EvapFlux_{(i,j,k)}\Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Infiltration Flux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}-(UnsatK\cdot Area_{cell}\cdot(1-Imp) \Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
&lt;br /&gt;
|''&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;'' || is the water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;V_{cell}&amp;lt;/math&amp;gt;'' || is the cell volume (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;Area_{cell}&amp;lt;/math&amp;gt;'' || is the cell area (m &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''ComputeFace'' || is the computed face (dimensionless)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;\Delta t&amp;lt;/math&amp;gt;'' || is the time step (s)&lt;br /&gt;
|-&lt;br /&gt;
|''FluxX'' || is the flux in X direction (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''FluxV'' || is the flux in Y direction (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''FluxW'' || is the flux in W direction (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''TranspFlux'' || is the transpiration flux (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''EvapFlux'' || is the evaporation flux (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''UnsatK'' || is unsaturated conductivity (m /s)&lt;br /&gt;
|-&lt;br /&gt;
|''Imp'' || is the percentage of impermeable soil of the cell (dimensionless)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The value of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; so obtained is compared with one used in the volumes calculation and the iterative process stop when: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;(\theta^{'})-(\theta^{new})&amp;lt;\,\, Tolerance\hspace{3cm} (1.9) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
|''&amp;lt;math&amp;gt;\theta^{'}&amp;lt;/math&amp;gt;'' || is the water content of the previous iteration (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If the equation (1.9) is not satisfy the temporal step is divided in half and the new value of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is used for solving the equation (1.7) for restarting the calculation process. The iteration process is stoped when the tolerance desired is reached.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Figure06.jpg|thumb|center|300px|Figure 2: Time step reduction]]&lt;br /&gt;
&lt;br /&gt;
==Other Features==&lt;br /&gt;
===How to Generate Info needed in Porous Media===&lt;br /&gt;
====SoilMap====&lt;br /&gt;
Model needs to know soil ID in each cell and layer to pick hydraulic properties from that type of soil. In Pedology soil includes more than one horizon, each with different soil properties. Here Soil is used has a unit of soil hidraulic properties, i.e., to define a soil with three horizons one has to create three SoilID (see below). This also means that if a watershed has at least one soil with three horizons one has to create three soil maps. Each soil map will be infact the map of each horizon of the soils. The grid cells with only one horizon will have the same SoilID in all maps, the grid cells with three horizons will have a different SoilID in each map.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* Constant value&lt;br /&gt;
* Soil Grid. One possible option is to associate with soil shape file. In this case can use MOHID GIS going to menu [Tools]-&amp;gt;[Shape to Grid Data] and provide: i) the grid (model grid), ii) the soil shape file and iii) the corespondence between soil codes and soil ID defined in data file. &lt;br /&gt;
&lt;br /&gt;
Soil ID must be defined in [[Module_FillMatrix|Module FillMatrix]] standards for each soil horizon defined (grid example):&lt;br /&gt;
 &amp;lt;beginhorizon&amp;gt;&lt;br /&gt;
 KLB                       : 1&lt;br /&gt;
 KUB                       : 10&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : SoilID&lt;br /&gt;
 DEFAULTVALUE              : 1&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\..\GeneralData\PorousMedia\SoilID200m.dat&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 ..&lt;br /&gt;
 &amp;lt;endhorizon&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Remarks'''&lt;br /&gt;
&lt;br /&gt;
All the soil ID's appearing in the soil grid(s) must be defined in the PorousMedia data file in terms of hydraulic properties:&lt;br /&gt;
 &amp;lt;beginsoiltype&amp;gt;&lt;br /&gt;
 ID                        : 1&lt;br /&gt;
 THETA_S                   : 0.3859&lt;br /&gt;
 THETA_R                   : 0.0476&lt;br /&gt;
 N_FIT                     : 1.39&lt;br /&gt;
 SAT_K                     : 3.5556e-6&lt;br /&gt;
 ALPHA                     : 2.75&lt;br /&gt;
 L_FIT                     : 0.50&lt;br /&gt;
 &amp;lt;endsoiltype&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginsoiltype&amp;gt;&lt;br /&gt;
 ID                        : 2&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;endsoiltype&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
====Soil Bottom====&lt;br /&gt;
The soil depth must be known by the model. This is computed by the model from terrain altitude (topography) and soil bottom altitude. As so, a soil bottom grid is needed.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* Grid File. &lt;br /&gt;
Soil depth (and soil bottom altitude, the effective grid needed) can be defined with a constant depth or estimated from slope [[HOW TO SoilBottom LINK]]. When the soil depth is estimated as a function of slope, soil depth will be smaller in ares with higher slope. In this areas only the surface layers of the soil will be considered (see [[Module_PorousMedia#Porous_Media_Geometry|Porous Media Geometry]]).&lt;br /&gt;
&lt;br /&gt;
Define the grid just generated, in the porous media data file with: &lt;br /&gt;
 BOTTOM_FILE  : ..\..\GeneralData\PorousMedia\BottomLevel.dat&lt;br /&gt;
&lt;br /&gt;
====Water Level====&lt;br /&gt;
Options:&lt;br /&gt;
*Grid File.&lt;br /&gt;
The water table altitude represents the initial altitude of the water table. &lt;br /&gt;
It is recommended to do a spin-up run to estabilize water level and then do a continuous simulation starting with the final water table achieved.&lt;br /&gt;
Use the following blocks with [[Module_FillMatrix|Module FillMatrix]] standards:&lt;br /&gt;
 &amp;lt;beginwaterlevel&amp;gt;&lt;br /&gt;
 NAME                      : waterlevel&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 0&lt;br /&gt;
 REMAIN_CONSTANT           : 0&lt;br /&gt;
 FILENAME                  : ..\..\GeneralData\PorousMedia\WaterLevel0.50.dat&lt;br /&gt;
 &amp;lt;endwaterlevel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Impermeability====&lt;br /&gt;
Impermeability values (0 - completely permeable, 1 - impermeable) must be provided. &lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* Constant Value.&lt;br /&gt;
* Grid File. One possible option is to associate with land use shape file. In this case can use MOHID GIS going to menu [Tools]-&amp;gt;[Shape to Grid Data] and provide: i) the grid (model grid), ii) the land use shape file and iii) the corespondence between land use codes and Impermeability values.&lt;br /&gt;
Use the following blocks with [[Module_FillMatrix|Module FillMatrix]] standards:&lt;br /&gt;
 &amp;lt;beginimpermeablefraction&amp;gt;&lt;br /&gt;
 NAME                      : impermeablefraction&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 0&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\..\GeneralData\PorousMedia\AreaImpermeavel.dat&lt;br /&gt;
 &amp;lt;endimpermeablefraction&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
===Timeseries===&lt;br /&gt;
&lt;br /&gt;
Theta - is water content of selected cell (vol water/ vol soil)&lt;br /&gt;
&lt;br /&gt;
relative_water_content - content in selected cell. between zero and one (zero is residual water content and one is saturated water content)&lt;br /&gt;
&lt;br /&gt;
VelW_[m/s] - vertical velocity in the bottom face of the selected cell&lt;br /&gt;
&lt;br /&gt;
VelW_Corr_[m/s] - vertical velocity in the bottom face of the selected cell that may be corrected if oversaturation occurs. if no correction occurs is the same as previous.&lt;br /&gt;
&lt;br /&gt;
InF_Vel_[m/s] - infiltration velocity (in the soil surface)&lt;br /&gt;
&lt;br /&gt;
Head_[m] - Suction in selected cell &lt;br /&gt;
&lt;br /&gt;
Conductivity_[m/s] - Conductivity in selected cell&lt;br /&gt;
&lt;br /&gt;
level_water_table_[m] - water table altitude &lt;br /&gt;
&lt;br /&gt;
water_table_depth_[m] - water table depth (from soil surface)&lt;br /&gt;
&lt;br /&gt;
Hydro_Pressure_[m] - hydrostatic pressure in selected cell&lt;br /&gt;
&lt;br /&gt;
Final_Head_[m] - Soil water charge in selected cell&lt;br /&gt;
&lt;br /&gt;
[Check Mohid Land Heights and Levels to understand some of the outputs]&lt;br /&gt;
&lt;br /&gt;
GW_flow_to_river_total_[m3/s] - Ground water flow to river if it is a river point&lt;br /&gt;
&lt;br /&gt;
Surface_Evaporation_Flux_[m3/s] - evaporation flux (in the soil surface)&lt;br /&gt;
&lt;br /&gt;
Transpiration_Flux_[m3/s] - transpiration flux in selected cell&lt;br /&gt;
&lt;br /&gt;
[http://screencast.com/t/I8We0B4j2uJ Check Mohid Land Heights and Levels to understand the difference between level and height results]&lt;br /&gt;
&lt;br /&gt;
==References ==&lt;br /&gt;
*Jury,W.A.,Gardner,W.R.,Gardner,W.H., 1991,Soil Physics&lt;br /&gt;
*Van Genuchten, M.T., A closed form equation for predicting the hydraulic conductivity of unsaturated soils&lt;br /&gt;
*Wu,J.,Zhang, R., Gui,S.,1999, Modelling soil water movement with water uptake by roots, Plant and soil 215: 7-17&lt;br /&gt;
*Marcel G.Schaap and Martinus Th. van Genuchten, A modified Maulem van Genuchten Formulation for Improved Description of Hydraulic Conductivity Near Saturation, 16 December 2005&lt;br /&gt;
&lt;br /&gt;
==Data File ==&lt;br /&gt;
&lt;br /&gt;
===Keywords===&lt;br /&gt;
 Keywords read in the Data File&lt;br /&gt;
 &lt;br /&gt;
 Keyword                   : Data Type         Default     !Comment&lt;br /&gt;
 &lt;br /&gt;
 BOTTOM_FILE               : char              -           !Path to Bottom Topography File&lt;br /&gt;
 START_WITH_FIELD          : logical           1           !Sets Theta initial Field Capacity&lt;br /&gt;
 CONTINUOUS                : logical           0           !Continues from previous run&lt;br /&gt;
 STOP_ON_WRONG_DATE        : logical           1           !Stops if previous run end is different from actual&lt;br /&gt;
                                                           !Start&lt;br /&gt;
 OUTPUT_TIME               : sec. sec. sec.    -           !Output Time&lt;br /&gt;
 TIME_SERIE_LOCATION       : char              -           !Path to File which defines Time Series&lt;br /&gt;
 CONTINUOUS_OUTPUT_FILE    : logical           1           !Writes &amp;quot;famous&amp;quot; iter.log&lt;br /&gt;
 CONDUTIVITYFACE           : integer           1           !Way to interpolate conducivity face&lt;br /&gt;
                                                           !1 - Average, 2 - Maximum, 3 - Minimum, 4 - Weigthed&lt;br /&gt;
 HORIZONTAL_K_FACTOR       : real              1.0         !Factor for Horizontal Conductivity = Kh / Kv&lt;br /&gt;
 CUT_OFF_THETA_LOW         : real              1e-6        !Disables calculation when Theta is near ThetaR&lt;br /&gt;
 CUT_OFF_THETA_HIGH        : real              1e-15       !Set Theta = ThetaS when Theta &amp;gt; ThetaS - CUT_OFF_THETA_HIGH&lt;br /&gt;
 MIN_ITER                  : integer           2           !Number of iterations below which the DT is increased&lt;br /&gt;
 MAX_ITER                  : integer           3           !Number of iterations above which the DT is decreased&lt;br /&gt;
 LIMIT_ITER                : integer           50          !Number of iterations of a time step (for restart)&lt;br /&gt;
 THETA_TOLERANCE           : real              0.001       !Converge Parameter&lt;br /&gt;
 INCREASE_DT               : real              1.25        !Increase of DT when iter &amp;lt; MIN_ITER&lt;br /&gt;
 DECREASE_DT               : real              0.70        !Decrease of DT when iter &amp;gt; MAX_ITER&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : Theta / waterlevel &lt;br /&gt;
 &lt;br /&gt;
 see Module FillMatrix for more options&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Sample===&lt;br /&gt;
&lt;br /&gt;
Some keywords of the PorousMedia input file:&lt;br /&gt;
 BOTTOM_FILE               : ..\General Data\Other\PorousMedia\SoilBottom_2cells.dat&lt;br /&gt;
 TIME_SERIE_LOCATION       : ..\General Data\TimeSeries\TimeSeriesLocation3D_2m.dat&lt;br /&gt;
 &lt;br /&gt;
 COMPUTE_SOIL_FIELD        : 1 &lt;br /&gt;
 &lt;br /&gt;
 OUTPUT_TIME               : 0 86400&lt;br /&gt;
 CUT_OFF_THETA_HIGH        : 1e-15&lt;br /&gt;
 START_WITH_FIELD          : 1&lt;br /&gt;
 &lt;br /&gt;
 LIMIT_EVAP_WATER_VEL      : 0&lt;br /&gt;
 LIMIT_EVAP_HEAD           : 0&lt;br /&gt;
 HEAD_LIMIT                : -100&lt;br /&gt;
 THETA_HYDRO_COEF          : 0.98&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginsoiltype&amp;gt;&lt;br /&gt;
 ID                        : 1&lt;br /&gt;
 THETA_S                   : 0.43&lt;br /&gt;
 THETA_R                   : 0.078&lt;br /&gt;
 SAT_K                     : 2.888e-6&lt;br /&gt;
 N_FIT                     : 1.56&lt;br /&gt;
 ALPHA                     : 3.6&lt;br /&gt;
 L_FIT                     : 0.50&lt;br /&gt;
 &amp;lt;endsoiltype&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 !----- Hydraulic Soil Properties&lt;br /&gt;
 &amp;lt;beginhorizon&amp;gt;&lt;br /&gt;
 KLB                       : 1&lt;br /&gt;
 KUB                       : 10&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : SoilID&lt;br /&gt;
 INITIALIZATION_METHOD     : CONSTANT&lt;br /&gt;
 DEFAULTVALUE              : 1&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : Theta&lt;br /&gt;
 INITIALIZATION_METHOD     : CONSTANT&lt;br /&gt;
 DEFAULTVALUE              : 0.30&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 &amp;lt;endhorizon&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginwaterlevel&amp;gt;&lt;br /&gt;
 NAME                      : waterlevel&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 1.&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\General Data\Initial Conditions\InitialWaterLevel_2cells.dat&lt;br /&gt;
 &amp;lt;endwaterlevel&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginimpermeablefraction&amp;gt;&lt;br /&gt;
 NAME                      : impermeablefraction&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 0&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\General Data\Other\PorousMedia\InitialImpermeabilization_2cells.dat&lt;br /&gt;
 &amp;lt;endimpermeablefraction&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[Category:MOHID Land]]&lt;/div&gt;</summary>
		<author><name>Carina</name></author>	</entry>

	<entry>
		<id>http://www.wiki.mohid.com/index.php?title=Module_PorousMedia&amp;diff=5640</id>
		<title>Module PorousMedia</title>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Module_PorousMedia&amp;diff=5640"/>
				<updated>2012-01-17T18:29:15Z</updated>
		
		<summary type="html">&lt;p&gt;Carina: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
Module Porous Media is responsible for handling all water fluxes in soil. In particular the infiltration flow is obtained from the potential water column available for this process. The potential water column is given by the [[Module Basin]] (the module that handles interface between modules) as reported below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PIC=TF+IWC&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
| ''PIC'' || is the Potential Infiltration column (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''TF'' || Throughfall is the percentage of the rain that reaches the soil  (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''IWC'' || is the Initial Water column  (m) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The infiltration flux is calculated by the Buckingham-Darcy equation using head gradient between surface runoff and first soil layer (Jury et al,1991).&lt;br /&gt;
&lt;br /&gt;
==Main Processes==&lt;br /&gt;
&lt;br /&gt;
===Porous Media Geometry===&lt;br /&gt;
Porous Media is a 3D domain delimited in its upper limit by topography and lower limit by soil bottom (defined by user).&lt;br /&gt;
In terms of soil definition it can be defined vertical horizons to link correspond to real soil horizons with different hydraulic carachteristics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;htm&amp;gt;&amp;lt;a href=&amp;quot;http://content.screencast.com/users/jovem/folders/Jing/media/b9ef6c79-c1d1-46ea-94f7-623471c15883/MohidLandSoilProfile.png&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://content.screencast.com/users/jovem/folders/Jing/media/b9ef6c79-c1d1-46ea-94f7-623471c15883/MohidLandSoilProfile.png&amp;quot; width=&amp;quot;650&amp;quot; height=&amp;quot;436&amp;quot;  border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/htm&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Water Flow===&lt;br /&gt;
Soil contains a large distribution of pore sizes and channels through which water may flow. In general the water flow determination is based on the mass conservation and momentum equation. In the case of soil it is assumed that the forces of inertia are almost zero; therefore the balance is reduced to the forces of pressure, gravity and viscous. The equation that describes the flow through soil is the Buckingham Darcy equation (Jury et al,1991). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v=-K\left ( \theta  \right )\left ( \frac{\partial H}{\partial z}  \right )=-K\left ( \theta  \right )\left ( \frac{\partial h}{\partial z} + 1 \right )\,\,\,\,(1.1)\\ &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|''v'' || is the water velocity at the cell interface (m/s)&lt;br /&gt;
|-&lt;br /&gt;
| ''H'' ||  is the hydraulic head (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''θ'' || is the water content (m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''K''|| is the hydraulic conductivity (m/s)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The hydraulic head is given by the formula:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H=h+p+z\,\,\,\,(1.2)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|-&lt;br /&gt;
| ''h'' ||  is the hydraulic head (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''p'' || is hydrostatic pressure (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''z''|| is the topography  (m)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When in saturated conditions, hydraulic head is zero and hydrostatic pressure may occur (if water is at rest or decelerating). In unsaturated conditions hydrostatic pressure is zero and hydarulic head exists.&lt;br /&gt;
&lt;br /&gt;
The soil is a very complex system, made up of a heterogeneous mixture of solid, liquid, and gaseous material. The liquid phase consists of soil water, which fills part or all of the open spaces between the soil particles. Therefore it is possible to divided the soil in two layers:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Saturated soil  &amp;lt;math&amp;gt;\Longrightarrow&amp;lt;/math&amp;gt;   The soil pores are filled by water&lt;br /&gt;
&lt;br /&gt;
*Unsaturated one &amp;lt;math&amp;gt;\Longrightarrow&amp;lt;/math&amp;gt;   The soil pores are filled by water and air&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the first case the equation of Buckingham Darcy is simplified to the Darcy law and the parameter associated for its resolution are connected with the saturated layer. On the other hand for the resolution of the equation (1.1) a description of the characteristics of the the unsaturated layer is needed.&lt;br /&gt;
&lt;br /&gt;
==Vadose Zone==&lt;br /&gt;
&lt;br /&gt;
Many vadose flow and transport studies require description of unsaturated soil hydraulic proprieties over a wide range of pressure head. The hydraulic proprieties are described using the porous size distribution model of Maulem (1976) for hydraulic conductivity in combination with a water retention function introduced by Van Genuchten (1980). &lt;br /&gt;
&lt;br /&gt;
===Water content===&lt;br /&gt;
&lt;br /&gt;
Water content is the quantity of water contained in the soil (called '''soil moisture'''). It is given as a volumetric basis and it is defined mathematically as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta = \frac{V_w}{V_T}\hspace{5cm}(1.3) &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V_T = V_s + V_v = V_s + V_w + V_a\hspace{1.6cm}(1.4)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;'' || is water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;V_w&amp;lt;/math&amp;gt; '' || is the volume of water (m s&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;V_T&amp;lt;/math&amp;gt;'' || is the total volume (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;V_s&amp;lt;/math&amp;gt;'' || is the soil volume (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;V_a&amp;lt;/math&amp;gt;'' || is the air space (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Initial Condition====&lt;br /&gt;
The user may define a water content initialization or choose the model to compute in the unsaturated area heads so that soil water is at [[Field Capacity]].&lt;br /&gt;
The below explains the latter.&lt;br /&gt;
&lt;br /&gt;
Once determined the aquifer level ('''water table''') the water content is associated at each cells by the following criteria:&lt;br /&gt;
:{|&lt;br /&gt;
*If the cell is located above the water table &amp;lt;math&amp;gt;\theta=\theta_{s}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
*If the cell is located over the water table &amp;lt;math&amp;gt;\theta=\theta_{ns}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta=\theta_{s}&amp;lt;/math&amp;gt;'' || is the water content in the saturated soil  (m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta=\theta_{ns}&amp;lt;/math&amp;gt;'' || is the water content in the non saturated soil   (m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to calculate field capacity by the equation (1.7) the evaluation of the suction head is needed :&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
:&amp;lt;math&amp;gt; h=-DWZ\cdot 0.5\hspace{2cm}for\,\, the\,\, cells\,\, immediately\,\, above\,\, the\,\, water\,\, table \hspace{5cm} (1.5)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;h=-(-DZZ-h)\hspace{1.5cm}for\,\, the\,\, other\,\, cells\hspace{9.75cm} (1.6) &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Figure05.jpg|thumb|center|300px|Figure 1: Suction Head Calculation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As shown in the picture the suction head is calculated in order to maintain the same total head (H = z + p + h) in the cells in agreement with the field capacity definition.&lt;br /&gt;
&lt;br /&gt;
===Water retention===&lt;br /&gt;
The model use for characterizing the shape of water retention curves is the van Genuchten model:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta(h) = \theta_r + \frac{\theta_s - \theta_r}{\left[ 1+(\alpha |h|)^n \right]^{1-1/n}}\hspace{0.5cm}\Longrightarrow\hspace{0.5cm}h(\theta)=\left |\frac{(S_{E}^{-1/n}-1)^{1/n}}{\alpha}  \right |\hspace{3cm}(1.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;S_{E}=\frac{\theta-\theta_{r}}{\theta_{s}-\theta_{r}}\hspace{11cm}(1.8)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|''&amp;lt;math&amp;gt;\theta(h)&amp;lt;/math&amp;gt;'' || is the the water retention curve (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta_s&amp;lt;/math&amp;gt;'' || is the saturated water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta_r&amp;lt;/math&amp;gt;'' || is the residual water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''h''|| is the suction head (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt;'' || is related to the inverse of the air entry (m &amp;lt;sub&amp;gt;-1&amp;lt;/sub&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''n''|| is a measure of the pore-size distribution n&amp;gt;1 (dimensionless)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;S_{E}&amp;lt;/math&amp;gt;''|| is the effective saturation (dimensionless)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Saturated and Unsaturated Conductivity===&lt;br /&gt;
&lt;br /&gt;
The saturated conductivity is given depending on the type of soil; instead the unsaturated conductivity is obtained from the suction head by the Maulem model:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;K(\theta)=K_{s}\cdot Se^{L}\cdot (1-(1-Se^{1/m})^{m})^{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|''&amp;lt;math&amp;gt;K(\theta)&amp;lt;/math&amp;gt;'' || is the unsaturated conductivity (m/s)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;K_{s}&amp;lt;/math&amp;gt;'' || is the saturated conductivity(m/s)&lt;br /&gt;
|-&lt;br /&gt;
| ''L'' || empirical pore-connectivity (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''m''|| m=1-1/n(dimensionless)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Evapotranspiration==&lt;br /&gt;
&lt;br /&gt;
Some water may be extracted from the soil because of the evaporation and transpiration processes, which become a sink in soil water profile. These two processes are currently named Evapotranspiration. &lt;br /&gt;
&lt;br /&gt;
Potential Evapotranspiration may be modeled using the Penmann Monteith equation. &lt;br /&gt;
Also, if vegetation exists, a differentiation between Potential Transpiration and Potential Evaporation is done using LAI.&lt;br /&gt;
These computation are made in [[Module Basin]] since this is the module that handles water fluxes in the interface betwen modules.&lt;br /&gt;
&lt;br /&gt;
However, not all of the potential water that can be evaporated or transpired will be in fact removed from the soil. The water that will really leave the soil through these processes is calculated: i) if vegetation exists, effective transpiration is computed in module Vegetation; ii) effective evaporation is computed in the Porous Media module.&lt;br /&gt;
In Figure below it can be seen that the actual transpiration and evaporation are then used in Porous Media module to compute the new water content. &lt;br /&gt;
The actual evaporation, which happens only at the soil surface, is calculated based on: i) a pressure head limit or ii) a soil conductivity limit, chosen by the user. It allows the model not to evaporate any surface water, even if it is available, when the soil head gets below the assigned value (i) or limits evaporation velocity to layer unsaturated conductivity (ii).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:evapotranspiration fluxogram.jpg|thumb|center|400px|Evapotranspiration fluxogram in Mohid Land model]]&lt;br /&gt;
Remind that Feddes is one option for computing effective transpiration in plants in [[module Vegetation]].&lt;br /&gt;
&lt;br /&gt;
==Iteration Process==&lt;br /&gt;
&lt;br /&gt;
Once obtained the water fluxes a balance on the water volume of each cell is apply in order to obtain the new water content &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. The balance applied is the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Horizontal Direction X'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}+(FluxU_{(i,j,k)}\cdot ComputeFace_{(i,j,k)}-Flux_{(i,j+1,k)}\cdot  ComputeFace_{(i,j+1,k)}\cdot \Delta t) V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Horizontal Direction Y'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}+(FluxV_{(i,j,k)}\cdot  ComputeFace_{(i,j,k)}-FluxV_{(i+1,j,k)}\cdot  ComputeFace_{(i+1,j,k)})\cdot \Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Vertical Direction W'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}+(FluxW_{(i,j,k)}\cdot  ComputeFace_{(i,j,k})-FluxW_{(i,j,k+1)}\cdot  ComputeFace_{(i,j,k+1}))\cdot \Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Transpiration Flux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}-(TranspFlux_{(i,j,k)}\Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Evaporation Flux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}-(EvapFlux_{(i,j,k)}\Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Infiltration Flux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}-(UnsatK\cdot Area_{cell}\cdot(1-Imp) \Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
&lt;br /&gt;
|''&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;'' || is the water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;V_{cell}&amp;lt;/math&amp;gt;'' || is the cell volume (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;Area_{cell}&amp;lt;/math&amp;gt;'' || is the cell area (m &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''ComputeFace'' || is the computed face (dimensionless)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;\Delta t&amp;lt;/math&amp;gt;'' || is the time step (s)&lt;br /&gt;
|-&lt;br /&gt;
|''FluxX'' || is the flux in X direction (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''FluxV'' || is the flux in Y direction (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''FluxW'' || is the flux in W direction (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''TranspFlux'' || is the transpiration flux (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''EvapFlux'' || is the evaporation flux (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''UnsatK'' || is unsaturated conductivity (m /s)&lt;br /&gt;
|-&lt;br /&gt;
|''Imp'' || is the percentage of impermeable soil of the cell (dimensionless)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The value of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; so obtained is compared with one used in the volumes calculation and the iterative process stop when: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;(\theta^{'})-(\theta^{new})&amp;lt;\,\, Tolerance\hspace{3cm} (1.9) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
|''&amp;lt;math&amp;gt;\theta^{'}&amp;lt;/math&amp;gt;'' || is the water content of the previous iteration (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If the equation (1.9) is not satisfy the temporal step is divided in half and the new value of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is used for solving the equation (1.7) for restarting the calculation process. The iteration process is stoped when the tolerance desired is reached.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Figure06.jpg|thumb|center|300px|Figure 2: Time step reduction]]&lt;br /&gt;
&lt;br /&gt;
==Other Features==&lt;br /&gt;
===How to Generate Info needed in Porous Media===&lt;br /&gt;
====SoilMap====&lt;br /&gt;
Model needs to know soil ID in each cell and layer to pick hydraulic properties from that type of soil. In Pedology soil includes more than one horizon, each with different soil properties. Here Soil is used has a unit of soil hidraulic properties, i.e., to define a soil with three horizons one has to create three SoilID (see below). This also means that if a watershed has at least one soil with three horizons one has to create three soil maps. Each soil map will be infact the map of each horizon of the soils. The grid cells with only one horizon will have the same SoilID in all maps, the grid cells with three horizons will have a different SoilID in each map.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* Constant value&lt;br /&gt;
* Soil Grid. One possible option is to associate with soil shape file. In this case can use MOHID GIS going to menu [Tools]-&amp;gt;[Shape to Grid Data] and provide: i) the grid (model grid), ii) the soil shape file and iii) the corespondence between soil codes and soil ID defined in data file. &lt;br /&gt;
&lt;br /&gt;
Soil ID must be defined in [[Module_FillMatrix|Module FillMatrix]] standards for each soil horizon defined (grid example):&lt;br /&gt;
 &amp;lt;beginhorizon&amp;gt;&lt;br /&gt;
 KLB                       : 1&lt;br /&gt;
 KUB                       : 10&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : SoilID&lt;br /&gt;
 DEFAULTVALUE              : 1&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\..\GeneralData\PorousMedia\SoilID200m.dat&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 ..&lt;br /&gt;
 &amp;lt;endhorizon&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Remarks'''&lt;br /&gt;
&lt;br /&gt;
All the soil ID's appearing in the soil grid(s) must be defined in the PorousMedia data file in terms of hydraulic properties:&lt;br /&gt;
 &amp;lt;beginsoiltype&amp;gt;&lt;br /&gt;
 ID                        : 1&lt;br /&gt;
 THETA_S                   : 0.3859&lt;br /&gt;
 THETA_R                   : 0.0476&lt;br /&gt;
 N_FIT                     : 1.39&lt;br /&gt;
 SAT_K                     : 3.5556e-6&lt;br /&gt;
 ALPHA                     : 2.75&lt;br /&gt;
 L_FIT                     : 0.50&lt;br /&gt;
 &amp;lt;endsoiltype&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginsoiltype&amp;gt;&lt;br /&gt;
 ID                        : 2&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;endsoiltype&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
====Soil Bottom====&lt;br /&gt;
The soil depth must be known by the model. This is computed by the model from terrain altitude (topography) and soil bottom altitude. As so, a soil bottom grid is needed.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* Grid File. &lt;br /&gt;
Soil depth (and soil bottom altitude, the effective grid needed) can be defined with a constant depth or estimated from slope [[HOW TO SoilBottom LINK]]. When the soil depth is estimated as a function of slope, soil depth will be smaller in ares with higher slope. In this areas only the surface layers of the soil will be considered (see [[Module_PorousMedia#Porous_Media_Geometry]]).&lt;br /&gt;
&lt;br /&gt;
Define the grid just generated, in the porous media data file with: &lt;br /&gt;
 BOTTOM_FILE  : ..\..\GeneralData\PorousMedia\BottomLevel.dat&lt;br /&gt;
&lt;br /&gt;
====Water Level====&lt;br /&gt;
Options:&lt;br /&gt;
*Grid File.&lt;br /&gt;
The water table altitude represents the initial altitude of the water table. &lt;br /&gt;
It is recommended to do a spin-up run to estabilize water level and then do a continuous simulation starting with the final water table achieved.&lt;br /&gt;
Use the following blocks with [[Module_FillMatrix|Module FillMatrix]] standards:&lt;br /&gt;
 &amp;lt;beginwaterlevel&amp;gt;&lt;br /&gt;
 NAME                      : waterlevel&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 0&lt;br /&gt;
 REMAIN_CONSTANT           : 0&lt;br /&gt;
 FILENAME                  : ..\..\GeneralData\PorousMedia\WaterLevel0.50.dat&lt;br /&gt;
 &amp;lt;endwaterlevel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Impermeability====&lt;br /&gt;
Impermeability values (0 - completely permeable, 1 - impermeable) must be provided. &lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* Constant Value.&lt;br /&gt;
* Grid File. One possible option is to associate with land use shape file. In this case can use MOHID GIS going to menu [Tools]-&amp;gt;[Shape to Grid Data] and provide: i) the grid (model grid), ii) the land use shape file and iii) the corespondence between land use codes and Impermeability values.&lt;br /&gt;
Use the following blocks with [[Module_FillMatrix|Module FillMatrix]] standards:&lt;br /&gt;
 &amp;lt;beginimpermeablefraction&amp;gt;&lt;br /&gt;
 NAME                      : impermeablefraction&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 0&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\..\GeneralData\PorousMedia\AreaImpermeavel.dat&lt;br /&gt;
 &amp;lt;endimpermeablefraction&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
===Timeseries===&lt;br /&gt;
&lt;br /&gt;
Theta - is water content of selected cell (vol water/ vol soil)&lt;br /&gt;
&lt;br /&gt;
relative_water_content - content in selected cell. between zero and one (zero is residual water content and one is saturated water content)&lt;br /&gt;
&lt;br /&gt;
VelW_[m/s] - vertical velocity in the bottom face of the selected cell&lt;br /&gt;
&lt;br /&gt;
VelW_Corr_[m/s] - vertical velocity in the bottom face of the selected cell that may be corrected if oversaturation occurs. if no correction occurs is the same as previous.&lt;br /&gt;
&lt;br /&gt;
InF_Vel_[m/s] - infiltration velocity (in the soil surface)&lt;br /&gt;
&lt;br /&gt;
Head_[m] - Suction in selected cell &lt;br /&gt;
&lt;br /&gt;
Conductivity_[m/s] - Conductivity in selected cell&lt;br /&gt;
&lt;br /&gt;
level_water_table_[m] - water table altitude &lt;br /&gt;
&lt;br /&gt;
water_table_depth_[m] - water table depth (from soil surface)&lt;br /&gt;
&lt;br /&gt;
Hydro_Pressure_[m] - hydrostatic pressure in selected cell&lt;br /&gt;
&lt;br /&gt;
Final_Head_[m] - Soil water charge in selected cell&lt;br /&gt;
&lt;br /&gt;
[Check Mohid Land Heights and Levels to understand some of the outputs]&lt;br /&gt;
&lt;br /&gt;
GW_flow_to_river_total_[m3/s] - Ground water flow to river if it is a river point&lt;br /&gt;
&lt;br /&gt;
Surface_Evaporation_Flux_[m3/s] - evaporation flux (in the soil surface)&lt;br /&gt;
&lt;br /&gt;
Transpiration_Flux_[m3/s] - transpiration flux in selected cell&lt;br /&gt;
&lt;br /&gt;
[http://screencast.com/t/I8We0B4j2uJ Check Mohid Land Heights and Levels to understand the difference between level and height results]&lt;br /&gt;
&lt;br /&gt;
==References ==&lt;br /&gt;
*Jury,W.A.,Gardner,W.R.,Gardner,W.H., 1991,Soil Physics&lt;br /&gt;
*Van Genuchten, M.T., A closed form equation for predicting the hydraulic conductivity of unsaturated soils&lt;br /&gt;
*Wu,J.,Zhang, R., Gui,S.,1999, Modelling soil water movement with water uptake by roots, Plant and soil 215: 7-17&lt;br /&gt;
*Marcel G.Schaap and Martinus Th. van Genuchten, A modified Maulem van Genuchten Formulation for Improved Description of Hydraulic Conductivity Near Saturation, 16 December 2005&lt;br /&gt;
&lt;br /&gt;
==Data File ==&lt;br /&gt;
&lt;br /&gt;
===Keywords===&lt;br /&gt;
 Keywords read in the Data File&lt;br /&gt;
 &lt;br /&gt;
 Keyword                   : Data Type         Default     !Comment&lt;br /&gt;
 &lt;br /&gt;
 BOTTOM_FILE               : char              -           !Path to Bottom Topography File&lt;br /&gt;
 START_WITH_FIELD          : logical           1           !Sets Theta initial Field Capacity&lt;br /&gt;
 CONTINUOUS                : logical           0           !Continues from previous run&lt;br /&gt;
 STOP_ON_WRONG_DATE        : logical           1           !Stops if previous run end is different from actual&lt;br /&gt;
                                                           !Start&lt;br /&gt;
 OUTPUT_TIME               : sec. sec. sec.    -           !Output Time&lt;br /&gt;
 TIME_SERIE_LOCATION       : char              -           !Path to File which defines Time Series&lt;br /&gt;
 CONTINUOUS_OUTPUT_FILE    : logical           1           !Writes &amp;quot;famous&amp;quot; iter.log&lt;br /&gt;
 CONDUTIVITYFACE           : integer           1           !Way to interpolate conducivity face&lt;br /&gt;
                                                           !1 - Average, 2 - Maximum, 3 - Minimum, 4 - Weigthed&lt;br /&gt;
 HORIZONTAL_K_FACTOR       : real              1.0         !Factor for Horizontal Conductivity = Kh / Kv&lt;br /&gt;
 CUT_OFF_THETA_LOW         : real              1e-6        !Disables calculation when Theta is near ThetaR&lt;br /&gt;
 CUT_OFF_THETA_HIGH        : real              1e-15       !Set Theta = ThetaS when Theta &amp;gt; ThetaS - CUT_OFF_THETA_HIGH&lt;br /&gt;
 MIN_ITER                  : integer           2           !Number of iterations below which the DT is increased&lt;br /&gt;
 MAX_ITER                  : integer           3           !Number of iterations above which the DT is decreased&lt;br /&gt;
 LIMIT_ITER                : integer           50          !Number of iterations of a time step (for restart)&lt;br /&gt;
 THETA_TOLERANCE           : real              0.001       !Converge Parameter&lt;br /&gt;
 INCREASE_DT               : real              1.25        !Increase of DT when iter &amp;lt; MIN_ITER&lt;br /&gt;
 DECREASE_DT               : real              0.70        !Decrease of DT when iter &amp;gt; MAX_ITER&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : Theta / waterlevel &lt;br /&gt;
 &lt;br /&gt;
 see Module FillMatrix for more options&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Sample===&lt;br /&gt;
&lt;br /&gt;
Some keywords of the PorousMedia input file:&lt;br /&gt;
 BOTTOM_FILE               : ..\General Data\Other\PorousMedia\SoilBottom_2cells.dat&lt;br /&gt;
 TIME_SERIE_LOCATION       : ..\General Data\TimeSeries\TimeSeriesLocation3D_2m.dat&lt;br /&gt;
 &lt;br /&gt;
 COMPUTE_SOIL_FIELD        : 1 &lt;br /&gt;
 &lt;br /&gt;
 OUTPUT_TIME               : 0 86400&lt;br /&gt;
 CUT_OFF_THETA_HIGH        : 1e-15&lt;br /&gt;
 START_WITH_FIELD          : 1&lt;br /&gt;
 &lt;br /&gt;
 LIMIT_EVAP_WATER_VEL      : 0&lt;br /&gt;
 LIMIT_EVAP_HEAD           : 0&lt;br /&gt;
 HEAD_LIMIT                : -100&lt;br /&gt;
 THETA_HYDRO_COEF          : 0.98&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginsoiltype&amp;gt;&lt;br /&gt;
 ID                        : 1&lt;br /&gt;
 THETA_S                   : 0.43&lt;br /&gt;
 THETA_R                   : 0.078&lt;br /&gt;
 SAT_K                     : 2.888e-6&lt;br /&gt;
 N_FIT                     : 1.56&lt;br /&gt;
 ALPHA                     : 3.6&lt;br /&gt;
 L_FIT                     : 0.50&lt;br /&gt;
 &amp;lt;endsoiltype&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 !----- Hydraulic Soil Properties&lt;br /&gt;
 &amp;lt;beginhorizon&amp;gt;&lt;br /&gt;
 KLB                       : 1&lt;br /&gt;
 KUB                       : 10&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : SoilID&lt;br /&gt;
 INITIALIZATION_METHOD     : CONSTANT&lt;br /&gt;
 DEFAULTVALUE              : 1&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : Theta&lt;br /&gt;
 INITIALIZATION_METHOD     : CONSTANT&lt;br /&gt;
 DEFAULTVALUE              : 0.30&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 &amp;lt;endhorizon&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginwaterlevel&amp;gt;&lt;br /&gt;
 NAME                      : waterlevel&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 1.&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\General Data\Initial Conditions\InitialWaterLevel_2cells.dat&lt;br /&gt;
 &amp;lt;endwaterlevel&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginimpermeablefraction&amp;gt;&lt;br /&gt;
 NAME                      : impermeablefraction&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 0&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\General Data\Other\PorousMedia\InitialImpermeabilization_2cells.dat&lt;br /&gt;
 &amp;lt;endimpermeablefraction&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[Category:MOHID Land]]&lt;/div&gt;</summary>
		<author><name>Carina</name></author>	</entry>

	<entry>
		<id>http://www.wiki.mohid.com/index.php?title=Module_PorousMedia&amp;diff=5639</id>
		<title>Module PorousMedia</title>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Module_PorousMedia&amp;diff=5639"/>
				<updated>2012-01-17T18:27:07Z</updated>
		
		<summary type="html">&lt;p&gt;Carina: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
Module Porous Media is responsible for handling all water fluxes in soil. In particular the infiltration flow is obtained from the potential water column available for this process. The potential water column is given by the [[Module Basin]] (the module that handles interface between modules) as reported below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PIC=TF+IWC&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
| ''PIC'' || is the Potential Infiltration column (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''TF'' || Throughfall is the percentage of the rain that reaches the soil  (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''IWC'' || is the Initial Water column  (m) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The infiltration flux is calculated by the Buckingham-Darcy equation using head gradient between surface runoff and first soil layer (Jury et al,1991).&lt;br /&gt;
&lt;br /&gt;
==Main Processes==&lt;br /&gt;
&lt;br /&gt;
===Porous Media Geometry===&lt;br /&gt;
Porous Media is a 3D domain delimited in its upper limit by topography and lower limit by soil bottom (defined by user).&lt;br /&gt;
In terms of soil definition it can be defined vertical horizons to link correspond to real soil horizons with different hydraulic carachteristics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;htm&amp;gt;&amp;lt;a href=&amp;quot;http://content.screencast.com/users/jovem/folders/Jing/media/b9ef6c79-c1d1-46ea-94f7-623471c15883/MohidLandSoilProfile.png&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://content.screencast.com/users/jovem/folders/Jing/media/b9ef6c79-c1d1-46ea-94f7-623471c15883/MohidLandSoilProfile.png&amp;quot; width=&amp;quot;650&amp;quot; height=&amp;quot;436&amp;quot;  border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/htm&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Water Flow===&lt;br /&gt;
Soil contains a large distribution of pore sizes and channels through which water may flow. In general the water flow determination is based on the mass conservation and momentum equation. In the case of soil it is assumed that the forces of inertia are almost zero; therefore the balance is reduced to the forces of pressure, gravity and viscous. The equation that describes the flow through soil is the Buckingham Darcy equation (Jury et al,1991). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v=-K\left ( \theta  \right )\left ( \frac{\partial H}{\partial z}  \right )=-K\left ( \theta  \right )\left ( \frac{\partial h}{\partial z} + 1 \right )\,\,\,\,(1.1)\\ &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|''v'' || is the water velocity at the cell interface (m/s)&lt;br /&gt;
|-&lt;br /&gt;
| ''H'' ||  is the hydraulic head (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''θ'' || is the water content (m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''K''|| is the hydraulic conductivity (m/s)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The hydraulic head is given by the formula:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H=h+p+z\,\,\,\,(1.2)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|-&lt;br /&gt;
| ''h'' ||  is the hydraulic head (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''p'' || is hydrostatic pressure (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''z''|| is the topography  (m)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When in saturated conditions, hydraulic head is zero and hydrostatic pressure may occur (if water is at rest or decelerating). In unsaturated conditions hydrostatic pressure is zero and hydarulic head exists.&lt;br /&gt;
&lt;br /&gt;
The soil is a very complex system, made up of a heterogeneous mixture of solid, liquid, and gaseous material. The liquid phase consists of soil water, which fills part or all of the open spaces between the soil particles. Therefore it is possible to divided the soil in two layers:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Saturated soil  &amp;lt;math&amp;gt;\Longrightarrow&amp;lt;/math&amp;gt;   The soil pores are filled by water&lt;br /&gt;
&lt;br /&gt;
*Unsaturated one &amp;lt;math&amp;gt;\Longrightarrow&amp;lt;/math&amp;gt;   The soil pores are filled by water and air&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the first case the equation of Buckingham Darcy is simplified to the Darcy law and the parameter associated for its resolution are connected with the saturated layer. On the other hand for the resolution of the equation (1.1) a description of the characteristics of the the unsaturated layer is needed.&lt;br /&gt;
&lt;br /&gt;
==Vadose Zone==&lt;br /&gt;
&lt;br /&gt;
Many vadose flow and transport studies require description of unsaturated soil hydraulic proprieties over a wide range of pressure head. The hydraulic proprieties are described using the porous size distribution model of Maulem (1976) for hydraulic conductivity in combination with a water retention function introduced by Van Genuchten (1980). &lt;br /&gt;
&lt;br /&gt;
===Water content===&lt;br /&gt;
&lt;br /&gt;
Water content is the quantity of water contained in the soil (called '''soil moisture'''). It is given as a volumetric basis and it is defined mathematically as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta = \frac{V_w}{V_T}\hspace{5cm}(1.3) &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V_T = V_s + V_v = V_s + V_w + V_a\hspace{1.6cm}(1.4)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;'' || is water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;V_w&amp;lt;/math&amp;gt; '' || is the volume of water (m s&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;V_T&amp;lt;/math&amp;gt;'' || is the total volume (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;V_s&amp;lt;/math&amp;gt;'' || is the soil volume (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;V_a&amp;lt;/math&amp;gt;'' || is the air space (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Initial Condition====&lt;br /&gt;
The user may define a water content initialization or choose the model to compute in the unsaturated area heads so that soil water is at [[Field Capacity]].&lt;br /&gt;
The below explains the latter.&lt;br /&gt;
&lt;br /&gt;
Once determined the aquifer level ('''water table''') the water content is associated at each cells by the following criteria:&lt;br /&gt;
:{|&lt;br /&gt;
*If the cell is located above the water table &amp;lt;math&amp;gt;\theta=\theta_{s}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
*If the cell is located over the water table &amp;lt;math&amp;gt;\theta=\theta_{ns}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta=\theta_{s}&amp;lt;/math&amp;gt;'' || is the water content in the saturated soil  (m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta=\theta_{ns}&amp;lt;/math&amp;gt;'' || is the water content in the non saturated soil   (m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to calculate field capacity by the equation (1.7) the evaluation of the suction head is needed :&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
:&amp;lt;math&amp;gt; h=-DWZ\cdot 0.5\hspace{2cm}for\,\, the\,\, cells\,\, immediately\,\, above\,\, the\,\, water\,\, table \hspace{5cm} (1.5)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;h=-(-DZZ-h)\hspace{1.5cm}for\,\, the\,\, other\,\, cells\hspace{9.75cm} (1.6) &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Figure05.jpg|thumb|center|300px|Figure 1: Suction Head Calculation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As shown in the picture the suction head is calculated in order to maintain the same total head (H = z + p + h) in the cells in agreement with the field capacity definition.&lt;br /&gt;
&lt;br /&gt;
===Water retention===&lt;br /&gt;
The model use for characterizing the shape of water retention curves is the van Genuchten model:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta(h) = \theta_r + \frac{\theta_s - \theta_r}{\left[ 1+(\alpha |h|)^n \right]^{1-1/n}}\hspace{0.5cm}\Longrightarrow\hspace{0.5cm}h(\theta)=\left |\frac{(S_{E}^{-1/n}-1)^{1/n}}{\alpha}  \right |\hspace{3cm}(1.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;S_{E}=\frac{\theta-\theta_{r}}{\theta_{s}-\theta_{r}}\hspace{11cm}(1.8)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|''&amp;lt;math&amp;gt;\theta(h)&amp;lt;/math&amp;gt;'' || is the the water retention curve (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta_s&amp;lt;/math&amp;gt;'' || is the saturated water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta_r&amp;lt;/math&amp;gt;'' || is the residual water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''h''|| is the suction head (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt;'' || is related to the inverse of the air entry (m &amp;lt;sub&amp;gt;-1&amp;lt;/sub&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''n''|| is a measure of the pore-size distribution n&amp;gt;1 (dimensionless)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;S_{E}&amp;lt;/math&amp;gt;''|| is the effective saturation (dimensionless)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Saturated and Unsaturated Conductivity===&lt;br /&gt;
&lt;br /&gt;
The saturated conductivity is given depending on the type of soil; instead the unsaturated conductivity is obtained from the suction head by the Maulem model:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;K(\theta)=K_{s}\cdot Se^{L}\cdot (1-(1-Se^{1/m})^{m})^{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|''&amp;lt;math&amp;gt;K(\theta)&amp;lt;/math&amp;gt;'' || is the unsaturated conductivity (m/s)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;K_{s}&amp;lt;/math&amp;gt;'' || is the saturated conductivity(m/s)&lt;br /&gt;
|-&lt;br /&gt;
| ''L'' || empirical pore-connectivity (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''m''|| m=1-1/n(dimensionless)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Evapotranspiration==&lt;br /&gt;
&lt;br /&gt;
Some water may be extracted from the soil because of the evaporation and transpiration processes, which become a sink in soil water profile. These two processes are currently named Evapotranspiration. &lt;br /&gt;
&lt;br /&gt;
Potential Evapotranspiration may be modeled using the Penmann Monteith equation. &lt;br /&gt;
Also, if vegetation exists, a differentiation between Potential Transpiration and Potential Evaporation is done using LAI.&lt;br /&gt;
These computation are made in [[Module Basin]] since this is the module that handles water fluxes in the interface betwen modules.&lt;br /&gt;
&lt;br /&gt;
However, not all of the potential water that can be evaporated or transpired will be in fact removed from the soil. The water that will really leave the soil through these processes is calculated: i) if vegetation exists, effective transpiration is computed in module Vegetation; ii) effective evaporation is computed in the Porous Media module.&lt;br /&gt;
In Figure below it can be seen that the actual transpiration and evaporation are then used in Porous Media module to compute the new water content. &lt;br /&gt;
The actual evaporation, which happens only at the soil surface, is calculated based on: i) a pressure head limit or ii) a soil conductivity limit, chosen by the user. It allows the model not to evaporate any surface water, even if it is available, when the soil head gets below the assigned value (i) or limits evaporation velocity to layer unsaturated conductivity (ii).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:evapotranspiration fluxogram.jpg|thumb|center|400px|Evapotranspiration fluxogram in Mohid Land model]]&lt;br /&gt;
Remind that Feddes is one option for computing effective transpiration in plants in [[module Vegetation]].&lt;br /&gt;
&lt;br /&gt;
==Iteration Process==&lt;br /&gt;
&lt;br /&gt;
Once obtained the water fluxes a balance on the water volume of each cell is apply in order to obtain the new water content &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. The balance applied is the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Horizontal Direction X'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}+(FluxU_{(i,j,k)}\cdot ComputeFace_{(i,j,k)}-Flux_{(i,j+1,k)}\cdot  ComputeFace_{(i,j+1,k)}\cdot \Delta t) V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Horizontal Direction Y'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}+(FluxV_{(i,j,k)}\cdot  ComputeFace_{(i,j,k)}-FluxV_{(i+1,j,k)}\cdot  ComputeFace_{(i+1,j,k)})\cdot \Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Vertical Direction W'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}+(FluxW_{(i,j,k)}\cdot  ComputeFace_{(i,j,k})-FluxW_{(i,j,k+1)}\cdot  ComputeFace_{(i,j,k+1}))\cdot \Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Transpiration Flux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}-(TranspFlux_{(i,j,k)}\Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Evaporation Flux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}-(EvapFlux_{(i,j,k)}\Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Infiltration Flux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}-(UnsatK\cdot Area_{cell}\cdot(1-Imp) \Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
&lt;br /&gt;
|''&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;'' || is the water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;V_{cell}&amp;lt;/math&amp;gt;'' || is the cell volume (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;Area_{cell}&amp;lt;/math&amp;gt;'' || is the cell area (m &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''ComputeFace'' || is the computed face (dimensionless)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;\Delta t&amp;lt;/math&amp;gt;'' || is the time step (s)&lt;br /&gt;
|-&lt;br /&gt;
|''FluxX'' || is the flux in X direction (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''FluxV'' || is the flux in Y direction (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''FluxW'' || is the flux in W direction (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''TranspFlux'' || is the transpiration flux (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''EvapFlux'' || is the evaporation flux (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''UnsatK'' || is unsaturated conductivity (m /s)&lt;br /&gt;
|-&lt;br /&gt;
|''Imp'' || is the percentage of impermeable soil of the cell (dimensionless)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The value of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; so obtained is compared with one used in the volumes calculation and the iterative process stop when: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;(\theta^{'})-(\theta^{new})&amp;lt;\,\, Tolerance\hspace{3cm} (1.9) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
|''&amp;lt;math&amp;gt;\theta^{'}&amp;lt;/math&amp;gt;'' || is the water content of the previous iteration (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If the equation (1.9) is not satisfy the temporal step is divided in half and the new value of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is used for solving the equation (1.7) for restarting the calculation process. The iteration process is stoped when the tolerance desired is reached.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Figure06.jpg|thumb|center|300px|Figure 2: Time step reduction]]&lt;br /&gt;
&lt;br /&gt;
==Other Features==&lt;br /&gt;
===How to Generate Info needed in Porous Media===&lt;br /&gt;
====SoilMap====&lt;br /&gt;
Model needs to know soil ID in each cell and layer to pick hydraulic properties from that type of soil. In Pedology soil includes more than one horizon, each with different soil properties. Here Soil is used has a unit of soil hidraulic properties, i.e., to define a soil with three horizons one has to create three SoilID (see below). This also means that if a watershed has at least one soil with three horizons one has to create three soil maps. Each soil map will be infact the map of each horizon of the soils. The grid cells with only one horizon will have the same SoilID in all maps, the grid cells with three horizons will have a different SoilID in each map.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* Constant value&lt;br /&gt;
* Soil Grid. One possible option is to associate with soil shape file. In this case can use MOHID GIS going to menu [Tools]-&amp;gt;[Shape to Grid Data] and provide: i) the grid (model grid), ii) the soil shape file and iii) the corespondence between soil codes and soil ID defined in data file. &lt;br /&gt;
&lt;br /&gt;
Soil ID must be defined in [[Module_FillMatrix|Module FillMatrix]] standards for each soil horizon defined (grid example):&lt;br /&gt;
 &amp;lt;beginhorizon&amp;gt;&lt;br /&gt;
 KLB                       : 1&lt;br /&gt;
 KUB                       : 10&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : SoilID&lt;br /&gt;
 DEFAULTVALUE              : 1&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\..\GeneralData\PorousMedia\SoilID200m.dat&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 ..&lt;br /&gt;
 &amp;lt;endhorizon&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Remarks'''&lt;br /&gt;
&lt;br /&gt;
All the soil ID's appearing in the soil grid(s) must be defined in the PorousMedia data file in terms of hydraulic properties:&lt;br /&gt;
 &amp;lt;beginsoiltype&amp;gt;&lt;br /&gt;
 ID                        : 1&lt;br /&gt;
 THETA_S                   : 0.3859&lt;br /&gt;
 THETA_R                   : 0.0476&lt;br /&gt;
 N_FIT                     : 1.39&lt;br /&gt;
 SAT_K                     : 3.5556e-6&lt;br /&gt;
 ALPHA                     : 2.75&lt;br /&gt;
 L_FIT                     : 0.50&lt;br /&gt;
 &amp;lt;endsoiltype&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginsoiltype&amp;gt;&lt;br /&gt;
 ID                        : 2&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;endsoiltype&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
====Soil Bottom====&lt;br /&gt;
The soil depth must be known by the model. This is computed by the model from terrain altitude (topography) and soil bottom altitude. As so, a soil bottom grid is needed.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* Grid File. &lt;br /&gt;
Soil depth (and soil bottom altitude, the effective grid needed) can be defined with a constant depth or estimated from slope [[HOW TO SoilBottom LINK]]. When the soil depth is estimated as a function of slope, soil depth will be smaller in ares with higher slope. In this areas only the surface layers of the soil will be considered (see [[Porous Media Geometry]]).&lt;br /&gt;
&lt;br /&gt;
Define the grid just generated, in the porous media data file with: &lt;br /&gt;
 BOTTOM_FILE  : ..\..\GeneralData\PorousMedia\BottomLevel.dat&lt;br /&gt;
&lt;br /&gt;
====Water Level====&lt;br /&gt;
Options:&lt;br /&gt;
*Grid File.&lt;br /&gt;
The water table altitude represents the initial altitude of the water table. &lt;br /&gt;
It is recommended to do a spin-up run to estabilize water level and then do a continuous simulation starting with the final water table achieved.&lt;br /&gt;
Use the following blocks with [[Module_FillMatrix|Module FillMatrix]] standards:&lt;br /&gt;
 &amp;lt;beginwaterlevel&amp;gt;&lt;br /&gt;
 NAME                      : waterlevel&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 0&lt;br /&gt;
 REMAIN_CONSTANT           : 0&lt;br /&gt;
 FILENAME                  : ..\..\GeneralData\PorousMedia\WaterLevel0.50.dat&lt;br /&gt;
 &amp;lt;endwaterlevel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Impermeability====&lt;br /&gt;
Impermeability values (0 - completely permeable, 1 - impermeable) must be provided. &lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* Constant Value.&lt;br /&gt;
* Grid File. One possible option is to associate with land use shape file. In this case can use MOHID GIS going to menu [Tools]-&amp;gt;[Shape to Grid Data] and provide: i) the grid (model grid), ii) the land use shape file and iii) the corespondence between land use codes and Impermeability values.&lt;br /&gt;
Use the following blocks with [[Module_FillMatrix|Module FillMatrix]] standards:&lt;br /&gt;
 &amp;lt;beginimpermeablefraction&amp;gt;&lt;br /&gt;
 NAME                      : impermeablefraction&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 0&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\..\GeneralData\PorousMedia\AreaImpermeavel.dat&lt;br /&gt;
 &amp;lt;endimpermeablefraction&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
===Timeseries===&lt;br /&gt;
&lt;br /&gt;
Theta - is water content of selected cell (vol water/ vol soil)&lt;br /&gt;
&lt;br /&gt;
relative_water_content - content in selected cell. between zero and one (zero is residual water content and one is saturated water content)&lt;br /&gt;
&lt;br /&gt;
VelW_[m/s] - vertical velocity in the bottom face of the selected cell&lt;br /&gt;
&lt;br /&gt;
VelW_Corr_[m/s] - vertical velocity in the bottom face of the selected cell that may be corrected if oversaturation occurs. if no correction occurs is the same as previous.&lt;br /&gt;
&lt;br /&gt;
InF_Vel_[m/s] - infiltration velocity (in the soil surface)&lt;br /&gt;
&lt;br /&gt;
Head_[m] - Suction in selected cell &lt;br /&gt;
&lt;br /&gt;
Conductivity_[m/s] - Conductivity in selected cell&lt;br /&gt;
&lt;br /&gt;
level_water_table_[m] - water table altitude &lt;br /&gt;
&lt;br /&gt;
water_table_depth_[m] - water table depth (from soil surface)&lt;br /&gt;
&lt;br /&gt;
Hydro_Pressure_[m] - hydrostatic pressure in selected cell&lt;br /&gt;
&lt;br /&gt;
Final_Head_[m] - Soil water charge in selected cell&lt;br /&gt;
&lt;br /&gt;
[Check Mohid Land Heights and Levels to understand some of the outputs]&lt;br /&gt;
&lt;br /&gt;
GW_flow_to_river_total_[m3/s] - Ground water flow to river if it is a river point&lt;br /&gt;
&lt;br /&gt;
Surface_Evaporation_Flux_[m3/s] - evaporation flux (in the soil surface)&lt;br /&gt;
&lt;br /&gt;
Transpiration_Flux_[m3/s] - transpiration flux in selected cell&lt;br /&gt;
&lt;br /&gt;
[http://screencast.com/t/I8We0B4j2uJ Check Mohid Land Heights and Levels to understand the difference between level and height results]&lt;br /&gt;
&lt;br /&gt;
==References ==&lt;br /&gt;
*Jury,W.A.,Gardner,W.R.,Gardner,W.H., 1991,Soil Physics&lt;br /&gt;
*Van Genuchten, M.T., A closed form equation for predicting the hydraulic conductivity of unsaturated soils&lt;br /&gt;
*Wu,J.,Zhang, R., Gui,S.,1999, Modelling soil water movement with water uptake by roots, Plant and soil 215: 7-17&lt;br /&gt;
*Marcel G.Schaap and Martinus Th. van Genuchten, A modified Maulem van Genuchten Formulation for Improved Description of Hydraulic Conductivity Near Saturation, 16 December 2005&lt;br /&gt;
&lt;br /&gt;
==Data File ==&lt;br /&gt;
&lt;br /&gt;
===Keywords===&lt;br /&gt;
 Keywords read in the Data File&lt;br /&gt;
 &lt;br /&gt;
 Keyword                   : Data Type         Default     !Comment&lt;br /&gt;
 &lt;br /&gt;
 BOTTOM_FILE               : char              -           !Path to Bottom Topography File&lt;br /&gt;
 START_WITH_FIELD          : logical           1           !Sets Theta initial Field Capacity&lt;br /&gt;
 CONTINUOUS                : logical           0           !Continues from previous run&lt;br /&gt;
 STOP_ON_WRONG_DATE        : logical           1           !Stops if previous run end is different from actual&lt;br /&gt;
                                                           !Start&lt;br /&gt;
 OUTPUT_TIME               : sec. sec. sec.    -           !Output Time&lt;br /&gt;
 TIME_SERIE_LOCATION       : char              -           !Path to File which defines Time Series&lt;br /&gt;
 CONTINUOUS_OUTPUT_FILE    : logical           1           !Writes &amp;quot;famous&amp;quot; iter.log&lt;br /&gt;
 CONDUTIVITYFACE           : integer           1           !Way to interpolate conducivity face&lt;br /&gt;
                                                           !1 - Average, 2 - Maximum, 3 - Minimum, 4 - Weigthed&lt;br /&gt;
 HORIZONTAL_K_FACTOR       : real              1.0         !Factor for Horizontal Conductivity = Kh / Kv&lt;br /&gt;
 CUT_OFF_THETA_LOW         : real              1e-6        !Disables calculation when Theta is near ThetaR&lt;br /&gt;
 CUT_OFF_THETA_HIGH        : real              1e-15       !Set Theta = ThetaS when Theta &amp;gt; ThetaS - CUT_OFF_THETA_HIGH&lt;br /&gt;
 MIN_ITER                  : integer           2           !Number of iterations below which the DT is increased&lt;br /&gt;
 MAX_ITER                  : integer           3           !Number of iterations above which the DT is decreased&lt;br /&gt;
 LIMIT_ITER                : integer           50          !Number of iterations of a time step (for restart)&lt;br /&gt;
 THETA_TOLERANCE           : real              0.001       !Converge Parameter&lt;br /&gt;
 INCREASE_DT               : real              1.25        !Increase of DT when iter &amp;lt; MIN_ITER&lt;br /&gt;
 DECREASE_DT               : real              0.70        !Decrease of DT when iter &amp;gt; MAX_ITER&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : Theta / waterlevel &lt;br /&gt;
 &lt;br /&gt;
 see Module FillMatrix for more options&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Sample===&lt;br /&gt;
&lt;br /&gt;
Some keywords of the PorousMedia input file:&lt;br /&gt;
 BOTTOM_FILE               : ..\General Data\Other\PorousMedia\SoilBottom_2cells.dat&lt;br /&gt;
 TIME_SERIE_LOCATION       : ..\General Data\TimeSeries\TimeSeriesLocation3D_2m.dat&lt;br /&gt;
 &lt;br /&gt;
 COMPUTE_SOIL_FIELD        : 1 &lt;br /&gt;
 &lt;br /&gt;
 OUTPUT_TIME               : 0 86400&lt;br /&gt;
 CUT_OFF_THETA_HIGH        : 1e-15&lt;br /&gt;
 START_WITH_FIELD          : 1&lt;br /&gt;
 &lt;br /&gt;
 LIMIT_EVAP_WATER_VEL      : 0&lt;br /&gt;
 LIMIT_EVAP_HEAD           : 0&lt;br /&gt;
 HEAD_LIMIT                : -100&lt;br /&gt;
 THETA_HYDRO_COEF          : 0.98&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginsoiltype&amp;gt;&lt;br /&gt;
 ID                        : 1&lt;br /&gt;
 THETA_S                   : 0.43&lt;br /&gt;
 THETA_R                   : 0.078&lt;br /&gt;
 SAT_K                     : 2.888e-6&lt;br /&gt;
 N_FIT                     : 1.56&lt;br /&gt;
 ALPHA                     : 3.6&lt;br /&gt;
 L_FIT                     : 0.50&lt;br /&gt;
 &amp;lt;endsoiltype&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 !----- Hydraulic Soil Properties&lt;br /&gt;
 &amp;lt;beginhorizon&amp;gt;&lt;br /&gt;
 KLB                       : 1&lt;br /&gt;
 KUB                       : 10&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : SoilID&lt;br /&gt;
 INITIALIZATION_METHOD     : CONSTANT&lt;br /&gt;
 DEFAULTVALUE              : 1&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : Theta&lt;br /&gt;
 INITIALIZATION_METHOD     : CONSTANT&lt;br /&gt;
 DEFAULTVALUE              : 0.30&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 &amp;lt;endhorizon&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginwaterlevel&amp;gt;&lt;br /&gt;
 NAME                      : waterlevel&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 1.&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\General Data\Initial Conditions\InitialWaterLevel_2cells.dat&lt;br /&gt;
 &amp;lt;endwaterlevel&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginimpermeablefraction&amp;gt;&lt;br /&gt;
 NAME                      : impermeablefraction&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 0&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\General Data\Other\PorousMedia\InitialImpermeabilization_2cells.dat&lt;br /&gt;
 &amp;lt;endimpermeablefraction&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[Category:MOHID Land]]&lt;/div&gt;</summary>
		<author><name>Carina</name></author>	</entry>

	<entry>
		<id>http://www.wiki.mohid.com/index.php?title=Module_PorousMedia&amp;diff=5638</id>
		<title>Module PorousMedia</title>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Module_PorousMedia&amp;diff=5638"/>
				<updated>2012-01-17T18:26:13Z</updated>
		
		<summary type="html">&lt;p&gt;Carina: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
Module Porous Media is responsible for handling all water fluxes in soil. In particular the infiltration flow is obtained from the potential water column available for this process. The potential water column is given by the [[Module Basin]] (the module that handles interface between modules) as reported below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PIC=TF+IWC&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
| ''PIC'' || is the Potential Infiltration column (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''TF'' || Throughfall is the percentage of the rain that reaches the soil  (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''IWC'' || is the Initial Water column  (m) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The infiltration flux is calculated by the Buckingham-Darcy equation using head gradient between surface runoff and first soil layer (Jury et al,1991).&lt;br /&gt;
&lt;br /&gt;
==Main Processes==&lt;br /&gt;
&lt;br /&gt;
===Porous Media Geometry===&lt;br /&gt;
Porous Media is a 3D domain delimited in its upper limit by topography and lower limit by soil bottom (defined by user).&lt;br /&gt;
In terms of soil definition it can be defined vertical horizons to link correspond to real soil horizons with different hydraulic carachteristics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;htm&amp;gt;&amp;lt;a href=&amp;quot;http://content.screencast.com/users/jovem/folders/Jing/media/b9ef6c79-c1d1-46ea-94f7-623471c15883/MohidLandSoilProfile.png&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://content.screencast.com/users/jovem/folders/Jing/media/b9ef6c79-c1d1-46ea-94f7-623471c15883/MohidLandSoilProfile.png&amp;quot; width=&amp;quot;650&amp;quot; height=&amp;quot;436&amp;quot;  border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/htm&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Water Flow===&lt;br /&gt;
Soil contains a large distribution of pore sizes and channels through which water may flow. In general the water flow determination is based on the mass conservation and momentum equation. In the case of soil it is assumed that the forces of inertia are almost zero; therefore the balance is reduced to the forces of pressure, gravity and viscous. The equation that describes the flow through soil is the Buckingham Darcy equation (Jury et al,1991). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v=-K\left ( \theta  \right )\left ( \frac{\partial H}{\partial z}  \right )=-K\left ( \theta  \right )\left ( \frac{\partial h}{\partial z} + 1 \right )\,\,\,\,(1.1)\\ &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|''v'' || is the water velocity at the cell interface (m/s)&lt;br /&gt;
|-&lt;br /&gt;
| ''H'' ||  is the hydraulic head (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''θ'' || is the water content (m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''K''|| is the hydraulic conductivity (m/s)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The hydraulic head is given by the formula:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H=h+p+z\,\,\,\,(1.2)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|-&lt;br /&gt;
| ''h'' ||  is the hydraulic head (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''p'' || is hydrostatic pressure (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''z''|| is the topography  (m)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When in saturated conditions, hydraulic head is zero and hydrostatic pressure may occur (if water is at rest or decelerating). In unsaturated conditions hydrostatic pressure is zero and hydarulic head exists.&lt;br /&gt;
&lt;br /&gt;
The soil is a very complex system, made up of a heterogeneous mixture of solid, liquid, and gaseous material. The liquid phase consists of soil water, which fills part or all of the open spaces between the soil particles. Therefore it is possible to divided the soil in two layers:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Saturated soil  &amp;lt;math&amp;gt;\Longrightarrow&amp;lt;/math&amp;gt;   The soil pores are filled by water&lt;br /&gt;
&lt;br /&gt;
*Unsaturated one &amp;lt;math&amp;gt;\Longrightarrow&amp;lt;/math&amp;gt;   The soil pores are filled by water and air&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the first case the equation of Buckingham Darcy is simplified to the Darcy law and the parameter associated for its resolution are connected with the saturated layer. On the other hand for the resolution of the equation (1.1) a description of the characteristics of the the unsaturated layer is needed.&lt;br /&gt;
&lt;br /&gt;
==Vadose Zone==&lt;br /&gt;
&lt;br /&gt;
Many vadose flow and transport studies require description of unsaturated soil hydraulic proprieties over a wide range of pressure head. The hydraulic proprieties are described using the porous size distribution model of Maulem (1976) for hydraulic conductivity in combination with a water retention function introduced by Van Genuchten (1980). &lt;br /&gt;
&lt;br /&gt;
===Water content===&lt;br /&gt;
&lt;br /&gt;
Water content is the quantity of water contained in the soil (called '''soil moisture'''). It is given as a volumetric basis and it is defined mathematically as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta = \frac{V_w}{V_T}\hspace{5cm}(1.3) &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V_T = V_s + V_v = V_s + V_w + V_a\hspace{1.6cm}(1.4)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;'' || is water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;V_w&amp;lt;/math&amp;gt; '' || is the volume of water (m s&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;V_T&amp;lt;/math&amp;gt;'' || is the total volume (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;V_s&amp;lt;/math&amp;gt;'' || is the soil volume (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;V_a&amp;lt;/math&amp;gt;'' || is the air space (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Initial Condition====&lt;br /&gt;
The user may define a water content initialization or choose the model to compute in the unsaturated area heads so that soil water is at [[Field Capacity]].&lt;br /&gt;
The below explains the latter.&lt;br /&gt;
&lt;br /&gt;
Once determined the aquifer level ('''water table''') the water content is associated at each cells by the following criteria:&lt;br /&gt;
:{|&lt;br /&gt;
*If the cell is located above the water table &amp;lt;math&amp;gt;\theta=\theta_{s}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
*If the cell is located over the water table &amp;lt;math&amp;gt;\theta=\theta_{ns}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta=\theta_{s}&amp;lt;/math&amp;gt;'' || is the water content in the saturated soil  (m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta=\theta_{ns}&amp;lt;/math&amp;gt;'' || is the water content in the non saturated soil   (m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to calculate field capacity by the equation (1.7) the evaluation of the suction head is needed :&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
:&amp;lt;math&amp;gt; h=-DWZ\cdot 0.5\hspace{2cm}for\,\, the\,\, cells\,\, immediately\,\, above\,\, the\,\, water\,\, table \hspace{5cm} (1.5)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;h=-(-DZZ-h)\hspace{1.5cm}for\,\, the\,\, other\,\, cells\hspace{9.75cm} (1.6) &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Figure05.jpg|thumb|center|300px|Figure 1: Suction Head Calculation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As shown in the picture the suction head is calculated in order to maintain the same total head (H = z + p + h) in the cells in agreement with the field capacity definition.&lt;br /&gt;
&lt;br /&gt;
===Water retention===&lt;br /&gt;
The model use for characterizing the shape of water retention curves is the van Genuchten model:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta(h) = \theta_r + \frac{\theta_s - \theta_r}{\left[ 1+(\alpha |h|)^n \right]^{1-1/n}}\hspace{0.5cm}\Longrightarrow\hspace{0.5cm}h(\theta)=\left |\frac{(S_{E}^{-1/n}-1)^{1/n}}{\alpha}  \right |\hspace{3cm}(1.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;S_{E}=\frac{\theta-\theta_{r}}{\theta_{s}-\theta_{r}}\hspace{11cm}(1.8)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|''&amp;lt;math&amp;gt;\theta(h)&amp;lt;/math&amp;gt;'' || is the the water retention curve (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta_s&amp;lt;/math&amp;gt;'' || is the saturated water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta_r&amp;lt;/math&amp;gt;'' || is the residual water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''h''|| is the suction head (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt;'' || is related to the inverse of the air entry (m &amp;lt;sub&amp;gt;-1&amp;lt;/sub&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''n''|| is a measure of the pore-size distribution n&amp;gt;1 (dimensionless)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;S_{E}&amp;lt;/math&amp;gt;''|| is the effective saturation (dimensionless)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Saturated and Unsaturated Conductivity===&lt;br /&gt;
&lt;br /&gt;
The saturated conductivity is given depending on the type of soil; instead the unsaturated conductivity is obtained from the suction head by the Maulem model:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;K(\theta)=K_{s}\cdot Se^{L}\cdot (1-(1-Se^{1/m})^{m})^{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|''&amp;lt;math&amp;gt;K(\theta)&amp;lt;/math&amp;gt;'' || is the unsaturated conductivity (m/s)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;K_{s}&amp;lt;/math&amp;gt;'' || is the saturated conductivity(m/s)&lt;br /&gt;
|-&lt;br /&gt;
| ''L'' || empirical pore-connectivity (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''m''|| m=1-1/n(dimensionless)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Evapotranspiration==&lt;br /&gt;
&lt;br /&gt;
Some water may be extracted from the soil because of the evaporation and transpiration processes, which become a sink in soil water profile. These two processes are currently named Evapotranspiration. &lt;br /&gt;
&lt;br /&gt;
Potential Evapotranspiration may be modeled using the Penmann Monteith equation. &lt;br /&gt;
Also, if vegetation exists, a differentiation between Potential Transpiration and Potential Evaporation is done using LAI.&lt;br /&gt;
These computation are made in [[Module Basin]] since this is the module that handles water fluxes in the interface betwen modules.&lt;br /&gt;
&lt;br /&gt;
However, not all of the potential water that can be evaporated or transpired will be in fact removed from the soil. The water that will really leave the soil through these processes is calculated: i) if vegetation exists, effective transpiration is computed in module Vegetation; ii) effective evaporation is computed in the Porous Media module.&lt;br /&gt;
In Figure below it can be seen that the actual transpiration and evaporation are then used in Porous Media module to compute the new water content. &lt;br /&gt;
The actual evaporation, which happens only at the soil surface, is calculated based on: i) a pressure head limit or ii) a soil conductivity limit, chosen by the user. It allows the model not to evaporate any surface water, even if it is available, when the soil head gets below the assigned value (i) or limits evaporation velocity to layer unsaturated conductivity (ii).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:evapotranspiration fluxogram.jpg|thumb|center|400px|Evapotranspiration fluxogram in Mohid Land model]]&lt;br /&gt;
Remind that Feddes is one option for computing effective transpiration in plants in [[module Vegetation]].&lt;br /&gt;
&lt;br /&gt;
==Iteration Process==&lt;br /&gt;
&lt;br /&gt;
Once obtained the water fluxes a balance on the water volume of each cell is apply in order to obtain the new water content &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. The balance applied is the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Horizontal Direction X'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}+(FluxU_{(i,j,k)}\cdot ComputeFace_{(i,j,k)}-Flux_{(i,j+1,k)}\cdot  ComputeFace_{(i,j+1,k)}\cdot \Delta t) V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Horizontal Direction Y'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}+(FluxV_{(i,j,k)}\cdot  ComputeFace_{(i,j,k)}-FluxV_{(i+1,j,k)}\cdot  ComputeFace_{(i+1,j,k)})\cdot \Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Vertical Direction W'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}+(FluxW_{(i,j,k)}\cdot  ComputeFace_{(i,j,k})-FluxW_{(i,j,k+1)}\cdot  ComputeFace_{(i,j,k+1}))\cdot \Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Transpiration Flux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}-(TranspFlux_{(i,j,k)}\Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Evaporation Flux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}-(EvapFlux_{(i,j,k)}\Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Infiltration Flux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}-(UnsatK\cdot Area_{cell}\cdot(1-Imp) \Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
&lt;br /&gt;
|''&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;'' || is the water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;V_{cell}&amp;lt;/math&amp;gt;'' || is the cell volume (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;Area_{cell}&amp;lt;/math&amp;gt;'' || is the cell area (m &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''ComputeFace'' || is the computed face (dimensionless)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;\Delta t&amp;lt;/math&amp;gt;'' || is the time step (s)&lt;br /&gt;
|-&lt;br /&gt;
|''FluxX'' || is the flux in X direction (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''FluxV'' || is the flux in Y direction (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''FluxW'' || is the flux in W direction (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''TranspFlux'' || is the transpiration flux (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''EvapFlux'' || is the evaporation flux (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''UnsatK'' || is unsaturated conductivity (m /s)&lt;br /&gt;
|-&lt;br /&gt;
|''Imp'' || is the percentage of impermeable soil of the cell (dimensionless)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The value of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; so obtained is compared with one used in the volumes calculation and the iterative process stop when: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;(\theta^{'})-(\theta^{new})&amp;lt;\,\, Tolerance\hspace{3cm} (1.9) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
|''&amp;lt;math&amp;gt;\theta^{'}&amp;lt;/math&amp;gt;'' || is the water content of the previous iteration (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If the equation (1.9) is not satisfy the temporal step is divided in half and the new value of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is used for solving the equation (1.7) for restarting the calculation process. The iteration process is stoped when the tolerance desired is reached.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Figure06.jpg|thumb|center|300px|Figure 2: Time step reduction]]&lt;br /&gt;
&lt;br /&gt;
==Other Features==&lt;br /&gt;
===How to Generate Info needed in Porous Media===&lt;br /&gt;
====SoilMap====&lt;br /&gt;
Model needs to know soil ID in each cell and layer to pick hydraulic properties from that type of soil. In Pedology soil includes more than one horizon, each with different soil properties. Here Soil is used has a unit of soil hidraulic properties, i.e., to define a soil with three horizons one has to create three SoilID (see below). This also means that if a watershed has at least one soil with three horizons one has to create three soil maps. Each soil map will be infact the map of each horizon of the soils. The grid cells with only one horizon will have the same SoilID in all maps, the grid cells with three horizons will have a different SoilID in each map.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* Constant value&lt;br /&gt;
* Soil Grid. One possible option is to associate with soil shape file. In this case can use MOHID GIS going to menu [Tools]-&amp;gt;[Shape to Grid Data] and provide: i) the grid (model grid), ii) the soil shape file and iii) the corespondence between soil codes and soil ID defined in data file. &lt;br /&gt;
&lt;br /&gt;
Soil ID must be defined in [[Module_FillMatrix|Module FillMatrix]] standards for each soil horizon defined (grid example):&lt;br /&gt;
 &amp;lt;beginhorizon&amp;gt;&lt;br /&gt;
 KLB                       : 1&lt;br /&gt;
 KUB                       : 10&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : SoilID&lt;br /&gt;
 DEFAULTVALUE              : 1&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\..\GeneralData\PorousMedia\SoilID200m.dat&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 ..&lt;br /&gt;
 &amp;lt;endhorizon&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Remarks'''&lt;br /&gt;
&lt;br /&gt;
All the soil ID's appearing in the soil grid(s) must be defined in the PorousMedia data file in terms of hydraulic properties:&lt;br /&gt;
 &amp;lt;beginsoiltype&amp;gt;&lt;br /&gt;
 ID                        : 1&lt;br /&gt;
 THETA_S                   : 0.3859&lt;br /&gt;
 THETA_R                   : 0.0476&lt;br /&gt;
 N_FIT                     : 1.39&lt;br /&gt;
 SAT_K                     : 3.5556e-6&lt;br /&gt;
 ALPHA                     : 2.75&lt;br /&gt;
 L_FIT                     : 0.50&lt;br /&gt;
 &amp;lt;endsoiltype&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginsoiltype&amp;gt;&lt;br /&gt;
 ID                        : 2&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;endsoiltype&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
====Soil Bottom====&lt;br /&gt;
The soil depth must be known by the model. This is computed by the model from terrain altitude (topography) and soil bottom altitude. As so, a soil bottom grid is needed.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* Grid File. &lt;br /&gt;
Soil depth (and soil bottom altitude, the effective grid needed) can be defined with a constant depth or estimated from slope [[HOW TO SoilBottom LINK]]. When the soil depth is estimated as a function of slope, soil depth will be smaller in ares with higher slope. In this areas only the surface layers of the soil will be considered (see [Porous Media Geometry]).&lt;br /&gt;
&lt;br /&gt;
Define the grid just generated, in the porous media data file with: &lt;br /&gt;
 BOTTOM_FILE  : ..\..\GeneralData\PorousMedia\BottomLevel.dat&lt;br /&gt;
&lt;br /&gt;
====Water Level====&lt;br /&gt;
Options:&lt;br /&gt;
*Grid File.&lt;br /&gt;
The water table altitude represents the initial altitude of the water table. &lt;br /&gt;
It is recommended to do a spin-up run to estabilize water level and then do a continuous simulation starting with the final water table achieved.&lt;br /&gt;
Use the following blocks with [[Module_FillMatrix|Module FillMatrix]] standards:&lt;br /&gt;
 &amp;lt;beginwaterlevel&amp;gt;&lt;br /&gt;
 NAME                      : waterlevel&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 0&lt;br /&gt;
 REMAIN_CONSTANT           : 0&lt;br /&gt;
 FILENAME                  : ..\..\GeneralData\PorousMedia\WaterLevel0.50.dat&lt;br /&gt;
 &amp;lt;endwaterlevel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Impermeability====&lt;br /&gt;
Impermeability values (0 - completely permeable, 1 - impermeable) must be provided. &lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* Constant Value.&lt;br /&gt;
* Grid File. One possible option is to associate with land use shape file. In this case can use MOHID GIS going to menu [Tools]-&amp;gt;[Shape to Grid Data] and provide: i) the grid (model grid), ii) the land use shape file and iii) the corespondence between land use codes and Impermeability values.&lt;br /&gt;
Use the following blocks with [[Module_FillMatrix|Module FillMatrix]] standards:&lt;br /&gt;
 &amp;lt;beginimpermeablefraction&amp;gt;&lt;br /&gt;
 NAME                      : impermeablefraction&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 0&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\..\GeneralData\PorousMedia\AreaImpermeavel.dat&lt;br /&gt;
 &amp;lt;endimpermeablefraction&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
===Timeseries===&lt;br /&gt;
&lt;br /&gt;
Theta - is water content of selected cell (vol water/ vol soil)&lt;br /&gt;
&lt;br /&gt;
relative_water_content - content in selected cell. between zero and one (zero is residual water content and one is saturated water content)&lt;br /&gt;
&lt;br /&gt;
VelW_[m/s] - vertical velocity in the bottom face of the selected cell&lt;br /&gt;
&lt;br /&gt;
VelW_Corr_[m/s] - vertical velocity in the bottom face of the selected cell that may be corrected if oversaturation occurs. if no correction occurs is the same as previous.&lt;br /&gt;
&lt;br /&gt;
InF_Vel_[m/s] - infiltration velocity (in the soil surface)&lt;br /&gt;
&lt;br /&gt;
Head_[m] - Suction in selected cell &lt;br /&gt;
&lt;br /&gt;
Conductivity_[m/s] - Conductivity in selected cell&lt;br /&gt;
&lt;br /&gt;
level_water_table_[m] - water table altitude &lt;br /&gt;
&lt;br /&gt;
water_table_depth_[m] - water table depth (from soil surface)&lt;br /&gt;
&lt;br /&gt;
Hydro_Pressure_[m] - hydrostatic pressure in selected cell&lt;br /&gt;
&lt;br /&gt;
Final_Head_[m] - Soil water charge in selected cell&lt;br /&gt;
&lt;br /&gt;
[Check Mohid Land Heights and Levels to understand some of the outputs]&lt;br /&gt;
&lt;br /&gt;
GW_flow_to_river_total_[m3/s] - Ground water flow to river if it is a river point&lt;br /&gt;
&lt;br /&gt;
Surface_Evaporation_Flux_[m3/s] - evaporation flux (in the soil surface)&lt;br /&gt;
&lt;br /&gt;
Transpiration_Flux_[m3/s] - transpiration flux in selected cell&lt;br /&gt;
&lt;br /&gt;
[http://screencast.com/t/I8We0B4j2uJ Check Mohid Land Heights and Levels to understand the difference between level and height results]&lt;br /&gt;
&lt;br /&gt;
==References ==&lt;br /&gt;
*Jury,W.A.,Gardner,W.R.,Gardner,W.H., 1991,Soil Physics&lt;br /&gt;
*Van Genuchten, M.T., A closed form equation for predicting the hydraulic conductivity of unsaturated soils&lt;br /&gt;
*Wu,J.,Zhang, R., Gui,S.,1999, Modelling soil water movement with water uptake by roots, Plant and soil 215: 7-17&lt;br /&gt;
*Marcel G.Schaap and Martinus Th. van Genuchten, A modified Maulem van Genuchten Formulation for Improved Description of Hydraulic Conductivity Near Saturation, 16 December 2005&lt;br /&gt;
&lt;br /&gt;
==Data File ==&lt;br /&gt;
&lt;br /&gt;
===Keywords===&lt;br /&gt;
 Keywords read in the Data File&lt;br /&gt;
 &lt;br /&gt;
 Keyword                   : Data Type         Default     !Comment&lt;br /&gt;
 &lt;br /&gt;
 BOTTOM_FILE               : char              -           !Path to Bottom Topography File&lt;br /&gt;
 START_WITH_FIELD          : logical           1           !Sets Theta initial Field Capacity&lt;br /&gt;
 CONTINUOUS                : logical           0           !Continues from previous run&lt;br /&gt;
 STOP_ON_WRONG_DATE        : logical           1           !Stops if previous run end is different from actual&lt;br /&gt;
                                                           !Start&lt;br /&gt;
 OUTPUT_TIME               : sec. sec. sec.    -           !Output Time&lt;br /&gt;
 TIME_SERIE_LOCATION       : char              -           !Path to File which defines Time Series&lt;br /&gt;
 CONTINUOUS_OUTPUT_FILE    : logical           1           !Writes &amp;quot;famous&amp;quot; iter.log&lt;br /&gt;
 CONDUTIVITYFACE           : integer           1           !Way to interpolate conducivity face&lt;br /&gt;
                                                           !1 - Average, 2 - Maximum, 3 - Minimum, 4 - Weigthed&lt;br /&gt;
 HORIZONTAL_K_FACTOR       : real              1.0         !Factor for Horizontal Conductivity = Kh / Kv&lt;br /&gt;
 CUT_OFF_THETA_LOW         : real              1e-6        !Disables calculation when Theta is near ThetaR&lt;br /&gt;
 CUT_OFF_THETA_HIGH        : real              1e-15       !Set Theta = ThetaS when Theta &amp;gt; ThetaS - CUT_OFF_THETA_HIGH&lt;br /&gt;
 MIN_ITER                  : integer           2           !Number of iterations below which the DT is increased&lt;br /&gt;
 MAX_ITER                  : integer           3           !Number of iterations above which the DT is decreased&lt;br /&gt;
 LIMIT_ITER                : integer           50          !Number of iterations of a time step (for restart)&lt;br /&gt;
 THETA_TOLERANCE           : real              0.001       !Converge Parameter&lt;br /&gt;
 INCREASE_DT               : real              1.25        !Increase of DT when iter &amp;lt; MIN_ITER&lt;br /&gt;
 DECREASE_DT               : real              0.70        !Decrease of DT when iter &amp;gt; MAX_ITER&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : Theta / waterlevel &lt;br /&gt;
 &lt;br /&gt;
 see Module FillMatrix for more options&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Sample===&lt;br /&gt;
&lt;br /&gt;
Some keywords of the PorousMedia input file:&lt;br /&gt;
 BOTTOM_FILE               : ..\General Data\Other\PorousMedia\SoilBottom_2cells.dat&lt;br /&gt;
 TIME_SERIE_LOCATION       : ..\General Data\TimeSeries\TimeSeriesLocation3D_2m.dat&lt;br /&gt;
 &lt;br /&gt;
 COMPUTE_SOIL_FIELD        : 1 &lt;br /&gt;
 &lt;br /&gt;
 OUTPUT_TIME               : 0 86400&lt;br /&gt;
 CUT_OFF_THETA_HIGH        : 1e-15&lt;br /&gt;
 START_WITH_FIELD          : 1&lt;br /&gt;
 &lt;br /&gt;
 LIMIT_EVAP_WATER_VEL      : 0&lt;br /&gt;
 LIMIT_EVAP_HEAD           : 0&lt;br /&gt;
 HEAD_LIMIT                : -100&lt;br /&gt;
 THETA_HYDRO_COEF          : 0.98&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginsoiltype&amp;gt;&lt;br /&gt;
 ID                        : 1&lt;br /&gt;
 THETA_S                   : 0.43&lt;br /&gt;
 THETA_R                   : 0.078&lt;br /&gt;
 SAT_K                     : 2.888e-6&lt;br /&gt;
 N_FIT                     : 1.56&lt;br /&gt;
 ALPHA                     : 3.6&lt;br /&gt;
 L_FIT                     : 0.50&lt;br /&gt;
 &amp;lt;endsoiltype&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 !----- Hydraulic Soil Properties&lt;br /&gt;
 &amp;lt;beginhorizon&amp;gt;&lt;br /&gt;
 KLB                       : 1&lt;br /&gt;
 KUB                       : 10&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : SoilID&lt;br /&gt;
 INITIALIZATION_METHOD     : CONSTANT&lt;br /&gt;
 DEFAULTVALUE              : 1&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : Theta&lt;br /&gt;
 INITIALIZATION_METHOD     : CONSTANT&lt;br /&gt;
 DEFAULTVALUE              : 0.30&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 &amp;lt;endhorizon&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginwaterlevel&amp;gt;&lt;br /&gt;
 NAME                      : waterlevel&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 1.&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\General Data\Initial Conditions\InitialWaterLevel_2cells.dat&lt;br /&gt;
 &amp;lt;endwaterlevel&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginimpermeablefraction&amp;gt;&lt;br /&gt;
 NAME                      : impermeablefraction&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 0&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\General Data\Other\PorousMedia\InitialImpermeabilization_2cells.dat&lt;br /&gt;
 &amp;lt;endimpermeablefraction&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[Category:MOHID Land]]&lt;/div&gt;</summary>
		<author><name>Carina</name></author>	</entry>

	<entry>
		<id>http://www.wiki.mohid.com/index.php?title=Module_PorousMedia&amp;diff=5637</id>
		<title>Module PorousMedia</title>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Module_PorousMedia&amp;diff=5637"/>
				<updated>2012-01-17T18:25:33Z</updated>
		
		<summary type="html">&lt;p&gt;Carina: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
Module Porous Media is responsible for handling all water fluxes in soil. In particular the infiltration flow is obtained from the potential water column available for this process. The potential water column is given by the [[Module Basin]] (the module that handles interface between modules) as reported below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PIC=TF+IWC&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
| ''PIC'' || is the Potential Infiltration column (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''TF'' || Throughfall is the percentage of the rain that reaches the soil  (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''IWC'' || is the Initial Water column  (m) &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The infiltration flux is calculated by the Buckingham-Darcy equation using head gradient between surface runoff and first soil layer (Jury et al,1991).&lt;br /&gt;
&lt;br /&gt;
==Main Processes==&lt;br /&gt;
&lt;br /&gt;
===Porous Media Geometry===&lt;br /&gt;
Porous Media is a 3D domain delimited in its upper limit by topography and lower limit by soil bottom (defined by user).&lt;br /&gt;
In terms of soil definition it can be defined vertical horizons to link correspond to real soil horizons with different hydraulic carachteristics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;htm&amp;gt;&amp;lt;a href=&amp;quot;http://content.screencast.com/users/jovem/folders/Jing/media/b9ef6c79-c1d1-46ea-94f7-623471c15883/MohidLandSoilProfile.png&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://content.screencast.com/users/jovem/folders/Jing/media/b9ef6c79-c1d1-46ea-94f7-623471c15883/MohidLandSoilProfile.png&amp;quot; width=&amp;quot;650&amp;quot; height=&amp;quot;436&amp;quot;  border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/htm&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Water Flow===&lt;br /&gt;
Soil contains a large distribution of pore sizes and channels through which water may flow. In general the water flow determination is based on the mass conservation and momentum equation. In the case of soil it is assumed that the forces of inertia are almost zero; therefore the balance is reduced to the forces of pressure, gravity and viscous. The equation that describes the flow through soil is the Buckingham Darcy equation (Jury et al,1991). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;v=-K\left ( \theta  \right )\left ( \frac{\partial H}{\partial z}  \right )=-K\left ( \theta  \right )\left ( \frac{\partial h}{\partial z} + 1 \right )\,\,\,\,(1.1)\\ &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|''v'' || is the water velocity at the cell interface (m/s)&lt;br /&gt;
|-&lt;br /&gt;
| ''H'' ||  is the hydraulic head (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''θ'' || is the water content (m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''K''|| is the hydraulic conductivity (m/s)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The hydraulic head is given by the formula:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;H=h+p+z\,\,\,\,(1.2)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|-&lt;br /&gt;
| ''h'' ||  is the hydraulic head (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''p'' || is hydrostatic pressure (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''z''|| is the topography  (m)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When in saturated conditions, hydraulic head is zero and hydrostatic pressure may occur (if water is at rest or decelerating). In unsaturated conditions hydrostatic pressure is zero and hydarulic head exists.&lt;br /&gt;
&lt;br /&gt;
The soil is a very complex system, made up of a heterogeneous mixture of solid, liquid, and gaseous material. The liquid phase consists of soil water, which fills part or all of the open spaces between the soil particles. Therefore it is possible to divided the soil in two layers:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Saturated soil  &amp;lt;math&amp;gt;\Longrightarrow&amp;lt;/math&amp;gt;   The soil pores are filled by water&lt;br /&gt;
&lt;br /&gt;
*Unsaturated one &amp;lt;math&amp;gt;\Longrightarrow&amp;lt;/math&amp;gt;   The soil pores are filled by water and air&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the first case the equation of Buckingham Darcy is simplified to the Darcy law and the parameter associated for its resolution are connected with the saturated layer. On the other hand for the resolution of the equation (1.1) a description of the characteristics of the the unsaturated layer is needed.&lt;br /&gt;
&lt;br /&gt;
==Vadose Zone==&lt;br /&gt;
&lt;br /&gt;
Many vadose flow and transport studies require description of unsaturated soil hydraulic proprieties over a wide range of pressure head. The hydraulic proprieties are described using the porous size distribution model of Maulem (1976) for hydraulic conductivity in combination with a water retention function introduced by Van Genuchten (1980). &lt;br /&gt;
&lt;br /&gt;
===Water content===&lt;br /&gt;
&lt;br /&gt;
Water content is the quantity of water contained in the soil (called '''soil moisture'''). It is given as a volumetric basis and it is defined mathematically as:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta = \frac{V_w}{V_T}\hspace{5cm}(1.3) &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;V_T = V_s + V_v = V_s + V_w + V_a\hspace{1.6cm}(1.4)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;'' || is water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;V_w&amp;lt;/math&amp;gt; '' || is the volume of water (m s&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;V_T&amp;lt;/math&amp;gt;'' || is the total volume (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;V_s&amp;lt;/math&amp;gt;'' || is the soil volume (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;V_a&amp;lt;/math&amp;gt;'' || is the air space (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Initial Condition====&lt;br /&gt;
The user may define a water content initialization or choose the model to compute in the unsaturated area heads so that soil water is at [[Field Capacity]].&lt;br /&gt;
The below explains the latter.&lt;br /&gt;
&lt;br /&gt;
Once determined the aquifer level ('''water table''') the water content is associated at each cells by the following criteria:&lt;br /&gt;
:{|&lt;br /&gt;
*If the cell is located above the water table &amp;lt;math&amp;gt;\theta=\theta_{s}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
*If the cell is located over the water table &amp;lt;math&amp;gt;\theta=\theta_{ns}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta=\theta_{s}&amp;lt;/math&amp;gt;'' || is the water content in the saturated soil  (m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta=\theta_{ns}&amp;lt;/math&amp;gt;'' || is the water content in the non saturated soil   (m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to calculate field capacity by the equation (1.7) the evaluation of the suction head is needed :&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
:&amp;lt;math&amp;gt; h=-DWZ\cdot 0.5\hspace{2cm}for\,\, the\,\, cells\,\, immediately\,\, above\,\, the\,\, water\,\, table \hspace{5cm} (1.5)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;h=-(-DZZ-h)\hspace{1.5cm}for\,\, the\,\, other\,\, cells\hspace{9.75cm} (1.6) &amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Figure05.jpg|thumb|center|300px|Figure 1: Suction Head Calculation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As shown in the picture the suction head is calculated in order to maintain the same total head (H = z + p + h) in the cells in agreement with the field capacity definition.&lt;br /&gt;
&lt;br /&gt;
===Water retention===&lt;br /&gt;
The model use for characterizing the shape of water retention curves is the van Genuchten model:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\theta(h) = \theta_r + \frac{\theta_s - \theta_r}{\left[ 1+(\alpha |h|)^n \right]^{1-1/n}}\hspace{0.5cm}\Longrightarrow\hspace{0.5cm}h(\theta)=\left |\frac{(S_{E}^{-1/n}-1)^{1/n}}{\alpha}  \right |\hspace{3cm}(1.7)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;S_{E}=\frac{\theta-\theta_{r}}{\theta_{s}-\theta_{r}}\hspace{11cm}(1.8)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|''&amp;lt;math&amp;gt;\theta(h)&amp;lt;/math&amp;gt;'' || is the the water retention curve (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta_s&amp;lt;/math&amp;gt;'' || is the saturated water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\theta_r&amp;lt;/math&amp;gt;'' || is the residual water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''h''|| is the suction head (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt;'' || is related to the inverse of the air entry (m &amp;lt;sub&amp;gt;-1&amp;lt;/sub&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| ''n''|| is a measure of the pore-size distribution n&amp;gt;1 (dimensionless)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;S_{E}&amp;lt;/math&amp;gt;''|| is the effective saturation (dimensionless)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Saturated and Unsaturated Conductivity===&lt;br /&gt;
&lt;br /&gt;
The saturated conductivity is given depending on the type of soil; instead the unsaturated conductivity is obtained from the suction head by the Maulem model:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;K(\theta)=K_{s}\cdot Se^{L}\cdot (1-(1-Se^{1/m})^{m})^{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
:{|&lt;br /&gt;
|''&amp;lt;math&amp;gt;K(\theta)&amp;lt;/math&amp;gt;'' || is the unsaturated conductivity (m/s)&lt;br /&gt;
|-&lt;br /&gt;
| ''&amp;lt;math&amp;gt;K_{s}&amp;lt;/math&amp;gt;'' || is the saturated conductivity(m/s)&lt;br /&gt;
|-&lt;br /&gt;
| ''L'' || empirical pore-connectivity (m)&lt;br /&gt;
|-&lt;br /&gt;
| ''m''|| m=1-1/n(dimensionless)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Evapotranspiration==&lt;br /&gt;
&lt;br /&gt;
Some water may be extracted from the soil because of the evaporation and transpiration processes, which become a sink in soil water profile. These two processes are currently named Evapotranspiration. &lt;br /&gt;
&lt;br /&gt;
Potential Evapotranspiration may be modeled using the Penmann Monteith equation. &lt;br /&gt;
Also, if vegetation exists, a differentiation between Potential Transpiration and Potential Evaporation is done using LAI.&lt;br /&gt;
These computation are made in [[Module Basin]] since this is the module that handles water fluxes in the interface betwen modules.&lt;br /&gt;
&lt;br /&gt;
However, not all of the potential water that can be evaporated or transpired will be in fact removed from the soil. The water that will really leave the soil through these processes is calculated: i) if vegetation exists, effective transpiration is computed in module Vegetation; ii) effective evaporation is computed in the Porous Media module.&lt;br /&gt;
In Figure below it can be seen that the actual transpiration and evaporation are then used in Porous Media module to compute the new water content. &lt;br /&gt;
The actual evaporation, which happens only at the soil surface, is calculated based on: i) a pressure head limit or ii) a soil conductivity limit, chosen by the user. It allows the model not to evaporate any surface water, even if it is available, when the soil head gets below the assigned value (i) or limits evaporation velocity to layer unsaturated conductivity (ii).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:evapotranspiration fluxogram.jpg|thumb|center|400px|Evapotranspiration fluxogram in Mohid Land model]]&lt;br /&gt;
Remind that Feddes is one option for computing effective transpiration in plants in [[module Vegetation]].&lt;br /&gt;
&lt;br /&gt;
==Iteration Process==&lt;br /&gt;
&lt;br /&gt;
Once obtained the water fluxes a balance on the water volume of each cell is apply in order to obtain the new water content &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;. The balance applied is the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Horizontal Direction X'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}+(FluxU_{(i,j,k)}\cdot ComputeFace_{(i,j,k)}-Flux_{(i,j+1,k)}\cdot  ComputeFace_{(i,j+1,k)}\cdot \Delta t) V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Horizontal Direction Y'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}+(FluxV_{(i,j,k)}\cdot  ComputeFace_{(i,j,k)}-FluxV_{(i+1,j,k)}\cdot  ComputeFace_{(i+1,j,k)})\cdot \Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Vertical Direction W'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}+(FluxW_{(i,j,k)}\cdot  ComputeFace_{(i,j,k})-FluxW_{(i,j,k+1)}\cdot  ComputeFace_{(i,j,k+1}))\cdot \Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Transpiration Flux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}-(TranspFlux_{(i,j,k)}\Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Evaporation Flux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}-(EvapFlux_{(i,j,k)}\Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Infiltration Flux'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\theta=(\theta\cdot V_{cell}-(UnsatK\cdot Area_{cell}\cdot(1-Imp) \Delta t)\cdot V_{cell}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
&lt;br /&gt;
|''&amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;'' || is the water content (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;V_{cell}&amp;lt;/math&amp;gt;'' || is the cell volume (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;Area_{cell}&amp;lt;/math&amp;gt;'' || is the cell area (m &amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
|''ComputeFace'' || is the computed face (dimensionless)&lt;br /&gt;
|-&lt;br /&gt;
|''&amp;lt;math&amp;gt;\Delta t&amp;lt;/math&amp;gt;'' || is the time step (s)&lt;br /&gt;
|-&lt;br /&gt;
|''FluxX'' || is the flux in X direction (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''FluxV'' || is the flux in Y direction (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''FluxW'' || is the flux in W direction (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''TranspFlux'' || is the transpiration flux (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''EvapFlux'' || is the evaporation flux (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/s)&lt;br /&gt;
|-&lt;br /&gt;
|''UnsatK'' || is unsaturated conductivity (m /s)&lt;br /&gt;
|-&lt;br /&gt;
|''Imp'' || is the percentage of impermeable soil of the cell (dimensionless)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The value of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; so obtained is compared with one used in the volumes calculation and the iterative process stop when: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;(\theta^{'})-(\theta^{new})&amp;lt;\,\, Tolerance\hspace{3cm} (1.9) &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where:&lt;br /&gt;
&lt;br /&gt;
:{|&lt;br /&gt;
|''&amp;lt;math&amp;gt;\theta^{'}&amp;lt;/math&amp;gt;'' || is the water content of the previous iteration (m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;/m &amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If the equation (1.9) is not satisfy the temporal step is divided in half and the new value of &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is used for solving the equation (1.7) for restarting the calculation process. The iteration process is stoped when the tolerance desired is reached.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Figure06.jpg|thumb|center|300px|Figure 2: Time step reduction]]&lt;br /&gt;
&lt;br /&gt;
==Other Features==&lt;br /&gt;
===How to Generate Info needed in Porous Media===&lt;br /&gt;
====SoilMap====&lt;br /&gt;
Model needs to know soil ID in each cell and layer to pick hydraulic properties from that type of soil. In Pedology soil includes more than one horizon, each with different soil properties. Here Soil is used has a unit of soil hidraulic properties, i.e., to define a soil with three horizons one has to create three SoilID (see below). This also means that if a watershed has at least one soil with three horizons one has to create three soil maps. Each soil map will be infact the map of each horizon of the soils. The grid cells with only one horizon will have the same SoilID in all maps, the grid cells with three horizons will have a different SoilID in each map.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* Constant value&lt;br /&gt;
* Soil Grid. One possible option is to associate with soil shape file. In this case can use MOHID GIS going to menu [Tools]-&amp;gt;[Shape to Grid Data] and provide: i) the grid (model grid), ii) the soil shape file and iii) the corespondence between soil codes and soil ID defined in data file. &lt;br /&gt;
&lt;br /&gt;
Soil ID must be defined in [[Module_FillMatrix|Module FillMatrix]] standards for each soil horizon defined (grid example):&lt;br /&gt;
 &amp;lt;beginhorizon&amp;gt;&lt;br /&gt;
 KLB                       : 1&lt;br /&gt;
 KUB                       : 10&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : SoilID&lt;br /&gt;
 DEFAULTVALUE              : 1&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\..\GeneralData\PorousMedia\SoilID200m.dat&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 ..&lt;br /&gt;
 &amp;lt;endhorizon&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Remarks'''&lt;br /&gt;
&lt;br /&gt;
All the soil ID's appearing in the soil grid(s) must be defined in the PorousMedia data file in terms of hydraulic properties:&lt;br /&gt;
 &amp;lt;beginsoiltype&amp;gt;&lt;br /&gt;
 ID                        : 1&lt;br /&gt;
 THETA_S                   : 0.3859&lt;br /&gt;
 THETA_R                   : 0.0476&lt;br /&gt;
 N_FIT                     : 1.39&lt;br /&gt;
 SAT_K                     : 3.5556e-6&lt;br /&gt;
 ALPHA                     : 2.75&lt;br /&gt;
 L_FIT                     : 0.50&lt;br /&gt;
 &amp;lt;endsoiltype&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginsoiltype&amp;gt;&lt;br /&gt;
 ID                        : 2&lt;br /&gt;
 ...&lt;br /&gt;
 &amp;lt;endsoiltype&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
====Soil Bottom====&lt;br /&gt;
The soil depth must be known by the model. This is computed by the model from terrain altitude (topography) and soil bottom altitude. As so, a soil bottom grid is needed.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* Grid File. &lt;br /&gt;
Soil depth (and soil bottom altitude, the effective grid needed) can be defined with a constant depth or estimated from slope [[HOW TO SoilBottom LINK]]. When the soil depth is estimated as a function of slope, soil depth will be smaller in ares with higher slope. In this areas only the surface layers of the soil will be considered (see Porous Media Geometry).&lt;br /&gt;
&lt;br /&gt;
Define the grid just generated, in the porous media data file with: &lt;br /&gt;
 BOTTOM_FILE  : ..\..\GeneralData\PorousMedia\BottomLevel.dat&lt;br /&gt;
&lt;br /&gt;
====Water Level====&lt;br /&gt;
Options:&lt;br /&gt;
*Grid File.&lt;br /&gt;
The water table altitude represents the initial altitude of the water table. &lt;br /&gt;
It is recommended to do a spin-up run to estabilize water level and then do a continuous simulation starting with the final water table achieved.&lt;br /&gt;
Use the following blocks with [[Module_FillMatrix|Module FillMatrix]] standards:&lt;br /&gt;
 &amp;lt;beginwaterlevel&amp;gt;&lt;br /&gt;
 NAME                      : waterlevel&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 0&lt;br /&gt;
 REMAIN_CONSTANT           : 0&lt;br /&gt;
 FILENAME                  : ..\..\GeneralData\PorousMedia\WaterLevel0.50.dat&lt;br /&gt;
 &amp;lt;endwaterlevel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Impermeability====&lt;br /&gt;
Impermeability values (0 - completely permeable, 1 - impermeable) must be provided. &lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* Constant Value.&lt;br /&gt;
* Grid File. One possible option is to associate with land use shape file. In this case can use MOHID GIS going to menu [Tools]-&amp;gt;[Shape to Grid Data] and provide: i) the grid (model grid), ii) the land use shape file and iii) the corespondence between land use codes and Impermeability values.&lt;br /&gt;
Use the following blocks with [[Module_FillMatrix|Module FillMatrix]] standards:&lt;br /&gt;
 &amp;lt;beginimpermeablefraction&amp;gt;&lt;br /&gt;
 NAME                      : impermeablefraction&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 0&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\..\GeneralData\PorousMedia\AreaImpermeavel.dat&lt;br /&gt;
 &amp;lt;endimpermeablefraction&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Outputs==&lt;br /&gt;
&lt;br /&gt;
===Timeseries===&lt;br /&gt;
&lt;br /&gt;
Theta - is water content of selected cell (vol water/ vol soil)&lt;br /&gt;
&lt;br /&gt;
relative_water_content - content in selected cell. between zero and one (zero is residual water content and one is saturated water content)&lt;br /&gt;
&lt;br /&gt;
VelW_[m/s] - vertical velocity in the bottom face of the selected cell&lt;br /&gt;
&lt;br /&gt;
VelW_Corr_[m/s] - vertical velocity in the bottom face of the selected cell that may be corrected if oversaturation occurs. if no correction occurs is the same as previous.&lt;br /&gt;
&lt;br /&gt;
InF_Vel_[m/s] - infiltration velocity (in the soil surface)&lt;br /&gt;
&lt;br /&gt;
Head_[m] - Suction in selected cell &lt;br /&gt;
&lt;br /&gt;
Conductivity_[m/s] - Conductivity in selected cell&lt;br /&gt;
&lt;br /&gt;
level_water_table_[m] - water table altitude &lt;br /&gt;
&lt;br /&gt;
water_table_depth_[m] - water table depth (from soil surface)&lt;br /&gt;
&lt;br /&gt;
Hydro_Pressure_[m] - hydrostatic pressure in selected cell&lt;br /&gt;
&lt;br /&gt;
Final_Head_[m] - Soil water charge in selected cell&lt;br /&gt;
&lt;br /&gt;
[Check Mohid Land Heights and Levels to understand some of the outputs]&lt;br /&gt;
&lt;br /&gt;
GW_flow_to_river_total_[m3/s] - Ground water flow to river if it is a river point&lt;br /&gt;
&lt;br /&gt;
Surface_Evaporation_Flux_[m3/s] - evaporation flux (in the soil surface)&lt;br /&gt;
&lt;br /&gt;
Transpiration_Flux_[m3/s] - transpiration flux in selected cell&lt;br /&gt;
&lt;br /&gt;
[http://screencast.com/t/I8We0B4j2uJ Check Mohid Land Heights and Levels to understand the difference between level and height results]&lt;br /&gt;
&lt;br /&gt;
==References ==&lt;br /&gt;
*Jury,W.A.,Gardner,W.R.,Gardner,W.H., 1991,Soil Physics&lt;br /&gt;
*Van Genuchten, M.T., A closed form equation for predicting the hydraulic conductivity of unsaturated soils&lt;br /&gt;
*Wu,J.,Zhang, R., Gui,S.,1999, Modelling soil water movement with water uptake by roots, Plant and soil 215: 7-17&lt;br /&gt;
*Marcel G.Schaap and Martinus Th. van Genuchten, A modified Maulem van Genuchten Formulation for Improved Description of Hydraulic Conductivity Near Saturation, 16 December 2005&lt;br /&gt;
&lt;br /&gt;
==Data File ==&lt;br /&gt;
&lt;br /&gt;
===Keywords===&lt;br /&gt;
 Keywords read in the Data File&lt;br /&gt;
 &lt;br /&gt;
 Keyword                   : Data Type         Default     !Comment&lt;br /&gt;
 &lt;br /&gt;
 BOTTOM_FILE               : char              -           !Path to Bottom Topography File&lt;br /&gt;
 START_WITH_FIELD          : logical           1           !Sets Theta initial Field Capacity&lt;br /&gt;
 CONTINUOUS                : logical           0           !Continues from previous run&lt;br /&gt;
 STOP_ON_WRONG_DATE        : logical           1           !Stops if previous run end is different from actual&lt;br /&gt;
                                                           !Start&lt;br /&gt;
 OUTPUT_TIME               : sec. sec. sec.    -           !Output Time&lt;br /&gt;
 TIME_SERIE_LOCATION       : char              -           !Path to File which defines Time Series&lt;br /&gt;
 CONTINUOUS_OUTPUT_FILE    : logical           1           !Writes &amp;quot;famous&amp;quot; iter.log&lt;br /&gt;
 CONDUTIVITYFACE           : integer           1           !Way to interpolate conducivity face&lt;br /&gt;
                                                           !1 - Average, 2 - Maximum, 3 - Minimum, 4 - Weigthed&lt;br /&gt;
 HORIZONTAL_K_FACTOR       : real              1.0         !Factor for Horizontal Conductivity = Kh / Kv&lt;br /&gt;
 CUT_OFF_THETA_LOW         : real              1e-6        !Disables calculation when Theta is near ThetaR&lt;br /&gt;
 CUT_OFF_THETA_HIGH        : real              1e-15       !Set Theta = ThetaS when Theta &amp;gt; ThetaS - CUT_OFF_THETA_HIGH&lt;br /&gt;
 MIN_ITER                  : integer           2           !Number of iterations below which the DT is increased&lt;br /&gt;
 MAX_ITER                  : integer           3           !Number of iterations above which the DT is decreased&lt;br /&gt;
 LIMIT_ITER                : integer           50          !Number of iterations of a time step (for restart)&lt;br /&gt;
 THETA_TOLERANCE           : real              0.001       !Converge Parameter&lt;br /&gt;
 INCREASE_DT               : real              1.25        !Increase of DT when iter &amp;lt; MIN_ITER&lt;br /&gt;
 DECREASE_DT               : real              0.70        !Decrease of DT when iter &amp;gt; MAX_ITER&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : Theta / waterlevel &lt;br /&gt;
 &lt;br /&gt;
 see Module FillMatrix for more options&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Sample===&lt;br /&gt;
&lt;br /&gt;
Some keywords of the PorousMedia input file:&lt;br /&gt;
 BOTTOM_FILE               : ..\General Data\Other\PorousMedia\SoilBottom_2cells.dat&lt;br /&gt;
 TIME_SERIE_LOCATION       : ..\General Data\TimeSeries\TimeSeriesLocation3D_2m.dat&lt;br /&gt;
 &lt;br /&gt;
 COMPUTE_SOIL_FIELD        : 1 &lt;br /&gt;
 &lt;br /&gt;
 OUTPUT_TIME               : 0 86400&lt;br /&gt;
 CUT_OFF_THETA_HIGH        : 1e-15&lt;br /&gt;
 START_WITH_FIELD          : 1&lt;br /&gt;
 &lt;br /&gt;
 LIMIT_EVAP_WATER_VEL      : 0&lt;br /&gt;
 LIMIT_EVAP_HEAD           : 0&lt;br /&gt;
 HEAD_LIMIT                : -100&lt;br /&gt;
 THETA_HYDRO_COEF          : 0.98&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginsoiltype&amp;gt;&lt;br /&gt;
 ID                        : 1&lt;br /&gt;
 THETA_S                   : 0.43&lt;br /&gt;
 THETA_R                   : 0.078&lt;br /&gt;
 SAT_K                     : 2.888e-6&lt;br /&gt;
 N_FIT                     : 1.56&lt;br /&gt;
 ALPHA                     : 3.6&lt;br /&gt;
 L_FIT                     : 0.50&lt;br /&gt;
 &amp;lt;endsoiltype&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 !----- Hydraulic Soil Properties&lt;br /&gt;
 &amp;lt;beginhorizon&amp;gt;&lt;br /&gt;
 KLB                       : 1&lt;br /&gt;
 KUB                       : 10&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : SoilID&lt;br /&gt;
 INITIALIZATION_METHOD     : CONSTANT&lt;br /&gt;
 DEFAULTVALUE              : 1&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginproperty&amp;gt;&lt;br /&gt;
 NAME                      : Theta&lt;br /&gt;
 INITIALIZATION_METHOD     : CONSTANT&lt;br /&gt;
 DEFAULTVALUE              : 0.30&lt;br /&gt;
 &amp;lt;endproperty&amp;gt;&lt;br /&gt;
 &amp;lt;endhorizon&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginwaterlevel&amp;gt;&lt;br /&gt;
 NAME                      : waterlevel&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 1.&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\General Data\Initial Conditions\InitialWaterLevel_2cells.dat&lt;br /&gt;
 &amp;lt;endwaterlevel&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;beginimpermeablefraction&amp;gt;&lt;br /&gt;
 NAME                      : impermeablefraction&lt;br /&gt;
 INITIALIZATION_METHOD     : ASCII_FILE&lt;br /&gt;
 DEFAULTVALUE              : 0&lt;br /&gt;
 REMAIN_CONSTANT           : 1&lt;br /&gt;
 FILENAME                  : ..\General Data\Other\PorousMedia\InitialImpermeabilization_2cells.dat&lt;br /&gt;
 &amp;lt;endimpermeablefraction&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[Category:MOHID Land]]&lt;/div&gt;</summary>
		<author><name>Carina</name></author>	</entry>

	<entry>
		<id>http://www.wiki.mohid.com/index.php?title=Module_Geometry&amp;diff=3320</id>
		<title>Module Geometry</title>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Module_Geometry&amp;diff=3320"/>
				<updated>2010-09-30T17:05:26Z</updated>
		
		<summary type="html">&lt;p&gt;Carina: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Module Geometry handles the vertical discretization in MOHID. It was designed to divide the water column (in MOHID Water) or the soil compartment (in MOHID Land) in different vertical coordinates: Sigma, Cartesian, Lagrangian, Fixed Spacing, Harmonic, etc. A subdivision of the vertical domain into different sub-domains using different vertical coordinate systems is also possible.&lt;br /&gt;
&lt;br /&gt;
== General options ==&lt;br /&gt;
*Minimum depth&lt;br /&gt;
&lt;br /&gt;
== Vertical coordinate system ==&lt;br /&gt;
&lt;br /&gt;
=== Sigma ===&lt;br /&gt;
[[Image:SZZ.gif|center|425px|thumb|Vertical sigma mesh]]&lt;br /&gt;
&lt;br /&gt;
=== Cartesian ===&lt;br /&gt;
The Cartesian coordinate can be used with or without [[shaved cells]]. Cartesian builds layers from bottom to top with fixed depth of each layer with the possibility of colapsing layers from top to bottom. This hapens if for example water level reduces. The bottom layers are the last to colapse.&lt;br /&gt;
&lt;br /&gt;
=== Fixspacing ===&lt;br /&gt;
The [[Fixed Spacing coordinates|Fixed Spacing]] coordinate allows the user to study flows close to the bottom.&lt;br /&gt;
&lt;br /&gt;
=== Lagrangian ===&lt;br /&gt;
The [[Lagrangian coordinate]] moves the upper and lower faces with the vertical flow velocity. &lt;br /&gt;
&lt;br /&gt;
=== Harmonic === &lt;br /&gt;
The Harmonic coordinate works like the Cartesian coordinate, just that the horizontal faces close to the surface expand and collapse depending on the variation of the surface elevation. This coordinate was implemented in the geometry module to simulate reservoirs.&lt;br /&gt;
&lt;br /&gt;
=== Fixsediment ===&lt;br /&gt;
&lt;br /&gt;
=== SigmaTop ===&lt;br /&gt;
&lt;br /&gt;
=== Cartesiantop ===&lt;br /&gt;
Cartesiantop is equal to cartesian but builds layers from top to bottom. This type of coodinates are used for [[Mohid_Land|Mohid Land]]. The top is the topography and the bottom is the non-porousmedia (rock). This means that in lower depth soils there will be less layers than in higher depth soils.&lt;br /&gt;
&lt;br /&gt;
== Distances ==&lt;br /&gt;
[[Image:Mohid_distances.JPG|center|250px|thumb|MOHID syntax for distances]]&lt;br /&gt;
===Public routines===&lt;br /&gt;
; ModuleHorizontalGrid: GetHorizontalGrid(HorizontalGridID, XX_IE, YY_IE, XX_Z, YY_Z,XX_U, YY_U, XX_V, YY_V, XX_Cross, YY_Cross, DXX, DYY, DZX, DZY, DUX, DUY, DVX, DVY, XX, YY, XX2D_Z, YY2D_Z, STAT)&lt;br /&gt;
; ModuleGeometry: GetGeometryDistances(GeometryID, SZZ, DZZ, DWZ, DUZ, DVZ, DZI, DZE,ZCellCenter, ActualTime, STAT)&lt;br /&gt;
&lt;br /&gt;
== Areas ==&lt;br /&gt;
&lt;br /&gt;
== Volumes ==&lt;br /&gt;
[[Image:VolumeDeControlo.gif|center|250px|thumb|Single T-cell control volume]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;htm&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;http://content.screencast.com/users/GRiflet/folders/Jing/media/cf704a90-e3ba-4068-8843-8cae69f38bbc/Arakawa C grid.png&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://content.screencast.com/users/GRiflet/folders/Jing/media/cf704a90-e3ba-4068-8843-8cae69f38bbc/Arakawa C grid.png&amp;quot; width=&amp;quot;544&amp;quot; height=&amp;quot;191&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/htm&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bathymetry consistency diagnostic ==&lt;br /&gt;
&lt;br /&gt;
Once the vertical discretization is imposed and the bathymetry is chosen, the bottom layer can yield stability problems when using shaved cells. You can have very thin bottom cell next to a very wide bottom cell. To diagnose the existence of such problematic cells, a [[geometry diagnostic]] tool was developed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Modules]]&lt;br /&gt;
[[Category:MOHID Base 2]]&lt;br /&gt;
&lt;br /&gt;
== Input data file ==&lt;br /&gt;
===Keywords===&lt;br /&gt;
 IMPERMEABILITY                : 0/1               -           !Consider impermeable cell faces&lt;br /&gt;
 IMPER_COEF_U                  : real             [1]          !&lt;br /&gt;
 IMPER_COEFX_U                 : real             [0]          !&lt;br /&gt;
 IMPER_COEF_V                  : real             [1]          !&lt;br /&gt;
 IMPER_COEFX_V                 : real             [0]          !&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;begindomain&amp;gt;&lt;br /&gt;
   ID                          : int               -           !Domain ID&lt;br /&gt;
   TYPE                        : char              -           !Type of vertical coordinate of the domain&lt;br /&gt;
                                                               !Multiple options: FIXSPACING, SIGMA,&lt;br /&gt;
                                                               !LAGRANGIAN, CARTESIAN, HARMONIC, FIXSEDIMENT, CARTESIANTOP.&lt;br /&gt;
   LAYERS                      : int               -           !Number of layers&lt;br /&gt;
   EQUIDISTANT                 : real             [0]          !Equidistant layers spacing in meters&lt;br /&gt;
   LAYERTHICKNESS              : real vector       -           !If not equidistant specifies layers thickness&lt;br /&gt;
                                                               !starting from bottom layer (e.g. 50. 20. 10. 5.)&lt;br /&gt;
   TOLERANCEDEPTH              : real            [0.05]        !Just for SIGMA,ISOPYCNIC, LAGRANGIAN coordinates&lt;br /&gt;
   TOTALTHICKNESS              : real              -           !Total domain thickness &lt;br /&gt;
                                                               !(Just for FIXSPACING, FIXSEDIMENT, SOIL_TOPLAYER)&lt;br /&gt;
   EMPTY_TOP_LAYERS            : int              [0]          !Number of empty layers counting from top&lt;br /&gt;
   DOMAINDEPTH                 : real&lt;br /&gt;
 &amp;lt;enddomain&amp;gt;&lt;/div&gt;</summary>
		<author><name>Carina</name></author>	</entry>

	<entry>
		<id>http://www.wiki.mohid.com/index.php?title=Module_Geometry&amp;diff=3319</id>
		<title>Module Geometry</title>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Module_Geometry&amp;diff=3319"/>
				<updated>2010-09-30T17:03:14Z</updated>
		
		<summary type="html">&lt;p&gt;Carina: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Module Geometry handles the vertical discretization in MOHID. It was designed to divide the water column (in MOHID Water) or the soil compartment (in MOHID Land) in different vertical coordinates: Sigma, Cartesian, Lagrangian, Fixed Spacing, Harmonic, etc. A subdivision of the vertical domain into different sub-domains using different vertical coordinate systems is also possible.&lt;br /&gt;
&lt;br /&gt;
== General options ==&lt;br /&gt;
*Minimum depth&lt;br /&gt;
&lt;br /&gt;
== Vertical coordinate system ==&lt;br /&gt;
&lt;br /&gt;
=== Sigma ===&lt;br /&gt;
[[Image:SZZ.gif|center|425px|thumb|Vertical sigma mesh]]&lt;br /&gt;
&lt;br /&gt;
=== Cartesian ===&lt;br /&gt;
The Cartesian coordinate can be used with or without [[shaved cells]]. Cartesian builds layers from bottom to topwith fixed depth of each layer with the possibility of colapsing layers from top to bottom. This hapens if for example water level reduces. The bottom layers are the last to colapse.&lt;br /&gt;
&lt;br /&gt;
=== Fixspacing ===&lt;br /&gt;
The [[Fixed Spacing coordinates|Fixed Spacing]] coordinate allows the user to study flows close to the bottom.&lt;br /&gt;
&lt;br /&gt;
=== Lagrangian ===&lt;br /&gt;
The [[Lagrangian coordinate]] moves the upper and lower faces with the vertical flow velocity. &lt;br /&gt;
&lt;br /&gt;
=== Harmonic === &lt;br /&gt;
The Harmonic coordinate works like the Cartesian coordinate, just that the horizontal faces close to the surface expand and collapse depending on the variation of the surface elevation. This coordinate was implemented in the geometry module to simulate reservoirs.&lt;br /&gt;
&lt;br /&gt;
=== Fixsediment ===&lt;br /&gt;
&lt;br /&gt;
=== SigmaTop ===&lt;br /&gt;
&lt;br /&gt;
=== Cartesiantop ===&lt;br /&gt;
Cartesiantop is equal to cartesian but builds layers from top to bottom. This type of coodinates are used for [[Mohid_Land|Mohid Land]]. The top is the topography and the bottom is the non-porousmedia (rock). This means that in lower depth soils there will be less layers than in higher depth soils.&lt;br /&gt;
&lt;br /&gt;
== Distances ==&lt;br /&gt;
[[Image:Mohid_distances.JPG|center|250px|thumb|MOHID syntax for distances]]&lt;br /&gt;
===Public routines===&lt;br /&gt;
; ModuleHorizontalGrid: GetHorizontalGrid(HorizontalGridID, XX_IE, YY_IE, XX_Z, YY_Z,XX_U, YY_U, XX_V, YY_V, XX_Cross, YY_Cross, DXX, DYY, DZX, DZY, DUX, DUY, DVX, DVY, XX, YY, XX2D_Z, YY2D_Z, STAT)&lt;br /&gt;
; ModuleGeometry: GetGeometryDistances(GeometryID, SZZ, DZZ, DWZ, DUZ, DVZ, DZI, DZE,ZCellCenter, ActualTime, STAT)&lt;br /&gt;
&lt;br /&gt;
== Areas ==&lt;br /&gt;
&lt;br /&gt;
== Volumes ==&lt;br /&gt;
[[Image:VolumeDeControlo.gif|center|250px|thumb|Single T-cell control volume]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;htm&amp;gt;&lt;br /&gt;
&amp;lt;a href=&amp;quot;http://content.screencast.com/users/GRiflet/folders/Jing/media/cf704a90-e3ba-4068-8843-8cae69f38bbc/Arakawa C grid.png&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://content.screencast.com/users/GRiflet/folders/Jing/media/cf704a90-e3ba-4068-8843-8cae69f38bbc/Arakawa C grid.png&amp;quot; width=&amp;quot;544&amp;quot; height=&amp;quot;191&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/htm&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bathymetry consistency diagnostic ==&lt;br /&gt;
&lt;br /&gt;
Once the vertical discretization is imposed and the bathymetry is chosen, the bottom layer can yield stability problems when using shaved cells. You can have very thin bottom cell next to a very wide bottom cell. To diagnose the existence of such problematic cells, a [[geometry diagnostic]] tool was developed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Modules]]&lt;br /&gt;
[[Category:MOHID Base 2]]&lt;br /&gt;
&lt;br /&gt;
== Input data file ==&lt;br /&gt;
===Keywords===&lt;br /&gt;
 IMPERMEABILITY                : 0/1               -           !Consider impermeable cell faces&lt;br /&gt;
 IMPER_COEF_U                  : real             [1]          !&lt;br /&gt;
 IMPER_COEFX_U                 : real             [0]          !&lt;br /&gt;
 IMPER_COEF_V                  : real             [1]          !&lt;br /&gt;
 IMPER_COEFX_V                 : real             [0]          !&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;begindomain&amp;gt;&lt;br /&gt;
   ID                          : int               -           !Domain ID&lt;br /&gt;
   TYPE                        : char              -           !Type of vertical coordinate of the domain&lt;br /&gt;
                                                               !Multiple options: FIXSPACING, SIGMA,&lt;br /&gt;
                                                               !LAGRANGIAN, CARTESIAN, HARMONIC, FIXSEDIMENT, CARTESIANTOP.&lt;br /&gt;
   LAYERS                      : int               -           !Number of layers&lt;br /&gt;
   EQUIDISTANT                 : real             [0]          !Equidistant layers spacing in meters&lt;br /&gt;
   LAYERTHICKNESS              : real vector       -           !If not equidistant specifies layers thickness&lt;br /&gt;
                                                               !starting from bottom layer (e.g. 50. 20. 10. 5.)&lt;br /&gt;
   TOLERANCEDEPTH              : real            [0.05]        !Just for SIGMA,ISOPYCNIC, LAGRANGIAN coordinates&lt;br /&gt;
   TOTALTHICKNESS              : real              -           !Total domain thickness &lt;br /&gt;
                                                               !(Just for FIXSPACING, FIXSEDIMENT, SOIL_TOPLAYER)&lt;br /&gt;
   EMPTY_TOP_LAYERS            : int              [0]          !Number of empty layers counting from top&lt;br /&gt;
   DOMAINDEPTH                 : real&lt;br /&gt;
 &amp;lt;enddomain&amp;gt;&lt;/div&gt;</summary>
		<author><name>Carina</name></author>	</entry>

	<entry>
		<id>http://www.wiki.mohid.com/index.php?title=GenerateGrid&amp;diff=2864</id>
		<title>GenerateGrid</title>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=GenerateGrid&amp;diff=2864"/>
				<updated>2010-02-26T19:12:34Z</updated>
		
		<summary type="html">&lt;p&gt;Carina: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
GenerateGrid is a [[Mohid Support Tools|MOHID support tool]] used to create regular grids with a non-constant grid size. It reads an input data file named ''GridGenerator.dat''. &lt;br /&gt;
&lt;br /&gt;
== Input data file (GridGenerator.dat)==&lt;br /&gt;
Below is a sample input data file. &lt;br /&gt;
&lt;br /&gt;
 OUTPUT_FILE            : Sample.grd          !Output file name&lt;br /&gt;
 ORIGIN_X               : -9                  !Coordinate X of the lower left corner&lt;br /&gt;
 ORIGIN_Y               : 39                  !Coordinate Y of the lower left corner&lt;br /&gt;
 GRID_ANGLE             : 0                   !Rotation angle of the grid&lt;br /&gt;
 COORD_TIP              : 4                   !Coordinate type&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;begin_grid_xx&amp;gt;&lt;br /&gt;
 NUMBER_OF_SEGMENTS     : 1                   !Number of segments in the XX direction&lt;br /&gt;
 NODES                  : 0.    2             !Coordinates starting in 0. of the XX nodes&lt;br /&gt;
 RESOLUTION             : 0.1   0.1           !Resolution at each of the defined XX nodes&lt;br /&gt;
 &amp;lt;end_grid_xx&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;begin_grid_yy&amp;gt;&lt;br /&gt;
 NUMBER_OF_SEGMENTS     : 2                   !Number of segments in the YY direction&lt;br /&gt;
 NODES                  : 0.     1.5    3     !Coordinates starting in 0. of YY nodes&lt;br /&gt;
 RESOLUTION             : 0.1    0.03   0.15  !Resolution at each of the defined YY nodes&lt;br /&gt;
 &amp;lt;end_grid_yy&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With these options a grid file is created, with origin in -9ºW and 39ºN (the approach is independent of the type of coordinates), with a constant spacing in the XX direction (resolution of 0.1º) and a non-constant spacing in the YY direction. In the YY direction, 2 segments are defined. The first starts at 0º from the origin and ends at 1.5º from the origin. The resolution of this segment starts at 0.1º and progressively decreases to 0.03º at the end of the segment. The second segment starts at the end of the first and ends at 3º from the origin. This means that the entire grid is 3º long in the YY direction. The resolution of the second segment starts at 0.03º and progressively decreases to 0.15º at the end of the segment. &lt;br /&gt;
&lt;br /&gt;
==Fast start==&lt;br /&gt;
How to create a grid. Go to MOHID Gis. Create NewData items choosing simple grid, then adjust coordinates.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>Carina</name></author>	</entry>

	</feed>