josie.twofluid package


josie.twofluid.fields module

josie.twofluid.scheme module

josie.twofluid.state module

class josie.twofluid.state.PhasePair(phase1=None, phase2=None)

Bases: dict

A tuple of objects that are indexable by Phases.

property phase1: Any
Return type


property phase2: Any
Return type


class josie.twofluid.state.PhaseState(*args, **kwargs)

Bases: josie.state.SubsetState, josie.fluid.state.SingleFluidState

This ConsSubsetState stores two sets of indices, one per phase, and it matches the field names with a regex in order to detect the phase they are member of. This is needed to support out-of-order listing of fields

class josie.twofluid.state.TwoFluidState(*args, **kwargs)

Bases: josie.fluid.state.ConsState

A generic ConsState for a two-phase flow problem. It allows to retrieve individual phase states


Returns the part of the state associated to a specified phase as an instance of PhaseQ


This does not return the first variable of the state, i.e. \alpha


phase (Phases) – A Phases instance identifying the requested phase partition of the state


A Q instance corresponding to the partition of the system associated to the requested phase

Return type


phase_state: Type[PhaseState]
set_phase(phase, values)

Sets the part of the system associated to the specified phase with the provided values

  • phase (Phases) – A Phases instance identifying the phase partition of the state for which the values need to be set

  • values (SingleFluidState) – The corresponding values to update the state with

Module contents