diff --git a/Modelica/Media/Incompressible.mo b/Modelica/Media/Incompressible.mo index a8bea31379..4f7341a669 100644 --- a/Modelica/Media/Incompressible.mo +++ b/Modelica/Media/Incompressible.mo @@ -364,6 +364,46 @@ which is only exactly true for a fluid with constant density d=d0. annotation(smoothOrder=2); end thermalConductivity; + redeclare function extends density_derp_h + "Return density derivative w.r.t. pressure at constant specific enthalpy" + algorithm + ddph := 0; // Correct if enthalpyOfT is true. + end density_derp_h; + + redeclare function extends density_derh_p + "Return density derivative w.r.t. specific enthalpy at constant pressure" + algorithm + ddhp := density_derT_p(state) / specificHeatCapacityCp(state); + end density_derh_p; + + + redeclare function extends density_derp_T + "Return density derivative w.r.t. pressure at constant temperature" + algorithm + ddpT := 0; // Incompressible + end density_derp_T; + + redeclare function extends density_derT_p + "Return density derivative w.r.t. temperature at constant pressure" + algorithm + ddTp := Polynomials.derivativeValue(poly_rho, if TinK then state.T else Cv.to_degC(state.T)); + end density_derT_p; + + redeclare function extends isobaricExpansionCoefficient + "Return isobaric expansion coefficient (beta) as a function of the thermodynamic state record" + algorithm + beta := -density_derT_p(state) / density(state); + annotation( + Documentation(info = "
The isobaric expansion coefficient beta is defined as
+1/v * der(v,T) +
with v = 1/d, at constant pressure p.
+Using the chain rule:
+")); + end isobaricExpansionCoefficient; + function s_T "Compute specific entropy" extends Modelica.Icons.Function; input Temperature T "Temperature";1/v * der(v,T) = d * (-der(d, T) / d^2) += -der(d, T) / d