dbcook / openrocket-database

Enhanced parts database for OpenRocket
Apache License 2.0
22 stars 12 forks source link

Aluminum densities are off by 3 orders of magnitude #28

Closed davesrocketshop closed 1 year ago

davesrocketshop commented 1 year ago
    <Material UnitsOfMeasure="g/cm3">
        <Name>Aluminum, generic, bulk</Name>
        <Density>2698.9</Density>
        <Type>BULK</Type>
    </Material>
    <Material UnitsOfMeasure="g/cm3">
        <Name>Aluminum, 2024, bulk</Name>
        <Density>2780.0</Density>
        <Type>BULK</Type>
    </Material>
    <Material UnitsOfMeasure="g/cm3">
        <Name>Aluminum, 7075, bulk</Name>
        <Density>2810.0</Density>
        <Type>BULK</Type>
    </Material>

Most websites list the density at ~2.7 g/cm3 which is 2700 kg/m3

https://asm.matweb.com/search/SpecificMaterial.asp?bassnum=ma2024t4 https://en.wikipedia.org/wiki/Aluminium

davesrocketshop commented 1 year ago

Similarly for balsa, your units should be kg/m3

https://www.woodsolutions.com.au/wood-species/hardwood/balsa

Looking through other materials, I suspect this is true of a lot of them. All of your woods seem to be using incorrect units

dbcook commented 1 year ago

I'm cleaning this up, but it's not as bad as it looks.

Tonight I repeated a code dive that I did 5 or 6 years ago, and also re-verified by creating a dummy entry, that no actual parsing of UnitsOfMeasure is done when a presets XML file is read. The numeric value is read in and is always assumed to be kg/m3, no matter what UnitsOfMeasure says in the tag.

davesrocketshop commented 1 year ago

Good to know. The FreeCAD Rocket Workbench did not make that assumption, but it's not using the value either. At least not yet.

dbcook commented 1 year ago

Fixed and pushed to master in 1.0.0.3