Extends from Buildings.BaseClasses.BaseIconExamples (Icon for Examples packages).
Name | Description |
---|---|
YorkCalc | Example for yorkCalc correlation |
YorkCalcDerivativeCheck |
Type | Name | Default | Description |
---|---|---|---|
Temperature | TRan | 5.56 | Range temperature (water in - water out) [K] |
Temperature | TAirInWB | 25.55 + 273.15 | Inlet air wet bulb temperature [K] |
model YorkCalc "Example for yorkCalc correlation" parameter Modelica.SIunits.Temperature TRan = 5.56 "Range temperature (water in - water out)"; parameter Modelica.SIunits.Temperature TAirInWB = 25.55 + 273.15 "Inlet air wet bulb temperature"; Modelica.SIunits.MassFraction x "Independent variable"; Modelica.SIunits.Temperature TApp_Wat "Approach temperature as a function of FRWat"; Modelica.SIunits.Temperature TApp_Air "Approach temperature as a function of FRAir"; equation x = 0.25+time; TApp_Wat=Buildings.Fluid.HeatExchangers.CoolingTowers.Correlations.yorkCalc(TRan=TRan, TWB=TAirInWB, FRWat=x, FRAir=1); TApp_Air=Buildings.Fluid.HeatExchangers.CoolingTowers.Correlations.yorkCalc(TRan=TRan, TWB=TAirInWB, FRWat=1, FRAir=x); end YorkCalc;
This example checks whether the function derivative is implemented correctly. If the derivative implementation is not correct, the model will stop with an assert statement.
Type | Name | Default | Description |
---|---|---|---|
Temperature | TRan | 5.56 | Range temperature (water in - water out) [K] |
Temperature | TAirInWB | 35.55 + 273.15 | Inlet air wet bulb temperature [K] |
model YorkCalcDerivativeCheck parameter Modelica.SIunits.Temperature TRan = 5.56 "Range temperature (water in - water out)"; parameter Modelica.SIunits.Temperature TAirInWB = 35.55 + 273.15 "Inlet air wet bulb temperature"; Real x; Real y; initial equation y=x; equation x=CoolingTowers.Correlations.yorkCalc(TRan=TRan, TWB=TAirInWB, FRWat=time, FRAir=1.1); der(y)=der(x); assert(abs(x-y) < 1E-2, "Model has an error"); end YorkCalcDerivativeCheck;