// 1.5608 * scattererFractionInMesophyll,
// IOR_WATER);
Function1 iorMesophyll = new ConstantFunction1(1.415);
Function1 iorAntidermalWall = new AXpBFunction1(
(1.0 - scattererFractionInAntidermalWall),
1.535 * scattererFractionInAntidermalWall,
IOR_WATER);
double concDryMatter = dryBulkDensity / (1.0 - airVolumeFraction);
double concProtein = concDryMatter * proteinFraction;
double concCellulose = concDryMatter * celluloseFraction;
double concLignin = concDryMatter * ligninFraction;
double absProtein = concProtein * SAC_PROTEIN;
double absCellulose = concCellulose * SAC_CELLULOSE_LIGNIN;
double absLignin = concLignin * SAC_CELLULOSE_LIGNIN;
Function1 mesophyllAbsorptionCoefficient = new SumFunction1()
.addChild(new ScaledFunction1(
concChlorophyllAInMesophyll + concChlorophyllBInMesophyll,
SAC_CHLOROPHYLL_AB))
.addChild(new ScaledFunction1(
concCarotenoidsInMesophyll,
SAC_CAROTENOIDS))
.addChild(new ConstantFunction1(absProtein + absCellulose + absLignin))
.addChild(SAC_WATER);
// try {
// OutputStream file = new FileOutputStream("/Users/brad/mesosac.csv");
// PrintStream out = new PrintStream(new CompositeOutputStream()
// .addChild(System.out)
// .addChild(file));
// for (int i = 400; i <= 700; i += 5) {
// out.println(mesophyllAbsorptionCoefficient.evaluate(1e-9 * (double) i));
// }
// out.flush();
// file.close();
// } catch (IOException e) {
// e.printStackTrace();
// }
double mesophyllFraction = bifacial ? 0.5 : 0.8;
mesophyllThickness = mesophyllFraction * wholeLeafThickness;
double lambda = 550e-9;
System.out.printf("mesophyllAbsorptionCoefficient=%f", mesophyllAbsorptionCoefficient.evaluate(lambda));
System.out.println();
System.out.printf("mesophyllThickness=%f", mesophyllThickness);
System.out.println();
System.out.printf("mesophyllOpticalDepth=%f", mesophyllAbsorptionCoefficient.evaluate(lambda) * mesophyllThickness);
System.out.println();
System.out.printf("nCuticle=%f", IOR_CUTICLE.evaluate(lambda));
System.out.println();
System.out.printf("nWater=%f", IOR_WATER.evaluate(lambda));
System.out.println();
System.out.printf("sacWater=%f", SAC_WATER.evaluate(lambda));
System.out.println();
System.out.printf("nWall=%f", iorAntidermalWall.evaluate(lambda));
System.out.println();
System.out.printf("nMesophyll=%f", iorMesophyll.evaluate(lambda));
System.out.println();
System.out.printf("dryBulkDensity=%f", dryBulkDensity);
System.out.println();