bmgen package#
Subpackages#
- bmgen.targets package
- Subpackages
- bmgen.targets.basytec package
- bmgen.targets.bcl package
- Subpackages
- Submodules
- bmgen.targets.bcl.ast module
- bmgen.targets.bcl.battery module
- bmgen.targets.bcl.channel module
- bmgen.targets.bcl.constants module
- bmgen.targets.bcl.function module
- bmgen.targets.bcl.program module
- bmgen.targets.bcl.stepinfo module
- bmgen.targets.bcl.transformer module
- Module contents
- bmgen.targets.bm package
- Subpackages
- Submodules
- bmgen.targets.bm.ast module
- bmgen.targets.bm.battery module
- bmgen.targets.bm.channel module
- bmgen.targets.bm.ctrl module
- bmgen.targets.bm.function module
- bmgen.targets.bm.program module
- bmgen.targets.bm.stepinfo module
- bmgen.targets.bm.time module
- bmgen.targets.bm.transformer module
- Module contents
- bmgen.targets.jsonld package
- Subpackages
- Submodules
- bmgen.targets.jsonld.ast module
- bmgen.targets.jsonld.battery module
- bmgen.targets.jsonld.channel module
- bmgen.targets.jsonld.constants module
- bmgen.targets.jsonld.function module
- bmgen.targets.jsonld.ontology module
- bmgen.targets.jsonld.program module
- bmgen.targets.jsonld.stepinfo module
- bmgen.targets.jsonld.transformer module
- Module contents
- bmgen.targets.neware package
- Subpackages
- Submodules
- bmgen.targets.neware.ast module
- bmgen.targets.neware.battery module
- bmgen.targets.neware.channel module
- bmgen.targets.neware.constants module
- bmgen.targets.neware.ctrl module
- bmgen.targets.neware.function module
- bmgen.targets.neware.program module
- bmgen.targets.neware.stepinfo module
- bmgen.targets.neware.transformer module
- Module contents
- bmgen.targets.python package
- Subpackages
- Submodules
- bmgen.targets.python.ast module
- bmgen.targets.python.battery module
- bmgen.targets.python.channel module
- bmgen.targets.python.constants module
- bmgen.targets.python.function module
- bmgen.targets.python.program module
- bmgen.targets.python.stepinfo module
- bmgen.targets.python.transformer module
- Module contents
- Module contents
- Subpackages
- bmgen.util package
- bmgen.web package
Submodules#
bmgen.base_generator module#
bmgen.battery module#
- class bmgen.battery.Battery(nominalCapacity: float | None = None, minVoltage: float | None = None, maxVoltage: float | None = None, nominalVoltage: float | None = None, eodVoltage: float | None = None, eocVoltage: float | None = None, contChargeCurrent: float | None = None, peakChargeCurrent: float | None = None, contDischargeCurrent: float | None = None, peakDischargeCurrent: float | None = None, minChargeTemperature: float | None = None, maxChargeTemperature: float | None = None, minDischargeTemperature: float | None = None, maxDischargeTemperature: float | None = None, weight: float | None = None, nominalCurrent: float | None = None, energyDensity: float | None = None, internalResistance: float | None = None, oneC: float | None = None)#
Bases:
objectThis class can be used to reference battery parameters in a cycling program. Parameters can be set to fixed values or translated to variables for the cycler.
- contChargeCurrent: float | None = None#
Maximum constant charge current in A.
- contDischargeCurrent: float | None = None#
Maximum constant discharge current in A.
- energyDensity: float | None = None#
Energy density in Wh/l.
- eocVoltage: float | None = None#
End-of-charge voltage for standard charging in V.
- eodVoltage: float | None = None#
End-of-discharge voltage for standard discharging in V.
- internalResistance: float | None = None#
Internal resistance in Ohm.
- maxChargeTemperature: float | None = None#
Maximum charge temperature in °C.
- maxDischargeTemperature: float | None = None#
Maximum discharge temperature in °C.
- maxVoltage: float | None = None#
Upper voltage limit that must not be exceeded in V.
- minChargeTemperature: float | None = None#
Minimum charge temperature in °C.
- minDischargeTemperature: float | None = None#
Minimum discharge temperature in °C.
- minVoltage: float | None = None#
Lower voltage limit that must not be exceeded in V.
- nominalCapacity: float | None = None#
Nominal capcity of the battery in Ah.
- nominalCurrent: float | None = None#
Nominal current in A.
- nominalVoltage: float | None = None#
Nominal voltage in V.
- oneC: float | None = None#
Current that is equal to 1C in A.
- peakChargeCurrent: float | None = None#
Peak charge current in A.
- peakDischargeCurrent: float | None = None#
Peak discharge current in A.
- weight: float | None = None#
Weight of the battery in g.
- class bmgen.battery.BatteryParametersNotSupported(nominalCapacity: float | None = None, minVoltage: float | None = None, maxVoltage: float | None = None, nominalVoltage: float | None = None, eodVoltage: float | None = None, eocVoltage: float | None = None, contChargeCurrent: float | None = None, peakChargeCurrent: float | None = None, contDischargeCurrent: float | None = None, peakDischargeCurrent: float | None = None, minChargeTemperature: float | None = None, maxChargeTemperature: float | None = None, minDischargeTemperature: float | None = None, maxDischargeTemperature: float | None = None, weight: float | None = None, nominalCurrent: float | None = None, energyDensity: float | None = None, internalResistance: float | None = None, oneC: float | None = None)#
Bases:
Battery
- class bmgen.battery.CyclerBattery(nominalCapacity: float | None = None, minVoltage: float | None = None, maxVoltage: float | None = None, nominalVoltage: float | None = None, eodVoltage: float | None = None, eocVoltage: float | None = None, contChargeCurrent: float | None = None, peakChargeCurrent: float | None = None, contDischargeCurrent: float | None = None, peakDischargeCurrent: float | None = None, minChargeTemperature: float | None = None, maxChargeTemperature: float | None = None, minDischargeTemperature: float | None = None, maxDischargeTemperature: float | None = None, weight: float | None = None, nominalCurrent: float | None = None, energyDensity: float | None = None, internalResistance: float | None = None, oneC: float | None = None)#
Bases:
Battery
- class bmgen.battery.PredefindedBattery(nominalCapacity: float | None = None, minVoltage: float | None = None, maxVoltage: float | None = None, nominalVoltage: float | None = None, eodVoltage: float | None = None, eocVoltage: float | None = None, contChargeCurrent: float | None = None, peakChargeCurrent: float | None = None, contDischargeCurrent: float | None = None, peakDischargeCurrent: float | None = None, minChargeTemperature: float | None = None, maxChargeTemperature: float | None = None, minDischargeTemperature: float | None = None, maxDischargeTemperature: float | None = None, weight: float | None = None, nominalCurrent: float | None = None, energyDensity: float | None = None, internalResistance: float | None = None, oneC: float | None = None)#
Bases:
Battery
bmgen.bmgen module#
- bmgen.bmgen.generate(file, target, format, intermediate, out, no_timestamps=False, battery=None, config=None, name=None)#
- bmgen.bmgen.output(target, text)#
bmgen.channel module#
- bmgen.channel.I: float#
Current measurement in A.
- bmgen.channel.StepCharge: float#
Charge throughput of the current step in Ah.
- bmgen.channel.T: float#
Temperature measurement in °C.
- bmgen.channel.Tenv: float#
Environment temperature measurement in °C.
- bmgen.channel.V: float#
Voltage measurement in V.
- bmgen.channel.channel(name: str) float#
Define a custom channel.
- Parameters:
name (str) – Name of the custom channel that is recognized by the targeted cycler.
- Returns:
Channel value that can be used in limits in calculations.
- Return type:
float
bmgen.converter module#
- exception bmgen.converter.ConverterError#
Bases:
Exception
bmgen.function module#
- bmgen.function.charge(current: float, voltage: float | None = None, limits: List[bool] = [], registrations: List = []) StepInfo#
Charge the battery connected to the cycler circuit.
- Parameters:
current (float) – Current setpoint in Ampere.
voltage (float | None) – Voltage setpoint in Volt, defaults to None.
limits (List[bool]) – List of limits, see the
limit()function, defaults to [].registrations (List) – List of registrations, see the
register()function, defaults to [].
- Returns:
StepInfoobject containing information about the executed step.- Return type:
- bmgen.function.discharge(current: float, voltage: float | None = None, limits: List[bool] = [], registrations: List = []) StepInfo#
Discharge the battery connected to the cycler circuit.
- Parameters:
current (float) – Current setpoint in Ampere.
voltage (float | None) – Voltage setpoint in Volt, defaults to None.
limits (List[bool]) – List of limits, see the
limit()function, defaults to [].registrations (List) – List of registrations, see the
register()function, defaults to [].
- Returns:
StepInfoobject containing information about the executed step.- Return type:
- bmgen.function.error(errnum: int)#
Set an error as the action for a limit.
An error will stop the execution of the current program until it is continued by an operator.
- Parameters:
errnum (int) – A number specifying what kind of error occured. The meaning of each numbers depends on the selected cycler target.
- bmgen.function.hours(value: float) time#
Convenience method to create a
timeinstance with thehoursattribute set.- Parameters:
value (float) – The number of hours.
- Return type:
- bmgen.function.limit(condition: bool, action=None)#
Define a limit for the current program step or the entire program.
Limits can be defined for one step if they are passed in the limits parameter. If a limit is defined on its own, it will apply to the entire program. In this case, an action must be specified, e.g.
error().- Parameters:
condition (bool) – Condition that will trigger the limit once it is reached.
action (_type_, optional) – Action to take once the limit condition is met. If this is None, the next step in the program will be executed.
- bmgen.function.message(errnum: int)#
Set a message as the action for a limit.
A message is informational and will not stop the execution of the current program.
- Parameters:
errnum (int) – A number specifying what kind of error occured. The meaning of each numbers depends on the selected cycler target.
- bmgen.function.minutes(value: float) time#
Convenience method to create a
timeinstance with theminutesattribute set.- Parameters:
value (float) – The number of minutes.
- Return type:
- bmgen.function.pause(limits: List[bool] = [], hours: float | None = None, minutes: float | None = None, seconds: float | None = None, registrations: List = []) StepInfo#
Pause the program until a limit is reached.
Limits can be set using the limit argument. The arguments hours, minutes, and seconds are provided as a shorthand to set a time-based limit. They act the same way as the the
time()function.- Parameters:
limits (List[bool], optional) – List of limits, see the
limit()function, defaults to [].hours (float | None, optional) – Hours of the time-based limit, defaults to None.
minutes (float | None, optional) – Minutes of the time-based limit, defaults to None.
seconds (float | None, optional) – Seconds of the time-based limit, defaults to None.
registrations (List, optional) – List of registrations, see the
register()function, defaults to [].
- Returns:
StepInfoobject containing information about the executed step.- Return type:
- bmgen.function.register(time: time | None = None, voltage: float | None = None, current: float | None = None, format: List | None = None)#
- bmgen.function.seconds(value: float) time#
Convenience method to create a
timeinstance with thesecondsattribute set.- Parameters:
value (float) – The number of seconds.
- Return type:
- class bmgen.function.time(hours: float | None = None, minutes: float | None = None, seconds: float | None = None)#
Bases:
objectObject expressing a timespan that can be used for defining limits.
The timespan can be set using different units. If multiple values are set, the will be converted to one unit and added together, e.g. minutes=1 and seconds=30 will result in seconds=90.
- hours: float | None = None#
- minutes: float | None = None#
- seconds: float | None = None#
bmgen.stepinfo module#
bmgen.transformer module#
Module contents#
- bmgen.get_version()#