[EPIC] Unit system
Open
EPIC
type: feature
type: new
- Dominant language
- C++
- Stars
- 287
- Forks
- 109
- Avg merge
- 4d 41m
- Merged PRs (30d)
- 5
Description
Issue general information
What is the requested feature?
- A unit system for GEOS.
Is your request related to a specific problem?
- Some data structures, as the
TableFunction, hold data and does not know its unit, so related reports or error message can be misleading. - GEOS users cannot specify which unit they want for the various input & output data.
- The code could be more self-explaining if variables could be declared as
Pressure,DistanceorViscositytype rather thanreal64. - There is a lack of information on the temperature units (
KelvinorCelsius) at different places in the code.
- I. Add a simple unit system to GEOS so when we store unqualified data, we can add the wanted unit metadata to it.
- GEOS PR that need this system: #2552
- #3733
- Attach unit info to inputs (
Wrapper) - Attach unit info to HDF5 output as a metadata (as a data description)
- II. Add a statically typed unit system.
- We could add or inspire from a library like mp-units.
- We need an extensive, simple and light solution, the goal is not to complexify the code nor to affect the performances.
- We need to be able to statically or dynamically add an unit to a value or a container.
- III. Expose a unit system configuration for GEOS input / output.
- Add a
<UnitSystem/>node to<Problem/> - Add a
presetattribute toUnitSystem, which would allow to quickly use a unit system preset as a base. These preset would be documented in the user guide, and would be added by the different teams working on GEOS. - Add
<UnitSystem/>children node for each characteristics.
As an exemple :<Time inputFiles="years" stdout="days" outputFiles="s" />
Or, as a more uniform exemple :<Time units="d" />
_Note: I'm not perfectly convinced that the task II. is required for GEOS, input / output conversion may be sufficient.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.