# Calculate Thrust/Drag and torque from Phoenics

 Register Blogs Members List Search Today's Posts Mark Forums Read

 April 16, 2007, 18:19 Calculate Thrust/Drag and torque from Phoenics #1 Jason Butcher Guest   Posts: n/a Hi. I've been doing some testing in PHOENICS and i need to calculate the Thrust/drag and torque generated from a certain part of my imported profile. Is there any way to do this, as from the results I have only got pressure in (Pa). Any help would be great. Thank you

 July 11, 2007, 20:41 Re: Calculate Thrust/Drag and torque from Phoenics #2 PattiMichelle Guest   Posts: n/a Dr. Mike once showed me how to do this - he used GROUND coding - I'm not sure there's a good way to do it OOB in Phoenics - maybe INFORM? Here's the GROUND code he gave me: (I *hope* you understand FORTRAN better than I) C--- GROUP 19. Special calls to GROUND from EARTH C 19 GO TO (191,192,193,194,195,196,197,198,199,1910,1911),IS C 191 CONTINUE C * ------------------- SECTION 1 ---- Start of time step. RETURN 192 CONTINUE C * ------------------- SECTION 2 ---- Start of sweep. RETURN 193 CONTINUE C * ------------------- SECTION 3 ---- Start of iz slab. RETURN 194 CONTINUE C * ------------------- SECTION 4 ---- Start of iterations over slab. RETURN 1911 CONTINUE C * ------------------- SECTION 11---- After calculation of convection C fluxes for scalars, and of volume C fractions, but before calculation of C scalars or velocities RETURN 199 CONTINUE C * ------------------- SECTION 9 ---- Start of solution sequence for C a variable RETURN 1910 CONTINUE C * ------------------- SECTION 10---- Finish of solution sequence for C a variable RETURN 195 CONTINUE C * ------------------- SECTION 5 ---- Finish of iterations over slab. RETURN 196 CONTINUE C * ------------------- SECTION 6 ---- Finish of iz slab. RETURN 197 CONTINUE C * ------------------- SECTION 7 ---- Finish of sweep. CALL GETPTC('OB1',GTYPE,JXF,JXL,JYF,JYL,JZF,JZL,JTF,JTL ) GSUMFX=0.0 GSUMFY=0.0 LBARE=LBNAME('AREE') LBARN=LBNAME('AREN') DO JZ=JZF,JZL JP1 = ANYZ(P1,JZ) JARE = ANYZ(LBARE,JZ) JARN = ANYZ(LBARN,JZ) L0P1 = L0F(JP1) L0ARE= L0F(JARE) L0ARN= L0F(JARN) Compute Drag Force JX1=JXF-1 DO JY=JYF,JYL J=(JX1-1)*NY+JY GSUMFX=GSUMFX+F(L0P1+J)*F(L0ARE+J) ENDDO JX1=JXL+1 DO JY=JYF,JYL J=(JX1-1)*NY+JY GSUMFX=GSUMFX-F(L0P1+J)*F(L0ARE+J) ENDDO Compute Lift Force DO JX=JXF,JXL J=(JX-1)*NY+JYF-1 GSUMFY=GSUMFY+F(L0P1+J)*F(L0ARN+J) ENDDO DO JX=JXF,JXL J=(JX-1)*NY+JYL+1 GSUMFY=GSUMFY-F(L0P1+J)*F(L0ARN+J) ENDDO ENDDO Compute Dynamic head GVIN =RG(1) GHIN =RG(2) GHEAD=0.5*RHO1*GVIN*GVIN GAPRJ=ZWLAST*GHIN Compute Drag and Lift Coefficients GCD=GSUMFX/(GHEAD*GAPRJ) GCL=GSUMFY/(GHEAD*GAPRJ) IF(STEADY) THEN WRITE(14,*) ' ISWP = ',ISWEEP,' CD = ',GCD,' CL = ',GCL, 1 ' FX = ',GSUMFX,' FY = ',GSUMFY ELSE IF(ISWEEP.EQ.LSWEEP-1) THEN JV1 = ANYZ(V1,IZMON) L0V1 = L0F(JV1) GV1MON= F(L0V1+IYMON+(IXMON-1)*NY) JP1 = ANYZ(P1,IZMON) L0P1 = L0F(JP1) GP1MON= F(L0P1+IYMON+(IXMON-1)*NY) WRITE(85,1981) ISTEP,TIM,GCD,GCL,GSUMFX,GSUMFY,GV1MON,GP1MON ENDIF ENDIF 1981 FORMAT(I4,1P7E11.3) RETURN 198 CONTINUE C * ------------------- SECTION 8 ---- Finish of time step. C RETURN