public function calculateLam(InductiveDev $inductive, $pcbID) { $sEnv = $inductive->getEnvironment(); $piE = $this->systemService->getPiE(111, $sEnv); $pcb = $this->pcbService->getItem($pcbID); $system = $this->systemService->getItem($pcb->getSystemID()); $temp = $inductive->getTempPassive() + $inductive->getTempDissipation() + $system->getTemp(); $inductive->setTemp($temp); $surface = $inductive->getSurface(); $weight = $inductive->getWeight(); $powerLoss = $inductive->getPowerLoss(); if ($surface) { $deltaT = 125 * $powerLoss / ($surface / 6.452); } else { if ($weight) { $deltaT = 11.5 * $powerLoss / pow($weight * 2.2046, 0.6766); } else { $deltaT = 35; } } $ths = $temp + 1.1 * $deltaT; $piT = exp(-0.11 / (8.617000000000001 * pow(10, -5)) * (1 / ($ths + 273) - 1 / 298)); $type = $inductive->getDevType(); $desc = $inductive->getDescription(); $base = $this->getDescValue($type, $desc); $qual = $inductive->getQuality(); $piQ = $this->getQualityValue($qual); $lambda = $base * $piT * $piQ * $piE * pow(10, -6); return $lambda; }