Extends from Buildings.BaseClasses.BaseIconExamples (Icon for Examples packages).
Name | Description |
---|---|
DewPointTemperatureDerivativeCheck | Model to test correct implementation of derivative |
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 |
---|---|---|---|
Real | uniCon | 1 | Constant to convert units [K/s] |
model DewPointTemperatureDerivativeCheck "Model to test correct implementation of derivative"Real x; Real y; parameter Real uniCon(unit="K/s") = 1 "Constant to convert units"; initial equation y=x; equation x=Buildings.Utilities.Psychrometrics.BaseClasses.dewPointTemperature(T=time*uniCon); der(y)=der(x); assert(abs(x-y) < 1E-2, "Model has an error"); end DewPointTemperatureDerivativeCheck;