Battery Current in Solar Network (Solar.py)

36 views
Skip to first unread message

Sehwan Park

unread,
Mar 20, 2022, 10:09:33 PM3/20/22
to SUAVE FORUM
In Energy/Networks/Solar.py,  battery.inputs.current is updated two times with different value: 1) solar_logic.outputs (current, power_in) before calling battery.energy_calc(numerics), and 2) solar_logic.inputs.currentesc before calling pack_battery_conditions.

To my understanding, the first might be for charging battery energy using remaining solar panel power (energy), and the second is for drawing power from battery and using it. Just let me know if I got wrong way.

Anyway, it seems that for the second one, the current of avionics and payload should be considered as well just as we did in Battery_Propeller.py.
-  battery.inputs.current        = solar_logic.inputs.currentesc
+ avionics_payload_power  = avionics.outputs.power + payload.outputs.power
+ avionics_payload_current = avionics_payload_power/self.voltage 
+ battery.inputs.current        = solar_logic.inputs.currentesc + avionics_payload_current
(or include them in Solar_Logic.py instead of Solar.py)

Could you please explain if I miss anything?

Thanks,
Sehwan

Emilio

unread,
Mar 22, 2022, 12:42:59 PM3/22/22
to SUAVE FORUM
Hi Sehwan,
There is a small mistake. Looks like someone got copy and paste happy when the battery was updated.

This line is correct and that means the battery energy state is calculated correctly.

However, this line should not be here at all. This line is really used to save the results for plotting after the fact. So the plots are wrong but the internal calcs are correct.

The solar logic handles the power flow so all the math you mentioned above is already done.

-Emilio

Sehwan Park

unread,
Apr 3, 2022, 8:27:30 PM4/3/22
to SUAVE FORUM
Thank you, Emilio.
Now it's crystal clear to me. 

Sehwan

2022년 3월 23일 수요일 오전 1시 42분 59초 UTC+9에 Emilio님이 작성:
Reply all
Reply to author
Forward
0 new messages