TALK=T;RUN( 1, 1) ************************************************************ Q1 created by VDI menu, Version 3.6, Date 12/09/05 CPVNAM=VDI;SPPNAM=Core Echo DISPLAY / USE settings DISPLAY This one-dimensional heat conduction problem tests the correctness of NEWPARSOL solver which gives correct result at one iteration. The domain is ZLENG [m] long in z; object BLOCK is at the middle of the domain. The object does not fit the grid. The domain material is air, the object is steel. k1 k2 k1 |-------!---|---!---|---!-------| | ! |///!///| ! | | 1 ! 2 |///!///| 3 ! 4 | | ! |///!///| ! | |-------!---|---!---|---!-------| z=0 z1=1.5 z2=2. z=ZLENG This case containts several tasks selected by CASENO. CASENO=1 - set tem1 0 and 1 values at low and high boundaries. CASENO=2 - fix zero values in left and right, set volume source 1 at right sunny sub-cell. CASENO=3 - fix zero values in left and right, set volume source 1 at left and right dark sub-cells. CASENO=4 - fix zero values in left and right, set volume source 1 at sunny and dark sub-cells. CASENO=5 - set value 0 at low and high boundaries, fix value 24.22 at sunny sub-cells. CASENO=6 - set value 0 at low and high boundaries, fix value 29.07 at left and right dark sub-cells. CASENO=7 - set value 0 at low and high boundaries, fix values 48.45 at sunny and 53.3 in dark sub-cells. CASENO=8 - unsteady, fix zero values in left and right, initial value 1. CASENO=9 - set tem1 0 at low and high boundaries, set volume source 1 at sunny sub-cells. CASENO=10- set tem1 0 at low and high boundaries, set volume source 1 at dark sub-cells. CASENO=11- set tem1 0 at low and high boundaries, set volume source 1 at sunny and dark sub-cells. ENDDIS ************************************************************ IRUNN = 1 ;LIBREF = 708 ************************************************************ INTEGER(CASENO) mesg(CASENO=1 - set tem1 0 and 1 at low and high boundaries. mesg(CASENO=2 - fix zero values in left and right, mesg( set volume source 1 at right sunny sub-cell. mesg(CASENO=3 - fix zero values in left and right, mesg( set volume source 1 at left and right dark sub-cells. mesg(CASENO=4 - fix zero values in left and right, mesg( set volume source 1 at sunny and dark sub-cells. mesg(CASENO=5 - set value 0 at low and high boundaries,, mesg( fix value 24.22 at sunny sub-cells. mesg(CASENO=6 - set value 0 at low and high boundaries,, mesg( fix value 29.07 at left and right dark sub-cells. mesg(CASENO=7 - set value 0 at low and high boundaries, mesg( fix values 48.45 at sunny and 53.3 in dark sub-cells. mesg(CASENO=8 - unsteady, fix zero values in left and right, mesg( initial value 1. mesg(CASENO=9 - set tem1 0 at low and high boundaries, mesg( set volume source 1 at sunny sub-cells. mesg(CASENO=10- set tem1 0 at low and high boundaries, mesg( set volume source 1 at dark sub-cells. mesg(CASENO=11- set tem1 0 at low and high boundaries, mesg( set volume source 1 at sunny and dark sub-cells. CASENO=1 mesg(caseno=:caseno: ok? If not, insert required value readvdu(caseno,int,:caseno:) caseno INTEGER(NCEL,ICUT,ICP1) NCEL=4 mesg(number of cells is :ncel: OK? If not, insert even desired number, readvdu(ncel,int,:ncel:) ncel ICUT=NCEL/2 ! Currect number of first cut-cell. ICP1=ICUT+1 REAL(TIMELAST);TIMELAST=1000. ! time, seconds REAL(TIMESTEP);TIMESTEP=1. ! last time step REAL(Z1,Z2,ZLENG,ZHALF,Z4,K1,K2) ZLENG=4. Z1=0.5*(ZLENG-ZLENG/NCEL) Z2=Z1+ZLENG/NCEL ZHALF=0.5*ZLENG/NCEL ! Half size of cell Z4=0.5*ZHALF REAL(DEL,DELD);DEL=1.5*ZHALF;DELD=ZHALF K1=0.0258 k2=43. REAL(LINK); LINK=1./(.5*ZHALF/K1+.5*ZHALF/K2) REAL(TEM0,TEMW);TEM0=0.0;TEMW=0.0 INTEGER(NUMMAT);NUMMAT=111 REAL(SOURC,SSOURC,DSOURC); sourc=1.0 ! source value ssourc=sourc*zhalf; dsourc=sourc*zhalf ! source value in sub-cells REAL(SVAL,DVAL);SVAL=1.;DVAL=1. REAL(DZOB);DZOB=0.5*(Z2-Z1) REAL(ZOB2);ZOB2=Z1+DZOB IF(CASENO.EQ.5) THEN + SVAL=24.22 ENDIF IF(CASENO.EQ.6) THEN + DVAL=29.07 ENDIF IF(CASENO.EQ.7) THEN + SVAL=48.45 + DVAL=53.3 ENDIF REAL(T0OB);T0OB=TEM0 IF(CASENO.EQ.8) THEN + T0OB=1. real(at,ct,f0,g0,scof,dcof) f0=t0ob; g0=t0ob ! initial values at sunny and dark sub-cells at=1.189*1005*zhalf/(timelast-tfirst)/timestep ! rho+s*cp_s*vol/del_time ct=7800*473*zhalf/(timelast-tfirst)/timestep ! rho_d*cp_d*vol/del_time real(delt);delt=(tlast-tfirst)/lstep scof=k1/del+link+at dcof=link+ct + SVAL=(at*f0*dcof+ct*g0*link)/(scof*dcof-link*link) + DVAL=(ct*g0*scof+at*f0*link)/(scof*dcof-link*link) ENDIF Group 1. Run Title TEXT(NEWPARSOL, 1D heat-conduction in z dir ************************************************************ Group 2. Transience STEADY = T IF(CASENO.EQ.8) THEN + STEADY=F ENDIF * Set overall time and no. of steps RSET(U,0.000000E+00,1000.,1) ************************************************************ Groups 3, 4, 5 Grid Information * Overall number of cells, RSET(M,NX,NY,NZ,tolerance) RSET(M,1,1,NCEL) ************************************************************ Group 6. Body-Fitted coordinates ************************************************************ Group 7. Variables: STOREd,SOLVEd,NAMEd ONEPHS = T * Non-default variable names NAME(148) =TEM1 ; NAME(150) =PRPS * Solved variables list SOLVE(TEM1) * Stored variables list STORE(PRPS,KOND) STORE(DVAR,DRES,DCOR) STORE(RST1,CRT1,APT1,AET1,AWT1) STORE(S_EX,D_EX) ! exact solution at sunny and dark STORE(SE/S,DE/D) ! exact/newparsol_solution for sunny and dark * Additional solver options SOLUTN(TEM1,Y,Y,Y,N,N,Y) inform7begin (stored var rst1 is resi(tem1)) (stored var crt1 is corr(tem1)) (stored var apt1 is apco(tem1)) (stored var aet1 is aeco(tem1)) (stored var awt1 is awco(tem1)) if(caseno.eq.1) then real(flx,twall);flx=1.;twall=0. (stored s_ex is zg*flx/k1 with if(zg<=z1)) (stored s_ex is z1*flx/k1+(z2-z1)*flx/k2+(zg-z2)*flx/k1 with if(zg$ >z2)) (stored d_ex is z1*flx/k1+(zg+z4-z1)*flx/k2 with if(iz=icut)) (stored d_ex is z1*flx/k1+(zg-z4-z1)*flx/k2 with if(iz=icp1)) (stored s_ex is (zg-z4)*flx/k1 with if(iz=icut)) (stored s_ex is z1*flx/k1+(z2-z1)*flx/k2+(zg+z4-z2)*flx/k1 with if$ (iz=icp1)) endif if(caseno.eq.2) then + real(sunval); sunval=ssourc/(K1/DEL+1./(DEL/K1+DELD/K2+2/LINK)) (stored s_ex is sunval with if(iz=icp1)) (stored d_ex is sunval*link/(link+1./(del/k1+deld/k2+1./link)) wit$ h if(iz=icp1)) (stored d_ex is sunval/(deld/k2+1./link)/(1./(deld/k2+1./link)+1./$ (del/k1+1./link)) with if(iz=icut)) (stored s_ex is sunval/(deld/k2+2./link)/(1./(deld/k2+2./link)+k1/$ del) with if(iz=icut)) endif if(caseno.eq.3) then (stored d_ex is dsourc*(1./link+del/k1) with if(iz=icut)) (stored d_ex is dsourc*(1./link+del/k1) with if(iz=icp1)) (stored s_ex is dsourc*del/k1 with if(iz=icut)) (stored s_ex is dsourc*del/k1 with if(iz=icp1)) endif if(caseno.eq.4) then (stored d_ex is dsourc/link+(dsourc+ssourc)/(k1/del) with if(iz=ic$ ut)) (stored d_ex is dsourc/link+(dsourc+ssourc)/(k1/del) with if(iz=ic$ p1)) (stored s_ex is (dsourc+ssourc)/(k1/del) with if(iz=icut)) (stored s_ex is (dsourc+ssourc)/(k1/del) with if(iz=icp1)) endif if(caseno.eq.5) then (stored d_ex is 24.22 with if(iz=icut)) (stored d_ex is 24.22 with if(iz=icp1)) real(flx);flx=24.22*k1/(z1-0.5*zhalf) (stored s_ex is zg*flx/k1 with if(zg<=z1)) (stored s_ex is (zleng-zg)*flx/k1 with if(zg>z2)) (stored s_ex is (zg-z4)*flx/k1 with if(iz=icut)) (stored s_ex is (zleng-zg-z4)*flx/k1 with if(iz=icp1)) endif if(caseno.eq.6) then (stored d_ex is 29.07 with if(iz=icut)) (stored d_ex is 29.07 with if(iz=icp1)) real(flx);flx=29.07*k1*k2/(k2*z1+k1*0.5*zhalf) (stored s_ex is zg*flx/k1 with if(zg<=z1)) (stored s_ex is (zleng-zg)*flx/k1 with if(zg>z2)) (stored s_ex is (zg-z4)*flx/k1 with if(iz=icut)) (stored s_ex is (zleng-zg-z4)*flx/k1 with if(iz=icp1)) endif if(caseno.eq.7) then real(flx);flx=48.45*k1/(z1-0.5*zhalf) (stored s_ex is zg*flx/k1 with if(zg<=z1)) (stored s_ex is (zleng-zg)*flx/k1 with if(zg>z2)) (stored s_ex is (zg-z4)*flx/k1 with if(iz=icut)) (stored s_ex is (zleng-zg-z4)*flx/k1 with if(iz=icp1)) (stored d_ex is 53.3 with if(iz=icut)) (stored d_ex is 53.3 with if(iz=icp1)) endif if(caseno.eq.8) then (stored s_ex is sval with if(iz=icut)) (stored d_ex is dval with if(iz=icut)) (stored s_ex is sval with if(iz=icp1)) (stored d_ex is dval with if(iz=icp1)) endif if(caseno.ge.9.and.caseno.le.11) then + if(caseno.eq.9) then + dsourc=0. + endif + if(caseno.eq.10) then + ssourc=0. + endif (stored d_ex is dsourc/link+(dsourc+ssourc)/(k1/(z1-z4)) with i$ f(iz=icut)) (stored d_ex is dsourc/link+(dsourc+ssourc)/(k1/(z1-z4)) with i$ f(iz=icp1)) real(tems);tems=(dsourc+ssourc)/(k1/(z1-z4)) real(flx);flx=tems*k1/(z1-z4) (stored s_ex is zg*flx/k1 with if(zg<=z1)) (stored s_ex is (zleng-zg)*flx/k1 with if(zg>z2)) (stored s_ex is (zg-z4)*flx/k1 with if(iz=icut)) (stored s_ex is (zleng-zg-z4)*flx/k1 with if(iz=icp1)) endif (stored var SE/S is s_ex/tem1 with if(tem1!=0.)) (stored var DE/D is d_ex/dvar with if(dvar!=0.)) inform7end ************************************************************ Group 8. Terms & Devices ************************************************************ Group 9. Properties PRESS0 = 1.000000E+05 ;TEMP0 = 2.730000E+02 * Domain material is: 0 Air at 20 deg C, 1 atm, treated as i SETPRPS(1, 0) ENUT = 0.000000E+00 DVO1DT = 3.410000E-03 PRNDTL(TEM1) = -K1 ************************************************************ Group 10.Inter-Phase Transfer Processes ************************************************************ Group 11.Initialise Var/Porosity Fields FIINIT(PRPS) = -1.000000E+00 FIINIT(TEM1) = TEM0 FIINIT(DVAR) = -1.234E-11 FIINIT(DRES) = -1.234E-11 FIINIT(DCOR) = -1.234E-11 FIINIT(S_EX) = 0.; FIINIT(D_EX) = 0. FIINIT(SE/S) = 0.; FIINIT(DE/D) = 0. IF(CASENO.EQ.8) THEN + PATCH(INIT1,INIVAL,1,nx,1,ny,icut,icp1,1,1) + COVAL(INIT1,TEM1, 1.000000E+00, 1.000000E+00) ENDIF INIADD = F ************************************************************ Group 12. Convection and diffusion adjustments No PATCHes used for this Group ************************************************************ Group 13. Boundary & Special Sources ! Set values 0 and 1 at low and high boundaries IF(CASENO.EQ.1) THEN + PATCH(LWAL ,LWALL ,1,nx,1,ny,1,1,1,1) + COVAL(LWAL ,TEM1, 1.000000E+00, 0.000000E+00) + PATCH(HFLUX ,HIGH ,1,nx,1,ny,nz,nz,1,1) + COVAL(HFLUX ,TEM1, FIXFLU, 1.000000E+00) ENDIF IF((CASENO.GE.2.AND.CASENO.LE.4).OR.CASENO.EQ.8) THEN ! Fix zero values in 1 and nz cells + PATCH(wfix ,VOLUME,1,nx,1,ny,1,ICUT-1,1,LSTEP) + COVAL(wfix ,TEM1, FIXVAL , 0.0) + PATCH(efix ,VOLUME,1,nx,1,ny,ICUT+2,NZ,1,LSTEP) + COVAL(efix ,TEM1, FIXVAL , 0.0) ENDIF IF(CASENO.EQ.2.OR.CASENO.EQ.4) THEN ! Set source in right sunny sub-cell + PATCH(SNYFLUX ,VOLUME,1,nx,1,ny,icp1,icp1,1,LSTEP) + COVAL(SNYFLUX ,TEM1, FIXFLU , SVAL) ENDIF IF(CASENO.EQ.4) THEN ! Set source in left sunny sub-cell + PATCH(SNYFLUX2,VOLUME,1,nx,1,ny,icut,icut,1,LSTEP) + COVAL(SNYFLUX2,TEM1, FIXFLU , SVAL) ENDIF IF(CASENO.GE.5.AND.CASENO.LE.7) THEN ! Fix value in sunny sub-cell + PATCH(LWAL ,LWALL ,1,nx,1,ny,1,1,1,1) + COVAL(LWAL ,TEM1, 1.000000E+00, 0.000000E+00) + PATCH(HWAL ,HWALL ,1,nx,1,ny,nz,nz,1,1) + COVAL(HWAL ,TEM1, 1.000000E+00, 0.000000E+00) ENDIF IF(CASENO.EQ.5.OR.CASENO.EQ.7) THEN ! Fix value in sunny sub-cell + PATCH(SNYFLUX ,VOLUME,1,nx,1,ny,icut,icp1,1,LSTEP) + COVAL(SNYFLUX ,TEM1, FIXVAL , SVAL) ENDIF IF(CASENO.GE.9.AND.CASENO.LE.11) THEN ! Set boundary conditions + PATCH(LWAL ,LWALL ,1,nx,1,ny,1,1,1,1) + COVAL(LWAL ,TEM1, 1.000000E+00, 0.000000E+00) + PATCH(HWAL ,HWALL ,1,nx,1,ny,nz,nz,1,1) + COVAL(HWAL ,TEM1, 1.000000E+00, 0.000000E+00) ENDIF IF(CASENO.EQ.9.OR.CASENO.EQ.11) THEN ! Set source in sunny sub-cell + PATCH(SNYFLUX ,VOLUME,1,nx,1,ny,icut,icp1,1,LSTEP) + COVAL(SNYFLUX ,TEM1, FIXFLU , SVAL) ENDIF EGWF = T ************************************************************ Group 14. Downstream Pressure For PARAB ************************************************************ Group 15. Terminate Sweeps LSWEEP = 1 RESFAC = 1.000000E-03 ************************************************************ Group 16. Terminate Iterations LITER (TEM1) = 3500 ************************************************************ Group 17. Relaxation relax(tem1,falsdt,1.E10) ************************************************************ Group 18. Limits ************************************************************ Group 19. EARTH Calls To GROUND Station USEGRD = T ;USEGRX = T ASAP = T PARSOL = T SPEDAT(SET,GXMONI,TRANSIENT,L,F) ************************************************************ Group 20. Preliminary Printout ECHO = T DISTIL = T ;NULLPR = F NDST = 0 DSTTOL = 1.000000E-02 EX (TEM1) = 0.000000E+00 ;EX (PRPS) = 3.354000E+00 ************************************************************ Group 21. Print-out of Variables ************************************************************ Group 22. Monitor Print-Out IXMON = 1 ;IYMON = 1 ;IZMON = -3 NPRMON = 100000 NPRMNT = 1 TSTSWP = -1 ************************************************************ Group 23.Field Print-Out & Plot Control NPRINT = 100000 NTPRIN = 100 ;ISTPRF = 1 ;ISTPRL = 10000 NXPRIN = 1 ISWPRF = 1 ;ISWPRL = 100000 PATCH (PLOT ,PROFIL,1,5,1,1,1,1,1,1) PLOT(PLOT ,TEM1, 0.000000E+00, 0.000000E+00) ************************************************************ Group 24. Dumps For Restarts GVIEW(P,0.000000E+00,0.000000E+00,1.000000E+00) GVIEW(UP,0.000000E+00,1.000000E+00,0.000000E+00) > DOM, SIZE, 1.000000E+00, 1.000000E+00, ZLENG > DOM, MONIT, 1.000000E+00, 1.000000E+00, Z1 > DOM, SCALE, 1.000000E+00, 1.000000E+00, 1.000000E+00 > DOM, SNAPSIZE, 1.000000E-02 > GRID, RSET_X_1, 1, 1.000000E+00 > GRID, RSET_Y_1, 1, 1.000000E+00 > GRID, RSET_Z_1, NCEL, 1.000000E+00 > OBJ, NAME, BLOCK > OBJ, POSITION, 0.000000E+00, 0.000000E+00, Z1 > OBJ, SIZE, 1.000000E+00, 1.000000E+00, Z2-Z1 > OBJ, GEOMETRY, cube4 > OBJ, ROTATION24, 1 > OBJ, GRID, NO > OBJ, TYPE, BLOCKAGE > OBJ, MATERIAL, NUMMAT > OBJ, TIME_LIMITS, ALWAYS_ACTIVE > OBJ, INI_TEMP, T0OB IF(CASENO.EQ.3.OR.CASENO.EQ.4) THEN > OBJ, HEAT_FLVX, 0.000000E+00, DVAL ENDIF IF(CASENO.EQ.6.OR.CASENO.EQ.7) THEN > OBJ, FIXED_TMP, 0.000000E+00, DVAL ENDIF IF(CASENO.EQ.10.OR.CASENO.EQ.11) THEN > OBJ, HEAT_FLVX, 0.000000E+00, DVAL ENDIF PHOTON USE AUTOPLOT USE file phi 5 d 1 tem1;d 1 dvar;Col1 1;Col2 2;blb4 1;blb2 2;Redr text 1 1 Temperature in structured storage 0.9E+03 0.28E+04 CR text 1 2 Temperature in dark sub-cells 0.9E+03 0.27E+04 CR msg Press any key to END pause ENDUSE NZPRIN=1 STOP isg60=1 ! set active NewParsol