CONTINUOUS_MODEL fdwall ABSTRACT "Test , Finite difference model of multi-layer component. The user is to discretize each material layer into (nSubCells) number of cells. The following chain of serially connected thermal resistances and heat capacities is calculated: -->Qa -->Q[1] -->Q[nCells-1] -->Qb Qa Ta ____ T[1] ____ ____ T[nCells] ____ Tb --> o--|____|---o---|____|----....---|____|---- o----|____|----o -->Qb R[1] | R[2] R[nCells] | R[nCells+1] = = | | C[1] C[nCells] NOTE: This model can be used instead of RCwall, especially if RCwall fails to fulfill required accuracy. Contrary to RCwall, discretization is in this model performed manually. The following data has to be prepared and quantified prior to input: n = number of material layer in building component. nSubLay(n) = subdivision, i.e number of cells, of each material layer nCells = total number of cells (mass nodes), nCells=sum(nSubLay) nOfRs = number of resistances, always nOfRs=nCells+1 nOfQs = number of heat flows in chain, allways nOfQs=nCells-1 " /* date Sgn Comment 010608 PG Added assertion nCells==sum(nSubLays). 010521 PG changed cp type HeatCap --> HeatCapM 010313 MV Default values of temperatures are changed from 0 to 20 °C 000109 rsc Supplied parameter name nLay changed to n */ EQUATIONS /* Capacitances next to boundaries */ /* T'[1] = (Qa - Q[1]) / (A*C[1]); T'[nCells] = (Q[nCells-1] - Qb) / (A*C[nCells]); */ /* Capacitances between boundaries */ /* FOR i = 2,(nCells-1) T'[i] = (Q[i-1] - Q[i]) / (A*C[i]) ; END_FOR ; */ FOR i = 1,nCells T'[i] = IF nCells == 1 THEN (Qa - Qb) / (A*C[1]) ELSE_IF i == 1 THEN (Qa - Q[1]) / (A*C[1]) ELSE_IF i == nCells THEN (Q[nCells-1] - Qb) / (A*C[nCells]) ELSE (Q[i-1] - Q[i]) / (A*C[i]) END_IF ; END_FOR ; /* Boundary heat flux */ Qa = A*(Ta - T[1])/R[1] ; Qb = A*(T[nCells] - Tb)/R[nCells+1] ; /* Heat flux between boundaries */ FOR i = 1,(nOfQs) Q[i] = A*(T[i] - T[i+1]) / R[i+1]; END_FOR; LINKS /* type name variables */ TQ Term_a Ta, POS_IN Qa ; TQ Term_b Tb, POS_OUT Qb ; VARIABLES /* type name role def min max description */ Temp T[nCells] OUT 20 ABS_ZERO BIG "Temp of mass node" Temp Ta OUT 20 ABS_ZERO BIG "Surf temp on a side" Temp Tb OUT 20 ABS_ZERO BIG "Surf temp on b side" HeatFlux Qa IN 0 -BIG BIG "Inflow at surf of side a" HeatFlux Qb IN 0 -BIG BIG "Outflow at surf of side b" HeatFlux Q[nOfQs] OUT 0 -BIG BIG "Flux between mass nodes" MODEL_PARAMETERS /* type name role def min max description */ INT n SMP 2 1 BIGINT "Number of material layers" INT nCells SMP 2 1 BIGINT "Number of cells = sum(nSubLay)" INT nOfRs CMP 3 2 BIGINT "Number of resistances = nCells+1" INT nOfQs CMP 1 0 BIGINT "Number of internal flows = nCells-1" PARAMETERS /* type name role def min max description */ Area A S_P 1 SMALL BIG "wall area" Length l[n] S_P 0.15 SMALL BIG "layer thickness" HeatCondL lambda[n] S_P 1.7 SMALL BIG "layer heat conductivity" Density rho[n] S_P 2400 SMALL BIG "layer density" HeatCapM cp[n] S_P 880 SMALL BIG "layer spec heat" Factor nSubLay[n] S_P 2 1 BIG "Number of sublayers (cells) per material layer" /* derived parameters */ HeatCapA C[nCells] C_P 316800 SMALL BIG "model heat capacities" HeatResA R[nOfRs] C_P 0.044 SMALL BIG "resistance between nodes" PARAMETER_PROCESSING IF nCells != SUM i=1,n NINT(nSubLay[i]) END_SUM THEN CALL NMF_ERROR("nCells is not equal to sum(nSubLay)"); END_IF; call fddisc(n,nSubLay[1],nCells,l[1],lambda[1],rho[1],cp[1],C[1],R[1]); nOfRs := nCells + 1; nOfQs := nCells - 1; END_MODEL