Skip to content

Setting of density in LatticePhase #644

@decaluwe

Description

@decaluwe

Cantera version

2.4.0

Operating System:

Any

Python/MATLAB version:

Any

Expected Behavior:

The LatticePhase implements a thermoPhase representing a solid solution with a fixed/specified molar density (kmol/m3). In theory, the mass density is therefore not an independent variable - it should adjust, as a function of composition, to maintain this set molar density.

Actual Behavior:

In reality, the density may be set by a user via any number of means (either as part of a property pair (e.g. 'TD'), or as part of a property pair + composition (e.g., 'TDY'). In either instance, the user-supplied molar density (site_density in the cti file) is explicitly changed/overwritten.

Steps to reproduce

(using Python syntax)

  1. ysz = ct.Solution('sofc.cti','oxide_bulk')
  2. print(ysz.density_mole)
  3. ysz.TD = 1073, 200
  4. print(ysz.density_mole)

There is some question, however, as to whether this is really a problem. A user who sets the density for this phase is explicitly violating the assumptions of the model they have chosen to implement, and it is not apparent that it is the software's job to prevent them from this accomplishment. Moreover, it is conceivable that a user would intentionally perform this operation, e.g. a numerical study where they vary the lattice's molar density.

The purpose of this issue, therefore, is to document the concern, so as to i) solicit input from users, and ii) encourage follow-up at a later date.

Metadata

Metadata

Assignees

No one assigned

    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