SUBROUTINE UFLUID(RHO,CP,CT,PNEWDT,ENER,PRESS,DPRESS,PRESSI, 1 TEMP,DTEMP,TEMPI,TIME,DTIME,KSTEP,KINC,NONUM,FLNAME,LFLAG) C C THIS USER SUBROUTINE MODELS A FLUID AS AN IDEAL GAS: C VARIABLES: C PAMB = AMBIENT PRESSURE C TABS = ABSOLUTE ZERO TEMPERATURE C PREF = REFERENCE PRESSURE FOR DENSITY C TREF = REFERENCE TEMPERATURE FOR DENSITY C RHOR = REFERENCE DENSITY C INCLUDE 'ABA_PARAM.INC' C CHARACTER*80 FLNAME DIMENSION TIME(2) PAMB = 14.7 TABS = -460. PREF = 0. TREF = 200. RHOR = 10. C C COMPUTE FOR FLUID DENSITY C RHO=RHOR*((TREF-TABS)*(PRESS+PAMB))/((TEMP-TABS)*(PREF+PAMB)) C C COMPUTE FOR FLUID PRESSURE COMPLIANCE C CP=(-1.0/RHOR)*((TEMP-TABS)*(PREF+PAMB))/((TREF-TABS)* 1 (PRESS+PAMB)**2) C C COMPUTE FOR FLUID TEMPERATURE COMPLIANCE C CT=(1.0/RHOR)*(PREF+PAMB)/((TREF-TABS)*(PRESS+PAMB)) C C COMPUTE FOR ENERGY PER UNIT MASS C ENER=(1.0/RHOR)*((TEMP-TABS)/(TREF-TABS)*(PREF+PAMB)* 1 (LOG((PRESS+PAMB)/PAMB) - PRESS/(PRESS+PAMB))) C RETURN END