Open jennyfothergill opened 3 years ago
To support this will will have to see if unyt either has a dimensionless unit or if we will just have to make a custom unit to handle something like volume fraction or number density.
note for later: unyt does have a dimensionless quantity
import unyt as u
mass = 1 * u.kg
volume = 10 * u.m **3
density = mass/volume
number = 2 * u.dimensionless
number_density = number / volume
results in
0.1 kg/m**3
0.2 dimensionless/m**3
I think we can add some logic to detect different density inputs, (number density, density, maybe even occupied volume?)
Being able to specify density in terms of volume fractions or number density are also important considerations if someone is using a coarse or toy model that doesn't have physical unit connections (yet).