Ticket #2 (new defect)

Opened 12 months ago

Last modified 7 months ago

Bug in the dynamic viscosity conditional equation

Reported by: msielemann Owned by: fcasella
Priority: low Milestone: undecided
Component: *unspecified* Severity: major
Keywords: Dynamic viscosity Cc:
Hide ticket: no

Description (last modified by dietmarw) (diff)

In some pipe models, the conditional equation to calculate the dynamic viscosity at port_b seems to use the wrong mass flow rate to distinguish which side is upstream.

The original equation basically reads

eta_b=if m_flow[1]<0
  then
    medium.dynamicViscosity(Medium.setState_phX(port_b.p, port_b.h, port_b.Xi))
  else 
    Medium.dynamicViscosity(medium[n].state)

It seems as if the following was the correct formulation

eta_b=if m_flow[n + 1]<0
  then
    Medium.dynamicViscosity(Medium.setState_phX(port_b.p, port_b.h, port_b.Xi))
  else
    Medium.dynamicViscosity(medium[n].state)

This is the case for the following models

Change History

Changed 11 months ago by dietmarw

  • description modified (diff)
  • severity set to major

Clean up of code quote (was a bit hard to read ;)

Changed 7 months ago by dietmarw

  • hide_ticket unset
  • milestone set to undecided
Note: See TracTickets for help on using tickets.