How to use the hardware.component.resistor.Resistor.Model.calculate_part function in hardware

To help you get started, we’ve selected a few hardware examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ReliaQualAssociates / ramstk / rtk / hardware / component / resistor / fixed / Film.py View on Github external
except OverflowError:
                # TODO: Handle overflow error.
                return True

            # Resistance factor.
            if self.resistance >= 10.0 and self.resistance <= 100.0:
                self.piR = 1.0
            elif self.resistance > 100.0 and self.resistance <= 1.0E4:
                self.piR = 1.2
            elif self.resistance > 1.0E4 and self.resistance <= 1.0E6:
                self.piR = 1.3
            elif self.resistance > 1.0E6:
                self.piR = 3.5
            self.hazard_rate_model['piR'] = self.piR

        return Resistor.calculate_part(self)
github ReliaQualAssociates / ramstk / rtk-RQA / rtk / hardware / component / resistor / fixed / Film.py View on Github external
except OverflowError:
                # TODO: Handle overflow error.
                return True

            # Resistance factor.
            if self.resistance >= 10.0 and self.resistance <= 100.0:
                self.piR = 1.0
            elif self.resistance > 100.0 and self.resistance <= 1.0E4:
                self.piR = 1.2
            elif self.resistance > 1.0E4 and self.resistance <= 1.0E6:
                self.piR = 1.3
            elif self.resistance > 1.0E6:
                self.piR = 3.5
            self.hazard_rate_model['piR'] = self.piR

        return Resistor.calculate_part(self)
github ReliaQualAssociates / ramstk / rtk / hardware / component / resistor / fixed / Wirewound.py View on Github external
# Resistance factor.
            if self.resistance <= 500.0:
                self.piR = self._lst_piR[self.characteristic - 1][self.style - 1][0]
            elif self.resistance > 500.0 and self.resistance <= 1000.0:
                self.piR = self._lst_piR[self.characteristic - 1][self.style - 1][1]
            elif self.resistance > 1000.0 and self.resistance <= 5000.0:
                self.piR = self._lst_piR[self.characteristic - 1][self.style - 1][2]
            elif self.resistance > 5000.0 and self.resistance <= 10000.0:
                self.piR = self._lst_piR[self.characteristic - 1][self.style - 1][3]
            elif self.resistance > 10000.0 and self.resistance <= 20000.0:
                self.piR = self._lst_piR[self.characteristic - 1][self.style - 1][4]
            elif self.resistance > 20000.0:
                self.piR = self._lst_piR[self.characteristic - 1][self.style - 1][5]
            self.hazard_rate_model['piR'] = self.piR

        return Resistor.calculate_part(self)
github ReliaQualAssociates / ramstk / rtk / hardware / component / resistor / variable / Film.py View on Github external
self.piR = 1.8
            self.hazard_rate_model['piR'] = self.piR

            # Voltage factor.
            _v_applied = sqrt(self.resistance * self.operating_power)
            if _v_applied / self.rated_voltage <= 0.8:
                self.piV = 1.00
            elif(_v_applied / self.rated_voltage > 0.8 and
                 _v_applied / self.rated_voltage <= 0.9):
                self.piV = 1.05
            elif(_v_applied / self.rated_voltage > 0.9 and
                 _v_applied / self.rated_voltage <= 1.0):
                self.piV = 1.20
            self.hazard_rate_model['piV'] = self.piV

        return Resistor.calculate_part(self)
github ReliaQualAssociates / ramstk / rtk / hardware / component / resistor / variable / NonWirewound.py View on Github external
self.piR = 1.8
            self.hazard_rate_model['piR'] = self.piR

            # Voltage factor.
            _v_applied = sqrt(self.resistance * self.operating_power)
            if _v_applied / self.rated_voltage <= 0.8:
                self.piV = 1.00
            elif(_v_applied / self.rated_voltage > 0.8 and
                 _v_applied / self.rated_voltage <= 0.9):
                self.piV = 1.05
            elif(_v_applied / self.rated_voltage > 0.9 and
                 _v_applied / self.rated_voltage <= 1.0):
                self.piV = 1.20
            self.hazard_rate_model['piV'] = self.piV

        return Resistor.calculate_part(self)
