Skip to content

Proposing a change in interface for CompositionalViscosityPrefactors<dim>::compute_viscosity #6848

@lhy11009

Description

@lhy11009

@danieldouglas92

I’m trying to modify the behavior of the viscosity module by hard-coding certain variables (e.g., temperature). In the calculate_isostrain_viscosities function, the temperature is first processed into the variable temperature_for_viscosity. However, the current interface of
CompositionalViscosityPrefactors::compute_viscosity takes MaterialInputs as an argument and re-parses the temperature from there, rather than using the already processed value.

This makes the workflow less transparent compared to other rheology modules (e.g., diffusion creep), which directly take temperature and pressure values passed down from calculate_isostrain_viscosities. For consistency and clarity, it seems preferable for this interface to follow the same pattern.

Because of this, I think adjusting the interface of compute_viscosity to accept temperature (and possibly pressure) explicitly, rather than re-reading them from MaterialInputs, would be a better design.

If you also agree, I can create a PR.

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