# How to write pressure/temperature value along the streamlines?

 For a 2D axi-symmetrical problem, is there a way to plot the pressure gradient along the stream line? I recently ran a simulation for a 2D axi-symmetrical problem. The solution converges. But I have a need to know the pressure profile along the flow path. There is no direct way to do this. Here are several workarounds using the fact that massless particles follow streamlines: 1. In FIPOST, You can plot pathlines and color by pressure or temperature. twophase(nstep=5000, tstar=0, tend=1000,dt=0.01) Particle(nodes) 83 0 path(conti,particl,all,pressure,plot) Please note that when you use FILE option to write out the particle information, it writes out x,y,z, temperature etc. but no pressure! 2. In FIPOST, plot pressure and then superimpose streamlines on the plot to give you visual information. 3. In FIELDVIEW, plot streamlines and color them by any variable you desire. 4. Here is another way to get the info you want. Tested with ex3.FDREAD (isothermal, const visc, laminar, steady) Run the example as is to convergence and post process the results. Now we are going to "trick" FIDAP in storing pressure so that you can use path(file) option as it doesn't write out PRESSURE by default. Make the following modifications to the input file < PROBLEM(NONLINEAR) > PROBLEM(NONLINEAR, ENERGY) < ICNODE(STOKES) > /ICNODE(STOKES) /added the following > bcnode(temp,enti="fluid",fsub) > solu(segr=1) > stra(segr) > 1{(T)}:0.01 > icnode(velo,read) > icnode(press,read) > problem(ener,nonl) In the subroutine (fisolv_user.F), we make two changes: USRINI and USRBCN. Basically we are setting the flag to compute and store pressure in USRINI and in USRBCN, we are setting Temperature equal to Pressure. USRBCN: if (IDF .eq. kdt) val = GETSOL(NODE, KDP) C commented CALL ERM C CALL ERMSGS (8901, 0, 3, C 1 0,0,0,0,0,ZRO,ZRO,ZRO,' ',' ',' ') and USRINI inivar(kdp)=1 We run only for one iteration. In FIPOST: TWOPHASE( TSTA = 0, TEND = 5000, DT = 0.01 ) PARTICLE( NODE ) 83 0 PATH( PRIN, FILE = "test_ak.out", TEMP ) test_ak.out is a text file: PARTICLE PATH DATA FOR PARTICLE NUMBER ( 1) -------------------------------------- ID TIME XP YP ZP DP DLTA UP VP WP TP 1 0.0000000E+00-0.60000000E+01 0.43750000E+00 0.00000000E+00 0.10000000E+01 0.1000000E+00 0.10000000E+01 0.66057837E-08 0.00000000E+00 0.26178302E+00 1 0.1000000E+00-0.59000140E+01 0.43753271E+00 0.00000000E+00 0.10000000E+01 0.1000000E+00 0.99969995E+00 0.67656159E-03 0.00000000E+00 0.26204587E+00 Please review POSTPROCESS Command in FIPREP manual (Chapter 3.13 Note 2) for the format of this file: >The FDPART is an ASCII file which contains a data record for each particle at each time step. Each data record includes the following information: id , time , x, y, z, u, v, w, T, d The last value in each set is temperature but in our case it is pressure. Note: even if you have nonisothermal problem, this trick should work. Please copy the files in the new directory so that you don't overwrite them by mistake! ***written by Ashwini.Kumar@ansys.com May 8, 2007 ***