Difference between revisions of "OpenFOAM/C3/Using-PyFoam-Utilities/English-timed"
From Script | Spoken-Tutorial
(Created page with "{| border=1 | '''Time''' | '''Narration''' |- | 00:01 | Hello and Welcome to the spoken tutorial on Using '''PyFoam Utilities''' |- | 00:07 | In this tutorial we will learn...") |
Jyotisolanki (Talk | contribs) |
||
Line 148: | Line 148: | ||
|- | |- | ||
| 03:37 | | 03:37 | ||
− | | Go to the bottom of the file and ''' | + | | Go to the bottom of the file and Remove '''U.Component(0).''' |
|- | |- |
Latest revision as of 00:01, 8 January 2018
Time | Narration |
00:01 | Hello and Welcome to the spoken tutorial on Using PyFoam Utilities |
00:07 | In this tutorial we will learn : About PyFoam Utilities |
00:12 | How to use PyFoam Utilites |
00:15 | How to run and plot data for the shockTube case using PyFoam Utilites |
00:22 | To record this tutorial I am using: Ubuntu Linux Operating System 14.04 |
00:30 | OpenFOAM version 2.3.0 |
00:34 | PyFoam 0.6.5 |
00:37 | As a prerequisite user should have : basic knowledge of running commands on the Linux terminal |
00:45 | And some experience of running and analyzing OpenFOAM cases |
00:51 | Let me introduce you to PyFoam utilities. |
00:55 | Utilities are Python programs which come inbuilt with PyFoam. |
01:01 | Each utility has a specific function. |
01:05 | Utilities are executed from the command line. |
01:10 | List of utilites that can be viewed using tab completion |
01:16 | Open the terminal. |
01:18 | The list of utilities can be viewed by typing pyFoam and then pressing Tab key twice |
01:29 | Let me switch back to the slides. |
01:32 | Each utility can be executed with the minus help option. |
01:38 | This helps us to find out what it does and what its options are. |
01:44 | We are going to use the below PyFoam Utilities to run the Shock Tube case. |
01:51 | We will use – PyFoamRunner dot py, PyFoamSamplePlot dot py |
01:58 | And then plot the necessary data using PyFoam |
02:02 | PyFoamRunner dot py can be used to run cases. |
02:07 | It also generates log files for later use. |
02:12 | This utility is used to plot the various data obtained from the previously set up sampleDict. |
02:21 | Shock Tube is an instrument used to replicate and direct blast waves at a sensor |
02:29 | To model actual explosion and their effects |
02:34 | In this case, the rectangular tube has low pressure on the right side and high pressure on the left side. |
02:42 | Both the pressures zones are separated by a thin diaphragm. |
02:47 | Open the Terminal , type the path for rhoCentralFoam inside compressible solver. |
02:56 | Type ls. You can see the shockTube case. |
03:02 | Type cd space shockTube |
03:05 | You can see three folders 0 dot org , constant and system. |
03:11 | We need to copy the 0 file from 0 dot org. So type cp space minus r space 0 dot org space 0 and press Enter |
03:26 | Now, go to the system folder by typing cd space system |
03:32 | Open the sampleDict file using gedit. |
03:37 | Go to the bottom of the file and Remove U.Component(0). |
03:45 | Replace it with Ux Uy and Uz. Remove rho as well. |
03:53 | Save and exit the file. |
03:56 | Go one level back by typing cd dot dot |
04:01 | Run the command blockMesh to mesh the geometry. |
04:06 | After this type setFields to set the pressure boundary condition. |
04:13 | Now we will use the pyFoam utility of pyFoamRunner.py |
04:19 | Type pyFoamRunner dot py space followed by name of the solver i.e. RhoCentralFoam. |
04:28 | This runs the case and creates a postProcessing log. |
04:33 | Type ls. |
04:35 | We can see the log files which are generated. |
04:39 | Now type sample to run the sample utility. |
04:44 | After this we can plot for various time steps using pyFoamSamplePlot dot py space dot slash space minus minus directory ie. Dir equal to postProcessing/sets space hyphen info |
05:10 | This will show which fields we have with us. |
05:14 | Then type pyFoamSamplePlot.py space dot slash space minus minus dir equal to postProcessing/sets space minus minus field equal to capital T space minus minus mode equal to timesInOne space vertical pipe space gnuplot |
05:44 | The output generated will be a png file. |
05:48 | Type ls. We can see the png file which is generated. |
05:54 | In this tutorial, we learnt about PyFoam Utilities. |
05:58 | We also learnt to- Check for various pyFoam utilities |
06:03 | pyFoamRunner.py to run the solver |
06:07 | pyFoamSamplePlot utility to generate a png file |
06:13 | Please post your timed queries in this forum. |
06:17 | Please post your general queries on OpenFOAM in this forum. |
06:22 | The FOSSEE team coordinates the TBC project. |
06:26 | The Spoken Tutorial Project is funded by NMEICT, MHRD, Govt. of India
For more details , visit this website. |
06:36 | This is Rahul Joshi from IIT Bombay signing off. Thanks for watching |