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()); }
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); } }