Challenge

Week 8 - Simulation of a backward facing step in OpenFOAM

foam file

format ascii;

class dictionary;

object block mesh dict;

convert to meters 0.01;

vertices

(

(0 0 0)

(8 0 0)

(8 0.5 0)

(0 0.5 0)

(8 1 0)

(0 1 0)

(20 1 0)

(20 0.5 0)

(20 0 0)

(20-1 0)

(8 -1 0)

(0 0 0.1)

(8 0 0.1)

(8 0.5 0.1)

(0 0.5 0.1)

(8 1 0.1)

(0 1 0.1)

(20 1 0.1)

(20 0.5 0.1)

(20 0 0.1)

(20 -1 0.1)

(8 -1 0.1)

);

Blocks

(

hex (0 1 2 311 12 13 14) (80 5 1)simple Grading (1 1 1)

hex (3 2 4 514 13 15 16)( 80 5 1) simple Grading (1 1 1)

hex (2 7 6 413 18 17 15)(120 5 1)simple grading (1 1 1)

hex (1 8 7 2 12 19 18 13)(120 5 1)simple grading (1 1 1)

hex (10 9 8 121 20 19 12)(120 10 1) simple Grading (1 1 1)

);

edges

(

);

boundary

(

inelt

{

Type of patch;

faces

(

(0 11 14 3)

(3 14 16 5)

);

}

Outlet

{

type of patch;

faces

(

(9 8 19 20)

(8 7 18 19)

(7 6 17 18)

);

}

front and back;

{

type empty;

faces

(

(11 12 13 14)

(14 13 15 16)

(13 18 17 15)

(12 19 18 13)

(21 20 19 12)

(0 3 2 1)

(3 5 4 2)

(2 4 6 7)

(1 2 7 8)

(10 1 8 9)

);

}

fixed walls

{

Type wall;

Faces

(

( 5 16 15 4)

(0 1 12 11)

(4 15 17 6)

(10 9 20 21)

(10 20 21 1)

);

}

);

Merge path pairs

(

);

//*******************************************************//

Foam file

{

format ascii;

class dictionary;

object block mesh dict;

}

//******************************************//

convert to meters 0.01;

vertices

(

(0 0 0)

(8 0 0)

(8 0.5 0)

(0 0.5 0)

(8 1 0)

(0 1 0)

(20 1 0)

(2 0 0.5 0)

(20 0 0)

(20-1 0)

(8 -1 0)

(0 0 0.1)

(8 0 0.1)

(8 0.5 0.1)

(0 0.5 0.1)

(8 1 0.1)

(0 1 0.1)

(20 1 0.1)

(20 0.5 0.1)

(20 0 0.1)

(20 -1 0.1)

(8 -1 0.1)

);

Blocks

(

hex (0 1 2 311 12 13 14) (80 5 1)simple Grading (0.2 5 1)

hex (3 2 4 514 13 15 16)( 80 5 1) simple Grading (0.2 0.2 1)

hex (2 7 6 413 18 17 15)(120 5 1)simple grading (5 0.2 1)

hex (1 8 7 2 12 19 18 13)(120 5 1)simple grading (5 5 1)

hex (10 9 8 121 20 19 12)(120 10 1) simple Grading (5 5 1)

);

edges

(

);

boundary

(

inelt

{

Type of patch;

faces

(

(0 11 14 3)

(3 14 16 5)

);

}

Outlet

{

type of patch;

faces

(

(9 8 19 20)

(8 7 18 19)

(7 6 17 18)

);

}

front and back;

{

type empty;

faces

(

(11 12 13 14)

(14 13 15 16)

(13 18 17 15)

(12 19 18 13)

(21 20 19 12)

(0 3 2 1)

(3 5 4 2)

(2 4 6 7)

(1 2 7 8)

(10 1 8 9)

);

}

fixed walls

{

Type wall;

Faces

(

( 5 16 15 4)

(0 1 12 11)

(4 15 17 6)

(10 9 20 21)

(10 20 21 1)

);

}

);

Merge path pairs

(

);

//*********************************************************//

foam file

{

format ascii;

class dictionary;

location “system”;

object control dict;

}

application icofoam;

start foam start time;

startTime 0;

stopat end time;

end Time 0.2;

delta 0.001;

write Control time Step;

write interval 20;

purge Write 0;

write Format ascii;

write Precision 6;

write compression off;

time Format general;

time precision 6;

run time modifiable true;

//*************************************************************//

foam file

{

format ascii;

class volscalar field;

object p;

}

//****************************************************//

dimensions [0 2 -2 0 0 0 0]

internal field uniform 0;

boundary field

{

Inlet

{

Type zero gradient;

}

Outlet

{

type fixed value;

Value uniform 0;

}

Fixed walls;

{

type zero gradient;

}

Front and back

{

type empty;

}

}

//****************************************//

foam file

{

format ascii;

Class volvectorfield;

Object u;

}

//******************************//

Dimensions [ 0 1 -1 0 0 0 0];

Internal field uniform (0 0 0);

Boundary field;

{

Inlet

{

type fixed value;

Value uniform (10 0 0);

}

Outlet

{

type zero gradient;

}

fixed walls

{

Type noslip;

}

front and back

{

type empty;

}

}

//**********************************//

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.