github ReliaQualAssociates / ramstk / rtk / hardware / component / resistor / fixed / Wirewound.py View on Github external
except OverflowError:
                # TODO: Handle overflow error.
                return True

            # Resistance factor.
            if self.resistance <= 10000.0:
                self.piR = 1.0
            elif self.resistance > 10000.0 and self.resistance <= 1.0E5:
                self.piR = 1.7
            elif self.resistance > 1.0E5 and self.resistance <= 1.0E6:
                self.piR = 3.0
            elif self.resistance > 1.0E6:
                self.piR = 5.0
            self.hazard_rate_model['piR'] = self.piR

        return Resistor.calculate_part(self)
github ReliaQualAssociates / ramstk / rtk / hardware / component / resistor / fixed / Film.py View on Github external
except OverflowError:
                # TODO: Handle overflow error.
                return True

            # Resistance factor.
            if self.resistance < 100000.0:
                self.piR = 1.0
            elif self.resistance >= 100000.0 and self.resistance < 1.0E6:
                self.piR = 1.1
            elif self.resistance >= 1.0E6 and self.resistance < 1.0E7:
                self.piR = 1.6
            elif self.resistance >= 1.0E7:
                self.piR = 2.5
            self.hazard_rate_model['piR'] = self.piR

        return Resistor.calculate_part(self)
github ReliaQualAssociates / ramstk / rtk / hardware / component / resistor / variable / Wirewound.py View on Github external
_v_applied / self.rated_voltage <= 0.6):
                self.piV = 1.00
            elif(_v_applied / self.rated_voltage > 0.6 and
                 _v_applied / self.rated_voltage <= 0.7):
                self.piV = 1.10
            elif(_v_applied / self.rated_voltage > 0.7 and
                 _v_applied / self.rated_voltage <= 0.8):
                self.piV = 1.22
            elif(_v_applied / self.rated_voltage > 0.8 and
                 _v_applied / self.rated_voltage <= 0.9):
                self.piV = 1.40
            elif _v_applied / self.rated_voltage > 0.9:
                self.piV = 2.00
            self.hazard_rate_model['piV'] = self.piV

        return Resistor.calculate_part(self)
github ReliaQualAssociates / ramstk / rtk / hardware / component / resistor / variable / Thermistor.py View on Github external
self.hazard_rate_model = {}

        if self.hazard_rate_type == 2:
            self.hazard_rate_model['equation'] = 'lambdab * piQ * piE'

            # Base hazard rate.
            if self.type == 1:              # Bead
                self.base_hr = 0.021
            elif self.type == 2:            # Disk
                self.base_hr = 0.065
            elif self.type == 3:            # Rod
                self.base_hr = 0.105
            self.hazard_rate_model['lambdab'] = self.base_hr

        return Resistor.calculate_part(self)
github ReliaQualAssociates / ramstk / rtk / hardware / component / resistor / variable / Wirewound.py View on Github external
self.piV = 1.10
            elif(_v_applied / self.rated_voltage > 0.7 and
                 _v_applied / self.rated_voltage <= 0.8):
                self.piV = 1.22
            elif(_v_applied / self.rated_voltage > 0.8 and
                 _v_applied / self.rated_voltage <= 0.9):
                self.piV = 1.40
            elif _v_applied / self.rated_voltage > 0.9:
                self.piV = 2.00
            self.hazard_rate_model['piV'] = self.piV

            # Construction factor.
            self.piC = self._lst_piC[self.construction - 1]
            self.hazard_rate_model['piC'] = self.piC

        return Resistor.calculate_part(self)