-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathorgan.h
73 lines (67 loc) · 2.47 KB
/
organ.h
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#pragma once
#ifndef _ORGAN_H_
#define _ORGAN_H_
#include "weather.h"
#include "thermaltime.h"
#include "initinfo.h"
#include "development.h"
struct TElement
{
TElement() {CHO = 0; water = 0; nitrogen=0;}
double CHO;
double water;
double nitrogen;
};
class COrgan
{
public:
COrgan();
COrgan(const TInitInfo&);
COrgan(double);
virtual ~COrgan();
virtual void import_CH2O(double);// import CHO from the reserve, virtual common metabolic reserve
virtual void import_N(double); // import N from the reserve
// virtual double export_CHO(); //export CHO to the reserve, virtual common metabolic reserve
// virtual double export_N();
// virtual void grow(double);
virtual void respire();
double get_age() {return age;}
double get_physAge() {return physAge;}
double get_mass() {return mass;}
double get_CH2O() {return CH2O;}
double get_N() {return N;}
// TElement * get_element() {return element;}
double get_temperature() {return temperature;}
double get_longevity() {return longevity;}
double get_growthDuration() {return growthDuration;}
double get_agingDuration() {return agingDuration;}
TInitInfo get_initInfo() {return initInfo;}
CThermalTime * get_GDD() {return GDD;}
virtual void set_age(double x) {age = x;}
virtual void set_physAge(double x) {physAge=x;}
virtual void set_mass(double x) {mass=x;}
virtual void set_CH2O(double x) {CH2O=x;}
virtual void set_N(double x) {N=x;}
// virtual void set_element(TElement * x) {element=x;}
virtual void set_temperature(double x) {temperature=x;}
void set_longevity(double x) {longevity=x;}
virtual void set_growthDuration(double x) {growthDuration=x;}
virtual void set_agingDuration(double x) {agingDuration=x;}
virtual void initialize();
virtual void update();
private:
COrgan(const COrgan&);
TInitInfo initInfo;
TElement * element;
CThermalTime * GDD;
double age; // chronological age of an organ, days
double physAge; // physiological age accouting for temperature effect (in reference to endGrowth and lifeSpan, days)
double mass; // biomass, g
double CH2O; //glucose, MW = 180.18 / 6 = 30.03 g
double N; //nitrogen content, mg
double temperature; // organ temperature, C
double longevity; // life expectancy of an organ in days at optimal temperature (fastest growing temp), days
double growthDuration, agingDuration; // physiological days to reach the end of growth (both cell division and expansion) at optimal temperature, days
double C_conc;
};
#endif