------------------------------------------------------------------------ -- (C) ESA-ESTEC, Propulsion & Aerothermodynamics Division -- -- FILE NAME: CompCoolingJacket.el -- LIBRARY: COMB_CHAMBERS -- DESCRIPTION: Thermal component for a discretised 3D wall, and -- two different cooling jacket models. -- NOTES: -- $LastChangedDate: 2012-02-20 12:08:07 +0100 (lun, 20 feb 2012) $ -- $Rev: 467 $ -- AUTHORS: F.D.M. and M.D.R., TEC-MPC, ESA-ESTEC, J.M., Empresarios Agrupados. -- VERIFIED: M.D.R., TEC-MPA, ESA-ESTEC. -- APPROVED: J.S., TEC-MPA, ESA-ESTEC. ------------------------------------------------------------------------ USE MATH VERSION "3.0" USE PORTS_LIB VERSION "1.0" USE FLUID_PROPERTIES USE THERMAL VERSION "3.1" --USE FLUID_FLOW_1D USE COMB_CHAMBERS --------------------------------------------------------------------------- COMPONENT CoolingJacket ( INTEGER Nsub = 3 "Number of chamber fluid sections; =0 --> no convergent part is included", INTEGER Nsup = 2 "Number of nozzle fluid sections; =0 --> no divergent part is included", INTEGER nr=1 "Number of radial thermal nodes at internal and external wall thickness (-)", INTEGER ns=1 "Number of azimutal thermal nodes between the channels (-)", ENUM DesignType type = Design "Design, Fixed dP; OffDesign, fixed flow area" ) "3D thermal model of a cooling jacket including two-phase channels" PORTS IN fluid_s f1 "Inlet/Outlet fluid port" OUT fluid_s f2 "Inlet/Outlet fluid port" IN thermal (n = Nsub+Nsup) tp_ch "Thermal port to chamber" OUT thermal (n = Nsub+Nsup) tp_ex "Thermal port to ambient" DATA REAL P_o = 100000. "Initial pressure (Pa)" REAL T_o = 293.15 "Initial temperature (K)" -- REAL x_o = 0. "Initial quality (-)" -- REAL rho_o = 1. "Initial density (kg/m^3)" -- REAL x_nco = 0 "Initial non-condensable mass fraction (-)" REAL dP_design=1e4 "Pressure drop in design mode (Pa)" REAL rug = 0.05e-3 "Roughness (m)" REAL k_f = 1 "Multiplier of the friction factor (-)" ENUM HT_OPTION ht_option = HT_tube_1ph "Wall-cooling fluid heat transfer option" REAL hc_dat = 1000 "Heat transfer coefficient - only if ht_option = Ht_constant (W/m^2*K)" INTEGER n_ch = 50 "Number of channels (-) " REAL w_ch = 0.004 "Channel width at throat section (m)" REAL t_ch = 0.006 "Channel height at throat section (m)" REAL Lc = 0.5 "Length of the convergent part. To normalise subsonic axial position (m)" REAL Dt = 0.1 "Cooling jacket throat diameter (m)" TABLE_1D Dc_vs_L = {{ 0,0.6,1}, { 2,2,1}} \ "Normalised convergent part diameters vs normalised axial position (-)" BOOLEAN dxc_input= FALSE "FALSE, dxc_vs_L = weighting function for conv. mesh size distribution. TRUE, normalised node lengths vs node number" TABLE_1D dxc_vs_L = {{ 0,0.6,1}, { 1,1,1}} \ "Weighting function for conv. mesh size distribution or normalised node lengths vs node number (-)" REAL Ld = 1 "Total length of divergent part. To normalise supersonic axial position (m)" REAL Ld1 = 0.0 "Nozzle axial length from throat to inlet - 0 if Lc > 0 (m)" REAL Ld2 = 1.0 "Nozzle axial length from throat to outlet (m)" TABLE_1D Dd_vs_L = {{0,0.2,0.4,0.6,0.8,1}, {1,1.0555,1.3888,1.8888,2.2222,2.3888}} \ "Normalised divergent part diameters vs normalised axial position (-)" BOOLEAN dxd_input= FALSE "FALSE, dxd_vs_L = weighting function for div. mesh size distribution. TRUE, normalised node lengths vs node number" TABLE_1D dxd_vs_L = {{ 0,0.6,1}, { 1,1,1}} \ "Weighting function for div. mesh size distribution or normalised node lengths vs node number (-)" REAL AR_sup = 0 "Nozzle exit/throat area ratio: 0, no Dd_vs_L profile modification (-)" REAL th_i = 0.003 "Jacket inner wall thickness at throat section (m)" REAL th_e = 0.005 "Jacket outer wall thickness at throat section (m)" TABLE_1D wc_vs_L = {{0,0.5,1},{1,1,1}} \ "Dimensionless channel widths vs dimensionless axial position (-)" TABLE_1D tc_vs_L = {{0,0.5,1},{1,1,1}} \ "Dimensionless channel heights vs dimensionless axial position (-)" TABLE_1D ti_vs_L = {{0,0.5,1},{1,1,1}} \ "Dimensionless inner wall thickness vs dimensionless axial position (-)" TABLE_1D te_vs_L = {{0,0.5,1},{1,1,1}} \ "Dimensionless outer wall thickness vs dimensionless axial position (-)" ENUM Material mat_e = None "Chamber external material" REAL K_e = 0.1 "External wall conductivity if mat=None (W/m*K)" REAL rho_e = 1000. "External wall density if mat=None (kg/m^3)" REAL cp_e = 500. "External wall specific heat if mat=None (J/kg*K)" ENUM Material mat_i = None "Chamber internal material" REAL K_i = 0.1 "Internal wall conductivity if mat=None (W/m*K)" REAL rho_i = 1000. "Internal wall density if mat=None (kg/m^3)" REAL cp_i = 500. "Internal wall specific heat if mat=None (J/kg*K)" DECLS REAL D[Nsub+Nsup] "Nozzle diameters (m)" REAL dL[Nsub+Nsup] "Channel lengths (m)" REAL dx[Nsub+Nsup] "Channel lengths in axial direction (m)" REAL wc[Nsub+Nsup] "Channel widths in azimut direction (m)" REAL tc[Nsub+Nsup] "Channel heights in radial direction (m)" REAL ti[Nsub+Nsup] "Jacket inner wall thickness (m)" REAL te[Nsub+Nsup] "Jacket outer wall thickness (m)" REAL w_ich[Nsub+Nsup] "Inter-channel half distances (m)" REAL w_cch[Nsub+Nsup] "Channel half widths (m)" REAL l_ch TOPOLOGY -- Channels STEADY.Tube_Channel( nodes = Nsub+Nsup, type = type) Channel ( num = n_ch, dP_design = dP_design, a = wc, b = tc, L = dL, T_o = T_o, P_o = P_o, m_o = 0, rug = rug, k_f = k_f, fld_add = 0, ht_option = ht_option, hc_dat = hc_dat) -- Five interconnected 3D walls around the channels wall_3D( nx = ns, ny = nr, nz=Nsub+Nsup) wall_int ( Wx = w_cch, mat = mat_i, con = K_i, rho = rho_i, cp = cp_i, To = T_o, Wy = ti, L = dL) wall_3D( nx = ns, ny = nr, nz=Nsub+Nsup) wall_int_righ ( Wx = w_ich, mat = mat_i, con = K_i, rho = rho_i, cp = cp_i, To = T_o, Wy = ti, L = dL) wall_3D( nx = ns, ny = nr, nz=Nsub+Nsup) wall_righ ( Wx = w_ich, mat = mat_i, con = K_i, rho = rho_i, cp = cp_i, To = T_o, Wy = tc, L = dL) wall_3D( nx = ns, ny = nr, nz=Nsub+Nsup) wall_ext_righ ( Wx = w_ich, mat = mat_e, con = K_e, rho = rho_e, cp = cp_e, To = T_o, Wy = te, L = dL) wall_3D( nx = ns, ny = nr, nz=Nsub+Nsup) wall_ext ( Wx = w_cch, mat = mat_e, con = K_e, rho = rho_e, cp = cp_e, To = T_o, Wy = te, L = dL) -- Wall connections CONNECT wall_int_righ.tpy_out TO wall_righ.tpy_in CONNECT wall_righ.tpy_out TO wall_ext_righ.tpy_in CONNECT wall_int.tpx_out TO wall_int_righ.tpx_in CONNECT wall_ext.tpx_out TO wall_ext_righ.tpx_in -- fluid connections CONNECT Channel.f1 TO f1 CONNECT Channel.f2 TO f2 INIT ASSERT (Nsub==0 OR Nsup==0 OR Ld1==0) \ FATAL "RegCircuit: If a subsonic part is included, then Ld1 data must be zero" -- Building chamber diameters and dx as a function of nozzle geometry (input data) mesh_size2(dxc_input, dxd_input, Nsub,Nsup, AR_sup, Lc,Dt,Dc_vs_L,dxc_vs_L, Ld,Ld1,Ld2,Dd_vs_L,dxd_vs_L, D, dL, dx) -- Building channel widths as a function of nozzle geometry (input data) l_ch = 0 FOR (ii IN 1,Nsub+Nsup) l_ch = l_ch + dx[ii] wc[ii] = w_ch * linearInterp1D(wc_vs_L, (l_ch-dx[ii]/2)/(Lc+Ld)) tc[ii] = t_ch * linearInterp1D(tc_vs_L, (l_ch-dx[ii]/2)/(Lc+Ld)) ti[ii] = th_i * linearInterp1D(ti_vs_L, (l_ch-dx[ii]/2)/(Lc+Ld)) te[ii] = th_e * linearInterp1D(te_vs_L, (l_ch-dx[ii]/2)/(Lc+Ld)) w_cch[ii] = wc[ii]/2 w_ich[ii] = PI*D[ii]/n_ch/2 - w_cch[ii] END FOR DISCRETE EXPAND_BLOCK (ii IN 1, Nsub+Nsup) WHEN(PI*D[ii]/n_ch/wc[ii] < 1) THEN WRITE("\n*** CoolingJacket: The inter-channel distance (%g) at node %d is negative. Please, reduce the number/size of the channels", 2*w_ich[ii],ii) ASSERT (FALSE) FATAL "Simulation stoped" END WHEN END EXPAND_BLOCK CONTINUOUS -- Building chamber diameters and dx as a function of nozzle geometry (input data) mesh_size2(dxc_input, dxd_input, Nsub,Nsup, AR_sup, Lc,Dt,Dc_vs_L,dxc_vs_L, Ld,Ld1,Ld2,Dd_vs_L,dxd_vs_L, D, dL, dx) -- Building channel widths as a function of nozzle geometry (input data) SEQUENTIAL l_ch = 0 FOR (ii IN 1,Nsub+Nsup) l_ch = l_ch + dx[ii] wc[ii] = w_ch * linearInterp1D(wc_vs_L, (l_ch-dx[ii]/2)/(Lc+Ld)) tc[ii] = t_ch * linearInterp1D(tc_vs_L, (l_ch-dx[ii]/2)/(Lc+Ld)) ti[ii] = th_i * linearInterp1D(ti_vs_L, (l_ch-dx[ii]/2)/(Lc+Ld)) te[ii] = th_e * linearInterp1D(te_vs_L, (l_ch-dx[ii]/2)/(Lc+Ld)) w_cch[ii] = wc[ii]/2 w_ich[ii] = PI*D[ii]/n_ch/2 - w_cch[ii] END FOR END SEQUENTIAL EXPAND_BLOCK (i IN 1, Nsub+Nsup) -- Number of levels (nl) -- Left / right sides are isolated (symmetry) EXPAND_BLOCK (j IN 1, nr) wall_righ.tpx_out.q[j+(i-1)*nr] = 0 wall_int.tpx_in.q[j+(i-1)*nr] = 0 wall_ext.tpx_in.q[j+(i-1)*nr] = 0 wall_int_righ.tpx_out.q[j+(i-1)*nr] = 0 wall_ext_righ.tpx_out.q[j+(i-1)*nr] = 0 END EXPAND_BLOCK -- Chamber to wall connections EXPAND_BLOCK (j IN 1, ns) tp_ch.Tk[i] = wall_int.tpy_in.Tk[j+(i-1)*ns] tp_ch.Tk[i] = wall_int_righ.tpy_in.Tk[j+(i-1)*ns] END EXPAND_BLOCK tp_ch.q[i] /n_ch /2 = SUM(j IN 1, ns; wall_int.tpy_in.q[j+(i-1)*ns] + wall_int_righ.tpy_in.q[j+(i-1)*ns]) -- Channel to wall connection EXPAND_BLOCK (j IN 1, ns) Channel.tp_in.Tk[i] = wall_int.tpy_out.Tk[j+(i-1)*ns] Channel.tp_out.Tk[i] = wall_ext.tpy_in.Tk[j+(i-1)*ns] END EXPAND_BLOCK EXPAND_BLOCK (j IN 1, nr) Channel.tp_lat.Tk[i] = wall_righ.tpx_in.Tk[j+(i-1)*nr] END EXPAND_BLOCK Channel.tp_in.q[i] /2/n_ch = SUM(j IN 1, ns; wall_int.tpy_out.q[j+(i-1)*ns]) Channel.tp_out.q[i]/2/n_ch = SUM(j IN 1, ns; wall_ext.tpy_in.q[j+(i-1)*ns]) Channel.tp_lat.q[i]/2/n_ch =-SUM(j IN 1, nr; wall_righ.tpx_in.q[j+(i-1)*nr]) -- Ambient to wall connections EXPAND_BLOCK (j IN 1, ns) tp_ex.Tk[i] = wall_ext.tpy_out.Tk[j+(i-1)*ns] tp_ex.Tk[i] = wall_ext_righ.tpy_out.Tk[j+(i-1)*ns] END EXPAND_BLOCK tp_ex.q[i] /n_ch /2 = SUM(j IN 1, ns; wall_ext.tpy_out.q[j+(i-1)*ns] + wall_ext_righ.tpy_out.q[j+(i-1)*ns]) END EXPAND_BLOCK END COMPONENT