-
Notifications
You must be signed in to change notification settings - Fork 23
/
CalcSatDensity.c
executable file
·47 lines (36 loc) · 1.35 KB
/
CalcSatDensity.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* SUMMARY: CalcSatDensity.c - Calculate saturated soil density
* USAGE: Part of DHSVM
*
* AUTHOR: Colleen O. Doten
* ORG: University of Washington, Department of Civil Engineering
* E-MAIL: [email protected]
* ORIG-DATE: Sept-03
* DESCRIPTION: This function calculates the saturated soil density based
on the bulk density and particlc density.
* DESCRIP-END.
* FUNCTIONS: CalcSatDensity)
* COMMENTS:
* $Id: CalcSatDensity.c,v 1.1 2003/10/29 01:01:08 colleen Exp $
*/
#include "settings.h"
#include "functions.h"
#include "constants.h"
/*****************************************************************************
Function name: CalcSatDensity()
Purpose : This function calculates the daturated soil density.
Required :
float Density - Soil bulk density in kg/m3
Returns : SatDensity - Saturated Soil Density
Modifies : NA
Comments :
*****************************************************************************/
float CalcSatDensity(float Density)
{
float SatDensity; /* Saturated Soil Density (kg/m3) */
float Porosity;
/* This could also be calculated using the porosity from the configuration file */
Porosity = 1 - (Density/PARTDENSITY);
SatDensity = PARTDENSITY*(1-Porosity) + WATER_DENSITY*Porosity;
return SatDensity;
}