Jump to content

[1.7.3] Real Battery v1.7


Blackline

Recommended Posts

12 hours ago, N_Molson said:

Stock KSP batteries are far too light IMHO. Such stuff tends to be heavy, and even a small car 12V DC battery is suprisingly dense.

That's not really the best comparison to be making; lead-acid batteries have poor energy-to-mass ratios. The sort of batteries you'd be seeing on spacecraft have a much better energy-to-mass ratio; lithium batteries can push to over 150 Wh/kg.

Link to comment
Share on other sites

The hard part is done now, take the cfg and make it as heavy as possible. you can config charge rates and ratio, even efficiency for charging.

The next thing to do is balancing, maybe another color/model and make a real mod out of it.

The plugin was made using visual Studio 15 community edition (free) and c#. very easy! there is a tutorial in the wiki how to setup visual Studio. 

Edited by Blackline
Link to comment
Share on other sites

Quote

That's not really the best comparison to be making; lead-acid batteries have poor energy-to-mass ratios. The sort of batteries you'd be seeing on spacecraft have a much better energy-to-mass ratio; lithium batteries can push to over 150 Wh/kg.

Agreed, but if you look at the first battery parts available, they suspiciously look like discarded batteries found in Jebediah's Junkyard :D

We can guess the inline ones are more advanced.

Link to comment
Share on other sites

Alright, i created 2 batteries for now. get it here: https://github.com/blackliner/RealBattery/tree/master/RealBattery/GameData/RealBattery

You will need 

 

Assumptions: 1 StoredCharge (from CRP) = 1kWh; 1 EC = 1 W; lead-acid energy density: 110 kJ/kg or 30 kWh/t and a power density of 300W/kg

20 kWh lead-acid battery based on stock 200EC model. That thing has to weigh 700kg !!! and could supply 210kW = 210000 EC per second. Balancing issues...

100 kWh based in 1k model, 3.3t and i dont even mention the power capabilities.

So, next step would be a reconsidering of assumptions. I think i will look closer at the apollo onboard batteries, which were charged by fuel cells. That should give some aprox. on the needed values.

Edited by Blackline
Link to comment
Share on other sites

Weird, recharching should happen if over 80% total EC. can you post a Screenshot during full EC and low StoredCharge? 

Regarding the outstanding balancing: Apollo CSM had a 400Ah battery, with 28V that makes roughly 1.2kWh. This would aready convert to 4 million EC!.... Maybe only trains need more than that :-)

Edited by Blackline
Link to comment
Share on other sites

On 2-11-2016 at 0:39 PM, Blackline said:

I thought I saw 1 EC is 1 Ws, thats where my assumption comes from. do you have a source for that? I would definitely prefer 1kWs!

Edit: got it, thats the next thing im gonna do https://github.com/KSP-RO/RealismOverhaul/wiki

KSPI uses the 1 EC = KW https://github.com/FractalUK/KSPInterstellar/wiki/Megajoules

By the way, do you take into account time warping?

Edited by FreeThinker
Link to comment
Share on other sites

18 hours ago, Blackline said:

I use TimeWarp.fixedDeltaTime, I thought that accounts all the timing stuff. Doesn't it?

Well yes and no, although your internal storage might be updated correctly, the problem is that any linked Electric charge buffer capacity will run out of room due to the fact that the amount of Electric Charge consumed or produced every processing tick (1/50 game speed) will surpass it's buffer, causing starvation of either ship systems or your batery. A possible solution would be to use dynamic Electric Charge buffers that grow and shrink with time warp acceleration.

Edited by FreeThinker
Link to comment
Share on other sites

Ah, suddenly it makes sense, why your wasteheat bars get unusually high during warp. how does stock ksp solve that issue? I really would like to stay as stock as possible. 

And regarding your usage of Megajoules: the one reason you mention in the wiki is not valid anymore, since 1.2 brought a new functionality for engines to not suck out all available EC/fuel. nevertheless, havin 12000000EC doesn't make sense as well... I wish, the stock display of large values would automatically add k(ilo), M(ega) and G(iga) and only show 3 significant values.

