assignment 1 cfd with opensource software

22
Assignment 1 CFD with OpenSource Software Shayan Rahat Applied Mechanics/Fluid Dynamics, Chalmers University of Technology, Gothenburg, Sweden Shayan Rahat Assignment 1CFD with OpenSource Software 1/1

Upload: others

Post on 07-Apr-2022

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Assignment 1 CFD with OpenSource Software

Assignment 1CFD with OpenSource Software

Shayan Rahat

Applied Mechanics/Fluid Dynamics,Chalmers University of Technology,

Gothenburg, Sweden

Shayan Rahat Assignment 1CFD with OpenSource Software 1 / 1

Page 2: Assignment 1 CFD with OpenSource Software

cavity

Solver:icoFoam

Utilities used:

blockMesh

checkMesh

+ paraFoam for every case

Shayan Rahat Assignment 1CFD with OpenSource Software 2 / 1

Page 3: Assignment 1 CFD with OpenSource Software

The threshold and glyph filters are used to produce the figure below. Ascan be seen, the flow-field is almost symmetric. This was expected as thevelocities are low.

Shayan Rahat Assignment 1CFD with OpenSource Software 3 / 1

Page 4: Assignment 1 CFD with OpenSource Software

The dynamic pressure can be calculated easily as was done here. Since theabsolute pressure is irrelevant in incompressible flow, the ”dynamicpressure” here is only meaningful in a relative sense.

Shayan Rahat Assignment 1CFD with OpenSource Software 4 / 1

Page 5: Assignment 1 CFD with OpenSource Software

cavityFine

Solver:icoFoam

Utilities used:

blockMesh

checkMesh

mapFields

foamCalc

Shayan Rahat Assignment 1CFD with OpenSource Software 5 / 1

Page 6: Assignment 1 CFD with OpenSource Software

Here, both Ux and mag(U) have been plotted along a vertical line in thecenter of the cavity using Plot Over Line.

Shayan Rahat Assignment 1CFD with OpenSource Software 6 / 1

Page 7: Assignment 1 CFD with OpenSource Software

The y component of the velocity field is plotted using foamCalc and theClip filter. Turning of the fluid in the corners can be seen.

Shayan Rahat Assignment 1CFD with OpenSource Software 7 / 1

Page 8: Assignment 1 CFD with OpenSource Software

cavityGrade

Solver:icoFoam

Utilities used:

blockMesh

checkMesh

mapFields

Shayan Rahat Assignment 1CFD with OpenSource Software 8 / 1

Page 9: Assignment 1 CFD with OpenSource Software

The mesh in this case set-up was graded to allocate more cells to theregions with the highest gradients. But since the flow is laminar andincompressible, the results do not show significant changes.

Shayan Rahat Assignment 1CFD with OpenSource Software 9 / 1

Page 10: Assignment 1 CFD with OpenSource Software

cavityHighRe

Solver:icoFoam

Utilities used:

blockMesh

checkMesh

Shayan Rahat Assignment 1CFD with OpenSource Software 10 / 1

Page 11: Assignment 1 CFD with OpenSource Software

As the Reynolds number is increased the flow becomes asymmetric. ASlice filter coloured according to Uy clearly shows this.

Shayan Rahat Assignment 1CFD with OpenSource Software 11 / 1

Page 12: Assignment 1 CFD with OpenSource Software

A combination of Slice, Stream Tracer and Tube filters are used tovisualise the flow.

Shayan Rahat Assignment 1CFD with OpenSource Software 12 / 1

Page 13: Assignment 1 CFD with OpenSource Software

cavityClipped

Solver:icoFoam

Utilities used:

blockMesh

checkMesh

mapFields

Shayan Rahat Assignment 1CFD with OpenSource Software 13 / 1

Page 14: Assignment 1 CFD with OpenSource Software

In case cavityClipped the lower right part of the cavity is removed, whichcauses a recirculation region in the flow-field. Here, a transparent Slicefilter has been combined with Stream Tracer and Glyph to capture thebehaviour of the fluid.

Shayan Rahat Assignment 1CFD with OpenSource Software 14 / 1

Page 15: Assignment 1 CFD with OpenSource Software

damBreak

Solver:interFoam

Utilities used:

blockMesh

setFields

checkMesh

Shayan Rahat Assignment 1CFD with OpenSource Software 15 / 1

Page 16: Assignment 1 CFD with OpenSource Software

A simple model of a dam breaking is calculated using interFoam. Theevolution of phase fraction with time is captured using Slice and Glyph.

Shayan Rahat Assignment 1CFD with OpenSource Software 16 / 1

Page 17: Assignment 1 CFD with OpenSource Software

damBreakFine

Solver:interFoam

Utilities used:

blockMesh

setFields

checkMesh

decomposePar

reconstructPar

Shayan Rahat Assignment 1CFD with OpenSource Software 17 / 1

Page 18: Assignment 1 CFD with OpenSource Software

Increasing the mesh resolution improves the results. e.g. artificialtransition interface between water and air becomes thinner, smallerfeatures become visible, etc.

Shayan Rahat Assignment 1CFD with OpenSource Software 18 / 1

Page 19: Assignment 1 CFD with OpenSource Software

Below, we can see velocity vectors plotted with the phase contour in thebackground. The higher velocities in the air phase are notable.

Shayan Rahat Assignment 1CFD with OpenSource Software 19 / 1

Page 20: Assignment 1 CFD with OpenSource Software

pitzDaily

Solver:simpleFoam

Utilities used:

blockMesh

checkMesh

Shayan Rahat Assignment 1CFD with OpenSource Software 20 / 1

Page 21: Assignment 1 CFD with OpenSource Software

In the PitzDaily tutorial, turbulent flow over a backward facing step wascalculated using the standard k-ε model. The figure shows the velocityfield after the solution has reached steady-state.

Shayan Rahat Assignment 1CFD with OpenSource Software 21 / 1

Page 22: Assignment 1 CFD with OpenSource Software

Variables solved for in the turbulence model can be extracted andvisualized just as easily as the physical variables. The figure shows νtwhich is used in RANS turbulence models to account for turbulentconvection in the averaged equations.

Shayan Rahat Assignment 1CFD with OpenSource Software 22 / 1