<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Evan</id>
		<title>Script | Spoken-Tutorial - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Evan"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Special:Contributions/Evan"/>
		<updated>2026-04-10T04:19:03Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/OpenFOAM-version-9/C3/Simulating-Natural-Convection-in-a-Cavity/English</id>
		<title>OpenFOAM-version-9/C3/Simulating-Natural-Convection-in-a-Cavity/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/OpenFOAM-version-9/C3/Simulating-Natural-Convection-in-a-Cavity/English"/>
				<updated>2025-01-28T04:28:18Z</updated>
		
		<summary type="html">&lt;p&gt;Evan: Created page with &amp;quot;'''Title of the script''': Simulating Natural Convection in a Cavity  '''Author''': Divyesh Variya  '''Keywords''': OpenFOAM, ParaView, CFD, computational fluid dynamics, bloc...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script''': Simulating Natural Convection in a Cavity&lt;br /&gt;
&lt;br /&gt;
'''Author''': Divyesh Variya&lt;br /&gt;
&lt;br /&gt;
'''Keywords''': OpenFOAM, ParaView, CFD, computational fluid dynamics, blockMesh, buoyancy driven flow, heat transfer, natural convection, buoyantSimpleFoam, thermophysical properties, FOSSEE, spoken tutorial, video tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
|- &lt;br /&gt;
|| '''Visual Cue'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''Opening Slide'''&lt;br /&gt;
|| Welcome to the spoken tutorial on '''Simulating Natural Convection in a Cavity'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''Learning Objective'''&lt;br /&gt;
|| In this tutorial, we will learn to:&lt;br /&gt;
* Set up a case of '''heat transfer''' in '''OpenFOAM'''&lt;br /&gt;
* Simulate a '''buoyancy-driven flow''', and&lt;br /&gt;
* Set up '''thermophysical properties''' in '''OpenFOAM'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''System Specifications'''&lt;br /&gt;
|| To record this tutorial, I am using,&lt;br /&gt;
* '''Ubuntu Linux''' OS version 22.04&lt;br /&gt;
* '''OpenFOAM''' version 9&lt;br /&gt;
* '''ParaView''' version 5.6.0, and&lt;br /&gt;
* '''gedit''' Text editor&lt;br /&gt;
&lt;br /&gt;
However, you may use any other editor of your choice.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
&lt;br /&gt;
* If not, please go through the prerequisite '''OpenFOAM '''tutorials on https://spoken-tutorial.org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| As a prerequisite:&lt;br /&gt;
* You should have basic knowledge of '''convective heat transfer'''.&lt;br /&gt;
* You should be familiar with '''setting up a case''' in '''OpenFOAM'''.&lt;br /&gt;
* If not, please go through the prerequisite '''OpenFOAM '''tutorial on this website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the '''Code''' '''Files''' link on this tutorial page &lt;br /&gt;
* Please download and extract them&lt;br /&gt;
* Make a copy and then use them while practising&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''Natural Convection in a Cavity'''&lt;br /&gt;
|| We will be solving a '''2D flow''' in a square '''cavity'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All '''4 walls''' of the '''cavity''' are '''fixed'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''Natural Convection in a Cavity'''&lt;br /&gt;
|| &lt;br /&gt;
* The '''bottom wall''' is maintained at a higher '''temperature''' compared to the '''top wall'''.&lt;br /&gt;
* The '''side walls''' are '''adiabatic'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''Natural Convection in a Cavity'''&lt;br /&gt;
|| &lt;br /&gt;
* The '''gravity''' is acting '''downwards''', in the '''negative y-direction'''.&lt;br /&gt;
&lt;br /&gt;
* Inside the '''cavity''', the fluid close to the '''hot wall''' at the '''bottom''' is lighter.&lt;br /&gt;
&lt;br /&gt;
* The fluid close to the '''cold wall''' on '''top''' is heavier.&lt;br /&gt;
&lt;br /&gt;
* This difference in density causes a continuous circulation in the '''cavity'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let’s '''simulate''' this problem in '''OpenFOAM'''.&lt;br /&gt;
|- &lt;br /&gt;
|| CTRL + ALT + T&lt;br /&gt;
|| Open the '''terminal''' by pressing '''Ctrl''', '''Alt''' and '''T''' keys.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''cd $FOAM_RUN'''&lt;br /&gt;
|| Type the following '''command''' and press '''Enter''' to move into the '''run directory'''.&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Please remember to press the '''Enter''' key after typing each '''command''' in the '''terminal'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: '''cp -r ~/Downloads/cavityConvection .'''&lt;br /&gt;
|| Let’s copy the case folder that is downloaded and extracted into the '''run directory'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: &lt;br /&gt;
&lt;br /&gt;
'''cd cavityConvection'''&lt;br /&gt;
|| Let’s change the directory to '''cavityConvection''' using the '''cd''' '''command'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''Geometry'''&lt;br /&gt;
|| In this '''simulation''', we consider a '''square cavity''' with an edge '''length''' of '''1 m'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''Boundaries'''&lt;br /&gt;
|| The '''computational domain''' has 4''' boundaries''', namely '''top''', '''bottom''', '''left''', and '''right'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All 4 '''boundaries''' are '''fixed walls'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: &lt;br /&gt;
&lt;br /&gt;
'''gedit system/blockMeshDict'''&lt;br /&gt;
|| Type the following command to open the '''blockMeshDict''' file in a text editor.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit blockMeshDict]:&lt;br /&gt;
&lt;br /&gt;
Only Narration&lt;br /&gt;
|| We have a '''cubical''' geometry with a single '''block''' and four '''walls'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''Ctrl + Q'''&lt;br /&gt;
|| Close this file by pressing '''Ctrl + Q'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: '''Boundary Conditions'''&lt;br /&gt;
|| Let’s look at the '''boundary conditions''' in this simulation.&lt;br /&gt;
&lt;br /&gt;
* The '''bottom hot wall''' is maintained at '''1 K'''.&lt;br /&gt;
* The '''top cold wall''' is maintained at '''0 K'''.&lt;br /&gt;
* The '''left''' and the '''right''' '''walls''' are '''adiabatic'''.&lt;br /&gt;
* Therefore, they have '''zero gradient temperature boundary conditions'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''Boundary Conditions'''&lt;br /&gt;
|| The '''boundary conditions '''used in the '''simulation''' are as shown in the table.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''ls 0'''&lt;br /&gt;
|| The '''boundary conditions''' are defined in the '''0 folder'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s view its contents.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''p p_rgh T U'''&lt;br /&gt;
|| You will see two '''pressure files''' along with the '''temperature''' and the '''velocity files'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One is the '''pressure file''', '''p''' and the other is the '''modified pressure file''', '''p_rgh'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''p_rgh'''&lt;br /&gt;
&lt;br /&gt;
* In solvers involving external forces, such as gravity, a modified pressure is used.&lt;br /&gt;
* In this case, a pressure without the hydrostatic pressure is used.&lt;br /&gt;
&lt;br /&gt;
'''Highlight &amp;gt;&amp;gt; p_rgh = p – rho*g*h'''&lt;br /&gt;
&lt;br /&gt;
* It is numerically convenient to solve for this modified pressure term, p_rgh&lt;br /&gt;
* The pressure, p is calculated from the p_rgh pressure&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| &lt;br /&gt;
* In '''solvers''' involving '''body forces''', such as '''gravity''', a '''modified pressure''' is used.&lt;br /&gt;
* In this case, a '''pressure''' without '''hydrostatic pressure''' is used.&lt;br /&gt;
* This '''modified pressure''', '''p_rgh''' is defined as: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''p_rgh = p - rho*g*h'''&lt;br /&gt;
* It is numerically convenient to solve for this '''modified pressure''' term, '''p_rgh'''&lt;br /&gt;
* The '''pressure''', '''p''' is calculated from the '''p_rgh pressure'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: '''gedit 0/T'''&lt;br /&gt;
|| Let’s first open the '''temperature file''', '''T'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''T'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''internalField uniform 1 '''&lt;br /&gt;
|| The '''domain''' is initialized with '''1 K'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''T'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''bottom '''boundary condition&lt;br /&gt;
|| The '''bottom wall''' is maintained at a '''constant temperature''' of '''1 K'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''T'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''top '''boundary condition&lt;br /&gt;
|| The '''top wall''' is maintained at a '''temperature''' of '''0 K'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''T'''] Highlight: &lt;br /&gt;
&lt;br /&gt;
'''left '''&amp;amp;''' right '''boundary condition&lt;br /&gt;
|| The '''left''' and '''right walls''' have '''zero gradient temperature boundary condition'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''T'''] Close the window&lt;br /&gt;
|| Close the '''temperature''' '''file'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: '''gedit 0/p_rgh'''&lt;br /&gt;
|| Let’s open the '''p_rgh file'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''p_rgh'''] Highlight: &lt;br /&gt;
&lt;br /&gt;
all''' walls '''boundary condition&lt;br /&gt;
|| All '''4 walls''' have been assigned the '''fixedFluxPressure''' '''boundary condition'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''fixedFluxPressure'''&lt;br /&gt;
|| The '''fixedFluxPressure boundary condition''' is:&lt;br /&gt;
&lt;br /&gt;
* Analogous to the '''zeroGradient''' '''pressure boundary condition'''&lt;br /&gt;
* Used when '''body forces''' such as '''gravity''' and '''surface tension''' are present&lt;br /&gt;
* It adjusts the '''pressure gradient''' at the '''wall''' based on the '''body forces'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''p_rgh'''] Highlight: &lt;br /&gt;
&lt;br /&gt;
all''' walls '''boundary condition&lt;br /&gt;
|| Our '''simulation''' takes '''gravitational''' '''force''' into consideration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Therefore, we will use the '''fixedFluxPressure''' condition at the '''walls'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''p_rgh'''] Close the window&lt;br /&gt;
|| Close the '''p_rgh''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: '''gedit 0/p'''&lt;br /&gt;
|| Let’s open the '''pressure '''file,''' p'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''p'''] Highlight: &lt;br /&gt;
&lt;br /&gt;
all''' walls '''boundary condition&lt;br /&gt;
|| The '''pressure''' values at the '''boundaries''' are calculated from the '''p_rgh''' values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Therefore, all '''4 walls''' have been assigned the '''calculated''' '''boundary condition'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''p'''] Highlight: &lt;br /&gt;
&lt;br /&gt;
'''value $internalField;'''&lt;br /&gt;
|| The '''value''' has been specified to be the same as the '''internalField'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''p'''] Close the window&lt;br /&gt;
|| Close the '''p''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''ls constant'''&lt;br /&gt;
|| Let’s now see the contents of the '''constant''' folder using the '''ls command'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''g momentumTransport thermophysicalProperties'''&lt;br /&gt;
|| We see that there are 3 files in the '''constant''' folder.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: '''gedit constant/g'''&lt;br /&gt;
|| Let’s open the '''g '''file.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''g'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''dimensions [0 1 -2 0 0 0 0] '''&lt;br /&gt;
|| The '''dimension''' of '''g''' is '''m/s&amp;lt;sup&amp;gt;2'''&amp;lt;/sup&amp;gt;.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''g'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''value (0 -10 0) '''&lt;br /&gt;
|| The '''magnitude''' of '''g''' is '''10''' '''m/s&amp;lt;sup&amp;gt;2'''&amp;lt;/sup&amp;gt;.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''g'''] Close the window&lt;br /&gt;
|| Close the '''g''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: '''gedit constant/momentumTransport'''&lt;br /&gt;
|| Let’s open the '''momentumTransport '''file.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''momentumTransport'''] Highlight: '''simulationType laminar'''&lt;br /&gt;
|| Our '''simulation''' will be a '''laminar''' one.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''momentumTransport'''] Close the window&lt;br /&gt;
|| Close the '''momentumTransport''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: '''gedit constant/thermophysicalProperties'''&lt;br /&gt;
|| Next, let’s open the '''thermophysicalProperties''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''thermophysicalProperties''']:&lt;br /&gt;
&lt;br /&gt;
Only Narration&lt;br /&gt;
|| In this file, the '''properties''' of the '''fluid''' used in our '''simulation''' are specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We’ll be '''simulating''' the '''flow''' inside the '''cavity'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''thermophysicalProperties'''] Highlight: '''thermoType''' field &lt;br /&gt;
|| '''OpenFOAM''' contains various '''thermophysical''' modelling packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''thermoType''' assembles the various '''thermophysical''' modelling packages.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| The '''additional reading material''' has more details on the '''thermophysical''' modelling packages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please refer to it.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''Fluid Properties'''&lt;br /&gt;
|| The various properties used in this '''simulation''' are shown in the table.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''thermophysicalProperties'''] Highlight: '''equationOfState Boussinesq''' &lt;br /&gt;
|| We’ll be using the '''Boussinesq approximation''' for the '''equation of state'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: '''Boussinesq Approximation'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Higlight: '''equation from slide in 3rd point&lt;br /&gt;
|| The '''Boussinesq approximation''' is: &lt;br /&gt;
* Used in '''buoyancy-driven flows'''.&lt;br /&gt;
* It acts as an '''equation of state''' while solving the '''governing equations'''&lt;br /&gt;
* Mathematically, it defines the '''density field''' as shown in the equation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''Boussinesq Approximation'''&lt;br /&gt;
|| '''Where, the reference density''' and '''coefficient of volumetric expansion''' are properties of fluid.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''Reference Temperature'''&lt;br /&gt;
|| The '''reference temperature''' is taken to be the '''average''' of '''hot''' and '''cold''' '''wall temperatures'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Therefore, the '''reference temperature''' for our '''simulation''' is '''0.5 K'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| The '''additional reading material''' has more details on the '''Boussinesq approximation'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please refer to it.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''thermophysicalProperties'''] Highlight: '''molWeight 28.9 '''&lt;br /&gt;
|| The '''molecular weight''' of the''' '''fluid is specified as '''28.9 g/mol'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''thermophysicalProperties'''] Highlight: '''rho0 1;'''&lt;br /&gt;
&lt;br /&gt;
'''T0 0.5; '''&lt;br /&gt;
|| For the fluid in our '''simulation''', the '''reference density''' is specified to be '''1 kg/m&amp;lt;sup&amp;gt;3'''&amp;lt;/sup&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the '''reference density''' at a '''reference temperature''' of '''0.5 K'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''thermophysicalProperties'''] Highlight: '''beta 3.4e-02 '''&lt;br /&gt;
|| The '''coefficient of volumetric expansion''' is '''3.4X10&amp;lt;sup&amp;gt;-2&amp;lt;/sup&amp;gt; K&amp;lt;sup&amp;gt;-1'''&amp;lt;/sup&amp;gt;.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''thermophysicalProperties'''] Highlight: '''Cp 1000 '''&lt;br /&gt;
|| The '''specific heat at constant pressure''' is taken to be '''1000 kJ/kg-K'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''thermophysicalProperties'''] Highlight: '''Hf 0 '''&lt;br /&gt;
|| Since no '''phase change''' is considered in this '''simulation''', the '''heat of fusion''' is '''0'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''thermophysicalProperties'''] Highlight: '''transport'''&lt;br /&gt;
&lt;br /&gt;
'''{'''&lt;br /&gt;
&lt;br /&gt;
'''mu 4.91e-03;'''&lt;br /&gt;
&lt;br /&gt;
'''Pr 0.71;'''&lt;br /&gt;
&lt;br /&gt;
'''} '''&lt;br /&gt;
|| For '''transport properties''', '''dynamic viscosity''' and '''Prandtl number''' are to be specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
They are specified as shown here.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''thermophysicalProperties'''] Close the window&lt;br /&gt;
|| Close the '''thermophysicalProperties''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: '''Ctrl + L'''&lt;br /&gt;
|| Clear the screen by pressing '''Ctrl''' and '''L''' keys together.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: '''blockMesh'''&lt;br /&gt;
|| Let’s '''mesh''' the geometry using the '''blockMesh''' '''command'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''buoyantSimpleFoam'''&lt;br /&gt;
|| We will be using the '''buoyantSimpleFoam''' solver in this simulation.&lt;br /&gt;
&lt;br /&gt;
* It is a '''steady-state''' '''compressible flow '''solver for '''buoyant''' and '''turbulent flows'''.&lt;br /&gt;
* It solves the '''mass''', '''momentum''' and '''energy equations''' along with an '''equation of state'''.&lt;br /&gt;
* The '''equation of state''' we have considered is based on the '''Boussinesq approximation'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: '''buoyantSimpleFoam'''&lt;br /&gt;
|| Let’s start the '''simulation''' using the following '''command'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| The '''simulation''' may take some time to complete.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Highlight: '''End'''&lt;br /&gt;
|| The '''simulation''' is now complete.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: '''paraFoam'''&lt;br /&gt;
|| Let’s view the simulated results in '''ParaView'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [ParaView] '''Properties''' '''Tab'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Apply'''&lt;br /&gt;
|| Click on the '''Apply''' button to view the geometry.&lt;br /&gt;
|- &lt;br /&gt;
|| [ParaView] '''Active Variable Controls'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''vtkBlockColors''' &amp;gt;&amp;gt; Click on '''U '''&lt;br /&gt;
|| Let’s view the '''velocity contours''' for the simulation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''vtkBlockColors''' dropdown in the '''Active Variable Controls''' and select '''U'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [ParaView] '''VCR Controls'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Last Frame '''&lt;br /&gt;
|| Let’s view the '''contours''' at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Last Frame''' button in the '''VCR Controls'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [ParaView]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Rescale to Visible Data Range '''&lt;br /&gt;
|| Click on the '''Rescale to Visible Data Range.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [ParaView] '''Layout Window'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to Circulation&lt;br /&gt;
|| We can see the '''steady-state circulation''' in the cavity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is an example of the '''Rayleigh-Benard convection'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [ParaView] '''Close ParaView'''&lt;br /&gt;
|| Close the '''ParaView''' window.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| We have come to the end of the tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|| In this tutorial, we have learnt to:&lt;br /&gt;
* Set up a case of '''heat transfer''' in '''OpenFOAM'''&lt;br /&gt;
* Simulate a '''buoyancy-driven flow''', and&lt;br /&gt;
* Set up '''thermophysical properties''' in '''OpenFOAM'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: '''Assignment'''&lt;br /&gt;
|| As an assignment:* Increase the '''length''' of the '''cavity''' in the '''x-direction''' to '''2 m'''&lt;br /&gt;
* Keep all the other parameters unaltered in your '''simulation'''&lt;br /&gt;
* '''Simulate''' the '''flow '''in this '''rectangular cavity'''&lt;br /&gt;
* View the '''steady-state velocity contours'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: '''About the Spoken Tutorial Project'''&lt;br /&gt;
|| The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: '''Spoken Tutorial Workshops'''&lt;br /&gt;
|| We conduct workshops using Spoken Tutorials and give certificates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please contact us.&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: '''Spoken Tutorial Forum'''&lt;br /&gt;
|| Please post your timed queries in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: '''FOSSEE Forum'''&lt;br /&gt;
|| * Do you have any general/technical questions?&lt;br /&gt;
* Please visit the forum given in the link.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: '''FOSSEE Case Study Project'''&lt;br /&gt;
|| * The FOSSEE team coordinates solving feasible CFD problems of reasonable complexity using OpenFOAM.&lt;br /&gt;
* We give honorarium and certificates to those who do this.&lt;br /&gt;
* For more details, please visit these sites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: '''Acknowledgements'''&lt;br /&gt;
|| The Spoken Tutorial project was established by the Ministry of Education, Govt. of India.&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| This tutorial is contributed by Diveysh variya, Aabhushan Regmi, Biraj Khadka, and Payel Mukharjee.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Evan</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/OpenFOAM-version-7/C3/Parallel-Computing-in-OpenFOAM/English</id>
		<title>OpenFOAM-version-7/C3/Parallel-Computing-in-OpenFOAM/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/OpenFOAM-version-7/C3/Parallel-Computing-in-OpenFOAM/English"/>
				<updated>2025-01-09T05:06:44Z</updated>
		
		<summary type="html">&lt;p&gt;Evan: Created page with &amp;quot;'''Title of the script:''' Parallel Computing in OpenFOAM  '''Script:''' Divyesh Variya, Ashuthosh Shridhar  '''Video &amp;amp; Narration:''' John Pinto, Payel Mukherjee   '''Keywords...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script:''' Parallel Computing in OpenFOAM&lt;br /&gt;
&lt;br /&gt;
'''Script:''' Divyesh Variya, Ashuthosh Shridhar&lt;br /&gt;
&lt;br /&gt;
'''Video &amp;amp; Narration:''' John Pinto, Payel Mukherjee &lt;br /&gt;
&lt;br /&gt;
'''Keywords:''' OpenFOAM, Parallel Computing, Hierarchical, Manual, Scotch, Simple, decomposition, mpirun, Paraview, Video-Tutorial&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
|-&lt;br /&gt;
|| '''Visual Cue'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 1:'''&lt;br /&gt;
&lt;br /&gt;
'''Opening Slide'''&lt;br /&gt;
|| Welcome to this spoken tutorial on '''Parallel Computing in OpenFOAM.'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 2:'''&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|| In this tutorial, we will learn to,&lt;br /&gt;
* '''Decompose''' a domain&lt;br /&gt;
* '''Run''' a '''simulation''' using '''Simple decomposition '''method&lt;br /&gt;
* '''Reconstruct''' a domain&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 3:'''&lt;br /&gt;
&lt;br /&gt;
'''System Specifications'''&lt;br /&gt;
|| To record this tutorial, I am using,&lt;br /&gt;
* '''Ubuntu Linux''' OS version 22.04&lt;br /&gt;
* '''OpenFOAM''' version 9&lt;br /&gt;
* '''ParaView''' version 5.10.1 and&lt;br /&gt;
* '''gedit Text Editor'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 4:'''&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If not, please go through the prerequisite '''OpenFOAM '''tutorial on '''https://spoken-tutorial.org'''&lt;br /&gt;
|| To practice this tutorial, learner should have,&lt;br /&gt;
* Basic knowledge of '''OpenFOAM '''software&lt;br /&gt;
* If not, please go through the prerequisite '''OpenFOAM '''tutorials on this website.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 5:'''&lt;br /&gt;
&lt;br /&gt;
'''Parallel Computing'''&lt;br /&gt;
|| In''' parallel computing, '''a large domain is split into multiple '''domains''' of smaller size.&lt;br /&gt;
&lt;br /&gt;
Each of the smaller domains is assigned an individual '''processor'''.&lt;br /&gt;
&lt;br /&gt;
The '''processors''' run simultaneously and communicate with each other.&lt;br /&gt;
&lt;br /&gt;
'''OpenFoam''' uses the '''OpenMPI''' library to do this.&lt;br /&gt;
&lt;br /&gt;
Thus, we can speed up the '''simulation'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 6:'''&lt;br /&gt;
&lt;br /&gt;
'''Processes Involved'''&lt;br /&gt;
|| There are three main processes involved in '''parallel computing.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Decomposition''' of the '''domain.'''&lt;br /&gt;
* '''Simulation''' of the '''decomposed tasks''' in separate '''processors.'''&lt;br /&gt;
* '''Reconstruction''' of the '''domain.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 7:'''&lt;br /&gt;
&lt;br /&gt;
'''Decomposition Methods'''&lt;br /&gt;
|| The four main '''decomposition methods''' available in OpenFOAM are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Simple'''&lt;br /&gt;
* '''Hierarchical'''&lt;br /&gt;
* '''Scotch '''and&lt;br /&gt;
* '''Manual'''&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let us learn about Simple Decomposition method using a 2 Dimensional example.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 8:'''&lt;br /&gt;
&lt;br /&gt;
'''Simple Decomposition'''&lt;br /&gt;
|| Simple decomposition method divides the domain''' '''in equal parts'''.'''&lt;br /&gt;
&lt;br /&gt;
The splitting is done according to the user-specified '''coefficients'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 9:'''&lt;br /&gt;
&lt;br /&gt;
'''Input Parameter - Simple'''&lt;br /&gt;
|| '''Simple decomposition''' requires two inputs.&lt;br /&gt;
* '''Decomposition coefficients''' and&lt;br /&gt;
* '''cell skewness factor, delta'''&lt;br /&gt;
&lt;br /&gt;
A typical value for '''delta''' is 10 to the power of minus 3('''10^-3).'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 10:'''&lt;br /&gt;
&lt;br /&gt;
'''Decomposition Coefficients'''&lt;br /&gt;
|| '''Decomposition coefficients''' represent the number of '''subdomains''' in a particular direction.&lt;br /&gt;
&lt;br /&gt;
Thus, the product of '''nx, ny, nz '''must be equal to the total number of '''subdomains.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 11:'''&lt;br /&gt;
&lt;br /&gt;
'''Simple Decomposition - n (2 2 1)'''&lt;br /&gt;
|| This slide shows the '''decomposition domain''' for the '''decomposition coefficients''' of (2 2 1).&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 12:'''&lt;br /&gt;
&lt;br /&gt;
'''Simple Decomposition - n (4 1 1)'''&lt;br /&gt;
|| This slide shows the '''decomposed domain''' for the''' decomposition coefficients '''of (4 1 1).&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| For more information on '''decomposition methods, '''Please refer to '''Additional Reading material.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let us set up a '''case.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Press CTRL + ALT + T keys.'''&lt;br /&gt;
|| Open the '''terminal''' by pressing '''Ctrl''', '''Alt''' and '''T''' keys.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''cd $FOAM_RUN'''&lt;br /&gt;
|| At the '''prompt''', type this '''command''' to go to the '''run directory'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity .'''&lt;br /&gt;
|| Copy the '''cavity''' '''case''' from the '''tutorial directory''' into the '''run directory'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''cd cavity'''&lt;br /&gt;
|| Navigate to the '''cavity case'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''blockMesh'''&lt;br /&gt;
|| Run the '''blockMesh''' command to execute the '''mesh'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''cp -r $FOAM_TUTORIALS/multiphase/interFoam/laminar/damBreak/damBreak/system/decomposeParDict system/'''&lt;br /&gt;
|| Copy a''' decomposeParDict''' file from''' '''the '''dam break''' '''tutorial''' to the '''system '''folder.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| To see the maximum number of '''processors''' available in your '''machine''', do the following.&lt;br /&gt;
|-&lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''lscpu'''&lt;br /&gt;
|| Type '''lscpu''' on the '''terminal.'''&lt;br /&gt;
|-&lt;br /&gt;
|| [gedit - '''terminal'''] Highlight&lt;br /&gt;
&lt;br /&gt;
'''CPU(s): 24'''&lt;br /&gt;
|| My '''machine''' has '''24 CPUs .'''&lt;br /&gt;
|-&lt;br /&gt;
|| [gedit - '''terminal'''] Highlight&lt;br /&gt;
&lt;br /&gt;
'''Thread(s) per core…. 2'''&lt;br /&gt;
|| '''12 physical cores''' per '''socket '''and '''2 threads''' per '''physical core.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 13:'''&lt;br /&gt;
&lt;br /&gt;
'''Number of processors'''&lt;br /&gt;
|| Multiplication of these 3 quantities gives the number of '''logical cores.'''&lt;br /&gt;
&lt;br /&gt;
This is equal to the maximum number of '''processors'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| We will run this case in 4''' processors'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Note:&lt;br /&gt;
&lt;br /&gt;
Please assign at least 4 processors to your Virtual Machine.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''gedit system/decomposeParDict'''&lt;br /&gt;
|| Open the '''decomposeparDict '''in a '''text editor.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit '''decomposeParDict'''] Highlight numberOfSubdomains '''4'''&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| The '''number of subdomains '''is defined as '''4.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit '''decomposeParDict''']&lt;br /&gt;
&lt;br /&gt;
'''method simple;'''&lt;br /&gt;
|| '''Simple''' method of decomposition is being used.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit '''decomposeParDict'''] Highlight '''coeffs'''&lt;br /&gt;
|| Go to '''coeffs sub-dictionary.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit '''decomposeParDict''': Highlight '''n'''&lt;br /&gt;
|| '''n '''represents the Decomposition coefficients in each direction.&lt;br /&gt;
&lt;br /&gt;
I will modify''' n '''so that we have:&lt;br /&gt;
* 2 '''divisions''' in '''x''' and''' y''' directions.&lt;br /&gt;
* And 1 division in '''z '''direction.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit '''decomposeParDict''']&lt;br /&gt;
&lt;br /&gt;
Save &amp;gt;&amp;gt; Close the window&lt;br /&gt;
|| '''Save''' and Close the file.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: &lt;br /&gt;
&lt;br /&gt;
'''decomposePar -cellDist'''&lt;br /&gt;
|| To '''decompose '''the '''domain''', type the following '''command.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''cellDist'''&lt;br /&gt;
|| The argument '''cellDist''' writes a file named '''cellDecomposition''' inside the '''constant''' folder.&lt;br /&gt;
&lt;br /&gt;
This file contains the details of the '''processor '''allocation.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| The '''domain''' is decomposed.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| The '''command''' '''decomposePar''' creates a directory for each '''processor'''.&lt;br /&gt;
&lt;br /&gt;
These directories contain the '''subdomain''' and the corresponding''' geometric fields.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: &lt;br /&gt;
&lt;br /&gt;
'''ls'''&lt;br /&gt;
|| Type '''ls''' to view the folders assigned to each '''processor.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [cavity - '''directory'''] Highlight&lt;br /&gt;
&lt;br /&gt;
'''Processor0 …..Processor3'''&lt;br /&gt;
|| Since we use''' '''4''' processors''', we have 4''' processor''' directories.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''ls processor0'''&lt;br /&gt;
|| Type '''ls''' '''processor0 '''to view the content of''' processor0.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Highlight&lt;br /&gt;
&lt;br /&gt;
'''0 constant'''&lt;br /&gt;
|| It contains the '''0''' and '''constant '''directories.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''0 directory'''.&lt;br /&gt;
&lt;br /&gt;
Point to '''Constant directory'''.&lt;br /&gt;
|| '''0''' directory contains the '''decomposed geometric field'''.&lt;br /&gt;
&lt;br /&gt;
The''' Constant '''directory contains the '''decomposed mesh files.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: &lt;br /&gt;
&lt;br /&gt;
'''gedit constant/cellDecomposition'''&lt;br /&gt;
|| Open the''' cellDecomposition '''file from the Constant folder in a '''text editor.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''cellDecomposition'''] Highlight '''400'''&lt;br /&gt;
|| The number on the first line represents the number of '''cells''' in the '''domain.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''cellDecomposition'''] Highlight&lt;br /&gt;
&lt;br /&gt;
'''(.......'''&lt;br /&gt;
|| The entries within the bracket represent the '''processor''' number.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''cellDecomposition'''] Highlight&lt;br /&gt;
&lt;br /&gt;
'''0'''&lt;br /&gt;
|| '''0''' here indicates the '''processor''' number that is assigned to the corresponding '''cell.'''&lt;br /&gt;
|-&lt;br /&gt;
|| [gedit - '''cellDecomposition''']&lt;br /&gt;
&lt;br /&gt;
Close the window&lt;br /&gt;
|| Close the file.&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let’s view the '''subdomains''' in '''paraview.'''&lt;br /&gt;
|-&lt;br /&gt;
|| [Terminal] Type: &lt;br /&gt;
&lt;br /&gt;
'''paraFoam'''&lt;br /&gt;
|| Type '''paraFoam '''on the '''terminal.'''&lt;br /&gt;
|-&lt;br /&gt;
|| [ParaView] Uncheck:&lt;br /&gt;
&lt;br /&gt;
'''Properties Tab &amp;gt;&amp;gt; Scroll Down - Mesh Parts &amp;gt;&amp;gt; Uncheck fixedWalls &amp;amp; movingWall'''&lt;br /&gt;
|| Uncheck all other fields other than '''internalMesh''' from '''Mesh Parts'''.&lt;br /&gt;
|-&lt;br /&gt;
|| [ParaView] Click:&lt;br /&gt;
&lt;br /&gt;
'''Properties Tab &amp;gt;&amp;gt; Scroll Down - Fields'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;gt;&amp;gt; check cellDist'''&lt;br /&gt;
|| Check all '''Volume Fields''' in the '''Properties tab'''.&lt;br /&gt;
|-&lt;br /&gt;
|| [ParaView] Click:&lt;br /&gt;
&lt;br /&gt;
'''Apply'''&lt;br /&gt;
|| Click on the '''Apply''' button in the '''Properties tab.'''&lt;br /&gt;
|-&lt;br /&gt;
|| [ParaView]&lt;br /&gt;
&lt;br /&gt;
'''Click on Solid Color &amp;gt;&amp;gt; Click on cell Dist'''&lt;br /&gt;
|| Click on '''Solid Color '''available in the '''Active Variable'''&lt;br /&gt;
&lt;br /&gt;
'''Controls.'''&lt;br /&gt;
&lt;br /&gt;
Select '''cellDist''' with a '''block''' from the '''menu.'''&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the dark blue block and the light blue block.&lt;br /&gt;
&lt;br /&gt;
Point to the beige block and the maroon block.&lt;br /&gt;
|| One can see the divided''' '''domain.&lt;br /&gt;
&lt;br /&gt;
The '''dark blue''' '''block''' belongs to '''processor number 0'''&lt;br /&gt;
&lt;br /&gt;
The''' light blue''' '''block''' belongs to '''processor number 1'''&lt;br /&gt;
&lt;br /&gt;
The '''beige block''' belongs to '''processor number 2''',&lt;br /&gt;
&lt;br /&gt;
And the''' maroon '''belongs to '''processor number 3'''&lt;br /&gt;
|-&lt;br /&gt;
|| ['''paraview''']&lt;br /&gt;
&lt;br /&gt;
Close the window&lt;br /&gt;
|| Close the '''ParaView''' window.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 14:'''&lt;br /&gt;
&lt;br /&gt;
'''Command - Parallel run'''&lt;br /&gt;
|| '''OpenFOAM '''uses''' '''the '''openMPI '''library for '''parallelization'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''mpirun''' is the '''process''' '''launcher'''.&lt;br /&gt;
* The '''argument''' '''np''' represents the number of '''processors'''.&lt;br /&gt;
* In our case we use '''4 processors.'''&lt;br /&gt;
* Then the name of the '''application '''entered.&lt;br /&gt;
* We need to specify that the '''application''' has to be run in '''parallel'''.&lt;br /&gt;
* The '''output''' of the '''simulation''' is written in a file named '''log.'''&lt;br /&gt;
* This is done by using the '''right''' '''angle''' '''bracket'''.&lt;br /&gt;
* The '''&amp;amp;''' indicates that the '''process''' will be '''run''' in the '''background'''.&lt;br /&gt;
&lt;br /&gt;
This allows us to use the current '''terminal''' when the '''application''' is '''running'''.&lt;br /&gt;
|-&lt;br /&gt;
|| [Terminal] Type: &lt;br /&gt;
&lt;br /&gt;
'''mpirun -np 4 icoFoam -parallel &amp;gt; log &amp;amp;'''&lt;br /&gt;
|| Type this '''command''' in the '''terminal.'''&lt;br /&gt;
|-&lt;br /&gt;
|| [Terminal] Type: &lt;br /&gt;
&lt;br /&gt;
'''tail log'''&lt;br /&gt;
|| Type the following '''command''' to view the end of the '''log '''file.&lt;br /&gt;
|-&lt;br /&gt;
|| [Terminal]&lt;br /&gt;
&lt;br /&gt;
Highlight''' End'''&lt;br /&gt;
|| The '''simulation '''is complete.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| To post-process the case, we need to '''reconstruct''' the domain.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type: &lt;br /&gt;
&lt;br /&gt;
'''reconstructPar'''&lt;br /&gt;
|| To do that, type''' reconstructPar''' in the '''terminal.'''&lt;br /&gt;
|-&lt;br /&gt;
|| [Terminal] Type: &lt;br /&gt;
&lt;br /&gt;
'''ls'''&lt;br /&gt;
|| Type''' ls'''&lt;br /&gt;
|-&lt;br /&gt;
|| [Terminal] Highlight&lt;br /&gt;
&lt;br /&gt;
'''0.5'''&lt;br /&gt;
|| The end time directory is reconstructed.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 15:'''&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|| With this we come to the end of this tutorial. Let us summarize.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have learned to,&lt;br /&gt;
* '''Decompose''' a domain&lt;br /&gt;
* Run''' '''the simulation using the '''simple decomposition method'''&lt;br /&gt;
* '''Reconstruct''' a '''domain'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide 16:'''&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
&lt;br /&gt;
Simulate the same '''case''' using,&lt;br /&gt;
* '''Simple decomposition''' with '''2''' '''processor'''&lt;br /&gt;
* '''Scotch decomposition''' with '''processor weight'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 17:'''&lt;br /&gt;
&lt;br /&gt;
'''About the Spoken Tutorial Project'''&lt;br /&gt;
|| The video at the following link summarizes the Spoken Tutorial project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 18:'''&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Workshops'''&lt;br /&gt;
|| We conduct workshops using Spoken Tutorials and give certificates.&lt;br /&gt;
&lt;br /&gt;
Please contact us.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 19:'''&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Forum'''&lt;br /&gt;
|| Please post your timed queries in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 20:'''&lt;br /&gt;
&lt;br /&gt;
'''FOSSEE Forum'''&lt;br /&gt;
|| &lt;br /&gt;
* Do you have any general/technical questions?&lt;br /&gt;
* Please visit the forum given in this link.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 21:'''&lt;br /&gt;
&lt;br /&gt;
'''FOSSEE Case Study Project'''&lt;br /&gt;
|| &lt;br /&gt;
* The FOSSEE team coordinates solving feasible CFD problems of reasonable complexity using OpenFOAM.&lt;br /&gt;
* We give honorarium and certificates to those who do this.&lt;br /&gt;
* For more details, please visit these sites.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 22: Spoken Tutorial'''&lt;br /&gt;
|| Spoken Tutorial project was established by the Ministry of Education, Govt. of India&lt;br /&gt;
&lt;br /&gt;
This tutorial is contributed by Divyesh Varya, Nishit Pachpande, John Pinto and Payel Mukherjee from IIT Bombay.&lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Evan</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/OpenFOAM-version-7/C3/2D-Dam-Break-Simulation-using-OpenFOAM/English</id>
		<title>OpenFOAM-version-7/C3/2D-Dam-Break-Simulation-using-OpenFOAM/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/OpenFOAM-version-7/C3/2D-Dam-Break-Simulation-using-OpenFOAM/English"/>
				<updated>2025-01-02T06:35:48Z</updated>
		
		<summary type="html">&lt;p&gt;Evan: Created page with &amp;quot;'''Title of the script''': 2D Dam Break Simulation using OpenFOAM  '''Author''': Ashley Melvin  '''Keywords''': OpenFOAM, ParaView, CFD, computational fluid dynamics, blockMes...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script''': 2D Dam Break Simulation using OpenFOAM&lt;br /&gt;
&lt;br /&gt;
'''Author''': Ashley Melvin&lt;br /&gt;
&lt;br /&gt;
'''Keywords''': OpenFOAM, ParaView, CFD, computational fluid dynamics, blockMesh, VOF, volume of fluid, multiphase flow, dam break, scotch decomposition, setFields, FOSSEE, spoken tutorial, video tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
|- &lt;br /&gt;
| align=center| '''Visual Cue'''&lt;br /&gt;
| align=center| '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''Opening Slide'''&lt;br /&gt;
|| Welcome to this tutorial on '''2D Dam Break Simulation'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|| In this tutorial, we will learn how to,&lt;br /&gt;
&lt;br /&gt;
* Set up''' '''a case of '''multiphase''' '''flow'''&lt;br /&gt;
* '''Decompose''' the domain using '''scotch decomposition''' method&lt;br /&gt;
* Specify a '''non-uniform initial condition''', and&lt;br /&gt;
* View the results of a '''multiphase''' '''simulation''' in '''ParaView'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''System Specifications'''&lt;br /&gt;
|| To record this tutorial, I am using,&lt;br /&gt;
&lt;br /&gt;
Ubuntu Linux OS version 22.04* '''OpenFOAM''' version 9&lt;br /&gt;
* '''ParaView''' version 5.10.1, and&lt;br /&gt;
* '''gedit Text Editor'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''* If not, please go through the prerequisite '''OpenFOAM '''tutorial on https://spoken-tutorial.org&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| As a prerequisite,&lt;br /&gt;
* You should have basic knowledge of '''multiphase flows'''.&lt;br /&gt;
* You should also be familiar with '''parallel computing''' in '''OpenFOAM'''.&lt;br /&gt;
* If not, please go through the prerequisite '''OpenFOAM '''tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
||&lt;br /&gt;
* The files used in this tutorial are available in the '''Code''' '''Files''' link on this tutorial page &lt;br /&gt;
* Please download and extract them&lt;br /&gt;
* Make a copy and then use them while practicing&lt;br /&gt;
* Copy the '''damBreak '''folder into the '''run directory''' to follow along &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''Breaking of a Dam'''&lt;br /&gt;
||&lt;br /&gt;
* We will be solving the '''dam break''' problem shown in the figure.&lt;br /&gt;
* Initially, there is a '''water column''' in the domain, and &lt;br /&gt;
* It is surrounded by '''air'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let’s see what happens when a '''dam''', that holds the '''water column''', suddenly breaks.&lt;br /&gt;
|- &lt;br /&gt;
|| '''CTRL + ALT + T''' keys&lt;br /&gt;
|| Open the '''terminal''' by pressing '''Ctrl''', '''Alt''' and '''T''' keys together. &lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''cd $FOAM_RUN'''&lt;br /&gt;
|| Type this '''command''' and press '''Enter''' to move into the '''run directory'''.&lt;br /&gt;
|-&lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''cd damBreak'''&lt;br /&gt;
|| Let’s move into the '''damBreak''' folder using the following '''command'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''gedit system/blockMeshDict'''&lt;br /&gt;
|| Let’s open the '''blockMeshDict''' file in a '''text editor'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''Dam Break Geometry'''&lt;br /&gt;
|| The geometry is divided into '''5 blocks''' as shown in the diagram.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''blockMeshDict'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
Blocks List [https://imgur.com/4clg8w3.png Link]&lt;br /&gt;
|| The '''5 blocks''' are defined as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''Boundaries'''&lt;br /&gt;
|| The '''boundaries''' of the geometry are:&lt;br /&gt;
* '''leftWall'''&lt;br /&gt;
* '''rightWall'''&lt;br /&gt;
* '''lowerWall''', and&lt;br /&gt;
* '''atmosphere'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is named so, as it is exposed to the '''atmosphere'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''blockMeshDict'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
Boundary List [https://imgur.com/OjuyDUc.png Link]&lt;br /&gt;
|| The '''4 faces''' are defined in the '''boundary list''' as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''blockMeshDict'''] &lt;br /&gt;
&lt;br /&gt;
Close the window&lt;br /&gt;
|| Close the '''blockMeshDict''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let’s view the '''initial''' and '''boundary''' '''conditions''' files.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''gedit 0/p_rgh'''&lt;br /&gt;
|| Let’s view the '''initial''' and '''boundary '''values of '''p_rgh'''&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| '''p_rgh''' is the '''pressure''' without the '''hydrostatic''' contribution.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''p_rgh'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''fixedFluxPressure '''[https://imgur.com/WmtpcPZ.png Link]&lt;br /&gt;
|| All three '''walls''' are imposed with '''fixedFluxPressure''' boundary conditions.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''p_rgh'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''value uniform 0''' [https://imgur.com/QoMav70.png Link]&lt;br /&gt;
|| For the '''type fixedFluxPressure''', '''value''' is just a '''placeholder''' for the first '''time-step'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''p_rgh'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''atmosphere''' boundary condition [https://imgur.com/JK3soLy.png Link]&lt;br /&gt;
|| The '''top boundary''' is exposed to the '''atmosphere'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Therefore, a '''totalPressure''' of '''0 Pa''' is imposed.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| The additional reading material has more details on '''p_rgh''' and its '''boundary conditions'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please refer to it.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''p_rgh'''] &lt;br /&gt;
&lt;br /&gt;
Close the window&lt;br /&gt;
|| Close the '''p_rgh''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''gedit 0/alpha.water.orig'''&lt;br /&gt;
|| Let’s view the '''initial''' and '''boundary '''values of '''phase fraction '''of''' water'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''alpha.water.orig'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''internalField uniform 0''' [https://imgur.com/1aaDdh8.png Link]&lt;br /&gt;
|| The domain is initialized uniformly with a value of 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This means the entire domain consists of only air.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will be initializing the section of the domain with the '''water column''' later.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''alpha.water.orig'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''zeroGradient '''[https://imgur.com/v9BoZsx.png Link]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the contact angles and walls.&lt;br /&gt;
|| The '''surface tension''' effects between the walls and the '''fluid-interface''' are ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the '''contact angle''' between the '''walls''' and the '''fluid-interface''' is '''90 degrees'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Therefore, all three '''walls''' are imposed with '''zeroGradient''' boundary condition.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''alpha.water.orig'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''type inletOutlet '''[https://imgur.com/HN6b9Ve.png Link]&lt;br /&gt;
|| The '''inletOutlet''' type '''boundary condition''' is imposed on the '''top boundary'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It acts as a '''zeroGradient boundary condition''' for outflow.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''alpha.water.orig'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''inletValue uniform 0 '''[https://imgur.com/RGjo8lX.png Link]&lt;br /&gt;
|| For inflow, this type of '''boundary condition''' takes the '''inletValue''' as the '''fixedValue'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have specified the '''inletValue''' as '''0''', corresponding to''' 100 percent''' '''air'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''alpha.water.orig'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''value uniform 0''' [https://imgur.com/G78q4oa.png Link]&lt;br /&gt;
|| For the '''type inletOutlet''', '''value''' is just a '''placeholder''' for the first '''time-step'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''alpha.water.orig'''] &lt;br /&gt;
&lt;br /&gt;
Close the window&lt;br /&gt;
|| Close the '''phase fraction''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''gedit 0/U'''&lt;br /&gt;
|| Let’s view the '''initial''' and '''boundary '''values of '''U'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''U '''is the '''Velocity Boundary Conditions''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''Velocity Boundary Conditions'''* walls - '''noSlip'''&lt;br /&gt;
* top (atmosphere) - '''pressureInletOutletVelocity'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Let’s look at the '''boundary conditions''' of '''velocity'''.* At the walls, '''noSlip''' condition is imposed&lt;br /&gt;
* At the top boundary''',''' '''pressureInletOutletVelocity''' type '''boundary condition '''is imposed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''pressureInletOutletVelocity '''&lt;br /&gt;
|| The '''pressureInletOutletVelocity '''&lt;br /&gt;
* Acts as a '''zeroGradient boundary condition''' for outflow.&lt;br /&gt;
* And for inflow, it acts as a '''fixedValue''' '''boundary condition'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''U''']&lt;br /&gt;
&lt;br /&gt;
Close the window&lt;br /&gt;
|| Close the '''U''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''ls constant'''&lt;br /&gt;
|| Let’s look at the constant files used in the simulation.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''momentumTransport'''&lt;br /&gt;
|| In this simulation, the flow is considered to be '''laminar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same is specified in the '''momentumTransport '''file.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''gedit constant/momentumTransport'''&lt;br /&gt;
|| Let's view the contents of the''' momentumTransport''' file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''simulationType''' is specified as '''laminar'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''momentumTransport''']&lt;br /&gt;
&lt;br /&gt;
Close the window&lt;br /&gt;
|| Close the '''momentumTransport''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''g'''&lt;br /&gt;
|| The simulation requires the '''acceleration due to gravity, '''to be specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''g''' file is used to specify the '''acceleration due to gravity'''. This has been discussed in the previous tutorials in this series. &lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Transport Properties'''&lt;br /&gt;
|| These are the '''transport properties''' of '''water''' and '''air''' used in this simulation.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Transport Properties'''&lt;br /&gt;
&lt;br /&gt;
Highlight: Newtonian [https://imgur.com/Pdn13Gv.png Link]&lt;br /&gt;
|| Both '''water''' and '''air '''are considered to be '''Newtonian''' fluids.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''gedit constant/transportProperties'''&lt;br /&gt;
|| Let’s open the '''transportProperties''' file in a '''text editor'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''transportProperties'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''phases (water air) '''[https://imgur.com/kpH02Yo.png Link]&lt;br /&gt;
|| The two '''phases''' in this simulation are '''water''' and '''air'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''transportProperties'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
Properties of water and air [https://imgur.com/nKWp8rv.png Link]&lt;br /&gt;
|| The properties of '''water''' and '''air''' are specified as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''transportProperties'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''sigma 0.07 '''[https://imgur.com/bdnBZhj.png Link]&lt;br /&gt;
|| The '''surface tension''' between '''water''' and '''air''' is taken to be '''0.07 Newton per meter'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''transportProperties'''] &lt;br /&gt;
&lt;br /&gt;
Close the window&lt;br /&gt;
|| Close the '''transportProperties''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now let’s look at how the domain is '''decomposed''' for the '''parallel run'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''gedit system/decomposeParDict'''&lt;br /&gt;
|| Let’s open the '''decomposePar''' dictionary in a '''text editor'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''decomposeParDict'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''numberOfSubdomains 4 '''[https://imgur.com/fbjxny0.png Link]&lt;br /&gt;
|| The domain is '''decomposed''' into '''4 sub-domains'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''decomposeParDict'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''method scotch '''[https://imgur.com/50ehP2I.png Link]&lt;br /&gt;
|| The domain is '''decomposed''' using the '''scotch decomposition''' method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Scotch decomposition''' requires no geometric input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It attempts to minimize the number of '''processor boundaries'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''decomposeParDict'''] &lt;br /&gt;
&lt;br /&gt;
Close the window&lt;br /&gt;
|| Close the '''decomposeParDict''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let’s see how to '''initialize''' the section of the domain with a '''water column'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''gedit system/setFieldsDict'''&lt;br /&gt;
|| Such '''non-uniform''' initial conditions are specified using the '''setFields''' dictionary.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''setFieldsDict'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''defaultFieldValues '''[https://imgur.com/Ii1maj0.png Link]&lt;br /&gt;
|| The default value of '''fields''' for the domain is specified using the '''defaultFieldValues''' list.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''setFieldsDict'''] Highlight: [https://imgur.com/PlQWgJD.png Link]&lt;br /&gt;
&lt;br /&gt;
'''volScalarFieldValue alpha.water 0'''&lt;br /&gt;
|| The default value of '''phase fraction''' of '''water''' is specified as '''0'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''setFieldsDict'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''regions '''[https://imgur.com/caYouzm.png Link]&lt;br /&gt;
|| Next, we set the '''regions''' where the '''field''' values are different from the default values.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''setFieldsDict'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''boxToCell '''[https://imgur.com/fuxtALG.png Link]&lt;br /&gt;
|| We specify the '''cells''' within a '''bounding box''' using''' boxToCell'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This '''bounding box''' contains the '''cells''' that hold the '''water column'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''boxToCell'''* box (minx miny minz) (maxx maxy maxz)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
||&lt;br /&gt;
* '''boxToCell''' creates a '''bounding box''' within a '''vector minimum''' and '''maximum''' to define the '''cells'''&lt;br /&gt;
* This is the syntax of '''boxToCell'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Water Column'''&lt;br /&gt;
|| The section occupied by the '''water column''' is shown in the figure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have considered the '''thickness''' of the geometry to be '''0.1 meter'''. &lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''boxToCell'''&lt;br /&gt;
|| For the '''water column''', &lt;br /&gt;
* The '''vector minimum''' is the '''origin''', and&lt;br /&gt;
* The '''vector maximum''' is '''(0.5,1,0.1)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''setFieldsDict'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''box (0 0 0) (0.5 1 0.1) '''[https://imgur.com/nHT9nNA.png Link]&lt;br /&gt;
|| We specify the '''bounding box''' as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''setFieldsDict'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
fieldValues List [https://imgur.com/32cJriX.png Link]&lt;br /&gt;
|| The '''fieldValues''' to be specified within the '''box''' is defined as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''setFieldsDict'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''alpha.water 1 '''[https://imgur.com/xJjpWjo.png Link]&lt;br /&gt;
|| The '''phase fraction''' of '''water''' is specified to be '''1''' within the '''box'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This means that the '''box''' is completely filled with '''water'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [gedit - '''setFieldsDict'''] &lt;br /&gt;
&lt;br /&gt;
Close the window&lt;br /&gt;
|| Close the '''setFieldsDict''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''blockMesh'''&lt;br /&gt;
|| Let’s '''mesh''' the geometry using the '''blockMesh command'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''setFields'''&lt;br /&gt;
|| Then, let’s set the fields in the domain using the '''setFields command'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the '''setFields''' '''command''' should be executed only after meshing.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| The additional reading material has more details on the '''setFields '''utility.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please refer to it.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''decomposePar'''&lt;br /&gt;
|| Let’s '''decompose''' the domain using the '''decomposePar command'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''interFoam'''* Captures the '''interface''' of '''2 immiscible fluids''' using the '''volume of fluid '''('''VOF''') method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| We will use the '''interFoam''' solver to simulate this problem.&lt;br /&gt;
* It solves '''incompressible''', '''isothermal''', '''turbulent''', '''multiphase flows'''.&lt;br /&gt;
* It captures the '''interface''' of '''2 immiscible fluids''' using the '''volume of fluid''' method.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''mpirun -np 4 interFoam -parallel'''&lt;br /&gt;
|| Let’s start the simulation using the following '''command'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''reconstructPar'''&lt;br /&gt;
|| Since we had run our simulation in '''parallel''', our solution is '''decomposed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s reconstruct our solution using the '''reconstructPar''' '''command'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Terminal] Type:&lt;br /&gt;
&lt;br /&gt;
'''paraFoam'''&lt;br /&gt;
|| Let’s now view the simulated results in '''ParaView'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [ParaView] '''Properties''' '''Tab'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Apply'''&lt;br /&gt;
|| Click on the '''Apply''' button to view the geometry.&lt;br /&gt;
|- &lt;br /&gt;
|| [ParaView] '''Active Variable Controls'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''vtkBlockColors''' &amp;gt;&amp;gt; Click on '''alpha.water '''[https://imgur.com/1nOhPK9.png Link]&lt;br /&gt;
|| Let’s view the '''contours''' of '''phase fraction''' of '''water'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''vtkBlockColors''' dropdown in the '''Active Variable Controls''' and select '''alpha.water'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [ParaView] '''Layout Window'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Initial Phase Fraction Contour&lt;br /&gt;
|| You can see the '''initial contours''' of '''phase fraction '''of''' water''' showing the '''water column'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [ParaView] '''VCR Controls'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Play '''[https://imgur.com/IFMlIWa.png Link]&lt;br /&gt;
|| Let’s see how the '''contours''' change with time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Play''' button in the '''VCR Controls'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [ParaView] '''Layout Window'''&lt;br /&gt;
&lt;br /&gt;
Phase Fraction Contour animation &lt;br /&gt;
|| The animation shows the '''water''' flow for '''5 seconds''' from the instance when the '''dam''' was '''broken'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [ParaView] '''Close ParaView'''&lt;br /&gt;
|| Close the '''ParaView''' window.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| With this we have come to the end of the tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|| In this tutorial, we have learnt to:&lt;br /&gt;
* Set up''' '''a case of '''multiphase''' '''flow'''&lt;br /&gt;
* '''Decompose''' the domain using '''scotch decomposition''' method&lt;br /&gt;
* Specify a '''non-uniform initial condition''', and&lt;br /&gt;
* View the results of a '''multiphase''' '''simulation''' in '''ParaView'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|| As an assignment:* For the same domain, increase the '''height''' of the '''water column''' to '''1.5 meter''', and &lt;br /&gt;
* Run the simulation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''About the Spoken Tutorial Project'''&lt;br /&gt;
|| The video at the following link summarizes the Spoken Tutorial project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Workshops'''&lt;br /&gt;
|| We conduct workshops using Spoken Tutorials and give certificates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please contact us.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Forum'''&lt;br /&gt;
|| Please post your timed queries in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''FOSSEE Forum'''&lt;br /&gt;
|| * Do you have any general/technical questions?&lt;br /&gt;
* Please visit the forum given in the link.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''FOSSEE Case Study Project'''&lt;br /&gt;
||&lt;br /&gt;
* The FOSSEE team coordinates solving feasible CFD problems of reasonable complexity using OpenFOAM.&lt;br /&gt;
* We give honorarium and certificates to those who do this.&lt;br /&gt;
* For more details, please visit these sites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide'''&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgement '''&lt;br /&gt;
|| The Spoken Tutorial project was established by the Ministry of Education, Govt. of India.&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| This tutorial is contributed by Ashley Melvin, Ashuthosh P S, John Pinto and Payel Mukherjee from IIT Bombay.&lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Evan</name></author>	</entry>

	</feed>