Ejemplo n.º 1
0
        public void validate_bidirectional_analog_TDiffuse()
        {
            var analyticSolution = BidirectionalAnalyticSolutions.GetBidirectionalRadianceInSlab(
                _slabThickness,
                new OpticalProperties(_mua, _musp, _g, 1.0),
                1,               // direction 1=down
                _slabThickness); // position at slab end
            var sd = ErrorCalculation.StandardDeviation(_output.Input.N, _output.Td, _output.Td2);

            Assert.Less(Math.Abs(_output.Td - analyticSolution), 3 * sd);
        }
Ejemplo n.º 2
0
        public void validate_bidirectional_CAW_RDiffuse()
        {
            var analyticSolution = BidirectionalAnalyticSolutions.GetBidirectionalRadianceInSlab(
                _slabThickness,
                new OpticalProperties(_mua, _musp, _g, 1.0),
                -1, // direction -1=up
                0); // position at surface
            var sd = ErrorCalculation.StandardDeviation(_output.Input.N, _output.Rd, _output.Rd2);

            Assert.Less(Math.Abs(_output.Rd - analyticSolution), 3 * sd);
        }
Ejemplo n.º 3
0
        public void validate_bidirectional_analog_ATotal()
        {
            var analyticSolutionRight =
                BidirectionalAnalyticSolutions.GetBidirectionalRadianceIntegratedOverInterval(
                    _slabThickness,
                    new OpticalProperties(_mua, _musp, _g, 1.0),
                    1,
                    0,
                    _slabThickness);
            var analyticSolutionLeft =
                BidirectionalAnalyticSolutions.GetBidirectionalRadianceIntegratedOverInterval(
                    _slabThickness,
                    new OpticalProperties(_mua, _musp, _g, 1.0),
                    -1,
                    0,
                    _slabThickness);
            // take sum because absorbed energy independent of direction
            var analyticSolution = (analyticSolutionRight + analyticSolutionLeft);
            var sd = ErrorCalculation.StandardDeviation(_output.Input.N, _output.Atot, _output.Atot2);

            Assert.Less(Math.Abs(_output.Atot - _mua * analyticSolution), 3 * sd);
        }