java.lang.Object
de.grogra.lignum.sky.Firmament
- All Implemented Interfaces:
Mathsym
- Direct Known Subclasses:
FirmamentWithMask
Translated from orignal C++ Lignum code.
- Author:
- Alexander Brinkmann
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected double
protected GMatrix
protected double
protected double
protected double
protected double
protected double
protected double
protected int
protected static int
protected int
protected static int
protected int
protected double
protected double
protected GMatrix
Fields inherited from interface de.grogra.lignum.jadt.Mathsym
HIT_THE_FOLIAGE, HIT_THE_WOOD, K_EPSILON, NO_HIT, PI_DIV_2, R_EPSILON, R_HUGE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
double
diffuseForestRegionRadiationSum
(int n, double z, double x, double la, double ke, double H, double Hc, Vector<Double> direction, double dens) This method calculates the radiation reaching a segment in a tree that is growing in a stand among identical trees (dens trees/ha).double
diffuseHalfRegionRadiationSum
(int n, Vector<Double> direction) double
double
diffuseRadiationSum
(Vector<Double> direction) double
diffuseRegionRadiationSum
(int n, Vector<Double> direction) double
directHalfRegionRadiationSum
(int n, Vector<Double> direction) double
directRadiation
(Vector<Double> direction) returns the intensity of the direct (sun) radiation on the plane perpendicular to the dirction of the sun (return) direction of the sun (in vector direction) Obs, sunPosition[2] = sin(iclination)int
getAzimDivision
(int n) double
getAzimuth
(int n) int
getAzimuthIndex
(int n) getDirection
(int n) double
getInclination
(int n) int
getInclinationIndex
(int n) int
int
double
getSectorArea
(int n) int
void
void
resize
(int no_incl, int no_azim, double diffuse_rad_plane) void
setDiffuseRadiation
(double rad) Sets the radiation of sectors to correspond input.void
setDirectRadiation
(double rad) void
Sets the the vector of Firmament that points to the sun v declared const in cLignum
-
Field Details
-
NUM_OF_AZIM
protected static int NUM_OF_AZIM -
NUM_OF_INCL
protected static int NUM_OF_INCL -
num_of_incl
protected int num_of_incl -
num_of_azim
protected int num_of_azim -
diffuseRadScale
protected double diffuseRadScale -
directRadPlane
protected double directRadPlane -
diffuseRadPlane
protected double diffuseRadPlane -
diffuseRadBall
protected double diffuseRadBall -
diffuseRadZenith
protected double diffuseRadZenith -
sunPosition
-
zoneAzims
-
inclinations
-
azimDivisions
-
diffuseRad
-
inclinationIndex
-
azimuthIndex
-
dir_x
-
dir_y
-
dir_z
-
areasByInclination
-
thetZ
protected double thetZ -
numOfSectors
protected int numOfSectors -
deltaIncl
protected double deltaIncl -
halfDeltaIncl
protected double halfDeltaIncl -
standDensity
protected double standDensity
-
-
Constructor Details
-
Firmament
public Firmament() -
Firmament
public Firmament(int no_incl, int no_azim)
-
-
Method Details
-
resize
public void resize(int no_incl, int no_azim, double diffuse_rad_plane) -
diffuseRadiationSum
-
diffuseRegionRadiationSum
-
diffuseHalfRegionRadiationSum
-
diffuseForestRegionRadiationSum
public double diffuseForestRegionRadiationSum(int n, double z, double x, double la, double ke, double H, double Hc, Vector<Double> direction, double dens) This method calculates the radiation reaching a segment in a tree that is growing in a stand among identical trees (dens trees/ha). The idea here is that the tree grows in a "hole" in the stand. The "hole" is a circular cylinder, the gross-sectional area of which is 10000/dens m2 and height equal to tree height. Outside this "hole" the foliage area (calculated with the aid of tree's leaf area and dens) is evenly distributed in the crown volume (leaf area density) that is between top height and the height of the crown base. The shading caused by the surrounding stand depends on the distance light beam travels in the stand volume on its way from a point in the sky to the segment: traveled distance * leaf area density * extinction coefficient ( extinction coefficient = 0.14 for Scots pine) The radiation coming from a point in the sky (sector) is obtained from method Firmament::regionRadiationSum(int n, vector& direction). Both height of the segment and its distance from the tree stem affect the path lenght in the surrounding canopy. The path length of the beam inside the canopy depends on the height it hits the mantle of the "hole". Since the the segment is not in the middle of the (bottom) circle of the "hole", the distance the beam travels inside the "hole" and consequently the height at which it hits the wall depends on the direction of the beam. This effect is treated here in an average manner. For all azimuthal directions of the coming beam the mean distance from a point (inside the circle) to the circumference of it is used in calculations. It seems that as an fairly accurate approximation mean distance = r*(1 - 0.35*(x/r)^2.5), where r is the radius of the circle and x is the distance of the point from center of the circle (0 <= x <= r). - Parameters:
n
- number of regionz
- height of the point from ground, mx
- distance of the point from the tree stem, mla
- needle area (total area) per tree (= sf * Wf), m2ke
- extinction cofficient (= 0.14 for Scots pine), unitlessH
- height of tree (h. of stand), mHc
- height of the crown base of the tree (stand), mdirection
-dens
- Density of the stand (trees/ha)- Returns:
- The annual radiation sum (MJ) from the nth region of the firmament as shaded by the neighboring stand direction the direction of nth region, If n < 0 or n > total number of regions - 1, return -1.0
-
setDiffuseRadiation
public void setDiffuseRadiation(double rad) Sets the radiation of sectors to correspond input. Updates also diffuseRadPlane, diffuseRadBall, diffuseRadZenith -variables- Parameters:
rad
- , Diffuse radiation falling on a horizontal plane
-
setSunPosition
Sets the the vector of Firmament that points to the sun v declared const in cLignum- Parameters:
v
- Vector pointing to sun
-
directRadiation
returns the intensity of the direct (sun) radiation on the plane perpendicular to the dirction of the sun (return) direction of the sun (in vector direction) Obs, sunPosition[2] = sin(iclination)- Parameters:
direction
-- Returns:
- Method returns type MJ in cLignum
-
directHalfRegionRadiationSum
-
getInclination
public double getInclination(int n) -
getAzimuth
public double getAzimuth(int n) -
getDirection
-
setDirectRadiation
public void setDirectRadiation(double rad) -
getSunPosition
-
numberOfRegions
public int numberOfRegions() -
diffusePlaneSensor
public double diffusePlaneSensor() -
diffuseBallSensor
public double diffuseBallSensor() -
getInclinationIndex
public int getInclinationIndex(int n) -
getAzimuthIndex
public int getAzimuthIndex(int n) -
getSectorArea
public double getSectorArea(int n) -
getAzimDivision
public int getAzimDivision(int n) -
getNoOfAzimuths
public int getNoOfAzimuths() -
getNoOfInclinations
public int getNoOfInclinations() -
outInclinations
public void outInclinations()
-