fof_sd.h
Go to the documentation of this file.
1 //
2 // $Id$
3 //
4 /*{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}
5 * Name: fofs_sd.c
6 * Desc: Soil Duff Simulation
7 *
8 {*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}{*}*/
9 
10 /*...........................................................................*/
11 /*Consumed Duff Dept Limits... */
12 #define e_DufDepLim 50.0
13 
14 /*.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*/
15 /* This amount will be used in Duff Sim when there has been no duff consumed */
16 /* so we have duff but none was consumed which is not the same as having */
17 /* no duff to start with and thus running Exp Heat */
18 /* This amount is how much duff we'll say gets consumed just to get the */
19 /* Duff Sim to do somthing, creating a little bit of heat for report/graph */
20 #define e_MinDufCon 0.1 /* in inches */
21 
22 
23 /*.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.*/
24 /* SD - Soil Duff Simulation Input Parameters */
25 typedef struct {
26  char cr_Name[50];
27  int i_midburn; /* midburn 720 1680 900 1100 1000 900 */
28  int i_burntime; /* burntime 240 180 300 300 400 400 */
29  int i_stoptime; /* stoptime 1200 2400 1800 1800 1500 1500 */
30  REAL r_ConDufDep; /* consumed duffdepth 0.08 0.06 0.05 0.04 0.07 */
31  REAL r_duffheat; /* duff heat content - J/m3 */
32  int i_duffdensity; /* duff density - kg/m3 */
33  REAL r_bd; /* soil bulk density - g/m3 */
34  REAL r_pd; /* soil particle density - g/m3 */
35  REAL r_xo; /* extrapolated water cont. at -1 J/kg */
36  REAL r_ls; /* thermal conductivity of mineral fraction */
37  REAL r_ga; /* de Vries shape factor */
38  REAL r_xwo; /* water content for liquid recirculation */
39  REAL r_cop; /* power for recirculation function */
40  int i_dt; /* time step - s */
41  REAL r_startwc; /* starting soil water content - m3/m3 */
42  REAL r_starttemp; /* starting soil temperatue - C */
43 
44 /* Layer and Display arrays, */
45 /* This get initalized before going into simulation, they tell the simulatn */
46 /* they define what the layers are and if it is to be outputed */
47 /* See where they get iniialized, */
48  REAL rr_z[e_mplus1+1]; /* Layer */
49  REAL rr_node[e_mplus1+1]; /* 1 = Display, 0 = No Display */
50 
51 } d_SD;
52 
53 
54 int SD_Mngr (d_SD *a_SD, char cr_TmpFN[], char cr_ErrMes[]);
55 int SD_Init (d_SD *a_SD, d_SI *a_SI, char cr_ErrMes[]);
56 int SD_ChkSoiDuf (float f_DufDepPre, float f_DufDepPos, char cr_ErrMes[]);
57 
58 REAL SD_HeatAdj (REAL r_Post);
59 float SD_Heatpercent(void);
60 void SD_Disp (d_SD *a_SD);
#define REAL
Definition: fof_sh.h:20
int SD_Init(d_SD *a_SD, d_SI *a_SI, char cr_ErrMes[])
Definition: fof_sd.c:171
void SD_Disp(d_SD *a_SD)
REAL SD_HeatAdj(REAL r_Post)
Definition: fof_sd.c:253
Definition: fof_sh.h:37
REAL r_starttemp
Definition: fof_sd.h:42
float SD_Heatpercent(void)
Definition: fof_sd.c:235
int i_duffdensity
Definition: fof_sd.h:32
int i_dt
Definition: fof_sd.h:40
REAL r_xwo
Definition: fof_sd.h:38
REAL r_ConDufDep
Definition: fof_sd.h:30
int SD_ChkSoiDuf(float f_DufDepPre, float f_DufDepPos, char cr_ErrMes[])
Definition: fof_sd.c:280
REAL r_ls
Definition: fof_sd.h:36
REAL r_bd
Definition: fof_sd.h:33
int i_burntime
Definition: fof_sd.h:28
REAL r_ga
Definition: fof_sd.h:37
REAL r_pd
Definition: fof_sd.h:34
#define e_mplus1
Definition: fof_sh.h:32
REAL rr_z[e_mplus1+1]
Definition: fof_soi.c:54
int i_stoptime
Definition: fof_sd.h:29
int SD_Mngr(d_SD *a_SD, char cr_TmpFN[], char cr_ErrMes[])
Definition: fof_sd.c:53
REAL r_duffheat
Definition: fof_sd.h:31
REAL r_startwc
Definition: fof_sd.h:41
int i_midburn
Definition: fof_sd.h:27
Definition: fof_sd.h:25
REAL r_cop
Definition: fof_sd.h:39
REAL r_xo
Definition: fof_sd.h:35