Module lignum

Class FirmamentNode

All Implemented Interfaces:
Transformation, Pickable, Renderable, Manageable, PersistenceCapable, Shareable, UserFields, XObject, Map, Instantiator<Instantiation>, Serializable

public class FirmamentNode extends NullWithShaderNode implements Instantiator<Instantiation>
See Also:
  • 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

      protected Vector<Double> sunPosition
    • zoneAzims

      protected GMatrix zoneAzims
    • inclinations

      protected Vector<Double> inclinations
    • azimDivisions

      protected Vector<Integer> azimDivisions
    • diffuseRad

      protected GMatrix diffuseRad
    • inclinationIndex

      protected Vector<Integer> inclinationIndex
    • azimuthIndex

      protected Vector<Integer> azimuthIndex
    • dir_x

      protected Vector<Double> dir_x
    • dir_y

      protected Vector<Double> dir_y
    • dir_z

      protected Vector<Double> dir_z
    • areasByInclination

      protected Vector<Double> areasByInclination
    • thetZ

      protected double thetZ
    • numOfSectors

      protected int numOfSectors
    • deltaIncl

      protected double deltaIncl
    • halfDeltaIncl

      protected double halfDeltaIncl
    • standDensity

      protected double standDensity
  • Constructor Details

    • FirmamentNode

      public FirmamentNode()
    • FirmamentNode

      public FirmamentNode(int no_incl, int no_azim)
  • Method Details

    • getInstantiator

      public Instantiator getInstantiator()
      Overrides:
      getInstantiator in class Node
    • instantiate

      public void instantiate(Instantiation state)
      Specified by:
      instantiate in interface Instantiator<Instantiation>
    • resize

      public void resize(int no_incl, int no_azim, double diffuse_rad_plane)
    • diffuseRadiationSum

      public double diffuseRadiationSum(Vector<Double> direction)
    • diffuseRegionRadiationSum

      public double diffuseRegionRadiationSum(int n, Vector<Double> direction)
    • diffuseHalfRegionRadiationSum

      public double diffuseHalfRegionRadiationSum(int n, Vector<Double> direction)
    • 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 region
      z - height of the point from ground, m
      x - distance of the point from the tree stem, m
      la - needle area (total area) per tree (= sf * Wf), m2
      ke - extinction cofficient (= 0.14 for Scots pine), unitless
      H - height of tree (h. of stand), m
      Hc - height of the crown base of the tree (stand), m
      direction -
      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

      public void setSunPosition(Vector<Double> v)
      Sets the the vector of Firmament that points to the sun v declared const in cLignum
      Parameters:
      v - Vector pointing to sun
    • directRadiation

      public 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)
      Parameters:
      direction -
      Returns:
      Method returns type MJ in cLignum
    • directHalfRegionRadiationSum

      public double directHalfRegionRadiationSum(int n, Vector<Double> direction)
    • getInclination

      public double getInclination(int n)
    • getAzimuth

      public double getAzimuth(int n)
    • getDirection

      public Vector3d getDirection(int n)
    • setDirectRadiation

      public void setDirectRadiation(double rad)
    • getSunPosition

      public Vector<Double> 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()