Skip to content

New interchange target_density scale factor behaviour does not have a direct 1.1 relationship with previous behaviour #1402

@IAlibay

Description

@IAlibay

Description

The current news item for the scale factor change states that "previous behavior can be restored by passing scaling the target_density argument down by a factor of 1.1" (note there's a typo in the news item!).

However, this is incorrect - it's actually closer to 1.33. I've not been able to nail down the exact number because of the ** (1/3), but 1.33 is close enough. (Edit: actually, I think it is just 1.1**3 - someone double check my maths though)

Reproduction

Assume a total_mass of 100, and an initial_volume of 50.

Scale of 1.1 and target density fo 0.95

volume (as passed to _scale_box) = 100 / 0.95 = 105.2632
volume_scale_factor = 2.1053
linear_scale_factor = 1.4089

Scale of 1.0 and target density of 0.8636 (~1.1 scaled down)

volume (as passed to _scale_box) = 100 / 0.8636 = 115.7943
volume_scale_factor = 2.3159
linear_scale_factor = 1.3230

Scale of 1.0 and target density of 0.715 (~1.33 scaled down)

volume (as passed to _scale_box) = 100 / 0.715 = 139.8601
volume_scale_factor = 2.7972
linear_scale_factor = 1.4089

Software versions

Current develop version of interchange.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions