Class BatteryStorage
java.lang.Object
neqsim.util.NamedBaseClass
neqsim.process.SimulationBaseClass
neqsim.process.equipment.ProcessEquipmentBaseClass
neqsim.process.equipment.battery.BatteryStorage
- All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, SimulationInterface, NamedInterface
Simple battery storage unit maintaining a state of charge.
The unit can be charged or discharged by supplying a power level and a duration. The state of charge is updated accordingly and the energy stream of the unit reflects the power usage (positive duty while charging and negative when discharging).
- Author:
- esol
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleprivate doubleprivate doubleprivate doubleprivate static final longSerialization version UID.private doubleFields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor with zero capacity.BatteryStorage(String name) Construct a battery with a given name and zero capacity.BatteryStorage(String name, double capacity) Construct a battery with the given name and capacity. -
Method Summary
Modifier and TypeMethodDescriptionvoidcharge(double power, double hours) Charge the battery.doubledischarge(double power, double hours) Discharge the battery.doubleGet capacity [J].doubleGet state of charge [J].doubleGet state of charge as a fraction of capacity.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.voidsetCapacity(double capacity) Set capacity [J].voidsetStateOfCharge(double soc) Set state of charge [J].Methods inherited from class ProcessEquipmentBaseClass
copy, displayResult, equals, getConditionAnalysisMessage, getController, getEnergyStream, getEntropyProduction, getExergyChange, getMassBalance, getMassBalance, getMechanicalDesign, getMinimumFlow, getPressure, getPressure, getProperty, getReport_json, getResultTable, getSpecification, getTemperature, getTemperature, getThermoSystem, hashCode, initMechanicalDesign, isActive, isActive, isSetEnergyStream, reportResults, run_step, runConditionAnalysis, setController, setEnergyStream, setEnergyStream, setFlowValveController, setMinimumFlow, setPressure, setRegulatorOutSignal, setSpecification, setTemperature, solved, toJson, toJsonMethods inherited from class SimulationBaseClass
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTimeMethods inherited from class NamedBaseClass
getName, getTagName, setName, setTagNameMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface NamedInterface
getName, getTagName, setName, setTagNameMethods inherited from interface ProcessEquipmentInterface
getCapacityDuty, getCapacityMax, getExergyChange, getFluid, getRestCapacity, needRecalculation, validateSetupMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run_step, runTransient, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
capacity
private double capacity -
stateOfCharge
private double stateOfCharge -
chargeEfficiency
private double chargeEfficiency -
dischargeEfficiency
private double dischargeEfficiency -
currentPower
private double currentPower
-
-
Constructor Details
-
BatteryStorage
Construct a battery with the given name and capacity.- Parameters:
name- name of the unitcapacity- maximum energy capacity [J]
-
BatteryStorage
public BatteryStorage()Default constructor with zero capacity. -
BatteryStorage
Construct a battery with a given name and zero capacity.- Parameters:
name- name of the unit
-
-
Method Details
-
charge
public void charge(double power, double hours) Charge the battery.- Parameters:
power- charging power [W]hours- duration of charging [h]
-
discharge
public double discharge(double power, double hours) Discharge the battery.- Parameters:
power- requested power [W]hours- duration of discharge [h]- Returns:
- actual delivered power [W]
-
getStateOfCharge
public double getStateOfCharge()Get state of charge [J].- Returns:
- current stored energy
-
setStateOfCharge
public void setStateOfCharge(double soc) Set state of charge [J].- Parameters:
soc- stored energy
-
getCapacity
public double getCapacity()Get capacity [J].- Returns:
- maximum storage capacity
-
setCapacity
public void setCapacity(double capacity) Set capacity [J].- Parameters:
capacity- maximum storage capacity
-
getStateOfChargeFraction
public double getStateOfChargeFraction()Get state of charge as a fraction of capacity.- Returns:
- state of charge [0-1]
-
run
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Parameters:
id- UUID
-