Skip to content

Add translator for temperature and density #28

@szabo137

Description

@szabo137

Description

The input temperature and density, usually Unitful.Quantity objects, are transformed to the internal unit system. It would be very convenient if you added a function that translates the internal values back to the original value (maybe by giving a target unit).

Validation and testing

using Test
using ElectronicStructureModels
using Unitful

ne = 1e23u"cm^(-3)"
temp = 1.0u"eV"


m = IdealElectronGas(ne, temp)

@test isapprox(density(m, u"cm^(-3)"), ne)
@test isapprox(temperature(m, u"eV"), temp)

Metadata

Metadata

Assignees

No one assigned

    Labels

    MonteCarloTransportIndicated that the issue is related to the upstream usage in a Monte-Carlo Transport Code.enhancementNew feature or requestgood first issueGood for newcomers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions