
//--------------------------------------------------------------------------------------------------
// user input:
//--------------------------------------------------------------------------------------------------

// column length and radius
collen = 1;
colrad = 1;

// element size
lc = 0.5;
//--------------------------------------------------------------------------------------------------




//--------------------------------------------------------------------------------------------------
// generate column...
//--------------------------------------------------------------------------------------------------


//------ inlet surface -----------------------------------------------------------------------------
p00 = newp; Point(p00) = {        0,       0, 0, lc };
p01 = newp; Point(p01) = {   colrad,       0, 0, lc };
p02 = newp; Point(p02) = {        0,  colrad, 0, lc };
p03 = newp; Point(p03) = {  -colrad,       0, 0, lc };
p04 = newp; Point(p04) = {        0, -colrad, 0, lc };

l01 = newl; Circle(l01) = { p01, p00, p02 };
l02 = newl; Circle(l02) = { p02, p00, p03 };
l03 = newl; Circle(l03) = { p03, p00, p04 };
l04 = newl; Circle(l04) = { p04, p00, p01 };

ll1 = newll; Line Loop(ll1) = { l01, l02, l03, l04 };

s1 = news;   Plane Surface(s1) = { ll1 };
//--------------------------------------------------------------------------------------------------



//------ inlet volume ------------------------------------------------------------------------------
extr1[] = Extrude { 0, 0, collen} { Surface{ s1 }; };



Physical Surface("inlet")  = { s1 };
Physical Surface("outlet") = { extr1[0] };
Physical Surface("wall")   = { extr1[{2:5}] };

Physical Volume ("fluid") = { extr1[1] };
