예제 #1
0
        public double strutLength(double targetTemp, double crossSection, Material material, Cooler cooler)
        {
            MWNumericArray targetTempData   = new MWNumericArray(targetTemp);
            MWNumericArray crossSectionData = new MWNumericArray(crossSection);
            MWNumericArray materialData     = material.getData("PM");
            MWNumericArray coolerData       = cooler.getData("CPM");
            MWNumericArray strutLength      = (MWNumericArray)matlabSim.strutlength(
                targetTempData, crossSectionData, materialData, coolerData);

            return(strutLength.ToScalarDouble());
        }
예제 #2
0
 public double simulate(double length, double crossSection, Material material, Cooler cooler)
 {
     try {
         MWNumericArray lengthData       = new MWNumericArray(length);
         MWNumericArray crossSectionData = new MWNumericArray(crossSection);
         MWNumericArray materialData     = material.getData("PM");
         MWNumericArray coolerData       = cooler.getData("CPM");
         MWNumericArray ssTemp           = (MWNumericArray)matlabSim.steadystatetemperature(
             lengthData, crossSectionData, materialData, coolerData);
         return(ssTemp.ToScalarDouble());
     } catch (Exception ex) {
         throw new ArgumentException("Bad arguments to simulate method", ex);
     }
 }