FLUENT 6 - Import 2d FLUENT 4 euler-euler data file to FLUENT 6

 Customer would like to continue in FLUENT 6 running an unsteady Euler-Euler FLUENT 4 calculation that took several weeks to converge. That is to say, he would like to import FLUENT 4 data into FLUENT 6. Here is a solution tested for a 2d case : 1. Compile a new FLUENT 4.5.6 executable with the routine usrfn.F below 2. Run this executable 3. Allocate memory for User Defined function Define - Allocate - 1 for Max Number of User Defined Function 4. Read 2d Euler-Euler case and data 5. Defined one post processing function : EXPERT/USER-SUBROUTINES/POST-PROCESSING/DEFINE-FUNCTIONS 6. Calculate this function : CALCULATE-FUNCTIONS USER-FUNCTION-1 This function will create a text file called fluent4-euler-euler.ip which format is the FLUENT 6 interpolate format 7. Run FLUENT 6 8. Import FLUENT 4 case file File - Import - FLUENT 4 Case File... 9. Set up all the materials / solvers / models / boundary conditions properly... The case set up is not imported only the grid is imported 10. Interpolate the datas previously written File - Interpolate - Read and Interpolate For 3d case, you will need to change few lines in the subroutine below : - number of cells ->(NI-2) * (NJ-2) * (NK-2) - dimensions -> 3 - do loops for K will be from K=2 to (NK-1) - write the Z coordinate before all the variables FLUENT 4 Post processing Subroutine : usrfn.F ======================================= SUBROUTINE USRFN( NFUNC, ISURF, INCCDW, FUNC ) C----------------------------------------------------------------------C C COMMON BLOCKS C C----------------------------------------------------------------------C #include "SIZE.INC" #include "SPECSZ.INC" C #include "USFLGS.INC" #include "USPARS.INC" #include "LBOUND.INC" #include "FLPEXV.INC" #include "FLPGEO.INC" #include "GRID.INC" #include "FTURB.INC" #include "FCONST.INC" #include "FLOPRO.INC" #include "FLOVEL.INC" #include "MIXPRP.INC" #include "SPCONS.INC" #include "CSHEAR.INC" #include "PRODEF.INC" #include "POLAR.INC" C C #include "MPFLOV.INC" #include "MPVOF.INC" C----------------------------------------------------------------------C C ARGUMENT TYPE DECLARATIONS... C C----------------------------------------------------------------------C C INTEGER NFUNC INTEGER INCCDW INTEGER ISURF REAL FUNC(ARYSIZ) C C----------------------------------------------------------------------C C LOCAL VARIABLE TYPE DECLARATIONS... C C----------------------------------------------------------------------C C INTEGER I INTEGER J INTEGER K INTEGER L INTEGER NUMBEROFCELLS C C----------------------------------------------------------------------C C NUMBER OF CELLS CALCULATION C C----------------------------------------------------------------------C NUMBEROFCELLS = (NI-2) * (NJ-2) C ISURF = 1 INCCDW = 1 C C----------------------------------------------------------------------C C BEGIN FUNCTION USRFN1... C C----------------------------------------------------------------------C C IF (NFUNC .EQ. 1) THEN C OPEN(15,FILE='fluent4-euler-euler.ip',STATUS='UNKNOWN') C----------------------------------------------------------------------C C FLUENT6 FORMAT -> index =2 C C----------------------------------------------------------------------C C WRITE(15,*) 2 C----------------------------------------------------------------------C C DIMENSIONS : 2d -> 2 C C----------------------------------------------------------------------C C WRITE(15,*) 2 C----------------------------------------------------------------------C C NUMBER OF CELLS C C----------------------------------------------------------------------C C WRITE(15,*) NUMBEROFCELLS C----------------------------------------------------------------------C C NUMBER OF FIELD VARIABLES C C----------------------------------------------------------------------C C WRITE(15,*) 9 C----------------------------------------------------------------------C C NAME OF FIELD VARIABLES C C----------------------------------------------------------------------C C WRITE(15,*) 'pressure' WRITE(15,*) 'mp-0' WRITE(15,*) 'mp-1' WRITE(15,*) 'x-velocity-0' WRITE(15,*) 'y-velocity-0' WRITE(15,*) 'epsilon-0' WRITE(15,*) 'k-0' WRITE(15,*) 'x-velocity-1' WRITE(15,*) 'y-velocity-1' C----------------------------------------------------------------------C C LIST OF X COORDINATE C C----------------------------------------------------------------------C C DO 3000 K = 1, NK DO 2000 J = 2, NJ-1 DO 1000 I = 2, NI-1 L = I + NI*((J-1) + (K-1)*NJ) WRITE(15,*) XN(L) 1000 CONTINUE 2000 CONTINUE 3000 CONTINUE C----------------------------------------------------------------------C C LIST OF Y COORDINATE C C----------------------------------------------------------------------C C DO 3001 K = 1, NK DO 2001 J = 2, NJ-1 DO 1001 I = 2, NI-1 L = I + NI*((J-1) + (K-1)*NJ) WRITE(15,*) YN(L) 1001 CONTINUE 2001 CONTINUE 3001 CONTINUE C----------------------------------------------------------------------C C LIST OF VALUES OF THE FIELD VARIABLE C C----------------------------------------------------------------------C C DO 3002 K = 1, NK DO 2002 J = 2, NJ-1 DO 1002 I = 2, NI-1 L = I + NI*((J-1) + (K-1)*NJ) WRITE(15,*) P(L) 1002 CONTINUE 2002 CONTINUE 3002 CONTINUE C DO 3003 K = 1, NK DO 2003 J = 2, NJ-1 DO 1003 I = 2, NI-1 L = I + NI*((J-1) + (K-1)*NJ) WRITE(15,*) VOF(L,2) 1003 CONTINUE 2003 CONTINUE 3003 CONTINUE C DO 3004 K = 1, NK DO 2004 J = 2, NJ-1 DO 1004 I = 2, NI-1 L = I + NI*((J-1) + (K-1)*NJ) WRITE(15,*) VOF(L,1) 1004 CONTINUE 2004 CONTINUE 3004 CONTINUE C DO 3005 K = 1, NK DO 2005 J = 2, NJ-1 DO 1005 I = 2, NI-1 L = I + NI*((J-1) + (K-1)*NJ) WRITE(15,*) UCO(L) 1005 CONTINUE 2005 CONTINUE 3005 CONTINUE C DO 3006 K = 1, NK DO 2006 J = 2, NJ-1 DO 1006 I = 2, NI-1 L = I + NI*((J-1) + (K-1)*NJ) WRITE(15,*) VCO(L) 1006 CONTINUE 2006 CONTINUE 3006 CONTINUE C DO 3007 K = 1, NK DO 2007 J = 2, NJ-1 DO 1007 I = 2, NI-1 L = I + NI*((J-1) + (K-1)*NJ) WRITE(15,*) D(L) 1007 CONTINUE 2007 CONTINUE 3007 CONTINUE C DO 3008 K = 1, NK DO 2008 J = 2, NJ-1 DO 1008 I = 2, NI-1 L = I + NI*((J-1) + (K-1)*NJ) WRITE(15,*) E(L) 1008 CONTINUE 2008 CONTINUE 3008 CONTINUE C DO 3009 K = 1, NK DO 2009 J = 2, NJ-1 DO 1009 I = 2, NI-1 L = I + NI*((J-1) + (K-1)*NJ) WRITE(15,*) U2CO(L,1) 1009 CONTINUE 2009 CONTINUE 3009 CONTINUE C DO 3010 K = 1, NK DO 2010 J = 2, NJ-1 DO 1010 I = 2, NI-1 L = I + NI*((J-1) + (K-1)*NJ) WRITE(15,*) V2CO(L,1) 1010 CONTINUE 2010 CONTINUE 3010 CONTINUE C CLOSE(15) ENDIF C======================================================================C C END OF USER FUNCTIONS CALCULATIONS... C C======================================================================C RETURN END