fan inlet

Help
aomedina
2006-01-09
2013-04-09
  • aomedina
    aomedina
    2006-01-09

    Here is a .flw and .GEO for a simple box with a fan (cylinder on it) can you write in an equation of the curled input flow of the fan?

    This explains it better: With the samples I can input a velocity with the three xyz directions/magnitudes. How can I input a velocity with an equation that looks like the curled flow coming from a fan?

    // INPUT DATA FILE for testing OpenFlower.
    // Created on 09/12/2004.

    TimeBegin 0.
    TimeEnd 1.0
    MaxTimeSteps 10
    CFL 0.2

    Medium water
    {
    rho    1.
    mu     0.001
    }

    Algorithm AlgoNavierStokes { eqn1 }

    Mesh gmsh
      {
      file box.msh
      frontiers
        {
        surface 1147 inlet
        surface 1146 outlet
        surface 1144 walls
        }
      }

    Equation navier_stokes_incompressible eqn1
      {
      Medium water
     
      // boundary conditions block
      boundary_condition wall walls 0. 0. 0
      boundary_condition velocity inlet  0. 0. 25.
      boundary_condition pressure_outlet outlet   0.0

      operator diffusion
      operator convection

      solver GMRES

    //  Initial_Condition File eqn1.save
      Initial_Condition Expr 0. 0. 0.

      }

    // Post_Processing block
    post_processing
      {
      probe eqn1.Velocity 0. 10. 0.001 position 1. 0.5 -0.5
      probe eqn1.Pressure 0. 10. 0.001 position 1. 0.5 -0.5
      global gmsh eqn1.Velocity 0. 3.0 0.0006
      global gmsh eqn1.Pressure 0. 3.0 0.0006
      }

    end

    //this ends the flw

    //here is the geo file

    Point(1) = {1, 0, 0, 0.08};
    Point(2) = {0, 0, 0, 0.08};
    Point(3) = {0, 1, 0, 0.08};
    Point(4) = {1, 1, 0, 0.08};
    Point(5) = {1, 1, 1, 0.08};
    Point(6) = {0, 0, 1, 0.08};
    Point(7) = {1, 0, 1, 0.08};
    Point(8) = {0, 1, 1, 0.08};
    Point(9) = {0.5, 0.5, 0, 0.08};
    Point(11) = {0.5, 0.25, 0, 0.02};
    Point(12) = {0.5, 0.75, 0, 0.02};
    Point(13) = {0.25, 0.5, 0, 0.02};
    Point(14) = {0.75, 0.5, 0, 0.02};
    Point(15) = {0.5, 0.75, -0.25, 0.08};
    Point(16) = {0.25, 0.5, -0.25, 0.08};
    Point(17) = {0.75, 0.5, -0.25, 0.08};
    Point(18) = {0.5, 0.25, -0.25, 0.08};
    Point(19) = {0.5, 0.5, -0.25, 0.08};
    Point(20) = {0.375, 0.5, -0.25, 0.08};
    Point(21) = {0.375, 0.5, 0, 0.02};
    Point(22) = {0.625, 0.5, -0.25, 0.08};
    Point(23) = {0.625, 0.5, 0, 0.02};
    Point(24) = {0.5, 0.375, 0, 0.02};
    Point(25) = {0.5, 0.375, -0.25, 0.08};
    Point(26) = {0.5, 0.625, 0, 0.02};
    Point(27) = {0.5, 0.625, -0.25, 0.08};
    Circle (2) = {11, 9, 13} Plane{0, 0, 1};
    Circle (3) = {13, 9, 12} Plane{0, 0, 1};
    Circle (4) = {12, 9, 14} Plane{0, 0, 1};
    Circle (5) = {14, 9, 11} Plane{0, 0, 1};
    Line (6) = {4, 3};
    Line (7) = {3, 2};
    Line (8) = {2, 1};
    Line (9) = {1, 4};
    Line (10) = {4, 5};
    Line (11) = {5, 8};
    Line (12) = {8, 3};
    Line (13) = {6, 8};
    Line (14) = {5, 7};
    Line (15) = {7, 6};
    Line (16) = {6, 2};
    Line (17) = {1, 7};
    Line (18) = {12, 15};
    Line (19) = {13, 16};
    Line (20) = {14, 17};
    Line (21) = {11, 18};
    Circle (22) = {15, 19, 16} Plane{0, 0, 1};
    Circle (23) = {16, 19, 18} Plane{0, 0, 1};
    Circle (24) = {18, 19, 17} Plane{0, 0, 1};
    Circle (25) = {17, 19, 15} Plane{0, 0, 1};
    Line (30) = {13, 2};
    Line (101) = {13, 3};
    Line (102) = {11, 2};
    Line (103) = {14, 1};
    Line (104) = {1, 11};
    Line (105) = {14, 4};
    Line (106) = {4, 12};
    Line (107) = {12, 3};
    Line (1002154) = {16, 20};
    Line (1002156) = {17, 22};
    Line (1002159) = {18, 25};
    Line (1002161) = {15, 27};
    Circle (1002162) = {26, 9, 21} Plane{0, 0, 1};
    Circle (1002163) = {21, 9, 24} Plane{0, 0, 1};
    Circle (1002164) = {24, 9, 23} Plane{0, 0, 1};
    Circle (1002165) = {23, 9, 26} Plane{0, 0, 1};
    Circle (1002166) = {27, 19, 20} Plane{0, 0, 1};
    Circle (1002167) = {20, 19, 25} Plane{0, 0, 1};
    Circle (1002168) = {25, 19, 22} Plane{0, 0, 1};
    Circle (1002169) = {22, 19, 27} Plane{0, 0, 1};
    Line (1002170) = {27, 26};
    Line (1002171) = {22, 23};
    Line (1002172) = {25, 24};
    Line (1002173) = {20, 21};
    Line Loop (1001111) = {21, -23, -19, -2};
    Ruled Surface (1111) = {1001111};
    Line Loop (1001113) = {20, -24, -21, -5};
    Ruled Surface (1113) = {1001113};
    Line Loop (1001115) = {25, -18, 4, 20};
    Ruled Surface (1115) = {1001115};
    Line Loop (1001117) = {22, -19, 3, 18};
    Ruled Surface (1117) = {1001117};
    Line Loop (1001119) = {106, 107, -6};
    Plane Surface (1119) = {1001119};
    Line Loop (1001121) = {3, 107, -101};
    Plane Surface (1121) = {1001121};
    Line Loop (1001123) = {101, 7, -30};
    Plane Surface (1123) = {1001123};
    Line Loop (1001127) = {102, 8, 104};
    Plane Surface (1127) = {1001127};
    Line Loop (1001129) = {5, -104, -103};
    Plane Surface (1129) = {1001129};
    Line Loop (1001131) = {103, 9, -105};
    Plane Surface (1131) = {1001131};
    Line Loop (1001133) = {105, 106, 4};
    Plane Surface (1133) = {1001133};
    Line Loop (1001135) = {6, -12, -11, -10};
    Plane Surface (1135) = {1001135};
    Line Loop (1001137) = {9, 10, 14, -17};
    Plane Surface (1137) = {1001137};
    Line Loop (1001139) = {8, 17, 15, 16};
    Plane Surface (1139) = {1001139};
    Line Loop (1001141) = {16, -7, -12, -13};
    Plane Surface (1141) = {1001141};
    Line Loop (1001143) = {13, -11, 14, 15};
    Plane Surface (1143) = {1001143};
    Line Loop (1002150) = {30, -102, 2};
    Plane Surface (2150) = {1002150};
    Line Loop (2002175) = {1002163, 1002164, 1002165, 1002162};
    Plane Surface (1002175) = {2002175};
    Line Loop (2002177) = {1002154, -1002166, -1002161, 22};
    Plane Surface (1002177) = {2002177};
    Line Loop (2002179) = {1002169, -1002161, -25, 1002156};
    Plane Surface (1002179) = {2002179};
    Line Loop (2002181) = {1002156, -1002168, -1002159, 24};
    Plane Surface (1002181) = {2002181};
    Line Loop (2002183) = {1002159, -1002167, -1002154, 23};
    Plane Surface (1002183) = {2002183};
    Line Loop (2002185) = {1002172, -1002163, -1002173, 1002167};
    Ruled Surface (1002185) = {2002185};
    Line Loop (2002187) = {1002173, -1002162, -1002170, 1002166};
    Ruled Surface (1002187) = {2002187};
    Line Loop (2002189) = {1002170, -1002165, -1002171, 1002169};
    Ruled Surface (1002189) = {2002189};
    Line Loop (2002191) = {1002171, -1002164, -1002172, 1002168};
    Ruled Surface (1002191) = {2002191};
    Surface Loop (2002152) = {1002185, 1002191, 1002189, 1002187, 1002175, 1002179, 1002177, 1002181, 1002183, 1137, 1131, 1129, 1113, 1115, 1117, 1111, 2150, 1123, 1121, 1119, 1133, 1135, 1141, 1139, 1127, 1143};
    Volume (1002152) = {2002152};
    Physical Surface (1144) = {1002185, 1002191, 1002189, 1002187, 1002175, 2150, 1135, 1119, 1133, 1131, 1129, 1113, 1115, 1117, 1111, 1123, 1121, 1141, 1139, 1127, 1137};
    Physical Surface (1146) = {1143};
    Physical Surface (1147) = {1002179, 1002177, 1002181, 1002183};
    Physical Volume (1002153) = {1002152};

     
    • Hi Aomedina,

      Here are some clues for your specific problem:

      An equation that would represent your inlet for the fan would be something like:
      u = -(y-0.5)*0.2
      v =  (x-0.5)*0.2
      w = 2.0

      It is centered on a circle of center O(x=0.5 ; y=0.5) and on the plan z=constant.
      The magnitude of the tangential velocity is adjusted with the 0.2 factor.
      The inlet normal flowrate is 2.0 in our case.

      Also, find below a .geo and a .flw file that look nicer (in terms of mesh optimization and geometrical created entities) than the original ones.

      Hope it helps !
      VortexFlow.

      .geo File:
      lc = 0.03;
      neg = -0.25;
      pos = 1.0;
      nt = 10;
      nT = 20;

      Point(1) = {1, 0, 0, 0.08};
      Point(2) = {0, 0, 0, 0.08};
      Point(3) = {0, 1, 0, 0.08};
      Point(4) = {1, 1, 0, 0.08};
      Point(9) = {0.5, 0.5, 0, 0.08};
      Point(11) = {0.5, 0.25, 0, lc};
      Point(12) = {0.5, 0.75, 0, lc};
      Point(13) = {0.25, 0.5, 0, lc};
      Point(14) = {0.75, 0.5, 0, lc};
      Point(21) = {0.375, 0.5, 0, lc};
      Point(23) = {0.625, 0.5, 0, lc};
      Point(24) = {0.5, 0.375, 0, lc};
      Point(26) = {0.5, 0.625, 0, lc};

      Circle(1) = {13,9,12};
      Circle(2) = {12,9,14};
      Circle(3) = {14,9,11};
      Circle(4) = {11,9,13};
      Circle(5) = {21,9,26};
      Circle(6) = {26,9,23};
      Circle(7) = {23,9,24};
      Circle(8) = {24,9,21};
      Line(9) = {3,4};
      Line(10) = {4,1};
      Line(11) = {1,2};
      Line(12) = {2,3};
      Line Loop(13) = {9,10,11,12};
      Line Loop(14) = {2,3,4,1};
      Plane Surface(15) = {13,14};
      Line Loop(16) = {6,7,8,5};
      Plane Surface(17) = {14,16};
      Plane Surface(18) = {16};

      Extrude Surface {15, {0.0,0.0,pos}} { Recombine; Layers { {nT}, {9000}, {1} }; };
      Extrude Surface {17, {0.0,0.0,pos}} { Recombine; Layers { {nT}, {9000}, {1} }; };
      Extrude Surface {18, {0.0,0.0,pos}} { Recombine; Layers { {nT}, {9000}, {1} }; };

      Extrude Surface {17, {0.0,0.0,neg}} { Recombine; Layers { {nt}, {9000}, {1} }; };

      // walls
      Physical Surface(1) = {15,18,31,43,35,39,137,149,141,145,153,157,161,165};
      // outlet
      Physical Surface(2) = {60,102,124};
      // inlet
      Physical Surface(3) = {166};

      Physical Volume(100) = {9000};

      .flw File:
      TimeBegin 0.
      TimeEnd 1.0
      MaxTimeSteps 1000
      CFL 0.4

      Medium water
      {
      rho    1.
      mu     0.001
      }

      Algorithm AlgoNavierStokes { eqn1 }

      Mesh gmsh
        {
        file simplified.msh
        frontiers
          {
          surface 3 inlet
          surface 2 outlet
          surface 1 walls
          }
        }

      Equation navier_stokes_incompressible eqn1
        {
        Medium water
       
        // boundary conditions block
        boundary_condition wall walls 0. 0. 0
        boundary_condition velocity inlet  x*0.5-0.25 0.25-0.5*y 2.0
        boundary_condition pressure_outlet outlet   0.0

        operator diffusion
        operator convection
        solver GMRES
        Initial_Condition Expr 0. 0. 2.0
        }

      // Post_Processing block
      post_processing
        {
        probe eqn1.Velocity 0. 10. 10.0e-8 position 1. 0.5 -0.5
        probe eqn1.Pressure 0. 10. 10.0e-8 position 1. 0.5 -0.5
        global tecplot eqn1.Velocity 0. 3.0 0.01
        global tecplot eqn1.Pressure 0. 3.0 0.01
        }

      end

       
    • I tried this - pretty cool, I also tried reversing the flow direction from what the above file has,
      ( boundary_condition velocity inlet -x*0.5-0.25 -0.25-0.5*y -2.0 also works fine.

      I have been playing around with Netgen 4.4 which can import STEP files from a cad system (pro-e)
      and export a .msh file readable by gmsh, but unfortunately cannot get surfaces to apply boundary conditions
      does anyone have a work around for this ?

       
    • read my least post about the stl importer.  Also From the GMSH forum, I know that they are going to release in the coming moths a version that will open STEP and IGES by using OPENcascade the 3-d open standard.

      From there to actually getting a mesh for openflower, I have no idea how it may play out. But I think my perl script will actually do some good. The problem with it right now is that it repeats lines. I'm fixing this today and then re posting it tomorrow or so. Last time it took my like a week to figure out how to kill repeated points, so I might also get stuck on lines. Cuz its not just filtering, but you need to keep the right hand rule and be able to know wich point number is each point after it has been repeated once. Same thing for lines. ech line loop has to know what line number to use if it encounters a repeated line.

      Alfonso

       
    • The Stl importer is still working well. I go to PRo/e and then save an assembly to IGES, reimport that then save as stl and import in GMSH. Importing step directly I haven't figured out how to apply boundary conditions.