Ksp Tank Calculator 1.5
A simple browser app for configuring fuel tanks (or any tank) for use with default KSP fuels or Community Resource Pack resources.
Enter the dimensions of the part you wish to make configs for. Add sub tanks with the 'Add Sub-tank' button. Or, remove tanks
with the 'Remove Sub-tank' button. Sliders allow for customization of each tanks size or you can enter the ratio in the 'Ratio' input.
Select the shape you would like to use for the volume calculation. Choose either Capsule, Cylinder, or Sphere.
Select multiple fuel types for each tank.
New in 1.2 is the CFG button which takes your resources for each tank, the total dry mass, cost, and calculated entry cost, then outputs those variables in CFG format.
Newly added in 1.3 is conical mode. By toggling the conical button, a second diameter input will appear that will conform all sub tanks to a tapered cylinder. Useful for making nosecone fuel tanks.
In 1.5 a new "Open Settings" button has been added, which exposes global variables.
KSP Tank Calculator is pretty smart. It will automatically adjust the volume, density, and cost of a tank when default KSP fuels
Under The Hood
A typical tank setup in KSPTC consists of:
Master Tank - The outer envelope for the Sub-Tanks. Sub Tank size/volume is constrained to the Master Tank.
Master Tank Cost - Master Tank Inner Volume is subtracted from Master Tank Inner Volume, then multiplied by Dry Mass Cost.
Master Tank Outer Volume - This is the total amount of space for the whole tank.
Master Tank Dry Mass - By subtracting the Master Tank Inner Volume from Master Tank Outer Volume, the stiffener dry mass volume is
attained. This value is multiplied by Dry Mass Density.
Master Tank Inner Volume - This is the amount of space for all Sub-Tanks to occupy.
Sub-Tank - Sub-Tanks are what contain resources. Each Sub-Tank you add subtracts from the space inside of the Master Tank.
The more Sub-Tanks you add, the less volume each Sub-Tank can contain. Sub-Tanks form a hierarchy based on their
order in the stack. The one bellow is constrained to the one above. This means, as you increase the ratio of the top most
Sub-Tank, you decrease the left over space for the lower Sub-Tanks to occupy.
Sub-Tank Outer Volume - This is the total amount of space that the Sub-Tank occupies.
Sub-Tank Inner Volume - This is the amount of space within the tank which resources may occupy.
Sub-Tank Resource Amount - The amount of a given resource for this Sub-Tank in Liters. If the fuel type for this Sub-Tank is a vanilla
KSP fuel, his value is multiplied by 0.199813, the default value of KSP Volume Mult. Otherwise, Sub-Tank
Resource Amount is multiplied by Volume Mult (the default is 1).
Sub-Tank Dry Mass - By subtracting the Sub-Tank Inner Volume from Sub-Tank Outer Volume, the Sub-Tank wall dry mass is attained.
This value is multiplied by Dry Mass Density.
Sub-Tank Fuel Cost - By multiplying the Sub-Tank Resource Amount by the fuel type unitCost value (defined in resources.js) the cost of
fuel is attained.
Sub-Tank Dry Cost - The Sub-Tank Dry Mass volume is multiplied by Dry Mass Cost. If the Sub-Tank fuel type for this
Sub-Tank is a vanilla KSP fuel type, KSP Dry Mass Cost is used instead of Dry Mass Cost.
Sub-Tank Cost - The sum of Sub-Tank Fuel Cost and Sub-Tank Dry Cost.
Total Volume - This is the sum of all Sub-Tank Resource Amounts.
Dry Mass - The sum of all Sub-Tank Dry Mass and the Master Tank Dry Mass.
Fuel Mass - The sum of all Sub-Tank Resource Amounts multiplied by each Sub-Tank fuel type density value (stored in resources.js).
Total Mass - The sum of Fuel Mass and Dry Mass.
Dry Cost - The sum of all Sub-Tank Dry Cost values and Master Tank Dry Cost.
Fuel Cost - The sum of all Sub-Tank Fuel Cost values.
Total Cost - The sum of all Sub-Tank Cost .
Download the KSP_Tank_Calculator zip file anywhere. Unzip the zip file. Open ksp_tank_calculator.html in any web browser (preferably Chrome or Firefox). Enjoy!
Download Version 1.5
Online version: https://bonus-eventus.github.io/KSP_Tank_Calculator/
* Fixed a bug where resource definitions for SolidFuel and XenonGas were missing in resources.js
* Added "Open Settings" button for editing global variables.
*fixed minor bug where monopropellant was labeled monoprop
*changed name of ksp_tank_calculator.html to index.html
*Fixed a bug where when non KSP fuels were selected then volumes did not
update to the proper scale.
*Added conical mode for nosecone tanks
* Fixed bug that caused volume calculations to be inaccurate at low ratios.
* Added CFG output for easier copy/pasting.
* Changed tank slider step amount from 0.01 to 0.0001 for more precise fine tuning.
Author: Bonus Eventus
This software is licensed under GPL 3. Check LICENSE file for more info.
All other software, fonts, etc is licensed by their respective copyright holders.