josie.ns package

Submodules

josie.ns.eos module

josie.ns.fields module

Navier-Stokes Equations take much of the implementations from euler

josie.ns.problem module

class josie.ns.problem.NSProblem(eos, transport)

Bases: josie.euler.problem.EulerProblem, josie.fluid.problem.DiffusiveProblem

K(cells)

This method returns the diffusive tensor \pdeDiffusiveMultiplier for the Navier-Stokes system.

In 2D it’s

\ipdeDiffusiveMultiplier =
\nsDiffusiveMultiplierXX (xx)
\nsDiffusiveMultiplierXY (xy)
\nsDiffusiveMultiplierYX (yx)
\nsDiffusiveMultiplierYY (yy)

Return type

np.ndarray

josie.ns.state module

We create one big state that contains the actual conservative variables that are used in the flux together with the “auxiliary” variables that are instead needed, for example, to compute the speed of sound.

\nsState

  • rho: density \rho

  • rhoU: component along x of the velocity \vb{u},
    multiplied by the density
  • rhoV: component along y of the velocity \vb{u},
    multiplied by the density
  • rhoE: total energy multiplied by the density \rho E

  • rhoe: internal energy multiplied by the density \rho e

  • U: component along x of the velocity u

  • V: component along y of the velocity v

  • p: pressure p

  • c: sound velocity c

class josie.ns.state.NSGradientState(*args, **kwargs)

Bases: josie.state.SubsetState

A State class representing the diffusive state variables of the Navier-Stokes system, i.e. the variables whose gradient is required in the diffusive term

fields

alias of josie.fields.NSGradientFields

full_state_fields

alias of josie.fields.EulerFields

class josie.ns.state.NSState(*args, **kwargs)

Bases: josie.euler.state.EulerState, josie.fluid.state.DiffState

diff_state

alias of josie.ns.state.NSGradientState

josie.ns.transport module

class josie.ns.transport.NSConstantTransport(viscosity, bulk_viscosity, thermal_diffusivity)

Bases: josie.ns.transport.NSTransport

A NSTransport providing constant coefficients

Parameters
  • viscosity (float) – the constant value of the viscosity

  • bulk_viscosity (float) – the constant value of the bulk viscosity

  • thermal_diffusivity (float) – The constant value of the thermal diffusivity

bulk_viscosity(cells)

The second viscosity coefficient also called second viscosity or bulk viscosity \bulkViscosity. Units: \qty[\si{\pascal
\second}]

It returns a value per each cell centroid

Return type

np.ndarray

thermal_diffusivity(cells)

Thermal diffusivity \thermalDiffusivity. Units: \qty[\si{\square \meter \per \second}]

\thermalDiffusivity = \frac{\thermalConductivity}%
{\specificHeat_\volume \density}

It returns a value per each cell centroid

Return type

np.ndarray

viscosity(cells)

Momentum diffusivity also called dynamic viscosity \viscosity. Units: \qty[\si{\pascal \second}]

It returns a value per each cell centroid

Return type

np.ndarray

class josie.ns.transport.NSTransport

Bases: josie.transport.Transport

abstract bulk_viscosity(cells)

The second viscosity coefficient also called second viscosity or bulk viscosity \bulkViscosity. Units: \qty[\si{\pascal
\second}]

It returns a value per each cell centroid

Return type

np.ndarray

abstract thermal_diffusivity(cells)

Thermal diffusivity \thermalDiffusivity. Units: \qty[\si{\square \meter \per \second}]

\thermalDiffusivity = \frac{\thermalConductivity}%
{\specificHeat_\volume \density}

It returns a value per each cell centroid

Return type

np.ndarray

abstract viscosity(cells)

Momentum diffusivity also called dynamic viscosity \viscosity. Units: \qty[\si{\pascal \second}]

It returns a value per each cell centroid

Return type

np.ndarray

Module contents