Skip to content

Conversation

hpohekar
Copy link
Collaborator

@hpohekar hpohekar commented Jun 19, 2024

Register unit without updating yaml file.

    >>> from ansys.units import register_unit
    >>> register_unit(unit="Q", composition="N m", factor=1)
    >>> ureg = UnitRegistry()
    >>> ureg.Q
    _name: Q
    _dimensions: {'MASS': 1.0, 'LENGTH': 2.0, 'TIME': -2.0}
    _composition: N m
    _factor: 1
    _si_units: kg m^2 s^-2
    _si_scaling_factor: 1.0
    _si_offset: 0.0

@github-actions github-actions bot added testing Anything related to tests enhancement New features or code improvements labels Jun 19, 2024
@hpohekar hpohekar changed the title feat: Register unit feat: Register unit without updating config files Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements testing Anything related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant