@@ -44,184 +44,184 @@ To run:
4444---------
4545## Tutorial 1 - Input and output
4646
47- Shows how to read information from dictionaries and output it into files.
47+ Shows how to read information from dictionaries and output it into files.
4848
49- To run:
50- ```
51- wmake
52- cd testCase
53- ./Allrun
54- ```
49+ To run:
50+ ```
51+ wmake
52+ cd testCase
53+ ./Allrun
54+ ```
5555
5656---------
5757## Tutorial 2 - Understanding the mesh
5858
59- Discusses how the OpenFOAM mesh description works and introduces the code
60- interface used to interact with the grid.
59+ Discusses how the OpenFOAM mesh description works and introduces the code
60+ interface used to interact with the grid.
6161
62- To run:
63- ```
64- wmake
65- cd testCase
66- ./Allrun
67- ```
62+ To run:
63+ ```
64+ wmake
65+ cd testCase
66+ ./Allrun
67+ ```
6868
6969---------
7070## Tutorial 3 - Basic field operations
7171
72- Introduces the idea of a field object, reading values from OF-native files
73- using built-in operators, as well as calculating field values by hand.
72+ Introduces the idea of a field object, reading values from OF-native files
73+ using built-in operators, as well as calculating field values by hand.
7474
75- To run:
76- ```
77- wmake
78- cd testCase
79- ./Allrun
80- ```
75+ To run:
76+ ```
77+ wmake
78+ cd testCase
79+ ./Allrun
80+ ```
8181
8282---------
8383# Tutorial 4 - Basic parallel computing
8484
85- Gives a crash-course introduction to parallel computing with OpenFOAM and
86- OpenMPI based on the example "solver" developed in Tutorial 2. The way
87- OpenFOAM handles parallel domain decomposition is described, basic operators
88- used for communication between parallel nodes are shown, and the basic solver
89- is upgraded to work in parallel.
85+ Gives a crash-course introduction to parallel computing with OpenFOAM and
86+ OpenMPI based on the example "solver" developed in Tutorial 2. The way
87+ OpenFOAM handles parallel domain decomposition is described, basic operators
88+ used for communication between parallel nodes are shown, and the basic solver
89+ is upgraded to work in parallel.
9090
91- To run:
92- ```
93- wmake
94- cd testCase
95- ./Allrun
96- ```
91+ To run:
92+ ```
93+ wmake
94+ cd testCase
95+ ./Allrun
96+ ```
9797
9898---------
9999## Tutorial 5 - Custom classes
100100
101- Shows how a new class may be added to expand OpenFOAM functionality, as well
102- as gives an example implementation of a class derived from and OpenFOAM
103- object. This is done by extending from the IOdictionary, with the aim of
104- adding a custom method which lists the contents of the dict file, while keeping
105- all of the baseline functionality.
101+ Shows how a new class may be added to expand OpenFOAM functionality, as well
102+ as gives an example implementation of a class derived from and OpenFOAM
103+ object. This is done by extending from the IOdictionary, with the aim of
104+ adding a custom method which lists the contents of the dict file, while keeping
105+ all of the baseline functionality.
106106
107- To run:
108- ```
109- wmake
110- cd testCase
111- ./Allrun
112- ```
107+ To run:
108+ ```
109+ wmake
110+ cd testCase
111+ ./Allrun
112+ ```
113113
114114---------
115115## Tutorial 6 - Custom libraries
116116
117- Shows how an external library may be compiled and added to OpenFOAM. This is
118- done by moving the key functionality of the "solver" from Tutorials 2 and 3
119- into an independent library, and then linking that against the rest of the
120- solver code.
117+ Shows how an external library may be compiled and added to OpenFOAM. This is
118+ done by moving the key functionality of the "solver" from Tutorials 2 and 3
119+ into an independent library, and then linking that against the rest of the
120+ solver code.
121121
122- To run:
123- ```
124- ./Allwmake
125- cd testCase
126- ./Allrun
127- ```
122+ To run:
123+ ```
124+ ./Allwmake
125+ cd testCase
126+ ./Allrun
127+ ```
128128
129129---------
130130## Tutorial 7 - Custom boundary condition
131131
132- Shows how a custom boundary condition may be implemented.
133- It does not introduce a bespoke utility, but instead only implements a
134- library. This defines an inlet condition that allows a boundary layer
135- profile to be prescribed at the inlet of a pipe.
136-
137- The BC is implemented as a class derived from the fixedValue boundary
138- condition, adding several control parameters allowing the inlet profile
139- to be customised. Key elements of the code are highlighted with the keyword
140- NOTE:. Key methods to pay attention to are the two constructors, default
141- and one constructing the BC from string, and .updateCoeffs().
142-
143- The test case is a straight pipe, flow through which gets solved with the
144- basic simpleFoam solver. Key things to note are the definition of the
145- BC in 0.org/U and the incorporation of a custom library in system/controlDict.
146- The simulation is 3D RANS on a coarse mesh so it takes a few minutes on
147- a low-end machine. The effect of the boundary condition may be visualised
148- by plotting the x-velocity through the pipe and noting the incident boundary
149- layer profile at the inlet and how it affects the solution.
150-
151- To run:
152- ```
153- ./Allwmake
154- cd testCase
155- ./Allrun
156- ```
132+ Shows how a custom boundary condition may be implemented.
133+ It does not introduce a bespoke utility, but instead only implements a
134+ library. This defines an inlet condition that allows a boundary layer
135+ profile to be prescribed at the inlet of a pipe.
136+
137+ The BC is implemented as a class derived from the fixedValue boundary
138+ condition, adding several control parameters allowing the inlet profile
139+ to be customised. Key elements of the code are highlighted with the keyword
140+ NOTE:. Key methods to pay attention to are the two constructors, default
141+ and one constructing the BC from string, and .updateCoeffs().
142+
143+ The test case is a straight pipe, flow through which gets solved with the
144+ basic simpleFoam solver. Key things to note are the definition of the
145+ BC in 0.org/U and the incorporation of a custom library in system/controlDict.
146+ The simulation is 3D RANS on a coarse mesh so it takes a few minutes on
147+ a low-end machine. The effect of the boundary condition may be visualised
148+ by plotting the x-velocity through the pipe and noting the incident boundary
149+ layer profile at the inlet and how it affects the solution.
150+
151+ To run:
152+ ```
153+ ./Allwmake
154+ cd testCase
155+ ./Allrun
156+ ```
157157
158158---------
159159## Tutorial 8 - Runtime post processing utility
160160
161- Discusses the implementation of a a runtime post-processing utility which
162- computes the flow rate through a face zone defined in the mesh using the
163- topoSet utility.
164-
165- The utility is implemented as a runtime postprocessing object derived from
166- the built-in functionObjectFile class. It integrates the normal velocity
167- through a specified face zone at each required time step and writes the
168- result to a file, as well as prints in on the screen. The key methods to
169- pay attention to are 1) the constructor 2) writeFileHeader(), as well as
170- 3) write(), which implements the actual maths behind the functionality.
171- Key elements of the code are highlighted with the keyword NOTE:. It is
172- important to note that the utility gets compiled as a library, which then
173- gets linked to the main solver, following the OpenFOAM runtime utility
174- convention.
175-
176- The test case is the same pipe as in Tutorial 6, except it uses a uniform
177- inflow BC and is not run until full convergence. It is worth to note
178- the definition of the faceZone of interest in system/topoSet. This may be
179- visualised by selecting "Include zones" in paraview and applying the "Extract
180- block" filter. As the simpleFoam solver is run, the output file gets created
181- by the utility in the postProcessing directory.
182-
183- To run:
184- ```
185- wmake libso
186- cd testCase
187- ./Allrun
188- ```
161+ Discusses the implementation of a a runtime post-processing utility which
162+ computes the flow rate through a face zone defined in the mesh using the
163+ topoSet utility.
164+
165+ The utility is implemented as a runtime postprocessing object derived from
166+ the built-in functionObjectFile class. It integrates the normal velocity
167+ through a specified face zone at each required time step and writes the
168+ result to a file, as well as prints in on the screen. The key methods to
169+ pay attention to are 1) the constructor 2) writeFileHeader(), as well as
170+ 3 ) write(), which implements the actual maths behind the functionality.
171+ Key elements of the code are highlighted with the keyword NOTE:. It is
172+ important to note that the utility gets compiled as a library, which then
173+ gets linked to the main solver, following the OpenFOAM runtime utility
174+ convention.
175+
176+ The test case is the same pipe as in Tutorial 6, except it uses a uniform
177+ inflow BC and is not run until full convergence. It is worth to note
178+ the definition of the faceZone of interest in system/topoSet. This may be
179+ visualised by selecting "Include zones" in paraview and applying the "Extract
180+ block" filter. As the simpleFoam solver is run, the output file gets created
181+ by the utility in the postProcessing directory.
182+
183+ To run:
184+ ```
185+ wmake libso
186+ cd testCase
187+ ./Allrun
188+ ```
189189
190190---------
191191## Tutorial 9 - Transport equation
192192
193- Introduces the concepts behind solving a simple scalar transport equation.
194-
195- The solver sets up the transport problem by importing a fixed velocity field
196- from the last time step and solving the transport of a scalar, beta, in the
197- presence of the velocity, beta being also subject to diffusion characterised
198- by a fixed proportionality constant, gamma. The solver is conceptually similar
199- to the built-in scalarTransportFoam, except it solves a steady-state problem.
200- Key things to note are 1) the syntax behind the scalar transport equation
201- 2) how OpenFOAM translates the syntax into specific operations and associates
202- them with entries in system/fvSolution and system/fvSchemes dictionaries
203- 3) inclusion of the boundary condition definitions in 0/beta into the equation
204- 4) units of the equations being solved and how OpenFOAM handles them.
205-
206- The test case is a simple 2D square domain with fixed scalar inlets at the bottom
207- and the left-hand side. Transport takes place in the presence of a velocity
208- field convecting away from the beta inlets. Once the case is run, it is best
209- to visualise the initial conditions in the "beta" field and the solution to the
210- transport equation saved as the "result" field.
211-
212- To run:
213- ```
214- wmake
215- cd testCase
216- ./Allrun
217- ```
218-
219- Recommended reading:
220- - Wikipedia is always a good start:
221- https://en.wikipedia.org/wiki/Convection%E2%80%93diffusion_equation
222- - Very brief description of the physical and mathematical concepts behind
223- the scalar transport equation by CFD-online:
224- https://www.cfd-online.com/Wiki/Generic_scalar_transport_equation
225- - Chapters 3, 4 and especially 5 in "Numerical Methods in Heat, Mass,
226- and Momentum Transfer" by Murthy, J. Y. 2002:
227- https://engineering.purdue.edu/ME608/webpage/main.pdf
193+ Introduces the concepts behind solving a simple scalar transport equation.
194+
195+ The solver sets up the transport problem by importing a fixed velocity field
196+ from the last time step and solving the transport of a scalar, beta, in the
197+ presence of the velocity, beta being also subject to diffusion characterised
198+ by a fixed proportionality constant, gamma. The solver is conceptually similar
199+ to the built-in scalarTransportFoam, except it solves a steady-state problem.
200+ Key things to note are 1) the syntax behind the scalar transport equation
201+ 2 ) how OpenFOAM translates the syntax into specific operations and associates
202+ them with entries in system/fvSolution and system/fvSchemes dictionaries
203+ 3 ) inclusion of the boundary condition definitions in 0/beta into the equation
204+ 4 ) units of the equations being solved and how OpenFOAM handles them.
205+
206+ The test case is a simple 2D square domain with fixed scalar inlets at the bottom
207+ and the left-hand side. Transport takes place in the presence of a velocity
208+ field convecting away from the beta inlets. Once the case is run, it is best
209+ to visualise the initial conditions in the "beta" field and the solution to the
210+ transport equation saved as the "result" field.
211+
212+ To run:
213+ ```
214+ wmake
215+ cd testCase
216+ ./Allrun
217+ ```
218+
219+ Recommended reading:
220+ - Wikipedia is always a good start:
221+ https://en.wikipedia.org/wiki/Convection%E2%80%93diffusion_equation
222+ - Very brief description of the physical and mathematical concepts behind
223+ the scalar transport equation by CFD-online:
224+ https://www.cfd-online.com/Wiki/Generic_scalar_transport_equation
225+ - Chapters 3, 4 and especially 5 in "Numerical Methods in Heat, Mass,
226+ and Momentum Transfer" by Murthy, J. Y. 2002:
227+ https://engineering.purdue.edu/ME608/webpage/main.pdf
0 commit comments