Edited by Blackline
Link to comment
Share on other sites

2 hours ago, Blackline said:

Ah, suddenly it makes sense, why your wasteheat bars get unusually high during warp. how does stock ksp solve that issue? I really would like to stay as stock as possible. 

And regarding your usage of Megajoules: the one reason you mention in the wiki is not valid anymore, since 1.2 brought a new functionality for engines to not suck out all available EC/fuel. nevertheless, havin 12000000EC doesn't make sense as well... I wish, the stock display of large values would automatically add k(ilo), M(ega) and G(iga) and only show 3 significant values.

Stock KSP does not solve this issue :P. 

Link to comment
Share on other sites

Figured that after reading moooarrr of your and freethinkers work... I think I am gonna start with some moduleCoreHeat for the time being, and handle timewarp when time comes.

Btw, did anyone try my last night's update? concerns, questions, requests?

Edited by Blackline
Link to comment
Share on other sites

What about exisiting stock EC storage? as you correctly mentioned, they perform like capacitators, but they store like super efficient long lasting batteries. I think that besides introducing real batteries you also need to addres existing EC storage and make them behave like real capacitators, meaning they lose their charge over time. This could be easily implemented by draining all batteries by the amount of stored charge. This way EC power must be used or it will be lost.

Edited by FreeThinker
Link to comment
Share on other sites

Thats on thing on my list: batteries will loose stored charge over time, just like real ones. then, as a next step, id need to implement a vessel wide EC drain, using the same technique, just different parameters (because capacitors loose ther charge faster). if someone now would install one of my batteries, the would try to keep the EC level on 95% (thats already implemented) and thus discharge themselves, to compensate the capacitor loss.

I think id like that behavior very much ;-)

Link to comment
Share on other sites

I have a small energy drain implemented by adding a resource converter to each manned module that uses 1.0 Ec and outputs 0.9 Ec, thus losing 0.1 Ec/sec. You could do something similar with the stock batteries. This will also allow you to produce heat.

Link to comment
Share on other sites

  • 2 weeks later...

Hello everyone,

after some family time, here comes the update:

-new: MM cfg, that duplicates all stock batteries and makes real batteries out of it.--> Module Manager needed

-new: moved battery config into dll, part.cfg can choose between available battery techs (like lead_acid, li_ion etc.)  Currently lead-acid only, which gives about 3.6 times the EC per weight compared to stock batteries. Lead acid batteries are charged with 1C and discharged with 10C (ie. a 1kWh Battery will give 10EC/s to the EC pool while discharging, and take 1EC/s while charging) There is also a sort of saturation feature, where the charging rate will slow down with higher SOC's (Sate of Charge ie. how full the battery is) its about 100% until 50%SOC, 80% up to 80%SOC and 50% at 100% SOC

-info: 1 EC is now treated as 1kWs; 1 StoredCharge is now treated as 1kWh, thus 3600EC = 1SC

Have fun!

 

EDIT made me self a release: https://github.com/blackliner/RealBattery/releases/tag/v1.1.0

Edited by Blackline
Link to comment
Share on other sites

Ok, this day was used to get heat working: what a pain... Uploaded my todays work to github, no new release.

  • tried ModuleCoreHeat with coreHeatModule.AddEnergyToCore, but the stuff just won't work properly: CoreTempGoal not showing the values from the MM cfg (maybe something is wrong there...) if i try to get the field within the C# lines, but the radiator behavior shows a fixed goal of 500K, no matter what i enter (like 320K)
  • tried part.AddThermalFlux: no radiator will ever work and cool my battery down :(

Any ideas? I really want to stay as stock as possible...

EDIT for Point 1: Holy snacks, i am quite a fool:

BatteryTempStatus = String.Format("{0:F1} K / {0:F1} K", currentTemp, maxTemp);

and wondering, why it shows the currentTemp twice. So i think ill stick to coreTemp System. New upload ready!

Edited by Blackline
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...