Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | Tcwout | |||
real(kind=r64), | intent(in) | :: | MCeng | |||
real(kind=r64), | intent(in) | :: | UAHX | |||
real(kind=r64), | intent(in) | :: | UAskin | |||
real(kind=r64), | intent(in) | :: | Troom | |||
real(kind=r64), | intent(in) | :: | Qgenss | |||
real(kind=r64), | intent(in) | :: | TengLast | |||
real(kind=r64), | intent(in) | :: | time |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
REAL(r64) FUNCTION FuncDetermineEngineTemp(Tcwout, MCeng, UAHX, UAskin, Troom, Qgenss, TengLast, time)
! FUNCTION INFORMATION:
! AUTHOR B. Griffith
! DATE WRITTEN Feb. 2007
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Calculate engine temperaure,
! METHODOLOGY EMPLOYED:
! model is dynamic in that previous condition affects current timestep
! solve ode for engine temp using analytical solution
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: Tcwout ! hot water leaving temp
REAL(r64), INTENT(IN) :: MCeng ! Fictitious mass and heat capacity of engine
REAL(r64), INTENT(IN) :: UAHX ! Heat exchanger UA
REAL(r64), INTENT(IN) :: UAskin ! Skin losses UA
REAL(r64), INTENT(IN) :: Troom ! surrounding zone temperature C
REAL(r64), INTENT(IN) :: Qgenss ! steady state generator heat generation
REAL(r64), INTENT(IN) :: TengLast ! engine temp at previous time step
REAL(r64), INTENT(IN) :: time ! elapsed time since previous evaluation
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: a
REAL(r64) :: b
a = ( ( UAHX * Tcwout / MCeng) + ( UAskin * Troom / MCeng ) + ( Qgenss / MCeng ) )
b = ( ( -1.0d0 * UAHX / MCeng ) + ( -1.0d0 * UAskin / MCeng ) )
FuncDetermineEngineTemp = (TengLast + a/b )* exp(b*time) - a / b
RETURN
END FUNCTION FuncDetermineEngineTemp