/CLEAR,START /COM,ANSYS RELEASE 8.1 UP20040329 /input,start81,ans,'C:\Programme\Ansys Inc\v81\ANSYS\apdl\',,,,,,,,,,,,,,,,1 /FILENAME,CFD,0 /REPLOT /CWD,'D:\Projekte\MOEL06\AnsysModels' !*************************Preprocessing***************************************************************** /PREP7 !* ET,1,FLUID141 !* KEYOPT,1,1,0 !Species transport not activated KEYOPT,1,3,0 !Cartesian coordinates KEYOPT,1,4,0 !do not include displacement DOF's !* !* X1 = 0.00025 !Keypoint 1 X2 = 0.03025 !Keypoint 2 Y1 = 0 !Keypoint 3 Y2 = 0.01 !Keypoint 4 Q = -8.21e-4 !Heat flux RHO = 1000 !Fluid density K = 9E-11 !Diffusivity CP = 39.3/RHO !Specific heat MU = 4.6e-4 !Viscosity of water (kg.s/m) Fm = 0.003 Km = 14000 Cinit = 46000 endtime = 10 !* RECTNG,X1,X2,Y1,Y2 !* LSEL,S,,,1 !select line 1 LESIZE,ALL,,,20,20 !define line divisions LSEL,S,,,3 !select line 3 LESIZE,ALL,,,20,0.05 !define line divisions LSEL,S,,,2 !select line 2 LESIZE,ALL,,,6 LSEL,S,,,4 !select line 4 LESIZE,ALL,,,6 ALLSEL AMESH,1 !* FINISH !*****************SOLUTION**************************************************************************** /SOLU ! Enter SOLUTION FLDATA1,SOLU,TRAN,TRUE !start transient algorithm FLDATA,TEMP,NOMI,Cinit FLDATA,NOMI,DENS,RHO ! Nominal density FLDATA,NOMI,VISC,MU ! Nominal viscosity FLDATA,NOMI,COND,K FLDATA,NOMI,SPHT,CP SAVE FLDATA,SOLU,TEMP,T !activate solution of heat equation FLDATA,SOLU,FLOW,F !activate solution of heat equation FLDATA,RELX,TEMP,1.0 !* ic,all,Temp,Cinit ic,all,VX,0 !* LSEL,S,,,4 ! boundary condition at root surface NSLL,S,1 !select nodes associated with selected line D,ALL,VX,0 SF,ALL,HFLUX,-Cinit*FM/(Cinit+Km) !* LSEL,S,,,2 ! outer boundary condition NSLL,S,1 !select nodes associated with selected line D,ALL,VX,0 ALLSEL !* !*******************************Time loop*********************************** FLDATA4,TIME,TEND,3600 !end time after first time step AUTOTS,0 FLDATA4A,TIME,STEP,3600 !time step KBC,1 solve !* *do,j,2,endtime,1 FLDATA4,TIME,TEND,j*3600 !end time after jth time step AUTOTS,0 FLDATA4A,TIME,STEP,3600 KBC,0 TSRES,ERASE !* LSEL,S,,,4 !select line 4 NSLL,S,1 !select nodes associated with selected line *get,nanz,node,,count !Konten Anzahl feststellen *get,nmin,node,,num,min !niedrigste Knotennummer narb=nmin !Knoten in Arbeit *do,i,1,nanz NSEL,S,NODE,,narb *GET, surfaceTemp, NODE, narb, TEMP !get temperature at selected node SFDELE,ALL,HFLUX !delete heat flux of previous step SF,ALL,HFLUX,-surfaceTemp*Fm/(surfaceTemp+Km) !apply new heat flux ALLSEL LSEL,S,,,4 !select line 4 NSLL,S,1 !select nodes associated with selected line narb=ndnext(narb) !nächster Knoten *enddo !* eplot ALLSEL solve !* *enddo !* FINISH !*************************************************************************** !* /POST26 !* NSOL,2,50,TEMP,, TEMP_2 STORE,NEW XVAR,1 PLVAR,2, ! Save time history variables to file outputCFD.prn *DEL,_P26_EXPORT *DIM,_P26_EXPORT,TABLE,11,1 VGET,_P26_EXPORT(1,0),1 VGET,_P26_EXPORT(1,1),2 /OUTPUT,'outputCFD','prn','.' *VWRITE,'TIME','TEMP_2' %14C %14C *VWRITE,_P26_EXPORT(1,0),_P26_EXPORT(1,1) %14.5G %14.5G /OUTPUT,TERM ! End of time history save